pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/f2c libtool-ize this for building its shared libs...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0ef34159ce66
branches:  trunk
changeset: 480565:0ef34159ce66
user:      dmcmahill <dmcmahill%pkgsrc.org@localhost>
date:      Tue Sep 14 22:09:40 2004 +0000

description:
libtool-ize this for building its shared libs instead of using
bsd.lib.mk.  Should address PR26628 where this package can't
build on solaris.  In addition, this cleans up some PLIST hacks.

diffstat:

 lang/f2c/Makefile         |   26 +--------
 lang/f2c/PLIST            |   14 +----
 lang/f2c/distinfo         |   10 +-
 lang/f2c/patches/patch-aa |   44 +++-------------
 lang/f2c/patches/patch-ad |   11 +--
 lang/f2c/patches/patch-ae |  104 ++++++++++++++++++++-------------------
 lang/f2c/patches/patch-ag |  120 +++++++++++++--------------------------------
 7 files changed, 113 insertions(+), 216 deletions(-)

diffs (truncated from 509 to 300 lines):

diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/Makefile
--- a/lang/f2c/Makefile Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/Makefile Tue Sep 14 22:09:40 2004 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2004/04/09 21:07:48 minskim Exp $
+# $NetBSD: Makefile,v 1.29 2004/09/14 22:09:40 dmcmahill Exp $
 
 DISTNAME=      f2c-20001205
-PKGREVISION=   5
+PKGREVISION=   6
 CATEGORIES=    lang
 MASTER_SITES=  ${MASTER_SITE_LOCAL}
 
@@ -17,7 +17,7 @@
 #read what the last change date was.
 #
 #   mv f2c.tar f2c-yyyymmdd.tar
-#   gzip f2c-yyyymmdd.tar
+#   gzip --best f2c-yyyymmdd.tar
 MAINTAINER=    dmcmahill%NetBSD.org@localhost
 HOMEPAGE=      http://www.netlib.org/f2c/index.html
 COMMENT=       Fortran to C compiler including a script to emulate f77
@@ -29,10 +29,10 @@
 MAKE_ENV+=     F2CMAJOR=${F2CMAJOR} F2CMINOR=${F2CMINOR}
 MAKE_ENV+=     LIBOWN=${LIBOWN} LIBGRP=${LIBGRP}
 PLIST_SUBST+=  F2CMAJOR=${F2CMAJOR} F2CMINOR=${F2CMINOR}
-PLIST_SRC=     ${WRKDIR}/PLIST
 
 WRKSRC=                ${WRKDIR}/f2c
 USE_BUILDLINK3=        yes
+USE_LIBTOOL=   yes
 
 post-extract:
        @${RM} ${WRKSRC}/index.html
@@ -48,27 +48,9 @@
        @${CP} -f ${WRKSRC}/libF77/signal1.h0 ${WRKSRC}/libF77/signal1.h
        @${CP} -f ${WRKSRC}/f2c.h ${WRKSRC}/libF77/f2c.h
        @${CP} -f ${WRKSRC}/f2c.h ${WRKSRC}/libI77/f2c.h
-       @${ECHO} "major=${F2CMAJOR}" > ${WRKSRC}/libF77/shlib_version
-       @${ECHO} "minor=${F2CMINOR}" >> ${WRKSRC}/libF77/shlib_version
-       @${ECHO} "major=${F2CMAJOR}" > ${WRKSRC}/libI77/shlib_version
-       @${ECHO} "minor=${F2CMINOR}" >> ${WRKSRC}/libI77/shlib_version
 
-# for OBJECT_FMT
 .include "../../mk/bsd.prefs.mk"
 MAKE_ENV+=     MACHINE_ARCH=${MACHINE_ARCH}
 
-pre-install:
-.if (${MACHINE_ARCH} == "mipsel")
-       ${SED} '/lib.*_pic/d' ${PKGDIR}/PLIST > ${PLIST_SRC}
-.else
-       ${CP} ${PKGDIR}/PLIST ${PLIST_SRC}
-.endif
-
-.if (${OBJECT_FMT} == "ELF")
-post-install:
-       cd ${PREFIX}/lib && ${LN} -fs libf2c.so.${F2CMAJOR}.${F2CMINOR}  libf2c.so.${F2CMAJOR}
-       cd ${PREFIX}/lib && ${LN} -fs libf2c.so.${F2CMAJOR}.${F2CMINOR}  libf2c.so
-
-.endif
 
 .include "../../mk/bsd.pkg.mk"
diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/PLIST
--- a/lang/f2c/PLIST    Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/PLIST    Tue Sep 14 22:09:40 2004 +0000
@@ -1,22 +1,14 @@
-@comment $NetBSD: PLIST,v 1.1 2001/11/01 00:23:09 zuntum Exp $
+@comment $NetBSD: PLIST,v 1.2 2004/09/14 22:09:40 dmcmahill Exp $
 bin/f2c
 bin/f2c-f77
 include/f2c.h
-lib/libf2c.a
-lib/libf2c_p.a
-lib/libf2c_pic.a
-lib/libf2c.so.${F2CMAJOR}.${F2CMINOR}
-lib/libf2c.so.${F2CMAJOR}
-lib/libf2c.so
 lib/libF77.a
-lib/libF77_p.a
-lib/libF77_pic.a
+lib/libF77.la
 lib/libF77.so.${F2CMAJOR}.${F2CMINOR}
 lib/libF77.so.${F2CMAJOR}
 lib/libF77.so
 lib/libI77.a
-lib/libI77_p.a
-lib/libI77_pic.a
+lib/libI77.la
 lib/libI77.so.${F2CMAJOR}.${F2CMINOR}
 lib/libI77.so.${F2CMAJOR}
 lib/libI77.so
diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/distinfo
--- a/lang/f2c/distinfo Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/distinfo Tue Sep 14 22:09:40 2004 +0000
@@ -1,12 +1,12 @@
-$NetBSD: distinfo,v 1.9 2004/03/13 13:47:40 dmcmahill Exp $
+$NetBSD: distinfo,v 1.10 2004/09/14 22:09:40 dmcmahill Exp $
 
 SHA1 (f2c-20001205.tar.gz) = f3cc1653eb962fee45d850df50890fc53448a17f
 Size (f2c-20001205.tar.gz) = 988607 bytes
-SHA1 (patch-aa) = af1e3e1e04d5ab5f06eed0e031a9939d1f41150d
+SHA1 (patch-aa) = c3ac2f66a5707b5a4d06f134e867ee245fd76ac0
 SHA1 (patch-ab) = 97c676fa452daa674e11348412ccb26d38a7baa4
 SHA1 (patch-ac) = 6fc52f9257cdecd3784e7f8897cce8b5656b73e4
-SHA1 (patch-ad) = 0144d0cdf55ce8117d179a56acc4db64fe67c8e0
-SHA1 (patch-ae) = c0562da54ef93f167db928b526a96c74c8cabc72
-SHA1 (patch-ag) = 3e263188c46c356eecf876cbf29d44b17308078d
+SHA1 (patch-ad) = 7f204a45891e3632589ea8fb0e4e379a0a792dea
+SHA1 (patch-ae) = 037cc8aed72a3088771ab24077ff19b009e63ebf
+SHA1 (patch-ag) = 5f294e491ba4730aa7047ad53fa710a0698c2649
 SHA1 (patch-ai) = 641d3720c80cfb7d1c23981bb845b0a9bee3e6d7
 SHA1 (patch-aj) = c58361fbbfc06e033b2a47e1d1e370716c4b185c
diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/patches/patch-aa
--- a/lang/f2c/patches/patch-aa Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/patches/patch-aa Tue Sep 14 22:09:40 2004 +0000
@@ -1,13 +1,11 @@
-$NetBSD: patch-aa,v 1.12 2002/08/25 19:23:02 jlam Exp $
-
-Add a top level Makefile
+$NetBSD: patch-aa,v 1.13 2004/09/14 22:09:40 dmcmahill Exp $
 
---- /dev/null  Thu Apr  5 17:09:09 2001
-+++ Makefile   Thu Apr  5 18:31:35 2001
-@@ -0,0 +1,64 @@
+--- Makefile.orig      Tue Sep 14 16:47:52 2004
++++ Makefile
+@@ -0,0 +1,43 @@
 +# Top level Makefile for f2c, libF77, and libI77
 +
-+all: f2c libf2c/libf2c.a f2c-f77 man
++all: f2c libF77/libF77.la libI77/libI77.la  f2c-f77 man
 +
 +
 +f2c:
@@ -15,29 +13,13 @@
 +      cd src; ${MAKE} all
 +      cp src/f2c f2c
 +
-+libF77/libF77.a:
++libF77/libF77.la:
 +      @echo Making all in 'libF77'
-+      cd libF77 &&  ${MAKE} all
-+
-+libI77/libI77.a:
-+      @echo Making all in 'libI77'
-+      cd libI77 &&  ${MAKE} all
++      cd libF77 &&  ${MAKE} all LIBDIR=${PREFIX}/lib
 +
-+libf2c/libf2c.a: libI77/libI77.a libF77/libF77.a
-+      -mkdir libf2c
-+      if [ -f libF77/libF77.a ]; then  cd libf2c && ar x ../libF77/libF77.a ; fi
-+      if [ -f libF77/libF77_p.a ]; then cd libf2c && ar x ../libF77/libF77_p.a ; fi
-+      if [ -f libF77/libF77_pic.a ]; then cd libf2c && ar x ../libF77/libF77_pic.a ; fi
-+      if [ -f libI77/libI77.a ]; then cd libf2c && ar x ../libI77/libI77.a ; fi
-+      if [ -f libI77/libI77_p.a ]; then cd libf2c && ar x ../libI77/libI77_p.a ; fi
-+      if [ -f libI77/libI77_pic.a ]; then cd libf2c && ar x ../libI77/libI77_pic.a ; fi
-+      if [ -f libF77/libF77.a ]; then cd libf2c && ar cruv libf2c.a *.o ; fi
-+      if [ -f libF77/libF77_p.a ]; then cd libf2c && ar cruv libf2c_p.a *.po ; fi
-+      if [ -f libF77/libF77_pic.a ]; then cd libf2c && ar cruv libf2c_pic.a *.so ; fi
-+      if [ -f libF77/libF77_pic.a ]; then cd libf2c && \
-+              ld -Bshareable -soname libf2c.so.${F2CMAJOR} -o libf2c.so.${F2CMAJOR}.${F2CMINOR} *.so ; fi
-+      if [ "${MACHINE_ARCH}" = "mipsel" ]; then cd libf2c && \
-+              ld -Bshareable -soname libf2c.so.${F2CMAJOR} -o libf2c.so.${F2CMAJOR}.${F2CMINOR} *.o ; fi
++libI77/libI77.la:
++      @echo Making all in 'libI77'
++      cd libI77 &&  ${MAKE} all LIBDIR=${PREFIX}/lib
 +
 +man: f2c.0
 +
@@ -54,11 +36,6 @@
 +      -@mkdir -p ${PREFIX}/lib
 +      @cd libI77 && ${MAKE} install LIBDIR=${PREFIX}/lib
 +      @cd libF77 && ${MAKE} install LIBDIR=${PREFIX}/lib
-+      ${BSD_INSTALL_DATA} ./libf2c/libf2c.a ${PREFIX}/lib
-+      if [ -f ./libf2c/libf2c_p.a ]; then ${BSD_INSTALL_DATA} ./libf2c/libf2c_p.a ${PREFIX}/lib ; fi
-+      if [ -f ./libf2c/libf2c_pic.a ]; then ${BSD_INSTALL_DATA} ./libf2c/libf2c_pic.a ${PREFIX}/lib ; fi
-+      if [ -f ./libf2c/libf2c.so.${F2CMAJOR}.${F2CMINOR} ]; then \
-+              ${BSD_INSTALL_DATA} ./libf2c/libf2c.so.${F2CMAJOR}.${F2CMINOR} ${PREFIX}/lib ; fi
 +      -@mkdir -p ${PREFIX}/include
 +      ${BSD_INSTALL_DATA} ./f2c.h ${PREFIX}/include
 +      -@mkdir -p ${PREFIX}/share/doc/f2c
@@ -69,4 +46,3 @@
 +
 +f2c-f77: fc
 +      sed 's!@PREFIX@!${PREFIX}!g' fc > f2c-f77
-+
diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/patches/patch-ad
--- a/lang/f2c/patches/patch-ad Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/patches/patch-ad Tue Sep 14 22:09:40 2004 +0000
@@ -1,10 +1,10 @@
-$NetBSD: patch-ad,v 1.4 1999/12/16 00:58:27 dmcmahill Exp $
+$NetBSD: patch-ad,v 1.5 2004/09/14 22:09:40 dmcmahill Exp $
 
 Name libraries correctly
 
 --- f2c.1t.orig        Tue Sep  8 10:16:48 1998
 +++ f2c.1t     Tue Dec  7 17:24:23 1999
-@@ -334,12 +334,15 @@
+@@ -334,12 +334,12 @@
  output file
  .TP
 -.F /usr/include/f2c.h
@@ -14,14 +14,11 @@
 -.F /usr/lib/libF77.a
 -intrinsic function library
 +.F .../lib/libF77.a
-+intrinsic function library.  May be replaced by libf2c.a
++intrinsic function library. 
  .TP
 -.F /usr/lib/libI77.a
 -Fortran I/O library
 +.F .../lib/libI77.a
-+Fortran I/O library.  May be replaced by libf2c.a
-+.TP
-+.F .../lib/libf2c.a
-+Combined Fortran library.  May be used in place of libF77.a and libI77.a
++Fortran I/O library. 
  .TP
  .F /lib/libc.a
diff -r 2585c4586449 -r 0ef34159ce66 lang/f2c/patches/patch-ae
--- a/lang/f2c/patches/patch-ae Tue Sep 14 17:18:05 2004 +0000
+++ b/lang/f2c/patches/patch-ae Tue Sep 14 22:09:40 2004 +0000
@@ -1,78 +1,81 @@
-$NetBSD: patch-ae,v 1.8 2002/03/14 22:09:35 dmcmahill Exp $
-
-use a bsd style makefile for building shared libs
+$NetBSD: patch-ae,v 1.9 2004/09/14 22:09:40 dmcmahill Exp $
 
---- libF77/makefile.orig       Fri Apr  6 22:20:09 2001
-+++ libF77/makefile    Fri Apr  6 22:20:40 2001
-@@ -1,26 +1,5 @@
+--- libF77/makefile.orig       Tue Sep 14 18:38:32 2004
++++ libF77/makefile
+@@ -1,7 +1,4 @@
 -.SUFFIXES: .c .o
 -CC = cc
 -SHELL = /bin/sh
 -CFLAGS = -O
--
--# If your system lacks onexit() and you are not using an
--# ANSI C compiler, then you should add -DNO_ONEXIT to CFLAGS,
--# e.g., by changing the above "CFLAGS =" line to
--# CFLAGS = -O -DNO_ONEXIT
--
--# On at least some Sun systems, it is more appropriate to change the
--# "CFLAGS =" line to
--# CFLAGS = -O -Donexit=on_exit
--
++.SUFFIXES: .c .lo
+ 
+ # If your system lacks onexit() and you are not using an
+ # ANSI C compiler, then you should add -DNO_ONEXIT to CFLAGS,
+@@ -12,11 +9,10 @@ CFLAGS = -O
+ # "CFLAGS =" line to
+ # CFLAGS = -O -Donexit=on_exit
+ 
 -# compile, then strip unnecessary symbols
 -.c.o:
 -      $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
 -      ld -r -x -o $*.xxx $*.o
 -      mv $*.xxx $*.o
--## Under Solaris (and other systems that do not understand ld -x),
--## omit -x in the ld line above.
--## If your system does not have the ld command, comment out
--## or remove both the ld and mv lines above.
--
-+CPPFLAGS+= -Wcast-align -DNO_ONEXIT -DSkip_f2c_Undefs
-+NOGCCERROR=   #defined
-+MKLINT=       no
- MISC =        F77_aloc.o Version.o main.o s_rnge.o abort_.o getarg_.o iargc_.o \
-       getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\
-@@ -47,57 +25,11 @@
++# compile
++.c.lo:
++      ${LIBTOOL} --mode=compile $(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
++
+ ## Under Solaris (and other systems that do not understand ld -x),
+ ## omit -x in the ld line above.
+ ## If your system does not have the ld command, comment out
+@@ -41,12 +37,12 @@ INT =      i_abs.o i_dim.o i_dnnt.o i_indx.o 
+ HALF =        h_abs.o h_dim.o h_dnnt.o h_indx.o h_len.o h_mod.o  h_nint.o h_sign.o
+ CMP = l_ge.o l_gt.o l_le.o l_lt.o hl_ge.o hl_gt.o hl_le.o hl_lt.o
+ EFL = ef1asc_.o ef1cmc_.o
+-CHAR =        F77_aloc.o s_cat.o s_cmp.o s_copy.o
++CHAR =        s_cat.o s_cmp.o s_copy.o
+ F90BIT = lbitbits.o lbitshft.o
+ QINT =        pow_qq.o qbitbits.o qbitshft.o
  TIME =        dtime_.o etime_.o
  
 -all: signal1.h libF77.a
--
--# You may need to adjust signal1.h suitably for your system...
--signal1.h: signal1.h0
--      cp signal1.h0 signal1.h
--
--# If you get an error compiling dtime_.c or etime_.c, try adding
--# -DUSE_CLOCK to the CFLAGS assignment above; if that does not work,
--# omit $(TIME) from the dependency list for libF77.a below.
--
--# For INTEGER*8 support (which requires system-dependent adjustments to



Home | Main Index | Thread Index | Old Index