]> git.pld-linux.org Git - packages/netcdf.git/blob - netcdf-shared.patch
- outdated hack
[packages/netcdf.git] / netcdf-shared.patch
1 --- netcdf-3.5.1/src/Makefile.orig      2004-01-27 15:08:14.000000000 +0100
2 +++ netcdf-3.5.1/src/Makefile   2004-02-11 23:29:29.498007248 +0100
3 @@ -27,11 +27,12 @@
4  
5  # I moved fortran to the bottom of the list, sometimes AIX make get's confused 
6  # if the C library and the fortran library are built in the same second. - Ed
7 -all:           libsrc/all      \
8 +# but fortran objects are linked into C library, so must it be built first --q
9 +all:           fortran/all     \
10 +               libsrc/all      \
11                 ncdump/all      \
12                 ncgen/all       \
13                 cxx/all \
14 -               fortran/all     \
15                 f90/all 
16  
17  test:          fortran/all \
18 diff -Nur netcdf-3.5.0.orig/src/cxx/Makefile netcdf-3.5.0/src/cxx/Makefile
19 --- netcdf-3.5.0.orig/src/cxx/Makefile  Wed May 12 21:38:30 1999
20 +++ netcdf-3.5.0/src/cxx/Makefile       Wed Apr  4 23:16:55 2001
21 @@ -11,19 +11,19 @@
22                   nctst.cpp ncvalues.cpp ncvalues.h netcdf.cpp netcdfcpp.h \
23                   expected cxxdoc.tex cxxdoc.ps texinfo.tex netcdf.hh
24  
25 -LIBRARY                = libnetcdf_c++.a
26 -lib_netcdf     = ../libsrc/libnetcdf.a
27 -ld_netcdf      = -L../libsrc -lnetcdf
28 +LIBRARYL       = libnetcdf_c++.la
29 +lib_netcdf     = ../libsrc/libnetcdf.la
30 +ld_netcdf      = -L../libsrc/.libs -lnetcdf
31  
32  HEADER1                = netcdfcpp.h
33  HEADER2                = ncvalues.h
34  HEADER3                = netcdf.hh
35  
36 -libs           =  $(LIBRARY) $(ld_netcdf) $(LIBS)
37 +libs           = -L.libs -lnetcdf_c++ $(ld_netcdf) $(LIBS)
38  
39  purify         = purify
40  
41 -LIB_OBJS       = netcdf.o ncvalues.o
42 +LIB_OBJS       = netcdf.lo ncvalues.lo
43  
44  # a test program that uses some of the draft C++ interface
45  prog           = nctst
46 @@ -33,16 +33,19 @@
47                   *.cps *.dvi *.fns \
48                   *.log *~ *.gs *.aux *.cp *.fn *.ky *.pg *.toc *.tp *.vr
49  
50 -all:           $(LIBRARY) $(prog)
51 +all:           $(LIBRARYL) $(prog)
52 +
53 +libnetcdf_c++.la: $(LIB_OBJS)
54 +       libtool --mode=link --tag=CXX $(CXX) -o libnetcdf_c++.la $(LIB_OBJS) $(LDFLAGS) -rpath $(LIBDIR) $(lib_netcdf)
55  
56  test:   $(prog) FORCE
57         ./$(prog) > test.out
58         @cmp expected test.out && \
59             echo "*** C++ test successful ***" ;
60  
61 -install:       $(LIBDIR)/$(LIBRARY) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\
62 +install:       $(LIBRARYL) $(INCDIR)/$(HEADER1) $(INCDIR)/$(HEADER2)\
63                 $(INCDIR)/$(HEADER3)
64 -
65 +       libtool --mode=install install $(LIBRARYL) $(LIBDIR)
66  
67  uninstall:
68         -rm -f $(LIBDIR)/$(LIBRARY)
69 @@ -50,7 +53,7 @@
70         -rm -f $(INCDIR)/$(HEADER2)
71         -rm -f $(INCDIR)/$(HEADER3)
72  
73 -$(prog) : $(prog_objs) $(LIBRARY) $(lib_netcdf)
74 +$(prog) : $(prog_objs) $(LIBRARYL) $(lib_netcdf)
75         $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(prog_objs) $(libs)
76  
77  nctst_src: nctst.cpp netcdf.cpp ncvalues.cpp
78 diff -Nur netcdf-3.5.0.orig/src/fortran/Makefile netcdf-3.5.0/src/fortran/Makefile
79 --- netcdf-3.5.0.orig/src/fortran/Makefile      Wed Feb 21 22:20:26 2001
80 +++ netcdf-3.5.0/src/fortran/Makefile   Wed Apr  4 23:18:04 2001
81 @@ -13,20 +13,20 @@
82  ld_netcdf      = $(LIBRARY)
83  HEADER         = netcdf.inc
84  LIB_OBJS       = \
85 -                 fort-attio.o  \
86 -                 fort-control.o        \
87 -                 fort-dim.o    \
88 -                 fort-genatt.o \
89 -                 fort-geninq.o \
90 -                 fort-genvar.o \
91 -                 fort-lib.o    \
92 -                 fort-misc.o   \
93 -                 fort-v2compat.o       \
94 -                 fort-vario.o  \
95 -                 fort-var1io.o \
96 -                 fort-varaio.o \
97 -                 fort-varmio.o \
98 -                 fort-varsio.o
99 +                 fort-attio.lo \
100 +                 fort-control.lo       \
101 +                 fort-dim.lo   \
102 +                 fort-genatt.lo        \
103 +                 fort-geninq.lo        \
104 +                 fort-genvar.lo        \
105 +                 fort-lib.lo   \
106 +                 fort-misc.lo  \
107 +                 fort-v2compat.lo      \
108 +                 fort-vario.lo \
109 +                 fort-var1io.lo        \
110 +                 fort-varaio.lo        \
111 +                 fort-varmio.lo        \
112 +                 fort-varsio.lo
113  #
114  
115  MANUAL         = netcdf.3f
116 @@ -69,7 +69,7 @@
117  #
118  
119  
120 -all:           $(LIBRARY) $(MANUAL)
121 +all:           $(LIB_OBJS) $(MANUAL)
122  
123  test:          ftest FORCE
124         ./ftest
125 diff -Nur netcdf-3.5.0.orig/src/libsrc/Makefile netcdf-3.5.0/src/libsrc/Makefile
126 --- netcdf-3.5.0.orig/src/libsrc/Makefile       Fri Feb 25 16:14:14 2000
127 +++ netcdf-3.5.0/src/libsrc/Makefile    Wed Apr  4 23:21:35 2001
128 @@ -7,7 +7,7 @@
129  
130  INCLUDES = -I.
131  
132 -LIBRARY        = libnetcdf.a
133 +LIBRARYL       = libnetcdf.la
134  ld_netcdf      = -L. -lnetcdf
135  
136  HEADER = netcdf.h
137 @@ -54,7 +54,23 @@
138         t_ncxx.c \
139         t_ncx.c
140  
141 -LIB_OBJS = $(LIB_CSRCS:.c=.o)
142 +LIB_OBJS = $(LIB_CSRCS:.c=.lo)
143 +
144 +LIB_FOBJS      = \
145 +                 ../fortran/fort-attio.lo      \
146 +                 ../fortran/fort-control.lo    \
147 +                 ../fortran/fort-dim.lo        \
148 +                 ../fortran/fort-genatt.lo     \
149 +                 ../fortran/fort-geninq.lo     \
150 +                 ../fortran/fort-genvar.lo     \
151 +                 ../fortran/fort-lib.lo        \
152 +                 ../fortran/fort-misc.lo       \
153 +                 ../fortran/fort-v2compat.lo   \
154 +                 ../fortran/fort-vario.lo      \
155 +                 ../fortran/fort-var1io.lo     \
156 +                 ../fortran/fort-varaio.lo     \
157 +                 ../fortran/fort-varmio.lo     \
158 +                 ../fortran/fort-varsio.lo
159  
160  GARBAGE                = t_ncio.o t_ncio t_ncx.o t_ncx t_ncxx.o t_ncxx \
161         t_nc.o t_nc test.nc *.so
162 @@ -62,15 +78,19 @@
163  DIST_GARBAGE   = ncconfig.h
164  
165  
166 -all:           $(LIBRARY) $(MANUAL)
167 +all:           $(LIBRARYL) $(MANUAL)
168  
169  check:         full_test 
170  
171  full_test:     test_ncx test nctest
172  
173 -install:       $(LIBDIR)/$(LIBRARY)    \
174 +install:       $(LIBRARYL)     \
175                 $(INCDIR)/$(HEADER)     \
176                 $(MANDIR)/man3/$(MANUAL)
177 +       libtool install $(LIBRARYL) $(LIBDIR)
178 +
179 +libnetcdf.la:  $(LIB_OBJS)
180 +       libtool --mode=link --tag=CC $(CC) -o libnetcdf.la $(LIB_OBJS) $(LIB_FOBJS) $(LDFLAGS) -rpath $(LIBDIR)
181  
182  uninstall:
183         -rm -f $(LIBDIR)/$(LIBRARY)
184 @@ -95,10 +115,10 @@
185         cmp test.nc test_nc.sav
186         @echo '*** Success ***'
187  
188 -nctest:                $(LIBRARY)
189 +nctest:                $(LIBRARYL)
190         (cd ../nctest ; make test)
191  
192 -nc_test:       $(LIBRARY)
193 +nc_test:       $(LIBRARYL)
194         (cd ../nc_test ; make test)
195  
196  
197 diff -Nur netcdf-3.5.0.orig/src/ncdump/Makefile netcdf-3.5.0/src/ncdump/Makefile
198 --- netcdf-3.5.0.orig/src/ncdump/Makefile       Tue Mar 13 18:42:52 2001
199 +++ netcdf-3.5.0/src/ncdump/Makefile    Wed Apr  4 23:22:41 2001
200 @@ -16,11 +16,11 @@
201                   test0.cdl ncdump.1 Makefile
202  MANUAL         = ncdump.1
203  
204 -lib_netcdf     = ../libsrc/libnetcdf.a
205 +lib_netcdf     = ../libsrc/libnetcdf.la
206  
207  # Don't use "-L../libsrc -lnetcdf" in the following because that doesn't
208  # work on a CRAY T90 (sigh).
209 -ld_netcdf      = $(lib_netcdf)
210 +ld_netcdf      = -L../libsrc/.libs -lnetcdf
211  
212  OBJS           =  ncdump.o vardata.o dumplib.o
213  GARBAGE                = $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
214 diff -Nur netcdf-3.5.0.orig/src/ncgen/Makefile netcdf-3.5.0/src/ncgen/Makefile
215 --- netcdf-3.5.0.orig/src/ncgen/Makefile        Tue Mar 13 18:42:53 2001
216 +++ netcdf-3.5.0/src/ncgen/Makefile     Wed Apr  4 23:23:09 2001
217 @@ -15,10 +15,10 @@
218                   ctest.c ctest ctest0.nc ctest1.cdl \
219                   ftest.f ftest ftest0.nc ftest1.cdl
220  
221 -lib_netcdf     = ../libsrc/libnetcdf.a
222 +lib_netcdf     = ../libsrc/libnetcdf.la
223  # Don't use "-L../libsrc -lnetcdf" in the following because that doesn't
224  # work on a CRAY T90 (sigh).
225 -ld_netcdf      = $(lib_netcdf)
226 +ld_netcdf      = -L../libsrc/.libs -lnetcdf
227  
228  PACKING_LIST   = Makefile depend escapes.c generic.h \
229                   ncgenyy.c ncgentab.c ncgentab.h \
230 diff -Nur netcdf-3.5.0.orig/src/rules.make netcdf-3.5.0/src/rules.make
231 --- netcdf-3.5.0.orig/src/rules.make    Mon Mar 12 23:31:55 2001
232 +++ netcdf-3.5.0/src/rules.make Wed Apr  4 23:24:06 2001
233 @@ -4,7 +4,7 @@
234  # It should be processed by every execution of the that utility.
235  
236  .SUFFIXES:
237 -.SUFFIXES:     .a .o .i .f .c .cpp .F .y .l .m4
238 +.SUFFIXES:     .a .o .lo .i .f .c .cpp .F .y .l .m4
239  
240  
241  ################################################################################
242 @@ -13,11 +13,17 @@
243  .c.o:
244         $(COMPILE.c) $<
245  
246 +.c.lo:
247 +       libtool --mode=compile --tag=CC $(COMPILE.c) $<
248 +
249  .c.i:
250         $(CPP) $(CPPFLAGS) $< >$@
251  
252  .cpp.o:
253         $(COMPILE.cxx) $<
254 +
255 +.cpp.lo:
256 +       libtool --mode=compile --tag=CXX $(COMPILE.cxx) $<
257  
258  # Not all FORTRAN compilers support C-preprocessing of *.F files; ergo, a 
259  # relatively complicated rule ensues.
This page took 0.283211 seconds and 3 git commands to generate.