summaryrefslogtreecommitdiff
path: root/lang/f2c/files
diff options
context:
space:
mode:
authorasau <asau@pkgsrc.org>2009-12-03 12:39:59 +0000
committerasau <asau@pkgsrc.org>2009-12-03 12:39:59 +0000
commite6513c823228b60fb7a2dae2b975e0e06249adfb (patch)
treef6a3494c666d7445762600246ac53c95e7478a46 /lang/f2c/files
parent45432c7f6a18dfd083b427589344a76615136880 (diff)
downloadpkgsrc-e6513c823228b60fb7a2dae2b975e0e06249adfb.tar.gz
Split f2c into library (devel/libf2c) and translator packages.
Requested by <joerg>.
Diffstat (limited to 'lang/f2c/files')
-rw-r--r--lang/f2c/files/chktypes.c118
-rw-r--r--lang/f2c/files/f2c-f77.in2
-rw-r--r--lang/f2c/files/f2c.mk2
-rw-r--r--lang/f2c/files/libf77.mk65
-rw-r--r--lang/f2c/files/libi77.mk46
-rw-r--r--lang/f2c/files/libtool.mk40
-rw-r--r--lang/f2c/files/main.mk3
7 files changed, 2 insertions, 274 deletions
diff --git a/lang/f2c/files/chktypes.c b/lang/f2c/files/chktypes.c
deleted file mode 100644
index a4bdf3ce8e8..00000000000
--- a/lang/f2c/files/chktypes.c
+++ /dev/null
@@ -1,118 +0,0 @@
-/* $NetBSD: chktypes.c,v 1.1 2009/11/22 12:52:54 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);
-}
diff --git a/lang/f2c/files/f2c-f77.in b/lang/f2c/files/f2c-f77.in
index b251d3425e5..998e40bb4e9 100644
--- a/lang/f2c/files/f2c-f77.in
+++ b/lang/f2c/files/f2c-f77.in
@@ -161,7 +161,7 @@ ARGS=
CPPFLAGS=
CFLAGS=-I@PREFIX@/include
LIBS=
-FLIBS="-Wl,-R@PREFIX@/lib -L@PREFIX@/lib -lF77 -lI77 -lm"
+FLIBS="-Wl,-R@PREFIX@/lib -L@PREFIX@/lib -lf2c -lm"
VERBOSE=no
while
diff --git a/lang/f2c/files/f2c.mk b/lang/f2c/files/f2c.mk
index fc8a82521c3..7e81ac6d287 100644
--- a/lang/f2c/files/f2c.mk
+++ b/lang/f2c/files/f2c.mk
@@ -7,7 +7,7 @@ SRCS= main.c init.c gram.y lex.c proc.c equiv.c data.c format.c \
output.c p1output.c pread.c put.c putpcc.c vax.c formatdata.c \
parse_args.c niceprintf.c cds.c sysdep.c version.c $(MALLOC)
-F2CSRCDIR= $(.CURDIR)/../distrib/src
+F2CSRCDIR= .
.PATH: $(F2CSRCDIR)
# To use the malloc whose source accompanies the f2c source,
diff --git a/lang/f2c/files/libf77.mk b/lang/f2c/files/libf77.mk
deleted file mode 100644
index cde8ceacf3b..00000000000
--- a/lang/f2c/files/libf77.mk
+++ /dev/null
@@ -1,65 +0,0 @@
-LIB= F77
-SHLIB_MAJOR= 0
-SHLIB_MINOR= 0
-
-# 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>
-.include <bsd.obj.mk>
-.include <bsd.dep.mk>
-.-include <bsd.depall.mk>
-.MAIN: all
-.endif
-# .include <bsd.init.mk>
-.PATH: $(LIBF2CSRCDIR)
-
-SRCS= $(MISC) $(POW) $(CX) $(DCX) $(REAL) $(DBL) $(INT) \
- $(HALF) $(CMP) $(EFL) $(CHAR) $(F90BIT) $(TIME)
-DPSRCS= f2c.h signal1.h
-
-CPPFLAGS= -I. # for generated include files
-CPPFLAGS+= -DSkip_f2c_Undefs
-
-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
-
-
-f2c.h: f2c.h0; cp $> $@
-signal1.h: signal1.h0; cp $> $@
-
-CLEANFILES= $(DPSRCS)
-
-INCS= f2c.h
-install: incinstall
-
-.if defined(MKLTARCHIVE) && !empty(MKLTARCHIVE:M[Yy][Ee][Ss])
-.include "../libtool.mk"
-.include "bsd.inc.mk"
-.else
-.include "bsd.lib.mk"
-.endif
diff --git a/lang/f2c/files/libi77.mk b/lang/f2c/files/libi77.mk
deleted file mode 100644
index c92a27051e6..00000000000
--- a/lang/f2c/files/libi77.mk
+++ /dev/null
@@ -1,46 +0,0 @@
-LIB= I77
-SHLIB_MAJOR= 0
-SHLIB_MINOR= 0
-
-# 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>
-.include <bsd.obj.mk>
-.include <bsd.dep.mk>
-.-include <bsd.depall.mk>
-.MAIN: all
-.endif
-# .include <bsd.init.mk>
-.PATH: $(LIBF2CSRCDIR)
-
-SRCS = 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
-SRCS+= i77vers.c # previously known as "Version.c"
-# Previously there was "backspace.c" instead of "backspac.c".
-
-DPSRCS= f2c.h sysdep1.h
-
-CPPFLAGS= -I. # for generated include files
-
-f2c.h: f2c.h0; cp $> $@
-sysdep1.h: sysdep1.h0; cp $> $@
-
-CLEANFILES= $(DPSRCS)
-
-CPPFLAGS+= -DNO_My_ctype
-CPPFLAGS+= -DSkip_f2c_Undefs
-
-i77vers.lo: i77vers.c
- $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c $(.ALLSRC:M*.c)
-
-.if defined(MKLTARCHIVE) && !empty(MKLTARCHIVE:M[Yy][Ee][Ss])
-.include "../libtool.mk"
-.else
-.include "bsd.lib.mk"
-.endif
diff --git a/lang/f2c/files/libtool.mk b/lang/f2c/files/libtool.mk
deleted file mode 100644
index 4f692152e5f..00000000000
--- a/lang/f2c/files/libtool.mk
+++ /dev/null
@@ -1,40 +0,0 @@
-# building library using libtool, simplified
-
-# 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>
-.include <bsd.obj.mk>
-.include <bsd.dep.mk>
-.-include <bsd.depall.mk>
-.MAIN: all
-.endif
-# .include <bsd.init.mk>
-
-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 $(BSD_INSTALL_DATA) -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
diff --git a/lang/f2c/files/main.mk b/lang/f2c/files/main.mk
deleted file mode 100644
index fb476b0563e..00000000000
--- a/lang/f2c/files/main.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-SUBDIR= libF77 libI77 src
-
-.include <bsd.subdir.mk>