[X2Go-Commits] nx-libs.git - master (branch) updated: redist-server/3.5.0.17-7-g8f151d7

X2Go dev team git-admin at x2go.org
Fri Mar 22 22:34:02 CET 2013


The branch, master has been updated
       via  8f151d797b015b7d1070151e75d56587a7f3652f (commit)
      from  258902bec76cc4828ab7453df7406957ce93048a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8f151d797b015b7d1070151e75d56587a7f3652f
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Mar 22 22:33:40 2013 +0100

    Work-in patch from Jan Engehardt for working around different improper bash implementations of string-in-string replacing. (Fixes: #145).

-----------------------------------------------------------------------

Summary of changes:
 debian/Makefile.nx-libs    |   12 ++++++------
 debian/Makefile.replace.sh |   27 +++++++++++++++++++++++++++
 debian/changelog           |    3 +++
 debian/roll-tarballs.sh    |    1 +
 4 files changed, 37 insertions(+), 6 deletions(-)
 create mode 100644 debian/Makefile.replace.sh

The diff of changes is:
diff --git a/debian/Makefile.nx-libs b/debian/Makefile.nx-libs
index 74f0d3a..beb522c 100644
--- a/debian/Makefile.nx-libs
+++ b/debian/Makefile.nx-libs
@@ -93,23 +93,23 @@ install-full:
 	cp -aL nx-X11/exports/include/* nx-X11/.build-exports/include
 
 	# copy libs (for libnx-x11), we want the targets of the links
-	find nx-X11/exports/lib/ | grep -F ".so" | while read libpath; do \
+	. replace.sh; set -x; find nx-X11/exports/lib/ | grep -F ".so" | while read libpath; do \
 	    libfile=$$(basename $$libpath); \
 	    libdir=$$(dirname $$libpath); \
 	    link=$$(readlink $$libpath); \
 	\
-	    mkdir -p $${libdir//exports/.build-exports}; \
-	    cp -a $${libpath/$$libfile/$$link} $${libdir//exports/.build-exports}; \
+	    mkdir -p "$$(string_rep "$$libdir" exports .build-exports)"; \
+	    cp -a "$$(string_rep "$$libpath" "$$libfile" "$$link")" "$$(string_rep "$$libdir" exports .build-exports)"; \
 	done;
 
 	$(INSTALL_DIR) $(DESTDIR)$(NXLIBDIR)/X11
 	$(COPY_SYMLINK) nx-X11/.build-exports/lib/*.so* $(DESTDIR)$(NXLIBDIR)/X11/
 
-	find nx-X11/.build-exports/include/ -type d | grep -v "include/X11/bitmaps" | \
+	. replace.sh; set -x; find nx-X11/.build-exports/include/ -type d | grep -v "include/X11/bitmaps" | \
 	    while read dirname; do \
-	        $(INSTALL_DIR) $${dirname//"nx-X11/.build-exports/include"/"$(DESTDIR)$(PREFIX)/include/nx"}; \
+	        $(INSTALL_DIR) "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(PREFIX)/include/nx")"; \
 	        $(INSTALL_FILE) $${dirname}/*.h \
-	                        $${dirname//"nx-X11/.build-exports/include"/"$(DESTDIR)$(PREFIX)/include/nx"}/ || true; \
+	                        "$$(string_rep "$$dirname" nx-X11/.build-exports/include "$(DESTDIR)$(PREFIX)/include/nx")"/ || true; \
 	    done; \
 
 	$(INSTALL_DIR) $(DESTDIR)$(PREFIX)/include/nx/X11/bitmaps
diff --git a/debian/Makefile.replace.sh b/debian/Makefile.replace.sh
new file mode 100644
index 0000000..d47d92b
--- /dev/null
+++ b/debian/Makefile.replace.sh
@@ -0,0 +1,27 @@
+# from http://mywiki.wooledge.org/BashFAQ/021
+
+string_rep()
+{
+	# initialize vars
+	in=$1
+	unset out
+
+	# SEARCH must not be empty
+	test -n "$2" || return
+
+	while true; do
+		# break loop if SEARCH is no longer in "$in"
+		case "$in" in
+			*"$2"*) : ;;
+			*) break;;
+		esac
+
+		# append everything in "$in", up to the first instance of SEARCH, and REP, to "$out"
+		out=$out${in%%"$2"*}$3
+		# remove everything up to and including the first instance of SEARCH from "$in"
+		in=${in#*"$2"}
+	done
+
+	# append whatever is left in "$in" after the last instance of SEARCH to out, and print
+	printf '%s%s\n' "$out" "$in"
+}
diff --git a/debian/changelog b/debian/changelog
index 7260164..824d746 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,9 @@ nx-libs (2:3.5.0.18-0) UNRELEASED; urgency=low
   [ Mike Gabriel ]
   * Remove duplicate install of nxproxy from main Makefile. Spotted by Jan
     Engelhard.
+  * Work-in patch from Jan Engehardt for working around different
+    improper bash implementations of string-in-string replacing. (Fixes:
+    #145).
 
   [ Orion Poplawski ]
   * Fix wrong symlink direction of libNX_* files. (Fixes: #107).
diff --git a/debian/roll-tarballs.sh b/debian/roll-tarballs.sh
index b43de4b..57b3aad 100755
--- a/debian/roll-tarballs.sh
+++ b/debian/roll-tarballs.sh
@@ -120,6 +120,7 @@ mv -v debian/changelog doc/changelog
 
 # copy the top-level makefile if no quilt patch created it before
 test -f Makefile || test -f debian/Makefile.nx-libs && cp -v debian/Makefile.nx-libs Makefile
+test -f replace.sh || test -f debian/Makefile.replace.sh && cp -v debian/Makefile.replace.sh replace.sh
 
 # remove folders that we do not want to roll into the tarball
 rm -Rf ".pc/"


hooks/post-receive
-- 
nx-libs.git (NX (redistributed))

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "nx-libs.git" (NX (redistributed)).




More information about the x2go-commits mailing list