File: dynlink.patch

package info (click to toggle)
wcslib 5.16-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,488 kB
  • ctags: 15,924
  • sloc: ansic: 30,968; lex: 7,902; fortran: 6,608; sh: 3,572; sed: 447; pascal: 153; makefile: 12
file content (118 lines) | stat: -rw-r--r-- 3,527 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
From: Ole Streicher <olebole@debian.org>
Date: Sun, 15 Jan 2017 16:35:33 +0100
Subject: Use dynamic linking for wcslib-tools instead of static

---
 C/GNUmakefile      |  4 +++-
 C/test/tdis3       |  3 +++
 C/test/twcslint    |  3 +++
 pgsbox/GNUmakefile |  4 +++-
 utils/GNUmakefile  | 17 +++++++----------
 5 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/C/GNUmakefile b/C/GNUmakefile
index 2cc311b..6d2305d 100644
--- a/C/GNUmakefile
+++ b/C/GNUmakefile
@@ -246,7 +246,9 @@ $(SHRLIB) : $(PICLIB)
 	     trap 'cd .. ; $(RM) -r tmp' 0 1 2 3 15 ; \
 	     $(AR) x ../$(PICLIB) && \
 	     $(SHRLD) -o $@ *.o $(LDFLAGS) $(LIBS) && \
-	     mv $@ ..
+	     mv $@ .. && \
+	     ln -sf $@ ../$(SONAME) && \
+	     ln -sf $(SONAME) ../$(SHRLN)
 
 $(PICLIB) : $(MODULES:%.o=$(PICLIB)(%.o)) ;
 
diff --git a/C/test/tdis3 b/C/test/tdis3
index 5916345..79b5847 100644
--- a/C/test/tdis3
+++ b/C/test/tdis3
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:.
+  export LD_LIBRARY_PATH
+
   echo "Testing WCSLIB's handling of translated distortions (tdis3)"
   echo "-----------------------------------------------------------"
 
diff --git a/C/test/twcslint b/C/test/twcslint
index 83721a5..019eb90 100644
--- a/C/test/twcslint
+++ b/C/test/twcslint
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+  LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:.
+  export LD_LIBRARY_PATH
+
   exec 1>twcslint.out 2>&1
 
   echo "Testing WCSLIB syntax checker for FITS WCS keyrecords (twcslint)"
diff --git a/pgsbox/GNUmakefile b/pgsbox/GNUmakefile
index ed2eeb3..4891d99 100644
--- a/pgsbox/GNUmakefile
+++ b/pgsbox/GNUmakefile
@@ -118,7 +118,9 @@ $(SHRLIB) : $(PICLIB)
 	     trap 'cd .. ; $(RM) -r tmp' 0 1 2 3 15 ; \
 	     $(AR) x ../$(PICLIB) && \
 	     $(SHRLD) -o $@ *.o ../$(WCSSHR) $(LDFLAGS) $(PGPLOTLIB) $(FLIBS) && \
-	     mv $@ ..
+	     mv $@ .. && \
+	     ln -sf $@ ../$(SONAME) && \
+	     ln -sf $(SONAME) ../$(SHRLN)
 
 $(PICLIB) : $(MODULES:%.o=$(PICLIB)(%.o)) ;
 
diff --git a/utils/GNUmakefile b/utils/GNUmakefile
index 230c981..0a49383 100644
--- a/utils/GNUmakefile
+++ b/utils/GNUmakefile
@@ -38,9 +38,6 @@ endif
 
 MAN := $(addsuffix .1,$(UTILS))
 
-WCSLIB    := ../C/$(WCSLIB)
-PGSBOXLIB := ../pgsbox/libpgsbox-$(LIBVER).a
-
 ifneq "$(GETWCSTAB)" ""
   GETWCSTAB := ../C/$(GETWCSTAB)
 endif
@@ -70,20 +67,20 @@ HPXcvt : HPXcvt.c
 	   $(LD) -o $@ $@.o $(LDFLAGS) $(CFITSIOLIB) $(LIBS)
 	-@ $(RM) $@.o
 
-wcsware : wcsware.c $(GETWCSTAB) $(WCSLIB)
+wcsware : wcsware.c $(GETWCSTAB) ../C/$(WCSLIB)
 	-@ echo ''
 	   $(CC) -DDO_CFITSIO $(CPPFLAGS) -I../pgsbox -I../C $(CFITSIOINC) \
 	     $(CFLAGS) -c -o $@.o $<
-	   $(LD) -o $@ $@.o $(GETWCSTAB) $(LDFLAGS) $(CFITSIOLIB) $(WCSLIB) \
-	     $(FLIBS) $(LIBS)
+	   $(LD) -o $@ $@.o $(GETWCSTAB) $(LDFLAGS) $(CFITSIOLIB) -L../C -lwcs \
+	     $(LIBS)
 	-@ $(RM) $@.o
 
-wcsgrid : wcsgrid.c $(GETWCSTAB) $(PGSBOXLIB) $(WCSLIB)
+wcsgrid : wcsgrid.c $(GETWCSTAB) ../pgsbox/libpgsbox-$(LIBVER).a ../C/$(WCSLIB)
 	-@ echo ''
 	   $(CC) -DDO_CFITSIO $(CPPFLAGS) -I../pgsbox -I../C $(PGPLOTINC) \
 	     $(CFITSIOINC) $(CFLAGS) -c -o $@.o $<
-	   $(LD) -o $@ $@.o $(GETWCSTAB) $(LDFLAGS) $(PGSBOXLIB) \
-	     $(PGPLOTLIB) $(CFITSIOLIB) $(WCSLIB) $(FLIBS) $(LIBS)
+	   $(LD) -o $@ $@.o $(GETWCSTAB) $(LDFLAGS) -L../pgsbox -lpgsbox \
+	     $(CPGPLOTLIB) $(CFITSIOLIB) -L../C -lwcs $(LIBS)
 	-@ $(RM) $@.o
 
 ../C/getwcstab.o :
@@ -102,7 +99,7 @@ $(PGSBOXLIB) :
 	-@ echo ''
 	   $(MAKE) -C ../pgsbox lib
 
-$(WCSLIB) :
+../C/$(WCSLIB) :
 	-@ echo ''
 	   $(MAKE) -C ../C lib