summaryrefslogtreecommitdiff
path: root/lang/f2c/patches/patch-aa
blob: 7ac8c5bab9418b08cc7779b2cfafb667035c8222 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
$NetBSD: patch-aa,v 1.11 2002/06/17 04:21:09 dmcmahill Exp $

Add a top level Makefile

--- /dev/null	Thu Apr  5 17:09:09 2001
+++ Makefile	Thu Apr  5 18:31:35 2001
@@ -0,0 +1,64 @@
+# Top level Makefile for f2c, libF77, and libI77
+
+all: f2c libf2c/libf2c.a f2c-f77 man
+
+
+f2c:
+	@echo Making all in 'src'
+	cd src; ${MAKE} all
+	cp src/f2c f2c
+
+libF77/libF77.a:
+	@echo Making all in 'libF77'
+	cd libF77 &&  ${MAKE} all
+
+libI77/libI77.a:
+	@echo Making all in 'libI77'
+	cd libI77 &&  ${MAKE} all
+
+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
+
+man: f2c.0
+
+f2c.0: f2c.1t
+	rm f2c.1
+	sed 's!/usr!${PREFIX}!g' f2c.1t | sed 's!lib/libc.a!usr/lib/libc.a!g' > f2c.1
+	nroff -man f2c.1 > f2c.0
+
+
+install::
+	-@mkdir -p ${PREFIX}/bin
+	${BSD_INSTALL_PROGRAM} ./src/f2c ${PREFIX}/bin
+	${BSD_INSTALL_SCRIPT} ./f2c-f77 ${PREFIX}/bin
+	-@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
+	${BSD_INSTALL_DATA} ./f2c.ps ${PREFIX}/share/doc/f2c
+	${BSD_INSTALL_DATA} ./changes ${PREFIX}/share/doc/f2c
+	${BSD_INSTALL_MAN} ./f2c.1 ${PREFIX}/man/man1
+	${BSD_INSTALL_MAN} ./f2c.0 ${PREFIX}/man/cat1
+
+f2c-f77: fc
+	sed 's!@PREFIX@!${PREFIX}!g' fc > f2c-f77
+