diff options
author | Thierry Thomas <thierry@FreeBSD.org> | 2006-08-10 07:37:32 +0000 |
---|---|---|
committer | Thierry Thomas <thierry@FreeBSD.org> | 2006-08-10 07:37:32 +0000 |
commit | 8abf80ec98b3f928e93133405f5cd084124d92d0 (patch) | |
tree | 696facf5ab0f98d6c98f1b0a404e24001c7ca8e5 /lang/f2c | |
parent | - Update to 0.03 (diff) |
- Upgrade to 20060506;
- Remove FreeBSD specificities.
PR: ports/101054
Security: VuXML ID 43cb40b3-c8c2-11da-a672-000e0c2e438a
Notes
Notes:
svn path=/head/; revision=170257
Diffstat (limited to 'lang/f2c')
-rw-r--r-- | lang/f2c/Makefile | 70 | ||||
-rw-r--r-- | lang/f2c/distinfo | 6 | ||||
-rw-r--r-- | lang/f2c/files/f2c.h.alpha | 223 | ||||
-rw-r--r-- | lang/f2c/files/patch-f2c_f2c.h | 44 | ||||
-rw-r--r-- | lang/f2c/files/patch-libf2c_MAIN.c | 21 | ||||
-rw-r--r-- | lang/f2c/files/patch-libf2c_Makefile | 50 | ||||
-rw-r--r-- | lang/f2c/files/patch-src_Makefile | 13 | ||||
-rw-r--r-- | lang/f2c/pkg-descr | 3 | ||||
-rw-r--r-- | lang/f2c/pkg-plist | 4 |
9 files changed, 144 insertions, 290 deletions
diff --git a/lang/f2c/Makefile b/lang/f2c/Makefile index 74d26380899b..143f76bbfd53 100644 --- a/lang/f2c/Makefile +++ b/lang/f2c/Makefile @@ -6,35 +6,73 @@ # PORTNAME= f2c -PORTVERSION= 3.0.0 -PORTREVISION= 1 +PORTVERSION= 20060506 CATEGORIES= lang -MASTER_SITES= ${MASTER_SITE_LOCAL} -MASTER_SITE_SUBDIR= lioux -DISTNAME= f2c-freebsd.3.0.0 +MASTER_SITES= ftp://netlib.bell-labs.com/netlib/ +DISTNAME= ${PORTNAME} +EXTRACT_SUFX= .tar +DIST_SUBDIR= ${PORTNAME}-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Fortran-to-C converter and its run-time libraries -.include <bsd.port.pre.mk> +EXTRACT_DEPENDS=${UNZIP_CMD}:${PORTSDIR}/archivers/unzip -.if (${ARCH} == "alpha") -pre-configure: - @${CP} ${FILESDIR}/f2c.h.alpha ${WRKSRC}/f2c/f2c.h -.endif +USE_GMAKE= yes +USE_LDCONFIG= yes -ALL_TARGET= depend all +# Set FCNAME to the name of the Fortran 77 / F2C wrapper. +FCNAME?= fc +PLIST_SUB= FCNAME=${FCNAME} +.if defined(WITH_FC) +PLIST_SUB+= FC="" +.else +PLIST_SUB+= FC="@comment " +.endif MAN1= f2c.1 +PORTDOCS= 00lastchange README README_libf2c changes f2c.pdf permission + +.include <bsd.port.pre.mk> + +post-extract: + cd ${WRKSRC} && ${FIND} . -name "*.gz" | ${XARGS} ${GUNZIP_CMD} + cd ${WRKSRC} && ${UNZIP_CMD} libf2c.zip + ${CP} -p ${WRKSRC}/libf2c/README ${WRKSRC}/README_libf2c + +pre-patch: + ${CP} -p ${WRKSRC}/libf2c/makefile.u ${WRKSRC}/libf2c/Makefile + ${CP} -p ${WRKSRC}/src/makefile.u ${WRKSRC}/src/Makefile + +pre-configure: + ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/fc + +do-build: + @${ECHO_MSG} "===> Building f2c..." + @(cd ${WRKSRC}/src; \ + ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET}) + @${ECHO_MSG} "===> Building libf2c..." + @(cd ${WRKSRC}/libf2c; \ + ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET} libf2c.so) + do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/f2c/f2c ${PREFIX}/bin - ${INSTALL_DATA} ${WRKSRC}/f2c/f2c.h ${PREFIX}/include - ${INSTALL_MAN} ${WRKSRC}/f2c/f2c.1 ${PREFIX}/man/man1 - ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.* ${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/src/f2c ${PREFIX}/bin +.if defined(WITH_FC) + ${INSTALL_SCRIPT} ${WRKSRC}/fc ${PREFIX}/bin/${FCNAME} +.endif + ${INSTALL_DATA} ${WRKSRC}/src/f2c.h ${PREFIX}/include + ${INSTALL_MAN} ${WRKSRC}/src/f2c.1 ${MAN1PREFIX}/man/man1 + ${MV} ${WRKSRC}/libf2c/libf2c.so ${WRKSRC}/libf2c/libf2c.so.2 + ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.a ${PREFIX}/lib + ${INSTALL_DATA} ${WRKSRC}/libf2c/libf2c.so.2 ${PREFIX}/lib ${LN} -sf libf2c.so.2 ${PREFIX}/lib/libf2c.so post-install: - ${LDCONFIG} -m ${PREFIX}/lib +.if !defined(NOPORTDOCS) + ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR} + @${ECHO_MSG} "===> Documentation installed in ${DOCSDIR}." +.endif .include <bsd.port.post.mk> diff --git a/lang/f2c/distinfo b/lang/f2c/distinfo index aba2765163a6..bd4dce26312d 100644 --- a/lang/f2c/distinfo +++ b/lang/f2c/distinfo @@ -1,3 +1,3 @@ -MD5 (f2c-freebsd.3.0.0.tar.gz) = e69b37fd3801faa82e5112806358b246 -SHA256 (f2c-freebsd.3.0.0.tar.gz) = 40fabd560f4984e82c30d08e9addf1c76afb5954cac6954c3f51faccbe80f8ec -SIZE (f2c-freebsd.3.0.0.tar.gz) = 266829 +MD5 (f2c-20060506/f2c.tar) = cd0d08d082a41235b17fbdb708acbe64 +SHA256 (f2c-20060506/f2c.tar) = f4d4882436e51f6ad14bdeb215435ddccccab74ea41a41a8c6e197bbf5ce2ba1 +SIZE (f2c-20060506/f2c.tar) = 1200128 diff --git a/lang/f2c/files/f2c.h.alpha b/lang/f2c/files/f2c.h.alpha deleted file mode 100644 index 61f72aff4461..000000000000 --- a/lang/f2c/files/f2c.h.alpha +++ /dev/null @@ -1,223 +0,0 @@ -/* f2c.h -- Standard Fortran to C header file */ - -/** barf [ba:rf] 2. "He suggested using FORTRAN, and everybody barfed." - - - From The Shogakukan DICTIONARY OF NEW ENGLISH (Second edition) */ - -#ifndef F2C_INCLUDE -#define F2C_INCLUDE - -typedef int integer; -typedef unsigned int uinteger; -typedef char *address; -typedef short int shortint; -typedef float real; -typedef double doublereal; -typedef struct { real r, i; } complex; -typedef struct { doublereal r, i; } doublecomplex; -typedef int logical; -typedef short int shortlogical; -typedef char logical1; -typedef char integer1; -#if 0 /* Adjust for integer*8. */ -typedef long long longint; /* system-dependent */ -typedef unsigned long long ulongint; /* system-dependent */ -#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) -#define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) -#endif - -#define TRUE_ (1) -#define FALSE_ (0) - -/* Extern is for use with -E */ -#ifndef Extern -#define Extern extern -#endif - -/* I/O stuff */ - -#ifdef f2c_i2 -/* for -i2 */ -typedef short flag; -typedef short ftnlen; -typedef short ftnint; -#else -typedef int flag; -typedef int ftnlen; -typedef int ftnint; -#endif - -/*external read, write*/ -typedef struct -{ flag cierr; - ftnint ciunit; - flag ciend; - char *cifmt; - ftnint cirec; -} cilist; - -/*internal read, write*/ -typedef struct -{ flag icierr; - char *iciunit; - flag iciend; - char *icifmt; - ftnint icirlen; - ftnint icirnum; -} icilist; - -/*open*/ -typedef struct -{ flag oerr; - ftnint ounit; - char *ofnm; - ftnlen ofnmlen; - char *osta; - char *oacc; - char *ofm; - ftnint orl; - char *oblnk; -} olist; - -/*close*/ -typedef struct -{ flag cerr; - ftnint cunit; - char *csta; -} cllist; - -/*rewind, backspace, endfile*/ -typedef struct -{ flag aerr; - ftnint aunit; -} alist; - -/* inquire */ -typedef struct -{ flag inerr; - ftnint inunit; - char *infile; - ftnlen infilen; - ftnint *inex; /*parameters in standard's order*/ - ftnint *inopen; - ftnint *innum; - ftnint *innamed; - char *inname; - ftnlen innamlen; - char *inacc; - ftnlen inacclen; - char *inseq; - ftnlen inseqlen; - char *indir; - ftnlen indirlen; - char *infmt; - ftnlen infmtlen; - char *inform; - ftnint informlen; - char *inunf; - ftnlen inunflen; - ftnint *inrecl; - ftnint *innrec; - char *inblank; - ftnlen inblanklen; -} inlist; - -#define VOID void - -union Multitype { /* for multiple entry points */ - integer1 g; - shortint h; - integer i; - /* longint j; */ - real r; - doublereal d; - complex c; - doublecomplex z; - }; - -typedef union Multitype Multitype; - -/*typedef long int Long;*/ /* No longer used; formerly in Namelist */ - -struct Vardesc { /* for Namelist */ - char *name; - char *addr; - ftnlen *dims; - int type; - }; -typedef struct Vardesc Vardesc; - -struct Namelist { - char *name; - Vardesc **vars; - int nvars; - }; -typedef struct Namelist Namelist; - -#define abs(x) ((x) >= 0 ? (x) : -(x)) -#define dabs(x) (doublereal)abs(x) -#define min(a,b) ((a) <= (b) ? (a) : (b)) -#define max(a,b) ((a) >= (b) ? (a) : (b)) -#define dmin(a,b) (doublereal)min(a,b) -#define dmax(a,b) (doublereal)max(a,b) -#define bit_test(a,b) ((a) >> (b) & 1) -#define bit_clear(a,b) ((a) & ~((uinteger)1 << (b))) -#define bit_set(a,b) ((a) | ((uinteger)1 << (b))) - -/* procedure parameter types for -A and -C++ */ - -#define F2C_proc_par_types 1 -#ifdef __cplusplus -typedef int /* Unknown procedure type */ (*U_fp)(...); -typedef shortint (*J_fp)(...); -typedef integer (*I_fp)(...); -typedef real (*R_fp)(...); -typedef doublereal (*D_fp)(...), (*E_fp)(...); -typedef /* Complex */ VOID (*C_fp)(...); -typedef /* Double Complex */ VOID (*Z_fp)(...); -typedef logical (*L_fp)(...); -typedef shortlogical (*K_fp)(...); -typedef /* Character */ VOID (*H_fp)(...); -typedef /* Subroutine */ int (*S_fp)(...); -#else -typedef int /* Unknown procedure type */ (*U_fp)(); -typedef shortint (*J_fp)(); -typedef integer (*I_fp)(); -typedef real (*R_fp)(); -typedef doublereal (*D_fp)(), (*E_fp)(); -typedef /* Complex */ VOID (*C_fp)(); -typedef /* Double Complex */ VOID (*Z_fp)(); -typedef logical (*L_fp)(); -typedef shortlogical (*K_fp)(); -typedef /* Character */ VOID (*H_fp)(); -typedef /* Subroutine */ int (*S_fp)(); -#endif -/* E_fp is for real functions when -R is not specified */ -typedef VOID C_f; /* complex function */ -typedef VOID H_f; /* character function */ -typedef VOID Z_f; /* double complex function */ -typedef doublereal E_f; /* real function with -R not specified */ - -/* undef any lower-case symbols that your C compiler predefines, e.g.: */ - -#ifndef Skip_f2c_Undefs -#undef cray -#undef gcos -#undef mc68010 -#undef mc68020 -#undef mips -#undef pdp11 -#undef sgi -#undef sparc -#undef sun -#undef sun2 -#undef sun3 -#undef sun4 -#undef u370 -#undef u3b -#undef u3b2 -#undef u3b5 -#undef unix -#undef vax -#endif -#endif diff --git a/lang/f2c/files/patch-f2c_f2c.h b/lang/f2c/files/patch-f2c_f2c.h deleted file mode 100644 index ba8a7ff56830..000000000000 --- a/lang/f2c/files/patch-f2c_f2c.h +++ /dev/null @@ -1,44 +0,0 @@ ---- f2c/f2c.h.orig Mon Jan 1 12:03:53 2001 -+++ f2c/f2c.h Tue Oct 4 19:30:53 2005 -@@ -6,22 +6,23 @@ - - #ifndef F2C_INCLUDE - #define F2C_INCLUDE -+#include <sys/types.h> - --typedef long int integer; --typedef unsigned long int uinteger; -+typedef int32_t integer; -+typedef uint32_t uinteger; - typedef char *address; - typedef short int shortint; - typedef float real; - typedef double doublereal; - typedef struct { real r, i; } complex; - typedef struct { doublereal r, i; } doublecomplex; --typedef long int logical; -+typedef int32_t logical; - typedef short int shortlogical; - typedef char logical1; - typedef char integer1; - #ifdef INTEGER_STAR_8 /* Adjust for integer*8. */ --typedef long long longint; /* system-dependent */ --typedef unsigned long long ulongint; /* system-dependent */ -+typedef int64_t longint; /* system-dependent */ -+typedef uint64_t ulongint; /* system-dependent */ - #define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b))) - #define qbit_set(a,b) ((a) | ((ulongint)1 << (b))) - #endif -@@ -42,9 +43,9 @@ - typedef short ftnlen; - typedef short ftnint; - #else --typedef long int flag; --typedef long int ftnlen; --typedef long int ftnint; -+typedef int32_t flag; -+typedef int32_t ftnlen; -+typedef int32_t ftnint; - #endif - - /*external read, write*/ diff --git a/lang/f2c/files/patch-libf2c_MAIN.c b/lang/f2c/files/patch-libf2c_MAIN.c new file mode 100644 index 000000000000..de56e9d49380 --- /dev/null +++ b/lang/f2c/files/patch-libf2c_MAIN.c @@ -0,0 +1,21 @@ +--- libf2c/MAIN.c.orig Sun Jul 30 15:06:49 2006 ++++ libf2c/MAIN.c Sun Jul 30 15:12:02 2006 +@@ -0,0 +1,18 @@ ++/* $FreeBSD$ ++ Add a pseudo entry point for cases where the main FOTRAN program is missing ++ e.g. ports/cad/tochnog. ++ ++ Credit: adapted from Sergio Gelato <gelato (at) sissa.it> on Usenet. ++*/ ++ ++#include <stdio.h> ++#include <stdlib.h> ++#include <sys/cdefs.h> ++ ++__weak_reference(missing_MAIN__,MAIN__); ++ ++void missing_MAIN__ (void) ++{ ++ fprintf(stderr, "The Fortran main program is missing.\n"); ++ abort(); ++} diff --git a/lang/f2c/files/patch-libf2c_Makefile b/lang/f2c/files/patch-libf2c_Makefile new file mode 100644 index 000000000000..685e6442fde3 --- /dev/null +++ b/lang/f2c/files/patch-libf2c_Makefile @@ -0,0 +1,50 @@ +--- libf2c/Makefile.orig Fri Jun 6 15:09:42 2003 ++++ libf2c/Makefile Sun Jul 30 11:48:17 2006 +@@ -13,9 +13,9 @@ + # to the CFLAGS = line below. + + .SUFFIXES: .c .o +-CC = cc ++#CC = cc + SHELL = /bin/sh +-CFLAGS = -O ++CFLAGS += -fPIC + + # compile, then strip unnecessary symbols + .c.o: +@@ -29,7 +29,7 @@ + + MISC = f77vers.o i77vers.o main.o s_rnge.o abort_.o exit_.o getarg_.o iargc_.o\ + getenv_.o signal_.o s_stop.o s_paus.o system_.o cabs.o\ +- derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o ++ derf_.o derfc_.o erf_.o erfc_.o sig_die.o uninit.o MAIN.o + POW = pow_ci.o pow_dd.o pow_di.o pow_hh.o pow_ii.o pow_ri.o pow_zi.o pow_zz.o + CX = c_abs.o c_cos.o c_div.o c_exp.o c_log.o c_sin.o c_sqrt.o + DCX = z_abs.o z_cos.o z_div.o z_exp.o z_log.o z_sin.o z_sqrt.o +@@ -82,7 +82,7 @@ + ## of "cc -shared". + + libf2c.so: $(OFILES) +- cc -shared -o libf2c.so $(OFILES) ++ $(CC) -shared -o libf2c.so $(OFILES) + + ### If your system lacks ranlib, you don't need it; see README. + +@@ -110,12 +110,15 @@ + # If your system lacks onexit() and you are not using an + # ANSI C compiler, then you should uncomment the following + # two lines (for compiling main.o): +-#main.o: main.c +-# $(CC) -c -DNO_ONEXIT -DSkip_f2c_Undefs main.c ++main.o: main.c ++ $(CC) -c $(CFLAGS) -DNO_ONEXIT -DSkip_f2c_Undefs main.c + # On at least some Sun systems, it is more appropriate to + # uncomment the following two lines: + #main.o: main.c + # $(CC) -c -Donexit=on_exit -DSkip_f2c_Undefs main.c ++ ++MAIN.o: MAIN.c ++ $(CC) -c $(CFLAGS) -DSkip_f2c_Undefs MAIN.c + + install: libf2c.a + cp libf2c.a $(LIBDIR) diff --git a/lang/f2c/files/patch-src_Makefile b/lang/f2c/files/patch-src_Makefile new file mode 100644 index 000000000000..052f1045a13d --- /dev/null +++ b/lang/f2c/files/patch-src_Makefile @@ -0,0 +1,13 @@ +--- ./src/Makefile.orig Sat Mar 5 02:24:21 2005 ++++ ./src/Makefile Thu Jul 27 22:50:42 2006 +@@ -1,8 +1,8 @@ + # Makefile for f2c, a Fortran 77 to C converter + + .SUFFIXES: .c .o +-CC = cc +-CFLAGS = -O ++#CC = cc ++#CFLAGS = -O + SHELL = /bin/sh + YACC = yacc + YFLAGS = diff --git a/lang/f2c/pkg-descr b/lang/f2c/pkg-descr index aff32287fed7..f5c442c2ed59 100644 --- a/lang/f2c/pkg-descr +++ b/lang/f2c/pkg-descr @@ -1,7 +1,6 @@ f2c and its run-time library, libf2c.a, are a port of the Fortran-to-C converter available from ftp.netlib.org. This software was originally developed by AT&T, Lucent Technologies, -and Bellcore. The port contains some enhancements for FreeBSD. +and Bellcore. WWW: http://www.netlib.org/ -FTP: ftp://ftp.netlib.org/ diff --git a/lang/f2c/pkg-plist b/lang/f2c/pkg-plist index 543fc3831297..b3bc4a54fdd1 100644 --- a/lang/f2c/pkg-plist +++ b/lang/f2c/pkg-plist @@ -1,6 +1,6 @@ bin/f2c +%%FC%%bin/%%FCNAME%% include/f2c.h lib/libf2c.a -lib/libf2c.so.2 lib/libf2c.so -@exec /sbin/ldconfig -m %D/lib +lib/libf2c.so.2 |