Fri Sep 16 19:53:44 2022 UTC ()
lang/smlnj11072: remove no longer needed powerpc nlffi section.

This now caused the build to fail, and the build and install
now succeeds on NetBSD/macppc.


(he)
diff -r1.12 -r1.13 pkgsrc/lang/smlnj11072/Makefile

cvs diff -r1.12 -r1.13 pkgsrc/lang/smlnj11072/Makefile (switch to unified diff)

--- pkgsrc/lang/smlnj11072/Makefile 2020/01/26 17:31:32 1.12
+++ pkgsrc/lang/smlnj11072/Makefile 2022/09/16 19:53:44 1.13
@@ -1,158 +1,144 @@ @@ -1,158 +1,144 @@
1# $NetBSD: Makefile,v 1.12 2020/01/26 17:31:32 rillig Exp $ 1# $NetBSD: Makefile,v 1.13 2022/09/16 19:53:44 he Exp $
2# 2#
3 3
4DISTNAME= boot.${BOX}-unix 4DISTNAME= boot.${BOX}-unix
5PKGNAME= smlnj-${SML_VERSION} 5PKGNAME= smlnj-${SML_VERSION}
6PKGREVISION= 1 6PKGREVISION= 1
7CATEGORIES= lang 7CATEGORIES= lang
8MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/${SML_VERSION}/ 8MASTER_SITES= http://smlnj.cs.uchicago.edu/dist/working/${SML_VERSION}/
9DISTFILES= MLRISC.tgz \ 9DISTFILES= MLRISC.tgz \
10 boot.${BOX}-unix.tgz \ 10 boot.${BOX}-unix.tgz \
11 ckit.tgz \ 11 ckit.tgz \
12 cm.tgz \ 12 cm.tgz \
13 cml.tgz \ 13 cml.tgz \
14 compiler.tgz \ 14 compiler.tgz \
15 config.tgz \ 15 config.tgz \
16 eXene.tgz \ 16 eXene.tgz \
17 ml-burg.tgz \ 17 ml-burg.tgz \
18 ml-lex.tgz \ 18 ml-lex.tgz \
19 nlffi.tgz \ 19 nlffi.tgz \
20 ml-yacc.tgz \ 20 ml-yacc.tgz \
21 runtime.tgz \ 21 runtime.tgz \
22 smlnj-lib.tgz \ 22 smlnj-lib.tgz \
23 system.tgz \ 23 system.tgz \
24 ml-lpt.tgz \ 24 ml-lpt.tgz \
25 pgraph.tgz \ 25 pgraph.tgz \
26 trace-debug-profile.tgz \ 26 trace-debug-profile.tgz \
27 heap2asm.tgz \ 27 heap2asm.tgz \
28 smlnj-c.tgz 28 smlnj-c.tgz
29 29
30MAINTAINER= richards+netbsd@CS.Princeton.EDU 30MAINTAINER= richards+netbsd@CS.Princeton.EDU
31HOMEPAGE= https://www.smlnj.org/index.html 31HOMEPAGE= https://www.smlnj.org/index.html
32COMMENT= Popular functional language from Bell Labs 32COMMENT= Popular functional language from Bell Labs
33 33
34SML_VERSION= 110.72 34SML_VERSION= 110.72
35 35
36WRKSRC= ${WRKDIR} 36WRKSRC= ${WRKDIR}
37DIST_SUBDIR= smlnj-${SML_VERSION} 37DIST_SUBDIR= smlnj-${SML_VERSION}
38USE_TOOLS+= gmake pax 38USE_TOOLS+= gmake pax
39 39
40# previous versions of the package had an additional '-' 40# previous versions of the package had an additional '-'
41CONFLICTS= sml-nj-[0-9]* 41CONFLICTS= sml-nj-[0-9]*
42 42
43SML_BASE= ${PREFIX}/lib/smlnj 43SML_BASE= ${PREFIX}/lib/smlnj
44SML_LIBDIR= ${SML_BASE}/lib 44SML_LIBDIR= ${SML_BASE}/lib
45SML_BINDIR= ${SML_BASE}/bin 45SML_BINDIR= ${SML_BASE}/bin
46SML_SCRIPTS= _link-sml _run-sml _ml-build _ml-makedepend 46SML_SCRIPTS= _link-sml _run-sml _ml-build _ml-makedepend
47 47
48# while building, the work directory is the "installation" 48# while building, the work directory is the "installation"
49BUILD_ENV+= SMLNJ_HOME="${WRKDIR}" 49BUILD_ENV+= SMLNJ_HOME="${WRKDIR}"
50 50
51# the build uses patch directly (yuk) 51# the build uses patch directly (yuk)
52BUILD_ENV+= PATCH=${PATCH:Q} PATCH_ARGS=${PATCH_ARGS:Q} 52BUILD_ENV+= PATCH=${PATCH:Q} PATCH_ARGS=${PATCH_ARGS:Q}
53 53
54# useful for debugging 54# useful for debugging
55#CFLAGS+= -Wall 55#CFLAGS+= -Wall
56 56
57# note that this includes bsd.prefs.mk 57# note that this includes bsd.prefs.mk
58.include "../../lang/smlnj/Makefile.common" 58.include "../../lang/smlnj/Makefile.common"
59 59
60BOXES= x86 ppc sparc 60BOXES= x86 ppc sparc
61 61
62.if make(distinfo) || make(makesum) || make(mdi) 62.if make(distinfo) || make(makesum) || make(mdi)
63. for B in ${BOXES} 63. for B in ${BOXES}
64DISTFILES+= boot.${B}-unix.tgz 64DISTFILES+= boot.${B}-unix.tgz
65. endfor 65. endfor
66.endif 66.endif
67 67
68# 68#
69# For smlnj reasons the runtime system needs to be unpacked twice, once 69# For smlnj reasons the runtime system needs to be unpacked twice, once
70# in work/src and once in work/base. 70# in work/src and once in work/base.
71# 71#
72# As of 20160624, instead of inconsistently patching one copy or the 72# As of 20160624, instead of inconsistently patching one copy or the
73# other and hoping, or patching both and duplicating all the patches, 73# other and hoping, or patching both and duplicating all the patches,
74# we'll patch only work/src, and then *after* patching clone work/src 74# we'll patch only work/src, and then *after* patching clone work/src
75# into work/base. 75# into work/base.
76# 76#
77 77
78# create parent directories for the runtime system 78# create parent directories for the runtime system
79pre-extract: 79pre-extract:
80 ${MKDIR} ${WRKDIR}/src || ${TRUE} 80 ${MKDIR} ${WRKDIR}/src || ${TRUE}
81 ${MKDIR} ${WRKDIR}/base || ${TRUE} 81 ${MKDIR} ${WRKDIR}/base || ${TRUE}
82 82
83# make it easier to patch the runtime system 83# make it easier to patch the runtime system
84do-extract: 84do-extract:
85 ${RUN} extract_file="${_DISTDIR}/config.tgz"; \ 85 ${RUN} extract_file="${_DISTDIR}/config.tgz"; \
86 export extract_file; \ 86 export extract_file; \
87 cd ${WRKDIR}; ${EXTRACT_CMD} 87 cd ${WRKDIR}; ${EXTRACT_CMD}
88 ${RUN} extract_file="${_DISTDIR}/runtime.tgz"; \ 88 ${RUN} extract_file="${_DISTDIR}/runtime.tgz"; \
89 export extract_file; \ 89 export extract_file; \
90 cd ${WRKDIR}/src; ${EXTRACT_CMD} 90 cd ${WRKDIR}/src; ${EXTRACT_CMD}
91 91
92# symlink the rest of the distfiles 92# symlink the rest of the distfiles
93# also copy in new configs 93# also copy in new configs
94post-extract: 94post-extract:
95 cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* . 95 cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* .
96 cp ${FILESDIR}/mk.* ${WRKDIR}/src/runtime/objs/ 96 cp ${FILESDIR}/mk.* ${WRKDIR}/src/runtime/objs/
97 97
98# make the necessary copy of the runtime, _after_ patching src 98# make the necessary copy of the runtime, _after_ patching src
99post-patch: 99post-patch:
100 cd ${WRKDIR}/src && pax -rw runtime ${WRKDIR}/base/ 100 cd ${WRKDIR}/src && pax -rw runtime ${WRKDIR}/base/
101 101
102# Turn of nlffi on powerpc (I guess it doesn't work?) 
103# 
104# XXX: this switch doesn't work any more as the line in question doesn't 
105# exist in the current version. Someone with a PPC build machine, 
106# please check it out and either change it to match the file if still 
107# needed, or get rid of it. 
108.if ${MACHINE_ARCH} == "powerpc" 
109SUBST_CLASSES+= nlffi 
110SUBST_STAGE.nlffi= pre-configure 
111SUBST_MESSAGE.nlffi= Turning off nlffi 
112SUBST_FILES.nlffi= config/targets 
113SUBST_SED.nlffi= -e '/^request nlffi$$/d' 
114.endif # powerpc 
115 
116# resolve definition of SML_BASE 102# resolve definition of SML_BASE
117SUBST_CLASSES+= smlbase 103SUBST_CLASSES+= smlbase
118SUBST_STAGE.smlbase= pre-configure 104SUBST_STAGE.smlbase= pre-configure
119SUBST_MESSAGE.smlbase= Setting SML_BASE 105SUBST_MESSAGE.smlbase= Setting SML_BASE
120SUBST_FILES.smlbase= ${SML_SCRIPTS:S/^/config\//} 106SUBST_FILES.smlbase= ${SML_SCRIPTS:S/^/config\//}
121SUBST_VARS.smlbase= SML_BASE 107SUBST_VARS.smlbase= SML_BASE
122 108
123# resolve definition of CFLAGS in patched files 109# resolve definition of CFLAGS in patched files
124# (note that we need to do this in both src/runtime and base/runtime) 110# (note that we need to do this in both src/runtime and base/runtime)
125SUBST_CLASSES+= cflags 111SUBST_CLASSES+= cflags
126SUBST_STAGE.cflags= pre-configure 112SUBST_STAGE.cflags= pre-configure
127SUBST_MESSAGE.cflags= Setting CFLAGS 113SUBST_MESSAGE.cflags= Setting CFLAGS
128SUBST_FILES.cflags= src/runtime/objs/* base/runtime/objs/* 114SUBST_FILES.cflags= src/runtime/objs/* base/runtime/objs/*
129SUBST_VARS.cflags= CFLAGS 115SUBST_VARS.cflags= CFLAGS
130 116
131# use the proper shell 117# use the proper shell
132SUBST_CLASSES+= shell 118SUBST_CLASSES+= shell
133SUBST_STAGE.shell= pre-configure 119SUBST_STAGE.shell= pre-configure
134SUBST_MESSAGE.shell= Choosing the right shell 120SUBST_MESSAGE.shell= Choosing the right shell
135SUBST_FILES.shell= config/install.sh 121SUBST_FILES.shell= config/install.sh
136SUBST_VARS.shell= CONFIG_SHELL 122SUBST_VARS.shell= CONFIG_SHELL
137 123
138# nothing here any more 124# nothing here any more
139do-configure: 125do-configure:
140 ${DO_NADA} 126 ${DO_NADA}
141 127
142# The build target needs to run $WRKDIR/config/install.sh 128# The build target needs to run $WRKDIR/config/install.sh
143do-build: 129do-build:
144 cd ${WRKDIR} && unset PWD && ${SETENV} ${BUILD_ENV} \ 130 cd ${WRKDIR} && unset PWD && ${SETENV} ${BUILD_ENV} \
145 ${CONFIG_SHELL} ./config/install.sh 131 ${CONFIG_SHELL} ./config/install.sh
146 132
147# install target 133# install target
148# (see ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.38/INSTALL) 134# (see ftp://ftp.research.bell-labs.com/dist/smlnj/working/110.38/INSTALL)
149# 1. create installation directories 135# 1. create installation directories
150# 2. copy the ./bin and ./lib directories across 136# 2. copy the ./bin and ./lib directories across
151# 3. install links to executables in $PREFIX/bin 137# 3. install links to executables in $PREFIX/bin
152INSTALLATION_DIRS= bin 138INSTALLATION_DIRS= bin
153do-install: 139do-install:
154 ${INSTALL_DATA_DIR} ${DESTDIR}${SML_BASE} 140 ${INSTALL_DATA_DIR} ${DESTDIR}${SML_BASE}
155 cd ${WRKDIR} && pax -rw -pam bin lib ${DESTDIR}${SML_BASE} 141 cd ${WRKDIR} && pax -rw -pam bin lib ${DESTDIR}${SML_BASE}
156 cd ${DESTDIR}${PREFIX}/bin && ${LN} -sf ../lib/smlnj/bin/* . 142 cd ${DESTDIR}${PREFIX}/bin && ${LN} -sf ../lib/smlnj/bin/* .
157 143
158.include "../../mk/bsd.pkg.mk" 144.include "../../mk/bsd.pkg.mk"