Import of pkgsrc-2013Q2

This commit is contained in:
2013-09-26 17:14:40 +02:00
commit 785076ae39
74991 changed files with 4380255 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
libf2c is Fortran support library distributed by Netlib with f2c
(Fortran 77 to C translator).
libf2c combines libF77 and libI77 in one library.
+58
View File
@@ -0,0 +1,58 @@
# $NetBSD: Makefile,v 1.8 2013/04/07 20:43:26 asau Exp $
DISTNAME= libf2c-20090201
PKGREVISION= 3
CATEGORIES= lang
MASTER_SITES= ${MASTER_SITE_LOCAL} # see notes below
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.netlib.org/f2c/index.html
COMMENT= f2c Fortran support library
CONFLICTS= egcs-current-19980608 \
f2c<=20090411
EXTRACT_DIR= ${WRKDIR}/libf2c
WRKSRC= ${EXTRACT_DIR}
USE_BSD_MAKEFILE= yes
USE_LIBTOOL= yes
MAKE_FLAGS= LIBF2CSRCDIR=. MKLTARCHIVE=yes
INSTALLATION_DIRS= lib include
TEST_TARGET= test
pre-extract:
@cd ${WRKDIR} && ${MKDIR} ${EXTRACT_DIR}
post-extract:
@${CP} ${FILESDIR:Q}/libf2c.mk ${WRKSRC}/Makefile
@${CP} ${FILESDIR:Q}/ltlib.mk ${WRKSRC}/ltlib.mk
@${CP} ${FILESDIR:Q}/bsd.init.mk ${WRKSRC}/bsd.init.mk # pkgsrc lossage
@${RM} -f ${WRKSRC}/ctype.h # don't mess with system ctype.h
@${CP} ${FILESDIR:Q}/chktypes.c ${WRKDIR}
do-test:
@cd ${WRKDIR} && ${CC} -I libf2c -o chktypes chktypes.c
${WRKDIR}/chktypes -v
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
BUILDLINK_TRANSFORM+= rm:-Werror
.endif
# Notes
#
# Original distfile doesn't carry version information,
# This makes it difficult at best to use the real master site.
# We create our local the distfile:
# ftp http://www.netlib.org/f2c/libf2c.zip
# unzip -d tmp libf2c.zip
# (cd tmp; ls | pax -zwf ../libf2c-yyyymmdd.tar.gz)
#
# Date corresponds to the last libf2c change from:
# http://www.netlib.org/f2c/changes
.include "../../mk/bsd.pkg.mk"
+3
View File
@@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2009/12/02 22:32:46 asau Exp $
include/f2c.h
lib/libf2c.la
+12
View File
@@ -0,0 +1,12 @@
# $NetBSD: buildlink3.mk,v 1.4 2009/12/29 18:12:44 asau Exp $
BUILDLINK_TREE+= libf2c
.if !defined(LIBF2C_BUILDLINK3_MK)
LIBF2C_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.libf2c+= libf2c>=20090201nb3
BUILDLINK_PKGSRCDIR.libf2c?= ../../devel/libf2c
.endif # LIBF2C_BUILDLINK3_MK
BUILDLINK_TREE+= -libf2c
+8
View File
@@ -0,0 +1,8 @@
$NetBSD: distinfo,v 1.4 2009/12/29 18:12:44 asau Exp $
SHA1 (libf2c-20090201.tar.gz) = 85bd1602dce67a4d784fa9815c993202b1da3216
RMD160 (libf2c-20090201.tar.gz) = 27fe1476eef9431042b67660120285395850d6a7
Size (libf2c-20090201.tar.gz) = 81983 bytes
SHA1 (patch-ai) = 3213ead493c570eb70bbd43e47f6bbc4bb762796
SHA1 (patch-aj) = 78ff4ad86970e1a32eb65ca4364dda0004959cf3
SHA1 (patch-ak) = 0369faf3d5a09a308915452afd58850c6e6a1731
+9
View File
@@ -0,0 +1,9 @@
# Simulate "bsd.init.mk" because pkgsrc doesn't provide it for some reason:
.if !target(__initialized__)
__initialized__:
.if exists(${.CURDIR}/../Makefile.inc)
.include "${.CURDIR}/../Makefile.inc"
.endif
.include <bsd.own.mk>
.MAIN: all
.endif
+118
View File
@@ -0,0 +1,118 @@
/* $NetBSD: chktypes.c,v 1.1.1.1 2009/12/02 22:32:47 asau Exp $ */
/*
does a sanity check of the settings in f2c.h If these settings
are wrong, a message is printed asking that the package maintainer
be contacted.
*/
#include <stdio.h>
#include <string.h>
#include "f2c.h"
int main(int argc, char *argv[])
{
int err=0;
int pok=0;
if(argc > 1)
{
if(strncmp(argv[1],"-v",2)==0)
{
pok=1;
}
}
if(sizeof(doublecomplex) == 2*sizeof(doublereal))
{
if(pok)
printf("sizeof(doublecomplex) = 2*sizeof(doublereal) = %d\n",sizeof(doublecomplex));
}
else
{
printf("ERROR:\tsizeof(doublecomplex) \t= %d\n\t2*sizeof(doublereal) \t= %d\n",
sizeof(doublecomplex),2*sizeof(doublereal));
err=1;
}
if(sizeof(doublereal) == sizeof(complex))
{
if(pok)
printf("sizeof(doublereal) = sizeof(complex) = %d\n",sizeof(doublereal));
}
else
{
printf("ERROR:\tsizeof(doublereal) \t= %d\n\tsizeof(complex) \t= %d\n",
sizeof(doublereal),sizeof(complex));
err=1;
}
if(sizeof(doublereal) == 2*sizeof(real))
{
if(pok)
printf("sizeof(doublereal) = 2*sizeof(real) = %d\n",sizeof(doublereal));
}
else
{
printf("ERROR:\tsizeof(doublereal) \t= %d\n\t2*sizeof(real)\t = %d\n",
sizeof(doublereal),2*sizeof(real));
err=1;
}
if(sizeof(real) == sizeof(integer))
{
if(pok)
printf("sizeof(real) = sizeof(integer) = %d\n",sizeof(real));
}
else
{
printf("ERROR:\tsizeof(real) \t= %d\n\tsizeof(integer) \t= %d\n",
sizeof(real),sizeof(integer));
err=1;
}
if(sizeof(real) == sizeof(logical))
{
if(pok)
printf("sizeof(real) = sizeof(logical) = %d\n",sizeof(real));
}
else
{
printf("ERROR:\tsizeof(real) \t= %d\n\tsizeof(logical) \t= %d\n",
sizeof(real),sizeof(logical));
err=1;
}
if(sizeof(real) == 2*sizeof(shortint))
{
if(pok)
printf("sizeof(real) = 2*sizeof(shortint) = %d\n",sizeof(real));
}
else
{
printf("ERROR:\tsizeof(real) \t= %d\n\t2*sizeof() \t= %d\n",
sizeof(real),2*sizeof(shortint));
err=1;
}
if(pok)
{
printf("\n\n-------------------\n");
printf("sizeof(short) = %d\n",sizeof(short));
printf("sizeof(int) = %d\n",sizeof(int));
printf("sizeof(float) = %d\n",sizeof(float));
printf("sizeof(long) = %d\n",sizeof(long));
printf("sizeof(double) = %d\n",sizeof(double));
printf("\n\n-------------------\n");
}
if(err)
{
printf("The header file f2c.h has the wrong typedef's for your machine\n");
printf("architecture. Please contact the package maintainer.\n");
}
return(err);
}
+67
View File
@@ -0,0 +1,67 @@
LIB= f2c
SHLIB_MAJOR= 0
SHLIB_MINOR= 0
.include "bsd.init.mk"
.PATH: $(LIBF2CSRCDIR)
INCS= f2c.h
SRCS= $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
$(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT) $(TIME)
SRCS+= $(IO) # libI77 part
DPSRCS= f2c.h signal1.h # generated files
DPSRCS+= sysdep1.h # libI77 generated file
CLEANFILES= $(DPSRCS)
CPPFLAGS+= -I/usr/include # override "." to pull in correct <ctype.h>
CPPFLAGS+= -I. # for generated include files
CPPFLAGS+= -DSkip_f2c_Undefs
CPPFLAGS+= -DNO_My_ctype # internal "ctype" causes more problems
# libF77 part:
MISC = f77_aloc.c f77vers.c main.c s_rnge.c abort_.c getarg_.c iargc_.c \
getenv_.c signal_.c s_stop.c s_paus.c system_.c cabs.c \
derf_.c derfc_.c erf_.c erfc_.c sig_die.c exit_.c
POW = pow_ci.c pow_dd.c pow_di.c pow_hh.c pow_ii.c pow_ri.c pow_zi.c pow_zz.c
CX = c_abs.c c_cos.c c_div.c c_exp.c c_log.c c_sin.c c_sqrt.c
DCX = z_abs.c z_cos.c z_div.c z_exp.c z_log.c z_sin.c z_sqrt.c
REAL = r_abs.c r_acos.c r_asin.c r_atan.c r_atn2.c r_cnjg.c r_cos.c \
r_cosh.c r_dim.c r_exp.c r_imag.c r_int.c \
r_lg10.c r_log.c r_mod.c r_nint.c r_sign.c \
r_sin.c r_sinh.c r_sqrt.c r_tan.c r_tanh.c
DBL = d_abs.c d_acos.c d_asin.c d_atan.c d_atn2.c \
d_cnjg.c d_cos.c d_cosh.c d_dim.c d_exp.c \
d_imag.c d_int.c d_lg10.c d_log.c d_mod.c \
d_nint.c d_prod.c d_sign.c d_sin.c d_sinh.c \
d_sqrt.c d_tan.c d_tanh.c
INT = i_abs.c i_dim.c i_dnnt.c i_indx.c i_len.c i_mod.c i_nint.c i_sign.c
HALF = h_abs.c h_dim.c h_dnnt.c h_indx.c h_len.c h_mod.c h_nint.c h_sign.c
CMP = l_ge.c l_gt.c l_le.c l_lt.c hl_ge.c hl_gt.c hl_le.c hl_lt.c
EFL = ef1asc_.c ef1cmc_.c
CHAR = s_cat.c s_cmp.c s_copy.c
F90BIT = lbitbits.c lbitshft.c
QINT = pow_qq.c qbitbits.c qbitshft.c
TIME = dtime_.c etime_.c
# libI77 part:
IO = backspac.c close.c dfe.c dolio.c due.c endfile.c err.c \
fmt.c fmtlib.c ftell_.c iio.c ilnw.c inquire.c lread.c lwrite.c \
open.c rdfmt.c rewind.c rsfe.c rsli.c rsne.c sfe.c sue.c typesize.c \
uio.c util.c wref.c wrtfmt.c wsfe.c wsle.c wsne.c xwsne.c
IO+= i77vers.c # previously known as "Version.c"
# Previously there was "backspace.c" instead of "backspac.c".
f2c.h: f2c.h0; cp $> $@
signal1.h: signal1.h0; cp $> $@
sysdep1.h: sysdep1.h0; cp $> $@ # libI77
# i77vers.lo: i77vers.c
# $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(.ALLSRC:M*.c)
install: incinstall # install include files
.if defined(MKLTARCHIVE) && !empty(MKLTARCHIVE:M[Yy][Ee][Ss])
.include "ltlib.mk"
.else
.include "bsd.lib.mk"
.endif
+34
View File
@@ -0,0 +1,34 @@
# building library using libtool, simplified
.include "bsd.init.mk"
.include <bsd.obj.mk>
.include <bsd.dep.mk>
.-include <bsd.depall.mk> # it doesn't exist on NetBSD
OBJS+= $(SRCS:.c=.o)
LTOBJS+= $(SRCS:.c=.lo)
.SUFFIXES: .c .lo
.c.lo:
$(LIBTOOL) --mode=compile $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
lib$(LIB).la: $(LTOBJS)
$(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(CPPFLAGS) -o $@ $(LTOBJS) $(LDFLAGS) -rpath $(LIBDIR) -version-info $(SHLIB_MAJOR):$(SHLIB_MINOR)
$(LTOBJS): $(DPSRCS)
all: lib$(LIB).la
install: lib$(LIB).la
$(LIBTOOL) --mode=install $(INSTALL) $(RENAME) $(PRESERVE) $(COPY) $(INSTPRIV) \
-o $(LIBOWN) -g $(LIBGRP) -m $(LIBMODE) \
lib$(LIB).la $(DESTDIR)$(LIBDIR)
clean cleandir:
rm -f $(CLEANFILES)
rm -f lib$(LIB).la $(LTOBJS) $(OBJS)
rm -rf .libs
LIBTOOL?= libtool
LIBDIR?= /usr/local/lib # required
.include "bsd.inc.mk"
+59
View File
@@ -0,0 +1,59 @@
$NetBSD: patch-ai,v 1.3 2009/12/07 13:00:56 tnn Exp $
--- f2c.h0.orig 1999-09-07 19:46:24.000000000 +0200
+++ f2c.h0
@@ -7,21 +7,35 @@
#ifndef F2C_INCLUDE
#define F2C_INCLUDE
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef int integer;
+typedef unsigned int uinteger;
+#else
typedef long int integer;
typedef unsigned long int uinteger;
+#endif
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;
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef int logical;
+#else
typedef long int logical;
+#endif
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 */
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef long longint; /* system-dependent */
+typedef unsigned long ulongint; /* system-dependent */
+#else
+typedef long long longint; /* system-dependent - oh yeah*/
+typedef unsigned long long ulongint; /* system-dependent - oh yeah*/
+#endif
#define qbit_clear(a,b) ((a) & ~((ulongint)1 << (b)))
#define qbit_set(a,b) ((a) | ((ulongint)1 << (b)))
#endif
@@ -42,10 +56,16 @@ typedef short flag;
typedef short ftnlen;
typedef short ftnint;
#else
+#if defined(__alpha__) || defined(__sparc64__) || defined(__x86_64__) || defined(__ia64__)
+typedef int flag;
+typedef int ftnlen;
+typedef int ftnint;
+#else
typedef long int flag;
typedef long int ftnlen;
typedef long int ftnint;
#endif
+#endif
/*external read, write*/
typedef struct
+27
View File
@@ -0,0 +1,27 @@
$NetBSD: patch-aj,v 1.1 2009/12/07 13:00:56 tnn Exp $
--- signal_.c.orig 2000-07-05 04:04:56.000000000 +0200
+++ signal_.c
@@ -1,10 +1,11 @@
+#include <stdint.h>
#include "f2c.h"
#include "signal1.h"
#ifdef __cplusplus
extern "C" {
#endif
- ftnint
+ftnint
#ifdef KR_headers
signal_(sigp, proc) integer *sigp; sig_pf proc;
#else
@@ -14,7 +15,8 @@ signal_(integer *sigp, sig_pf proc)
int sig;
sig = (int)*sigp;
- return (ftnint)signal(sig, proc);
+ /* xxx amd64 can't hold the return value */
+ return (ftnint)(uintptr_t)signal(sig, proc);
}
#ifdef __cplusplus
}
+14
View File
@@ -0,0 +1,14 @@
$NetBSD: patch-ak,v 1.1 2009/12/29 18:12:44 asau Exp $
Make MAIN__ weak in order to allow non-Fortran programs to use the library.
--- main.c.orig 2008-04-06 06:42:46.000000000 +0400
+++ main.c 2009-12-29 18:18:21.000000000 +0300
@@ -49,6 +49,7 @@
#define Int /* int */
#else
extern void f_init(void), sig_die(const char*, int);
+#pragma weak MAIN__
extern int MAIN__(void);
#define Int int
#endif