pkgsrc/devel/cfitsio/patches/patch-aa
markd 0e72987c9c Update cfitsio to version 3.100
leaf node.  Fixes build problem seen in bulk builds.

Four years worth of changes.
2008-12-29 10:13:12 +00:00

113 lines
4 KiB
Text

$NetBSD: patch-aa,v 1.3 2008/12/29 10:13:12 markd Exp $
--- Makefile.in.orig 2008-01-15 07:30:51.000000000 +1300
+++ Makefile.in
@@ -29,11 +29,12 @@ INSTALL_DIRS = $(DESTDIR)@INSTALL_ROOT@
SHELL = /bin/sh
RANLIB = @RANLIB@
-CC = @CC@
+CC = ${LIBTOOL} --mode=compile @CC@
+LD = ${LIBTOOL} --mode=link @CC@
CFLAGS = @CFLAGS@
FC = @FC@
LDFLAGS = $(CFLAGS)
-DEFS = @DEFS@
+DEFS = @DEFS@ -Dunix
LIBS = @LIBS@
FLEX = flex
BISON = bison
@@ -79,53 +80,47 @@ all:
all-nofitsio:
${MAKE} stand_alone "FITSIO_SRC="
-stand_alone: libcfitsio.a
+stand_alone: libcfitsio.la
-libcfitsio.a: ${OBJECTS}
- ar rv libcfitsio.a ${OBJECTS}; \
- ${RANLIB} libcfitsio.a;
+libcfitsio.la: ${OBJECTS}
+ ${LIBTOOL} --mode=link @CC@ -o $@ ${OBJECTS:.o=.lo} -rpath ${PREFIX}/lib -version-info 3:0
shared: libcfitsio${SHLIB_SUFFIX}
libcfitsio${SHLIB_SUFFIX}: ${OBJECTS}
${SHLIB_LD} -o $@ ${OBJECTS}
-install: libcfitsio.a $(INSTALL_DIRS)
- @if [ -f libcfitsio.a ]; then \
- /bin/mv libcfitsio.a ${CFITSIO_LIB}; \
- fi; \
- if [ -f libcfitsio${SHLIB_SUFFIX} ]; then \
- /bin/mv libcfitsio${SHLIB_SUFFIX} ${CFITSIO_LIB}; \
- fi; \
- /bin/cp fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}/; \
- /bin/cp cfitsio.pc ${CFITSIO_LIB}/pkgconfig
-
-smem: smem.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm
-
-testprog: testprog.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o testprog testprog.o -L. -lcfitsio -lm ${LIBS}
-
-fpack: fpack.o fpackutil.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o fpack fpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS}
-
-funpack: funpack.o fpackutil.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o funpack funpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS}
-
-fitscopy: fitscopy.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS}
-
-speed: speed.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o speed speed.o -L. -lcfitsio -lm ${LIBS}
+install: libcfitsio.la $(INSTALL_DIRS)
+ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libcfitsio.la ${CFITSIO_LIB}
+ ${BSD_INSTALL_DATA} fitsio.h fitsio2.h longnam.h drvrsmem.h ${CFITSIO_INCLUDE}/
+ ${BSD_INSTALL_DATA} cfitsio.pc ${CFITSIO_LIB}/pkgconfig
-imcopy: imcopy.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o imcopy imcopy.o -L. -lcfitsio -lm ${LIBS}
+smem: smem.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o smem smem.o -L. -lcfitsio -lm
-listhead: listhead.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o listhead listhead.o -L. -lcfitsio -lm ${LIBS}
+testprog: testprog.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o testprog testprog.o libcfitsio.la -lm ${LIBS}
-cookbook: cookbook.o libcfitsio.a ${OBJECTS}
- ${CC} $(CFLAGS) $(DEFS) -o cookbook cookbook.o -L. -lcfitsio -lm ${LIBS}
+fpack: fpack.o fpackutil.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o fpack fpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS}
+
+funpack: funpack.o fpackutil.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o funpack funpack.o fpackutil.o -L. -lcfitsio -lm ${LIBS}
+
+fitscopy: fitscopy.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o fitscopy fitscopy.o -L. -lcfitsio -lm ${LIBS}
+
+speed: speed.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o speed speed.o -L. -lcfitsio -lm ${LIBS}
+
+imcopy: imcopy.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o imcopy imcopy.o -L. -lcfitsio -lm ${LIBS}
+
+listhead: listhead.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o listhead listhead.o -L. -lcfitsio -lm ${LIBS}
+
+cookbook: cookbook.o libcfitsio.la ${OBJECTS}
+ ${LD} $(CFLAGS) $(DEFS) -o cookbook cookbook.o -L. -lcfitsio -lm ${LIBS}
eval: # Rebuild eval_* files from flex/bison source
$(FLEX) -t eval.l > eval_l.c1
@@ -137,7 +132,7 @@ eval: # Rebuild eval_* files from flex/
/bin/rm -f y.tab.c y.tab.h
clean:
- - /bin/rm -f *.o libcfitsio.a libcfitsio${SHLIB_SUFFIX} \
+ - /bin/rm -f *.o libcfitsio.la libcfitsio${SHLIB_SUFFIX} \
smem testprog y.output
distclean: clean