Subject: Bug#84: DESTDIR and OPTFLAGS patches for nx-libs

From: Mike Gabriel <[email-masked]>
Date: Wed, 12 Dec 2012 13:03:20 +0100

Package: nx-libs

Patches attached for nx-libs:
- bin/Makefile doesn't support DESTDIR.  The attached   
nx-libs-destdir.patch partially addresses that.
- The various nx*/configure.in files do not honor passed in compiler  
flags. The attached nx-libs-optflags.patch fixes that.  Note also  
though that CFLAGS is used in some and CPPFLAGS in others.

----- Weitergeleitete Nachricht von [email-masked] -----
      Datum: Tue, 11 Dec 2012 16:11:02 -0700
        Von: Orion Poplawski <[email-masked]>
Antwort an: [email-masked]
    Betreff: [X2Go-Dev] x2go for Fedora packaging issues
         An: [email-masked]

[...]

Thank you for your attention.

- Orion

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA, Boulder Office                  FAX: 303-415-9702
3380 Mitchell Lane                       [email-masked]
Boulder, CO 80301                   http://www.nwra.com

----- Ende der weitergeleiteten Nachricht -----

-- 

DAS-NETZWERKTEAM
mike gabriel, rothenstein 5, 24214 neudorf-bornstein
fon: +49 (1520) 1976 148

GnuPG Key ID 0x25771B31
mail: [email-masked], http://das-netzwerkteam.de

freeBusy:
https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb
diff -up nx-libs-3.5.0.16/bin/Makefile.destdir nx-libs-3.5.0.16/bin/Makefile
--- nx-libs-3.5.0.16/bin/Makefile.destdir	2012-11-10 06:40:56.000000000 -0700
+++ nx-libs-3.5.0.16/bin/Makefile	2012-12-11 13:32:26.589921544 -0700
@@ -17,13 +17,14 @@ X2GOLIBDIR=$(PREFIX)/lib/x2go
 	echo "Nothing to do for $@..."
 
 install:
-	$(INSTALL_DIR) $(X2GOLIBDIR)/bin/
-	ln -sf $(NXLIBDIR)/bin/nxagent $(X2GOLIBDIR)/bin/x2goagent
-	find nx* | while read file; do $(INSTALL_PROGRAM) $$file $(BINDIR)/; done
-	find x2go* | while read file; do $(INSTALL_PROGRAM) $$file $(BINDIR)/; done
+	$(INSTALL_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/
+	ln -sf $(NXLIBDIR)/bin/nxagent $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent
+	[ ! -d $(DESTDIR)$(BINDIR) ] && $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
+	find nx* | while read file; do $(INSTALL_PROGRAM) $$file $(DESTDIR)$(BINDIR)/; done
+	find x2go* | while read file; do $(INSTALL_PROGRAM) $$file $(DESTDIR)$(BINDIR)/; done
 
 uninstall:
-	find nx* | while read file; do rm -f $(BINDIR)/$$file; done
-	find x2go* | while read file; do rm -f $(BINDIR)/$$file; done
-	$(RM_FILE) $(X2GOLIBDIR)/bin/x2goagent
-	$(RM_DIR) $(X2GOLIBDIR)/bin/
+	find nx* | while read file; do rm -f $(DESTDIR)$(BINDIR)/$$file; done
+	find x2go* | while read file; do rm -f $(DESTDIR)$(BINDIR)/$$file; done
+	$(RM_FILE) $(DESTDIR)$(X2GOLIBDIR)/bin/x2goagent
+	$(RM_DIR) $(DESTDIR)$(X2GOLIBDIR)/bin/
diff -up nx-libs-3.5.0.16/nxcomp/configure.in.optflags nx-libs-3.5.0.16/nxcomp/configure.in
--- nx-libs-3.5.0.16/nxcomp/configure.in.optflags	2012-11-10 06:40:55.000000000 -0700
+++ nx-libs-3.5.0.16/nxcomp/configure.in	2012-12-11 13:13:19.390229196 -0700
@@ -7,8 +7,8 @@ AC_PREREQ(2.13)
 
 dnl Set our default compilation flags.
 
-CXXFLAGS="-O3 -fno-rtti -fno-exceptions"
-CFLAGS="-O3"
+CXXFLAGS="$CXXFLAGS -O3 -fno-rtti -fno-exceptions"
+CFLAGS="$CFLAGS -O3"
 
 dnl Reset default linking directives.
 
diff -up nx-libs-3.5.0.16/nxcompext/configure.in.optflags nx-libs-3.5.0.16/nxcompext/configure.in
--- nx-libs-3.5.0.16/nxcompext/configure.in.optflags	2012-11-10 06:40:55.000000000 -0700
+++ nx-libs-3.5.0.16/nxcompext/configure.in	2012-12-11 13:15:26.712576302 -0700
@@ -7,8 +7,8 @@ AC_PREREQ(2.13)
 
 dnl Reset default compilation flags.
 
-CXXFLAGS="-O3"
-CFLAGS="-O3"
+CXXFLAGS="$CXXFLAGS -O3"
+CFLAGS="$CFLAGS -O3"
 
 dnl Reset default linking directives.
 
diff -up nx-libs-3.5.0.16/nxcompshad/configure.in.optflags nx-libs-3.5.0.16/nxcompshad/configure.in
--- nx-libs-3.5.0.16/nxcompshad/configure.in.optflags	2012-11-10 06:40:56.000000000 -0700
+++ nx-libs-3.5.0.16/nxcompshad/configure.in	2012-12-11 13:13:25.915196300 -0700
@@ -7,8 +7,8 @@ AC_PREREQ(2.13)
 
 dnl Reset default compilation flags.
 
-CXXFLAGS="-O3"
-CPPFLAGS="-O3"
+CXXFLAGS="$CXXFLAGS -O3"
+CPPFLAGS="$CPPFLAGS -O3"
 
 dnl Reset default linking directives.
 
diff -up nx-libs-3.5.0.16/nxproxy/configure.in.optflags nx-libs-3.5.0.16/nxproxy/configure.in
--- nx-libs-3.5.0.16/nxproxy/configure.in.optflags	2012-11-10 06:40:55.000000000 -0700
+++ nx-libs-3.5.0.16/nxproxy/configure.in	2012-12-11 13:16:19.955301045 -0700
@@ -7,8 +7,8 @@ AC_PREREQ(2.13)
 
 dnl Reset default compilation flags.
 
-CXXFLAGS="-O3"
-CPPFLAGS="-O3"
+CXXFLAGS="$CXXFLAGS -O3"
+CPPFLAGS="$CPPFLAGS -O3"
 
 dnl Prefer headers and libraries from nx-X11 if present.
 
diff -up nx-libs-3.5.0.16/nx-X11/programs/xterm/configure.optflags nx-libs-3.5.0.16/nx-X11/programs/xterm/configure