Tags: patch

The perl patching command given by Edmund results in this change:

--- debian/patches/linker-specific-changes.orig 2011-11-19 16:45:51.000000000
+1100
+++ debian/patches/linker-specific-changes      2015-08-03 14:16:16.518331208
+1000
@@ -65,7 +65,7 @@
  grtv00.o : $(DRVDIR)/imdef.h
  pgxwin.o : $(DRVDIR)/pgxwin.h
 -pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
-+pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h
/usr/include/zconf.h
++pndriv.o :
  
  x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
  

zconf.h moved from /usr/include/ to /usr/include/<arch>-<os>-<compiler>/
e.g. /usr/include/x86_64-linux-gnu/zconf.h.

I think what is needed here is a revised version of

   debian/patches/linker-specific-changes

which I have attached to this message.
  
-- 
Description: correct linker variables
 This patch set sets all the linker-specific variables correctly

---

Last-Update: 2011-11-18

Index: pgplot5-5.2.2/makemake
===================================================================
--- pgplot5-5.2.2.orig/makemake
+++ pgplot5-5.2.2/makemake
@@ -658,6 +658,8 @@ CPGPLOT_LIB=$CPGPLOT_LIB
 #
 SHARED_LIB=$SHARED_LIB
 SHARED_LD=$SHARED_LD
+SHARED_LD_PGPLOT_OPTS=$SHARED_LD_PGPLOT_OPTS
+SHARED_LD_CPGPLOT_OPTS=$SHARED_LD_CPGPLOT_OPTS
 #
 # The libraries that the shared PGPLOT library depends upon.
 # This is for systems that allow one to specify what libraries
@@ -667,6 +669,7 @@ SHARED_LD=$SHARED_LD
 # libraries when they link their executables.
 #
 SHARED_LIB_LIBS=$SHARED_LIB_LIBS
+SHARED_LIB_CPGPLOT_LIBS=$SHARED_LIB_CPGPLOT_LIBS
 #
 # Ranlib command if required
 #
@@ -806,7 +809,8 @@ grexec.o: grexec.f
 # libraries.
 #-----------------------------------------------------------------------
 
-lib : libpgplot.a $(SHARED_LIB)
+#lib : libpgplot.a $(SHARED_LIB)
+lib : libpgplot.a
 
 libpgplot.a : $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
           $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
@@ -816,6 +820,16 @@ libpgplot.a : $(PG_ROUTINES) $(PG_NON_ST
                $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq`
        $(RANLIB) libpgplot.a
 
+#shared: $(PG_ROUTINES) $(PG_NON_STANDARD) $(GR_ROUTINES) \
+#         $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+#         $(SHARED_LD)
+
+shared: $(PG_ROUTINES) $(PG_NON_STANDARD) \
+       $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
+       $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
+       $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
+       $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
+
 EOD
 
 # Emit the shared library dependency if requested.
@@ -824,7 +838,7 @@ if test -n "$SHARED_LIB" -a -n "$SHARED_
 cat >> makefile << \EOD
 $(SHARED_LIB): $(PG_ROUTINES) $(PG_NON_STANDARD) \
        $(GR_ROUTINES) $(DISPATCH_ROUTINE) $(DRIVERS) $(SYSTEM_ROUTINES)
-       $(SHARED_LD) `ls $(PG_ROUTINES) \
+       $(SHARED_LD) $(SHARED_LD_PGPLOT_OPTS) `ls $(PG_ROUTINES) \
        $(PG_NON_STANDARD) $(GR_ROUTINES) $(DISPATCH_ROUTINE) \
        $(DRIVERS) $(SYSTEM_ROUTINES) | sort | uniq` $(SHARED_LIB_LIBS)
 EOD
@@ -1019,13 +1033,15 @@ EOD
 
 cat >> makefile << \EOD
 
+DEB_HOST_MULTIARCH=$(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
 # Miscellaneous include files required by drivers
 
 griv00.o : $(DRVDIR)/gadef.h $(DRVDIR)/gmdef.h $(DRVDIR)/gphdef.h
 grivas.o : $(DRVDIR)/gadef.h
 grtv00.o : $(DRVDIR)/imdef.h
 pgxwin.o : $(DRVDIR)/pgxwin.h
-pndriv.o : ./png.h ./pngconf.h ./zlib.h ./zconf.h
+pndriv.o : /usr/include/png.h /usr/include/pngconf.h /usr/include/zlib.h 
/usr/include/$(DEB_HOST_MULTIARCH)/zconf.h
 
 x2driv.o figdisp_comm.o: $(DRVDIR)/commands.h
 
@@ -1039,6 +1055,8 @@ cpg:      libcpgplot.a cpgplot.h cpgdemo
        @echo 'will be needed.'
        @echo ' '
 
+cpg-shared: libcpgplot.so
+
 pgbind: $(SRC)/cpg/pgbind.c
        $(CCOMPL) $(CFLAGC) $(SRC)/cpg/pgbind.c -o pgbind
 
@@ -1050,6 +1068,13 @@ libcpgplot.a cpgplot.h: $(PG_SOURCE) pgb
        $(RANLIB) libcpgplot.a
        rm -f cpg*.o
 
+libcpgplot.so: $(PG_SOURCE) pgbind
+       ./pgbind $(PGBIND_FLAGS) -w $(PG_SOURCE)
+       $(CCOMPL) -c $(CFLAGC) cpg*.c
+       rm -f cpg*.c
+       $(SHARED_LD) $(SHARED_LD_CPGPLOT_OPTS) cpg*.o $(SHARED_LIB_CPGPLOT_LIBS)
+       rm -f cpg*.o
+
 cpgdemo: cpgplot.h $(SRC)/cpg/cpgdemo.c libcpgplot.a
        $(CCOMPL) $(CFLAGD) -c -I. $(SRC)/cpg/cpgdemo.c
        $(FCOMPL) -o cpgdemo cpgdemo.o $(CPGPLOT_LIB) $(LIBS)

Reply via email to