summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/cbflib/files')
-rw-r--r--sci-libs/cbflib/files/0.8.1-Makefile.patch300
1 files changed, 300 insertions, 0 deletions
diff --git a/sci-libs/cbflib/files/0.8.1-Makefile.patch b/sci-libs/cbflib/files/0.8.1-Makefile.patch
new file mode 100644
index 000000000000..dd4c5dcba835
--- /dev/null
+++ b/sci-libs/cbflib/files/0.8.1-Makefile.patch
@@ -0,0 +1,300 @@
+sed \
+-e '/rm \*\.o/d' \
+-e 's:$(CC) -o $@ \*\.o $(SOLDFLAGS):$(CC) $(LDFLAGS) -o $@ *.o:g' \
+-e 's:$(F90C) -o $@ \*\.o $(SOLDFLAGS):$(F90C) $(LDFLAGS) -o $@ *.o:g' \
+-e '900,2000s:$(CC) $(CFLAGS) :$(CC) $(CFLAGS) $(SOCFLAGS) $(LDFLAGS) -o $@ :g' \
+-e '900,2000s:$(C++) $(CFLAGS) :$(C++) $(CFLAGS) $(SOCFLAGS) $(LDFLAGS) -o $@ :g' \
+-e '900,2000s:$(F90C) $(F90FLAGS) :$(F90C) $(F90FLAGS) $(SOCFLAGS) $(LDFLAGS) -o $@ :g' \
+-e 's:-lcbf -lm -limg -o $@:-lcbf -lm -limg:g' \
+-e 's:-lcbf -lm -o $@:-lcbf -lm:g' \
+-e 's:-lfcb -o $@:-lfcb -lm:g' \
+-e '900,2000s:-L$(LIB):-L$(SOLIB):g' \
+-e 's|: $(LIB)/libcbf.a|: $(SOLIB)/libcbf.so|g' \
+-e 's|: $(LIB)/libfcb.a|: $(SOLIB)/libfcb.so|g' \
+-e 's:/usr/bin/bunzip2:/bin/bunzip2:g' \
+-e 's:/usr/bin/bzip2:/bin/bunzip2:g' \
+-e 's|install: all|install:|g' \
+Makefile > Makefile.new
+--- Makefile 2009-07-18 17:24:25.000000000 +0200
++++ Makefile.new 2009-07-18 17:24:31.000000000 +0200
+@@ -288,13 +288,13 @@
+ #
+ # Program to use to decompress a data file
+ #
+-DECOMPRESS = /usr/bin/bunzip2
++DECOMPRESS = /bin/bunzip2
+
+
+ #
+ # Program to use to compress a data file
+ #
+-COMPRESS = /usr/bin/bzip2
++COMPRESS = /bin/bunzip2
+
+ #
+ # Program to use to generate a signature
+@@ -702,7 +702,7 @@
+ ./.symlinks $(SLFLAGS)
+ touch symlinksdone
+
+-install: all $(INSTALLDIR) $(INSTALLDIR)/lib $(INSTALLDIR)/bin \
++install: $(INSTALLDIR) $(INSTALLDIR)/lib $(INSTALLDIR)/bin \
+ $(INSTALLDIR)/include $(INSTALLDIR)/include/cbflib
+ -chmod -R 755 $(INSTALLDIR)/include/cbflib
+ -chmod 755 $(INSTALLDIR)/lib/libcbf.a
+@@ -837,15 +837,13 @@
+ $(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP) $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
+ $(AR) cr $@ *.o
+- rm *.o
+ ifneq ($(RANLIB),)
+ $(RANLIB) $@
+ endif
+
+ $(SOLIB)/libcbf.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
+ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
+- $(CC) -o $@ *.o $(SOLDFLAGS)
+- rm *.o
++ $(CC) $(LDFLAGS) -Wl,-soname,libcbf.so.0.8 $(SOCFLAGS) $(SOLDFLAGS) -o $@ *.o -lgfortran
+
+ #
+ # IMG library
+@@ -853,15 +851,13 @@
+ $(LIB)/libimg.a: $(EXAMPLES)/img.c $(HEADERS) $(COMMONDEP) $(LIB)
+ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(EXAMPLES)/img.c
+ $(AR) cr $@ *.o
+- rm *.o
+ ifneq ($(RANLIB),)
+ $(RANLIB) $@
+ endif
+
+ $(SOLIB)/libimg.so: $(SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
+ $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(EXAMPLES)/img.c
+- $(CC) -o $@ *.o $(SOLDFLAGS)
+- rm *.o
++ $(CC) $(LDFLAGS) -Wl,-soname,libimg.so.0.8 $(SOLDFLAGS) -o $@ *.o
+
+ #
+ # CBF and IMG libraries
+@@ -876,7 +872,6 @@
+ ifneq ($(F90C),)
+ $(F90C) $(F90FLAGS) -c $(F90SOURCE)
+ $(AR) cr $@ *.o
+- rm *.o
+ ifneq ($(RANLIB),)
+ $(RANLIB) $@
+ endif
+@@ -887,8 +882,7 @@
+ $(SOLIB)/libfcb.so: $(F90SOURCE) $(HEADERS) $(COMMONDEP) $(SOLIB)
+ ifneq ($(F90C),)
+ $(F90C) $(F90FLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) -c $(F90SOURCE)
+- $(F90C) -o $@ *.o $(SOLDFLAGS)
+- rm *.o
++ $(F90C) $(LDFLAGS) -Wl,-soname,libcbf.so.0.8 $(SOLDFLAGS) -o $@ *.o
+ else
+ echo "Define F90C to build $(SOLIB)/libfcb.so"
+ endif
+@@ -914,8 +908,8 @@
+ $(JAR) cf $@ org
+
+ $(SOLIB)/libcbf_wrap.so: $(JAVADIR)/cbflib-$(VERSION).jar $(SOLIB)/libimg.so
+- $(CC) $(CFLAGS) $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(SRC)/cbf_wrap.c
+- $(CC) -o $@ *.o $(SOLDFLAGS) -L$(SOLIB) -lcbf
++ $(CC) $(CFLAGS) $(SOCFLAGS) $(LDFLAGS) $(SOLDFLAGS) -o $@ $(SOCFLAGS) $(INCLUDES) $(WARNINGS) $(JAVAINCLUDES) -c $(SRC)/cbf_wrap.c
++ $(CC) $(LDFLAGS) -Wl,-soname,libcbf_wrap.so.0.8 $(SOLDFLAGS) -o $@ *.o -L$(SOLIB) -lcbf
+
+ #
+ # F90SOURCE
+@@ -942,131 +936,131 @@
+ #
+ # convert_image example program
+ #
+-$(BIN)/convert_image: $(LIB)/libcbf.a $(EXAMPLES)/convert_image.c $(EXAMPLES)/img.c \
++$(BIN)/convert_image: $(SOLIB)/libcbf.so $(EXAMPLES)/convert_image.c $(EXAMPLES)/img.c \
+ $(GOPTLIB) $(GOPTINC)
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/convert_image.c $(EXAMPLES)/img.c $(GOPTLIB) -L$(LIB) \
+- -lcbf -lm -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/convert_image.c $(EXAMPLES)/img.c $(GOPTLIB) -L$(SOLIB) \
++ -lcbf -lm
+ #
+ # convert_minicbf example program
+ #
+-$(BIN)/convert_minicbf: $(LIB)/libcbf.a $(EXAMPLES)/convert_minicbf.c \
++$(BIN)/convert_minicbf: $(SOLIB)/libcbf.so $(EXAMPLES)/convert_minicbf.c \
+ $(GOPTLIB) $(GOPTINC)
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(LIB) \
+- -lcbf -lm -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/convert_minicbf.c $(GOPTLIB) -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # makecbf example program
+ #
+-$(BIN)/makecbf: $(LIB)/libcbf.a $(EXAMPLES)/makecbf.c $(LIB)/libimg.a
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/makecbf.c -L$(LIB) \
+- -lcbf -lm -limg -o $@
++$(BIN)/makecbf: $(SOLIB)/libcbf.so $(EXAMPLES)/makecbf.c $(SOLIB)/libimg.so
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/makecbf.c -L$(SOLIB) \
++ -lcbf -lm -limg
+
+
+ #
+ # adscimg2cbf example program
+ #
+-$(BIN)/adscimg2cbf: $(LIB)/libcbf.a $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c
+- $(CC) $(CFLAGS) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/adscimg2cbf: $(SOLIB)/libcbf.so $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/adscimg2cbf.c $(EXAMPLES)/adscimg2cbf_sub.c -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # cbf2adscimg example program
+ #
+-$(BIN)/cbf2adscimg: $(LIB)/libcbf.a $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c
+- $(CC) $(CFLAGS) -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/cbf2adscimg: $(SOLIB)/libcbf.so $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -D_SVID_SOURCE $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/cbf2adscimg.c $(EXAMPLES)/cbf2adscimg_sub.c -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # img2cif example program
+ #
+-$(BIN)/img2cif: $(LIB)/libcbf.a $(EXAMPLES)/img2cif.c $(LIB)/libimg.a \
++$(BIN)/img2cif: $(SOLIB)/libcbf.so $(EXAMPLES)/img2cif.c $(SOLIB)/libimg.so \
+ $(GOPTLIB) $(GOTPINC)
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(LIB) \
+- -lcbf -lm -limg -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/img2cif.c $(GOPTLIB) -L$(SOLIB) \
++ -lcbf -lm -limg
+
+ #
+ # cif2cbf example program
+ #
+-$(BIN)/cif2cbf: $(LIB)/libcbf.a $(EXAMPLES)/cif2cbf.c $(LIB)/libimg.a \
++$(BIN)/cif2cbf: $(SOLIB)/libcbf.so $(EXAMPLES)/cif2cbf.c $(SOLIB)/libimg.so \
+ $(GOPTLIB) $(GOPTINC)
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(LIB) \
+- -lcbf -lm -limg -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/cif2cbf.c $(GOPTLIB) -L$(SOLIB) \
++ -lcbf -lm -limg
+ #
+ # testcell example program
+ #
+-$(BIN)/testcell: $(LIB)/libcbf.a $(EXAMPLES)/testcell.C
+- $(C++) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/testcell.C -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/testcell: $(SOLIB)/libcbf.so $(EXAMPLES)/testcell.C
++ $(C++) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/testcell.C -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # cif2c example program
+ #
+-$(BIN)/cif2c: $(LIB)/libcbf.a $(EXAMPLES)/cif2c.c
+- $(C++) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/cif2c.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/cif2c: $(SOLIB)/libcbf.so $(EXAMPLES)/cif2c.c
++ $(C++) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/cif2c.c -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # sauter_test example program
+ #
+-$(BIN)/sauter_test: $(LIB)/libcbf.a $(EXAMPLES)/sauter_test.C
+- $(C++) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/sauter_test.C -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/sauter_test: $(SOLIB)/libcbf.so $(EXAMPLES)/sauter_test.C
++ $(C++) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/sauter_test.C -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # testreals example program
+ #
+-$(BIN)/testreals: $(LIB)/libcbf.a $(EXAMPLES)/testreals.c
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/testreals.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/testreals: $(SOLIB)/libcbf.so $(EXAMPLES)/testreals.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/testreals.c -L$(SOLIB) \
++ -lcbf -lm
+ #
+ # testflat example program
+ #
+-$(BIN)/testflat: $(LIB)/libcbf.a $(EXAMPLES)/testflat.c
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/testflat.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/testflat: $(SOLIB)/libcbf.so $(EXAMPLES)/testflat.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/testflat.c -L$(SOLIB) \
++ -lcbf -lm
+ #
+ # testflatpacked example program
+ #
+-$(BIN)/testflatpacked: $(LIB)/libcbf.a $(EXAMPLES)/testflatpacked.c
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/testflatpacked.c -L$(LIB) \
+- -lcbf -lm -o $@
++$(BIN)/testflatpacked: $(SOLIB)/libcbf.so $(EXAMPLES)/testflatpacked.c
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/testflatpacked.c -L$(SOLIB) \
++ -lcbf -lm
+
+ ifneq ($(F90C),)
+ #
+ # test_xds_binary example program
+ #
+-$(BIN)/test_xds_binary: $(LIB)/libfcb.a $(EXAMPLES)/test_xds_binary.f90
+- $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \
+- -L$(LIB) -lfcb -o $@
++$(BIN)/test_xds_binary: $(SOLIB)/libfcb.so $(EXAMPLES)/test_xds_binary.f90
++ $(F90C) $(F90FLAGS) $(LDFLAGS) -o $@ $(F90LDFLAGS) $(EXAMPLES)/test_xds_binary.f90 \
++ -L$(SOLIB) -lfcb -lm
+
+ #
+ # test_fcb_read_image example program
+ #
+-$(BIN)/test_fcb_read_image: $(LIB)/libfcb.a $(EXAMPLES)/test_fcb_read_image.f90
+- $(F90C) $(F90FLAGS) $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \
+- -L$(LIB) -lfcb -o $@
++$(BIN)/test_fcb_read_image: $(SOLIB)/libfcb.so $(EXAMPLES)/test_fcb_read_image.f90
++ $(F90C) $(F90FLAGS) $(LDFLAGS) -o $@ $(F90LDFLAGS) $(EXAMPLES)/test_fcb_read_image.f90 \
++ -L$(SOLIB) -lfcb -lm
+ endif
+
+ #
+ # testcbf (C)
+ #
+ $(BIN)/ctestcbf: $(EXAMPLES)/testcbf.c $(LIB)/libcbf.a
+- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) \
+- $(EXAMPLES)/testcbf.c -L$(LIB) \
+- -lcbf -lm -o $@
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(INCLUDES) $(WARNINGS) \
++ $(EXAMPLES)/testcbf.c -L$(SOLIB) \
++ -lcbf -lm
+
+ #
+ # testcbf (Java)