Package: vcg
Version: 1.30debian-5
Severity: important
Tags: patch

Hi,

currently this package FTBFS on GNU/kFreeBSD since it uses directly the
output of "uname -s" in filenames, although this output can contain
slashes.

The attached patch catches GNU/kFreeBSD as well as GNU(/Hurd) and
make them look like Linux, which allows at least a fine build on
GNU/kFreeBSD.

Cheers,

-- 
Cyril Brulebois
--- vcg-1.30debian/Makefile     2003-02-20 22:06:27.000000000 +0100
+++ vcg-1.30debian/Makefile     2007-03-20 16:41:33.000000000 +0100
@@ -24,6 +24,10 @@
 
 SHELL = /bin/sh
 
+# GNU/kFreeBSD and GNU(/Hurd) are like Linux
+UNAME = $(shell uname -s | sed -e 's/GNU\/kFreeBSD/Linux/' | sed -e 
's/GNU/Linux/')
+
+
 #-------------------------- Rules ------------------------------
 
 #all: stamp-all
@@ -54,7 +58,7 @@
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/rm -f Makefile x11setup x11setup2; \
                  xmkmf; make | sed -e "s/^make.*//" > x11setup); \
-               (cd preconf; cd X11cc`uname -s`; \
+               (cd preconf; cd X11cc$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -67,7 +71,7 @@
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/rm -f Makefile x11setup x11setup2; \
                  xmkmf; make | sed -e "s/^make.*//" > x11setup); \
-               (cd preconf; cd X11gcc`uname -s`; \
+               (cd preconf; cd X11gcc$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -80,7 +84,7 @@
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/rm -f Makefile x11setup x11setup2; \
                  xmkmf; make | sed -e "s/^make.*//" > x11setup); \
-               (cd preconf; cd X11g++`uname -s`; \
+               (cd preconf; cd X11g++$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -93,7 +97,7 @@
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/rm -f Makefile x11setup x11setup2; \
                  xmkmf; make | sed -e "s/^make.*//" > x11setup); \
-               (cd preconf; cd X11c89`uname -s`; \
+               (cd preconf; cd X11c89$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -105,7 +109,7 @@
 xvcg_cc_noxmkmf:
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/cp ../x11setup ../x11setup2 .); \
-               (cd preconf; cd X11cc`uname -s`; \
+               (cd preconf; cd X11cc$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -117,7 +121,7 @@
 xvcg_gcc_noxmkmf:
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/cp ../x11setup ../x11setup2 .); \
-               (cd preconf; cd X11gcc`uname -s`; \
+               (cd preconf; cd X11gcc$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -129,7 +133,7 @@
 xvcg_c89_noxmkmf:
        if (test ! -r tMakefile) then \
                (cd preconf/X11; /bin/cp ../x11setup ../x11setup2 .); \
-               (cd preconf; cd X11c89`uname -s`; \
+               (cd preconf; cd X11c89$(UNAME); \
                  /bin/cp tMakefile ../../Make.tmp; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.tmp); \
@@ -140,7 +144,7 @@
 
 vcg_gcc:
        if (test ! -r tMakefile) then \
-               (cd preconf; cd SunVgcc`uname -s`; \
+               (cd preconf; cd SunVgcc$(UNAME); \
                  /bin/cp tMakefile ../../tMakefile; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.csh); \
@@ -148,7 +152,7 @@
 
 vcg_cc:
        if (test ! -r tMakefile) then \
-               (cd preconf; cd SunVcc`uname -s`; \
+               (cd preconf; cd SunVcc$(UNAME); \
                  /bin/cp tMakefile ../../tMakefile; \
                  /bin/cp globals.h ../../src; \
                  /bin/cp demo.csh ../../demo/demo.csh); \
@@ -160,29 +164,29 @@
        /bin/cp demo/demo.csh preconf/  
 
 prepare_x11gcc:
-       /bin/cp tMakefile preconf/X11gcc`uname -s`/     
-       /bin/cp src/globals.h preconf/X11gcc`uname -s`/ 
-       /bin/cp demo/demo.csh preconf/X11gcc`uname -s`/ 
+       /bin/cp tMakefile preconf/X11gcc$(UNAME)/       
+       /bin/cp src/globals.h preconf/X11gcc$(UNAME)/   
+       /bin/cp demo/demo.csh preconf/X11gcc$(UNAME)/   
 
 prepare_x11cc:
-       /bin/cp tMakefile preconf/X11cc`uname -s`/      
-       /bin/cp src/globals.h preconf/X11cc`uname -s`/  
-       /bin/cp demo/demo.csh preconf/X11cc`uname -s`/  
+       /bin/cp tMakefile preconf/X11cc$(UNAME)/        
+       /bin/cp src/globals.h preconf/X11cc$(UNAME)/    
+       /bin/cp demo/demo.csh preconf/X11cc$(UNAME)/    
 
 prepare_x11c89:
-       /bin/cp tMakefile preconf/X11c89`uname -s`/     
-       /bin/cp src/globals.h preconf/X11c89`uname -s`/ 
-       /bin/cp demo/demo.csh preconf/X11c89`uname -s`/ 
+       /bin/cp tMakefile preconf/X11c89$(UNAME)/       
+       /bin/cp src/globals.h preconf/X11c89$(UNAME)/   
+       /bin/cp demo/demo.csh preconf/X11c89$(UNAME)/   
 
 prepare_sungcc:
-       /bin/cp tMakefile preconf/SunVgcc`uname -s`/    
-       /bin/cp src/globals.h preconf/SunVgcc`uname -s`/        
-       /bin/cp demo/demo.csh preconf/SunVgcc`uname -s`/        
+       /bin/cp tMakefile preconf/SunVgcc$(UNAME)/      
+       /bin/cp src/globals.h preconf/SunVgcc$(UNAME)/  
+       /bin/cp demo/demo.csh preconf/SunVgcc$(UNAME)/  
 
 prepare_suncc:
-       /bin/cp tMakefile preconf/SunVcc`uname -s`/     
-       /bin/cp src/globals.h preconf/SunVcc`uname -s`/ 
-       /bin/cp demo/demo.csh preconf/SunVcc`uname -s`/ 
+       /bin/cp tMakefile preconf/SunVcc$(UNAME)/       
+       /bin/cp src/globals.h preconf/SunVcc$(UNAME)/   
+       /bin/cp demo/demo.csh preconf/SunVcc$(UNAME)/   
 
 xvcg vcg: tMakefile
        make -f tMakefile

Reply via email to