View | Details | Raw Unified | Return to bug 234532
Collapse All | Expand All

(-)Makefile (-81 / +60 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	smlnj
3
PORTNAME=	smlnj
4
PORTVERSION=	110.77
4
PORTVERSION=	110.84
5
CATEGORIES=	lang
5
CATEGORIES=	lang
6
MASTER_SITES=	http://smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/ \
6
MASTER_SITES=	http://smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/ \
7
		ftp://mirror.free.de/http/smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/
7
		ftp://mirror.free.de/http/smlnj.cs.uchicago.edu/dist/working/${PORTVERSION}/
Lines 18-24 Link Here
18
		http://www.smlnj.org/license.html
18
		http://www.smlnj.org/license.html
19
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
19
LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
20
20
21
ONLY_FOR_ARCHS=	i386 amd64
21
ONLY_FOR_ARCHS=	amd64 i386
22
LLD_UNSAFE=	yes
22
LLD_UNSAFE=	yes
23
23
24
NO_WRKSUBDIR=	yes
24
NO_WRKSUBDIR=	yes
Lines 27-80 Link Here
27
SUB_LIST=	EXEBINDIR=${MLBINRELATIVE} EXENAMES="${MLEXE}"
27
SUB_LIST=	EXEBINDIR=${MLBINRELATIVE} EXENAMES="${MLEXE}"
28
PKGDEINSTALL=	${PKGINSTALL}
28
PKGDEINSTALL=	${PKGINSTALL}
29
29
30
# Calm portlint
30
OPTIONS_DEFINE=		EVERYTHING RECOMPILE POSITION64
31
CALM=
31
RECOMPILE_IMPLIES=	EVERYTHING
32
32
POSITION64_IMPLIES=	RECOMPILE
33
OPTIONS_RADIO=		RG1
33
EVERYTHING_DESC=	install everything from the SML/NJ distribution
34
OPTIONS_RADIO_RG1=	EVERYTHING RECOMPILE POSITION64
35
OPTIONS_EXCLUDE_amd64=	RECOMPILE POSITION64
36
EVERYTHING_DESC=	install${CALM} everything from the SML/NJ distribution
37
RECOMPILE_DESC=		recompile the SML compiler - implies EVERYTHING
34
RECOMPILE_DESC=		recompile the SML compiler - implies EVERYTHING
38
POSITION64_DESC=	use 64bit file${CALM} positions - implies RECOMPILE
35
POSITION64_DESC=	use 64bit file positions - implies RECOMPILE
39
36
40
.include <bsd.port.pre.mk>
37
.include <bsd.port.pre.mk>
41
38
42
# Recompiling the compiler currently fails on amd64
43
.if ${ARCH} == "i386"
44
ML_RECOMPILE_OPTIONS=	RECOMPILE POSITION64
45
.endif
46
47
.if (${ARCH} == "amd64")
39
.if (${ARCH} == "amd64")
48
CFLAGS+=	-m32
40
CFLAGS+=	-m32
49
AS?=		as
41
AS?=		as
50
AS+=		--32
42
ASFLAGS+=	--32
51
.endif
43
.endif
52
.if (${ARCH} == "i386" || ${ARCH} == "amd64")
44
.if (${ARCH} == "i386" || ${ARCH} == "amd64")
53
MLARCH=		x86
45
MLARCH=		x86
54
DISTFILES+=	boot.x86-unix.tgz
46
DISTFILES+=	boot.x86-unix.tgz
55
.endif
47
.endif
56
DISTFILES+=	MLRISC.tgz ckit.tgz cml.tgz doc.tgz heap2asm.tgz \
48
DISTFILES+=	MLRISC.tgz asdl.tgz ckit.tgz cml.tgz doc.tgz heap2asm.tgz \
57
		ml-burg.tgz ml-lpt.tgz ml-lex.tgz ml-yacc.tgz nlffi.tgz \
49
		ml-burg.tgz ml-lex.tgz ml-lpt.tgz ml-yacc.tgz nlffi.tgz \
58
		smlnj-lib.tgz trace-debug-profile.tgz
50
		old-basis.tgz smlnj-lib.tgz trace-debug-profile.tgz
59
51
60
PLIST_SUB+=	MLARCH=${MLARCH}
52
PLIST_SUB+=	MLARCH=${MLARCH}
61
53
62
.if ${PORT_OPTIONS:MPOSITION64} || defined(ML_POSITION64)
54
.if ${PORT_OPTIONS:MPOSITION64}
63
ML_POSITION64?=	${PORT_OPTIONS:MPOSITION64}
64
ML_RECOMPILE?=	${ML_POSITION64}
65
ML_EVERYTHING?=	${ML_POSITION64}
66
CMB_COMMAND=	'(\#set o CMB.symval) "USE_64_BIT_POSITIONS" (SOME 1);'
55
CMB_COMMAND=	'(\#set o CMB.symval) "USE_64_BIT_POSITIONS" (SOME 1);'
67
.else
56
.else
68
CMB_COMMAND=
57
CMB_COMMAND=
69
.endif
58
.endif
70
59
71
.if ${PORT_OPTIONS:MRECOMPILE} || defined(ML_RECOMPILE)
60
.if ${PORT_OPTIONS:MEVERYTHING}
72
ML_RECOMPILE?=	${PORT_OPTIONS:MRECOMPILE}
73
ML_EVERYTHING?=	${ML_RECOMPILE}
74
.endif
75
76
.if ${PORT_OPTIONS:MEVERYTHING} || defined(ML_EVERYTHING)
77
ML_EVERYTHING?=	${PORT_OPTIONS:MEVERYTHING}
78
DISTFILES+=	cm.tgz compiler.tgz eXene.tgz \
61
DISTFILES+=	cm.tgz compiler.tgz eXene.tgz \
79
		pgraph.tgz smlnj-c.tgz system.tgz
62
		pgraph.tgz smlnj-c.tgz system.tgz
80
PLIST_SUB+=	EVERYTHING=""
63
PLIST_SUB+=	EVERYTHING=""
Lines 87-93 Link Here
87
MLBINRELATIVE=	${MLROOTRELATIVE}/bin
70
MLBINRELATIVE=	${MLROOTRELATIVE}/bin
88
MLBIN=		${MLROOT}/bin
71
MLBIN=		${MLROOT}/bin
89
MLLIB=		${MLROOT}/lib
72
MLLIB=		${MLROOT}/lib
90
MLSTDSRCDIRS=	cml doc heap2asm ml-burg ml-lex ml-lpt ml-yacc nlffi smlnj-lib
73
MLSTDSRCDIRS=	asdl cml doc heap2asm ml-burg ml-lex ml-lpt ml-yacc \
74
		nlffi smlnj-lib
91
MLSRCDIRS=	base ${MLSTDSRCDIRS} \
75
MLSRCDIRS=	base ${MLSTDSRCDIRS} \
92
		ckit eXene pgraph smlnj-c
76
		ckit eXene pgraph smlnj-c
93
MLSRCS=
77
MLSRCS=
Lines 95-103 Link Here
95
MLSRCS+=	${MLROOT}/${srcdir}
79
MLSRCS+=	${MLROOT}/${srcdir}
96
.endfor
80
.endfor
97
MLTARGETS=	heap2asm
81
MLTARGETS=	heap2asm
98
MLEXE=		heap2exec ml-antlr ml-build ml-burg ml-lex ml-makedepend \
82
MLEXE=		asdlgen heap2exec ml-antlr ml-build ml-burg ml-lex \
99
		ml-nlffigen ml-ulex ml-yacc sml
83
		ml-makedepend ml-nlffigen ml-ulex ml-yacc sml
100
.if defined(ML_EVERYTHING)
84
.if ${PORT_OPTIONS:MEVERYTHING}
101
MLTARGETS+=	eXene mlrisc-tools nowhere pgraph-util src-smlnj
85
MLTARGETS+=	eXene mlrisc-tools nowhere pgraph-util src-smlnj
102
MLEXE+=		nowhere
86
MLEXE+=		nowhere
103
PLIST=		${WRKDIR}/.PLIST
87
PLIST=		${WRKDIR}/.PLIST
Lines 108-126 Link Here
108
92
109
pre-fetch:
93
pre-fetch:
110
	@${ECHO}
94
	@${ECHO}
111
.if ! defined(ML_EVERYTHING)
95
.if ! ${PORT_OPTIONS:MEVERYTHING}
112
	@${ECHO} 'Use make ML_EVERYTHING=yes to also build/install'
96
	@${ECHO} 'Use port option EVERYTHING to also build/install'
113
	@${ECHO} ' eXene (X Windows toolkit),'
97
	@${ECHO} ' eXene (X Windows toolkit),'
114
	@${ECHO} ' nowhere (preprocessor for conditional patterns),'
98
	@${ECHO} ' nowhere (preprocessor for conditional patterns),'
115
	@${ECHO} ' various libraries, and all the sources.'
99
	@${ECHO} ' various libraries, and all the sources.'
116
.endif
100
.endif
117
.if !empty(ML_RECOMPILE_OPTIONS:MRECOMPILE) && !defined(ML_RECOMPILE)
101
.if ! ${PORT_OPTIONS:MRECOMPILE}
118
	@${ECHO} 'Use make ML_RECOMPILE=yes to recompile the compiler.'
102
	@${ECHO} 'Use port option RECOMPILE to recompile the compiler.'
119
	@${ECHO} ' This implies ML_EVERYTHING.'
103
	@${ECHO} ' This implies EVERYTHING.'
120
.endif
104
.endif
121
.if !empty(ML_RECOMPILE_OPTIONS:MPOSITION64) && !defined(ML_POSITION64)
105
.if ! ${PORT_OPTIONS:MPOSITION64}
122
	@${ECHO} 'Use make ML_POSITION64=yes to use 64bit file positions.'
106
	@${ECHO} 'Use port option POSITION64 to use 64bit file positions.'
123
	@${ECHO} ' This implies ML_RECOMPILE.'
107
	@${ECHO} ' This implies RECOMPILE.'
124
.endif
108
.endif
125
	@${ECHO}
109
	@${ECHO}
126
110
Lines 145-151 Link Here
145
# Recompilation requires ml-lex and ml-yacc. All requested targets
129
# Recompilation requires ml-lex and ml-yacc. All requested targets
146
# will be built later using the recompiled core system after
130
# will be built later using the recompiled core system after
147
# removing targets.customized. See "do-build" below.
131
# removing targets.customized. See "do-build" below.
148
.if defined(ML_RECOMPILE)
132
.if ${PORT_OPTIONS:MRECOMPILE}
149
	( ${ECHO_CMD} "request	ml-yacc" && \
133
	( ${ECHO_CMD} "request	ml-yacc" && \
150
	  ${ECHO_CMD} "request	ml-lex" && \
134
	  ${ECHO_CMD} "request	ml-lex" && \
151
	  ${ECHO_CMD} "request	ml-lex-mllex-tool" && \
135
	  ${ECHO_CMD} "request	ml-lex-mllex-tool" && \
Lines 158-164 Link Here
158
# a subsequent make install.
142
# a subsequent make install.
159
# See base/system/README for information on recompiling the compiler.
143
# See base/system/README for information on recompiling the compiler.
160
144
161
.if defined(ML_RECOMPILE)
145
.if ${PORT_OPTIONS:MRECOMPILE}
162
RECOMPILEDIR=	base/system
146
RECOMPILEDIR=	base/system
163
.else
147
.else
164
RECOMPILEDIR=
148
RECOMPILEDIR=
Lines 174-182 Link Here
174
MLSTANDARDPATCHDIRS_CMD=	cd ${FILESDIR} && \
158
MLSTANDARDPATCHDIRS_CMD=	cd ${FILESDIR} && \
175
			( for srcdir in ${MLSTDSRCDIRS} ; \
159
			( for srcdir in ${MLSTDSRCDIRS} ; \
176
			  do if ${LS} do-patch-$${srcdir}_* 1>&- 2>&- ; \
160
			  do if ${LS} do-patch-$${srcdir}_* 1>&- 2>&- ; \
177
			     then ${ECHO_CMD} -n $${srcdir} " " ; break ; fi ; \
161
			     then ${ECHO_CMD} -n $${srcdir} " " ; fi ; \
178
			  done ) || ${TRUE}
162
			  done ) || ${TRUE}
179
.if defined(ML_EVERYTHING)
163
.if ${PORT_OPTIONS:MEVERYTHING}
180
MLSOURCEPATCHES_CMD=	cd ${FILESDIR} && \
164
MLSOURCEPATCHES_CMD=	cd ${FILESDIR} && \
181
			( ${LS} do-patch-* 2>&- || \
165
			( ${LS} do-patch-* 2>&- || \
182
			  ${TRUE} )
166
			  ${TRUE} )
Lines 192-200 Link Here
192
	MLSTANDARDPATCHES=`${MLSTANDARDPATCHES_CMD}` \
176
	MLSTANDARDPATCHES=`${MLSTANDARDPATCHES_CMD}` \
193
	MLSTANDARDPATCHDIRS=`${MLSTANDARDPATCHDIRS_CMD}` \
177
	MLSTANDARDPATCHDIRS=`${MLSTANDARDPATCHDIRS_CMD}` \
194
	MLSOURCEPATCHES=`${MLSOURCEPATCHES_CMD}` \
178
	MLSOURCEPATCHES=`${MLSOURCEPATCHES_CMD}` \
195
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' AS='${AS}' EXTRA_DEFS='${EXTRA_DEFS}' \
179
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' \
180
	AS='${AS}' ASFLAGS='${ASFLAGS}' EXTRA_DEFS='${EXTRA_DEFS}' \
196
	./config/install.sh
181
	./config/install.sh
197
.if defined(ML_RECOMPILE)
182
.if ${PORT_OPTIONS:MRECOMPILE}
198
	-${RM} ${WRKSRC}/config/targets.customized
183
	-${RM} ${WRKSRC}/config/targets.customized
199
	@${ECHO} '(* Recompiling the core system: *)'
184
	@${ECHO} '(* Recompiling the core system: *)'
200
	cd ${WRKSRC}/${RECOMPILEDIR} && ( \
185
	cd ${WRKSRC}/${RECOMPILEDIR} && ( \
Lines 215-245 Link Here
215
	./installml
200
	./installml
216
	@${ECHO} '(* Building requested targets: *)'
201
	@${ECHO} '(* Building requested targets: *)'
217
	cd ${WRKSRC} && unset PWD && \
202
	cd ${WRKSRC} && unset PWD && \
218
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
203
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" \
204
	PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
219
	MLNORUNTIMECLEAN=yes RECOMPILEDIR="${RECOMPILEDIR}" \
205
	MLNORUNTIMECLEAN=yes RECOMPILEDIR="${RECOMPILEDIR}" \
220
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' AS='${AS}' EXTRA_DEFS='${EXTRA_DEFS}' \
206
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' \
207
	AS='${AS}' ASFLAGS='${ASFLAGS}' EXTRA_DEFS='${EXTRA_DEFS}' \
221
	./config/install.sh
208
	./config/install.sh
222
.endif
209
.endif
223
210
224
# If Mac OS X resource files make it into the distribution tarballs,
211
.if ${PORT_OPTIONS:MEVERYTHING}
225
# then we have to remove them at several points during the
226
# installation process. This is no longer necessary with FreeBSD 10
227
# as it uses libarchive 3.x (via bsdtar), but earlier versions
228
# don't ignore such resource files and hence WRKSRC and STAGEDIR
229
# are full of them. Once FreeBSD 9 will be out of service, all
230
# lines in this Makefile can be removed which contain a pattern
231
# for the prefix "._" of the resource files. Background information:
232
# <https://github.com/libarchive/libarchive/wiki/TarExtendedAttributes#Apple_tar>
233
234
post-build:
212
post-build:
235
	${FIND} ${WRKSRC} -type f -name '\._*' -delete
213
	${CHMOD} a-x ${WRKSRC}/eXene/examples/basicwin/test.sh \
214
		${WRKSRC}/smlnj-lib/HTML4/helper.py
215
	@${ECHO} '(* Cleaning asdl: *)'
216
	${FIND} ${WRKSRC}/asdl -type f \
217
		-exec ${GREP} -F -l "${WRKDIR}" {} \; -delete
218
.endif
236
219
237
# Nowadays PLIST has to be computed before installation. We do it in
220
# Nowadays PLIST has to be computed before installation. We do it in
238
# "pre-install" because source extraction happens during "build".
221
# "pre-install" because source extraction happens during "build".
239
222
240
.if defined(ML_EVERYTHING)
223
.if ${PORT_OPTIONS:MEVERYTHING}
241
MLNOINSTALL=	.cm
224
MLNOINSTALL=	.cm
242
.if defined(ML_RECOMPILE)
225
.if ${PORT_OPTIONS:MRECOMPILE}
243
MLNOINSTALL+=	sml.bin.${MLARCH}-unix sml.boot.${MLARCH}-unix \
226
MLNOINSTALL+=	sml.bin.${MLARCH}-unix sml.boot.${MLARCH}-unix \
244
		sml.lib sml.${MLARCH}-bsd
227
		sml.lib sml.${MLARCH}-bsd
245
.endif
228
.endif
Lines 252-261 Link Here
252
.endif
235
.endif
253
236
254
pre-install:
237
pre-install:
255
.if defined(ML_EVERYTHING)
238
.if ${PORT_OPTIONS:MEVERYTHING}
256
	@${ECHO} -n '(* Computing package list ...'
239
	@${ECHO} -n '(* Computing package list ...'
257
	@${TAR} -tzf ${WRKSRC}/runtime.tgz | \
240
	@${TAR} -tzf ${WRKSRC}/runtime.tgz | \
258
	${GREP} -E -v '(^|/)\._.*' | \
259
	${SED} -E -n -e 's%^(.*[^/])$$%${MLROOTRELATIVE}/base/\1%p' \
241
	${SED} -E -n -e 's%^(.*[^/])$$%${MLROOTRELATIVE}/base/\1%p' \
260
	> ${MLRUNTIMEPLIST}
242
	> ${MLRUNTIMEPLIST}
261
	@${MLRUNTIMEPATCHES_CMD} | \
243
	@${MLRUNTIMEPATCHES_CMD} | \
Lines 274-279 Link Here
274
	${AWK} '{ print "${MLROOTRELATIVE}/" $$0 }' ) ; \
256
	${AWK} '{ print "${MLROOTRELATIVE}/" $$0 }' ) ; \
275
	( ${FIND} -s -d ${MLSRCDIRS} -type d -empty | \
257
	( ${FIND} -s -d ${MLSRCDIRS} -type d -empty | \
276
	${AWK} '{ print "@dir ${MLROOTRELATIVE}/" $$0 }' ) ) | \
258
	${AWK} '{ print "@dir ${MLROOTRELATIVE}/" $$0 }' ) ) | \
259
	${EGREP} -v "^${MLROOTRELATIVE}/base/runtime" | \
277
	${EGREP} -v ${MLSRCEXCLUDEREGEX} > ${MLSRCPLIST}
260
	${EGREP} -v ${MLSRCEXCLUDEREGEX} > ${MLSRCPLIST}
278
	@${SED} -e 's/^%%EVERYTHING%%//' ${MLPLISTFILES} | \
261
	@${SED} -e 's/^%%EVERYTHING%%//' ${MLPLISTFILES} | \
279
	${GREP} -h -v "^@dir" | ${SORT} -u > ${PLIST}
262
	${GREP} -h -v "^@dir" | ${SORT} -u > ${PLIST}
Lines 304-310 Link Here
304
# When staging CM_PATHCONFIG has to point to the final
287
# When staging CM_PATHCONFIG has to point to the final
305
# ${MLLIB}/pathconfig (in ${PREFIX}) while building the compiler.
288
# ${MLLIB}/pathconfig (in ${PREFIX}) while building the compiler.
306
289
307
.if defined(ML_EVERYTHING)
290
.if ${PORT_OPTIONS:MEVERYTHING}
308
MLSRCEXCLUDES=
291
MLSRCEXCLUDES=
309
.for excl in ${MLNOINSTALL}
292
.for excl in ${MLNOINSTALL}
310
MLSRCEXCLUDES+=	--exclude "${excl}"
293
MLSRCEXCLUDES+=	--exclude "${excl}"
Lines 313-324 Link Here
313
296
314
do-install:
297
do-install:
315
	${MKDIR} "${STAGEDIR}${MLROOT}"
298
	${MKDIR} "${STAGEDIR}${MLROOT}"
316
.if ! defined(ML_RECOMPILE)
299
.if ! ${PORT_OPTIONS:MRECOMPILE}
317
	cd ${WRKSRC} && unset PWD && \
300
	cd ${WRKSRC} && unset PWD && \
318
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
301
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
319
	STAGEDIR="${STAGEDIR}" MLLIB="${MLLIB}" \
302
	STAGEDIR="${STAGEDIR}" MLLIB="${MLLIB}" \
320
	INSTALLDIR="${STAGEDIR}${MLROOT}" \
303
	INSTALLDIR="${STAGEDIR}${MLROOT}" \
321
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' AS='${AS}' EXTRA_DEFS='${EXTRA_DEFS}' \
304
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' \
305
	AS='${AS}' ASFLAGS='${ASFLAGS}' EXTRA_DEFS='${EXTRA_DEFS}' \
322
	./config/install.sh
306
	./config/install.sh
323
.else
307
.else
324
	@${ECHO} '(* Rebuilding the recompiled libs: *)'
308
	@${ECHO} '(* Rebuilding the recompiled libs: *)'
Lines 330-345 Link Here
330
	@${ECHO} '(* Rebuilding the recompiled heap: *)'
314
	@${ECHO} '(* Rebuilding the recompiled heap: *)'
331
	cd ${WRKSRC}/${RECOMPILEDIR} && \
315
	cd ${WRKSRC}/${RECOMPILEDIR} && \
332
	./makeml
316
	./makeml
333
	@${ECHO} '(* Installing into ${MLROOT}: *)'
317
	@${ECHO} '(* Installing into ${STAGEDIR}${MLROOT}: *)'
334
	cd ${WRKSRC} && unset PWD && \
318
	cd ${WRKSRC} && unset PWD && \
335
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
319
	FILESDIR="${FILESDIR}" PATCH="${PATCH}" PATCH_ARGS="-d ${PATCH_WRKSRC} ${PATCH_ARGS}" \
336
	STAGEDIR="${STAGEDIR}" MLLIB="${MLLIB}" \
320
	STAGEDIR="${STAGEDIR}" MLLIB="${MLLIB}" \
337
	INSTALLDIR="${STAGEDIR}${MLROOT}" RECOMPILEDIR="${RECOMPILEDIR}" \
321
	INSTALLDIR="${STAGEDIR}${MLROOT}" RECOMPILEDIR="${RECOMPILEDIR}" \
338
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' AS='${AS}' EXTRA_DEFS='${EXTRA_DEFS}' \
322
	CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}' \
323
	AS='${AS}' ASFLAGS='${ASFLAGS}' EXTRA_DEFS='${EXTRA_DEFS}' \
339
	./config/install.sh
324
	./config/install.sh
340
.endif
325
.endif
341
	[ ! -d ${STAGEDIR} ] || \
342
	${FIND} ${STAGEDIR} -type f -name '\._*' -delete
343
	@${ECHO} '(* Installing man pages. *)'
326
	@${ECHO} '(* Installing man pages. *)'
344
.for mansect in 1 2 3 4 5 6 7 8 9
327
.for mansect in 1 2 3 4 5 6 7 8 9
345
	@[ ! -d ${WRKSRC}/doc/man/man${mansect} ] || \
328
	@[ ! -d ${WRKSRC}/doc/man/man${mansect} ] || \
Lines 352-379 Link Here
352
	( eval $${MLARCHOPSYS} ; \
335
	( eval $${MLARCHOPSYS} ; \
353
	${STRIP_CMD} "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}" \
336
	${STRIP_CMD} "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}" \
354
	  "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}.so" )
337
	  "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}.so" )
355
.if defined(ML_EVERYTHING)
338
.if ${PORT_OPTIONS:MEVERYTHING}
356
	@${ECHO} '(* Cleaning base/runtime: *)'
339
	@${ECHO} '(* Cleaning base/runtime: *)'
357
	cd ${WRKSRC}/base/runtime/objs && ${MAKE_CMD} clean
340
	cd ${WRKSRC}/base/runtime/objs && ${MAKE_CMD} clean
341
	@${ECHO} '(* Cleaning asdl: *)'
342
	${FIND} ${WRKSRC}/asdl -type f \
343
		-exec ${GREP} -F -l "${WRKDIR}" {} \; -delete
358
	@${ECHO} -n '(* Installing sources into ${STAGEDIR}${MLROOT} ...'
344
	@${ECHO} -n '(* Installing sources into ${STAGEDIR}${MLROOT} ...'
359
	@cd ${WRKSRC} && ${TAR} -cf - ${MLSRCEXCLUDES} ${MLSRCDIRS} | \
345
	@cd ${WRKSRC} && ${TAR} -cf - ${MLSRCEXCLUDES} ${MLSRCDIRS} | \
360
	${TAR} -xf - -C "${STAGEDIR}${MLROOT}"
346
	${TAR} -xf - -C "${STAGEDIR}${MLROOT}"
361
	@${ECHO} ' done. *)'
347
	@${ECHO} ' done. *)'
362
.endif
348
.endif
363
364
# Only execute ${PKGINSTALL} when installing to ${PREFIX},
349
# Only execute ${PKGINSTALL} when installing to ${PREFIX},
365
# but not when staging.
350
# but not when staging.
366
.ifmake install${CALM}
351
.ifmake install${CALM_PORTLINT}
367
	PKG_PREFIX=${PREFIX} MULTIEXEC_WRAPPER_VERBOSE=yes \
352
	PKG_PREFIX=${PREFIX} MULTIEXEC_WRAPPER_VERBOSE=yes \
368
	${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
353
	${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
369
.endif
354
.endif
370
355
371
	${FIND} ${STAGEDIR} -type f -name '\._*' -delete
372
	MLARCHOPSYS=`${STAGEDIR}${MLBIN}/.arch-n-opsys` && \
373
	( eval $${MLARCHOPSYS} ; \
374
	${STRIP_CMD} "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}" \
375
	  "${STAGEDIR}${MLBIN}/.run/run.$${ARCH}-$${OPSYS}.so" )
376
377
.ifndef MULTIEXEC_WRAPPER_VERBOSE
356
.ifndef MULTIEXEC_WRAPPER_VERBOSE
378
deinstall:
357
deinstall:
379
	export MULTIEXEC_WRAPPER_VERBOSE=yes && \
358
	export MULTIEXEC_WRAPPER_VERBOSE=yes && \
(-)distinfo (-42 / +47 lines)
Lines 1-42 Link Here
1
SHA256 (smlnj/110.77/MLRISC.tgz) = 4b443ee9e27bc8d2010bdce5724302c7d338e8eba0051d45cb4e384204488a76
1
TIMESTAMP = 1545084427
2
SIZE (smlnj/110.77/MLRISC.tgz) = 1479104
2
SHA256 (smlnj/110.84/MLRISC.tgz) = da3c5236018fa7608863c2fe1f3c57b60013df98b5a249fb3d4edc738cdfd072
3
SHA256 (smlnj/110.77/boot.x86-unix.tgz) = 9982a36d9fb3d2d15590d0d8bb15a30d3e684ad49f56d69eef8684f4eaf3bf02
3
SIZE (smlnj/110.84/MLRISC.tgz) = 1458550
4
SIZE (smlnj/110.77/boot.x86-unix.tgz) = 5905482
4
SHA256 (smlnj/110.84/asdl.tgz) = 8be712200dc186b8bbe79b3ae111f2c490bf74f4709882d3459ac061f66b5b8e
5
SHA256 (smlnj/110.77/ckit.tgz) = 29145b1739d46173cbaa87456b2bed35977c4ae7e83c48134a591459939b3966
5
SIZE (smlnj/110.84/asdl.tgz) = 193047
6
SIZE (smlnj/110.77/ckit.tgz) = 206672
6
SHA256 (smlnj/110.84/boot.x86-unix.tgz) = a29e3b0ca623da197e9c18ea64db4c2a08fe5e6add85c0d053c4ecfa653ace82
7
SHA256 (smlnj/110.77/cm.tgz) = 1c60316b3f16ae1a93cb87e281edcf2a84a554ac0415f010b8d565c2ae3a0a82
7
SIZE (smlnj/110.84/boot.x86-unix.tgz) = 5762714
8
SIZE (smlnj/110.77/cm.tgz) = 209949
8
SHA256 (smlnj/110.84/ckit.tgz) = 7e2534e393d2372cad8ff9ddd306881db91bbbcc2b0e0538e76868c86c658c36
9
SHA256 (smlnj/110.77/cml.tgz) = bc4548eda9531c52029ed68a7988985b62ad17e95841c04dbbe32b4b30df4ef7
9
SIZE (smlnj/110.84/ckit.tgz) = 198419
10
SIZE (smlnj/110.77/cml.tgz) = 119083
10
SHA256 (smlnj/110.84/cm.tgz) = 7055c60481a887f27a5135ac1f33233565b99a7c99c4aa73e023e28e629b0663
11
SHA256 (smlnj/110.77/compiler.tgz) = fcc7388167ee2d0048644bb2147bbca3e16f60be326dd724407e0f51e254e52f
11
SIZE (smlnj/110.84/cm.tgz) = 220278
12
SIZE (smlnj/110.77/compiler.tgz) = 841677
12
SHA256 (smlnj/110.84/cml.tgz) = 556110c746db863211ac8a97e1bf097b0e5d45dfea4b3e8194b6c389ac2b569a
13
SHA256 (smlnj/110.77/config.tgz) = 6bed2026e05367f247e2fcfa918edb835bdab24182f02f3253c1baf2f301b552
13
SIZE (smlnj/110.84/cml.tgz) = 105655
14
SIZE (smlnj/110.77/config.tgz) = 514900
14
SHA256 (smlnj/110.84/compiler.tgz) = 6d23aff2e75727bf6969b05a070128f187e06f60408aabf6a71e0475326fee87
15
SHA256 (smlnj/110.77/doc.tgz) = 8301bccdc1e99e8865e905070f7719d94a0ae39b44733d961a3e3002d97dd27e
15
SIZE (smlnj/110.84/compiler.tgz) = 862298
16
SIZE (smlnj/110.77/doc.tgz) = 10240
16
SHA256 (smlnj/110.84/config.tgz) = 1810d3ca768222e120c7a3f2f93aafd652705371fc73929423c671dce3cef832
17
SHA256 (smlnj/110.77/eXene.tgz) = d4d3ccbde1bc11943054fb093a34c8531c9e8f56731293ca2470eab21602ea33
17
SIZE (smlnj/110.84/config.tgz) = 514275
18
SIZE (smlnj/110.77/eXene.tgz) = 729294
18
SHA256 (smlnj/110.84/doc.tgz) = 0ed69456e4c2b851f475057a94da406c80f46cdd02a5d9077670be33122c7020
19
SHA256 (smlnj/110.77/heap2asm.tgz) = f3f5c26d11dbe8019e6b3349ab07c04ffe553780a3a6ca0b000fe8084886ada5
19
SIZE (smlnj/110.84/doc.tgz) = 2029114
20
SIZE (smlnj/110.77/heap2asm.tgz) = 1606
20
SHA256 (smlnj/110.84/eXene.tgz) = 3fe1c6a1a334e7d7359fbcfd053066c88cb7705a90975b60fff946554aa0019c
21
SHA256 (smlnj/110.77/ml-burg.tgz) = 9bc7bb014d34a63cb3ac8c42104bd579e8990ab2803c32a6a4410fcf8cfcbd4c
21
SIZE (smlnj/110.84/eXene.tgz) = 720713
22
SIZE (smlnj/110.77/ml-burg.tgz) = 37604
22
SHA256 (smlnj/110.84/heap2asm.tgz) = 3d33c52b650536762d47534f07709e749cc821ce515aef2fb9a746db11433e95
23
SHA256 (smlnj/110.77/ml-lex.tgz) = c4c0e108bf166f77e083692a27f9231d730c5b2a73a2f9f5409e55928c679553
23
SIZE (smlnj/110.84/heap2asm.tgz) = 1343
24
SIZE (smlnj/110.77/ml-lex.tgz) = 34081
24
SHA256 (smlnj/110.84/ml-burg.tgz) = 62ea37b13788078e3ea77d3b870da42788153c348009f827f2c0b05cfc07d918
25
SHA256 (smlnj/110.77/ml-lpt.tgz) = eff30e6a3c4afb7f8265650e3e1cc83a8ff252ed19f22b30c2c431c9beca126e
25
SIZE (smlnj/110.84/ml-burg.tgz) = 40510
26
SIZE (smlnj/110.77/ml-lpt.tgz) = 266511
26
SHA256 (smlnj/110.84/ml-lex.tgz) = cc7e045aa9667f1eed055db1defca0e830eed34c08f3dfdf37f698964fe04070
27
SHA256 (smlnj/110.77/ml-yacc.tgz) = 24a2b1d955e990c6f2a64d6be4df0c7d9bf430f56501587ecf95d30732cf266c
27
SIZE (smlnj/110.84/ml-lex.tgz) = 27833
28
SIZE (smlnj/110.77/ml-yacc.tgz) = 103554
28
SHA256 (smlnj/110.84/ml-lpt.tgz) = 2f60e1467a69fd4fb5501354244337926bc2a65225dde328f6aa3883b14fb3a5
29
SHA256 (smlnj/110.77/nlffi.tgz) = 8729d2aa203329fa76f9a7dccafe6fe88d0f397f1238727fea8fa1c67ae38cf0
29
SIZE (smlnj/110.84/ml-lpt.tgz) = 267076
30
SIZE (smlnj/110.77/nlffi.tgz) = 79026
30
SHA256 (smlnj/110.84/ml-yacc.tgz) = cfebaeb5f08810fcc93c49bf171834b7bf14b5f7e76d206e0afa35e18887bdb9
31
SHA256 (smlnj/110.77/pgraph.tgz) = 5b46d4d9668f27b7538b5a8f6b62d9cd2c5797118e303aa691266df67f6e818c
31
SIZE (smlnj/110.84/ml-yacc.tgz) = 101692
32
SIZE (smlnj/110.77/pgraph.tgz) = 5907
32
SHA256 (smlnj/110.84/nlffi.tgz) = 8b96a82a3d63b000b70a1b982aab9750ce9caa77f316f6a923969e86b0133f31
33
SHA256 (smlnj/110.77/runtime.tgz) = 8e40aa7d39c806d36360174d36bc376fa53662b5ac4f0a4add120c8c2fe67f2b
33
SIZE (smlnj/110.84/nlffi.tgz) = 75036
34
SIZE (smlnj/110.77/runtime.tgz) = 349470
34
SHA256 (smlnj/110.84/old-basis.tgz) = cf15fe5c242f19f0605cd38a7bef3c1ebc89d5204c4cf68fac479198dd9fed93
35
SHA256 (smlnj/110.77/smlnj-c.tgz) = 6de6f0d5a41e7fe097f3fae2815829c4bb14729145efa293fc74bd138180f01d
35
SIZE (smlnj/110.84/old-basis.tgz) = 1080
36
SIZE (smlnj/110.77/smlnj-c.tgz) = 11462
36
SHA256 (smlnj/110.84/pgraph.tgz) = aa2f14de13a540dbc370b45757156c0b03516a5b8f97b5759292841d7b7ac1cb
37
SHA256 (smlnj/110.77/smlnj-lib.tgz) = 9232f7cf61a9a7a859dc9249a47a77b954a746137e8d8f6e57236f8c030677e7
37
SIZE (smlnj/110.84/pgraph.tgz) = 5432
38
SIZE (smlnj/110.77/smlnj-lib.tgz) = 434946
38
SHA256 (smlnj/110.84/runtime.tgz) = 5fcf4bbdeaddb247f69a333d2295f5f5c0be55b1f86ff4fbffb63f0021d84d6c
39
SHA256 (smlnj/110.77/system.tgz) = 367cce5e0ab848d28bc019862a30c2b5b774fd4733301bb72fec811d8e9d7f54
39
SIZE (smlnj/110.84/runtime.tgz) = 355339
40
SIZE (smlnj/110.77/system.tgz) = 246164
40
SHA256 (smlnj/110.84/smlnj-c.tgz) = 145a513becb4c98991af7eae81ae19b8fff336458f1f011eafdc283cb76deee9
41
SHA256 (smlnj/110.77/trace-debug-profile.tgz) = e6c7a4ed96de076b8d27af44eb8bfc1121e32f915d9a0b8fc356b5a27c761908
41
SIZE (smlnj/110.84/smlnj-c.tgz) = 10623
42
SIZE (smlnj/110.77/trace-debug-profile.tgz) = 4329
42
SHA256 (smlnj/110.84/smlnj-lib.tgz) = 3356924655277416d8a491c1d601a0f567ab3d15cb17e243620e85cb28f0e9dd
43
SIZE (smlnj/110.84/smlnj-lib.tgz) = 456254
44
SHA256 (smlnj/110.84/system.tgz) = f46b1de790000a98f4aa9830325d39cb1e4867338d4db6b8a102084db1512218
45
SIZE (smlnj/110.84/system.tgz) = 261237
46
SHA256 (smlnj/110.84/trace-debug-profile.tgz) = ecc54281b8654c75f8b9d4ebdf1ff67de71ef31297cf1b14115cd75645e46a5a
47
SIZE (smlnj/110.84/trace-debug-profile.tgz) = 3939
(-)files/do-patch-asdl_configure (+9 lines)
Line 0 Link Here
1
+++ asdl/configure	2018-12-17 15:01:00.142964000 +0100
2
@@ -4893,6 +4893,7 @@
3
     sparc:solaris2*)	SMLNJ_ARCH=sparc;	SMLNJ_OPSYS=sunos;;
4
     sparc:solaris3*)	SMLNJ_ARCH=sparc;	SMLNJ_OPSYS=solaris;;
5
     x86_64:linux*)	SMLNJ_ARCH=x86;		SMLNJ_OPSYS=linux;;
6
+    x86_64:freebsd*)	SMLNJ_ARCH=x86;		SMLNJ_OPSYS=freebsd;;
7
     x86_64:darwin*)	SMLNJ_ARCH=x86;		SMLNJ_OPSYS=darwin;;
8
     *)
9
     as_fn_error $? "unsupported configuration ${host_cpu}-${host_os}" "$LINENO" 5 ;;
(-)files/do-patch-asdl_src_asdlgen_Makefile.in (+42 lines)
Line 0 Link Here
1
--- asdl/src/asdlgen/Makefile.in.orig	2018-08-28 17:36:58.000000000 +0200
2
+++ asdl/src/asdlgen/Makefile.in	2018-12-17 21:42:50.793253000 +0100
3
@@ -54,8 +54,10 @@
4
 
5
 CODE_FRAG_DIRS =	back-end/sml
6
 
7
-CODE_FRAG_FILES =	$(patsubst %,%/fragments.sml,$(CODE_FRAG_DIRS))
8
-CODE_FRAG_MKFILES =	$(patsubst %,%/fragments.gmk,$(CODE_FRAG_DIRS))
9
+#CODE_FRAG_FILES =	$(patsubst %,%/fragments.sml,$(CODE_FRAG_DIRS))
10
+#CODE_FRAG_MKFILES =	$(patsubst %,%/fragments.gmk,$(CODE_FRAG_DIRS))
11
+CODE_FRAG_FILES =	${CODE_FRAG_DIRS:C/(.+)/\1\/fragments.sml/}
12
+CODE_FRAG_MKFILES =	${CODE_FRAG_DIRS:C/(.+)/\1\/fragments.gmk/}
13
 
14
 SRCDIR =		@ASDLGEN_SRCDIR@
15
 
16
@@ -94,14 +96,18 @@
17
 	touch .depend
18
 	$(ML_MAKEDEPEND) $(ML_MAKEDEPEND_FLAGS) -n -f .depend $(ROOT_CM) $(HEAP) || rm -f .depend
19
 
20
-ifneq ($(MAKECMDGOALS),clean)
21
-ifneq ($(MAKECMDGOALS),devclean)
22
-ifneq ($(MAKECMDGOALS),distclean)
23
-sinclude .depend
24
-sinclude back-end/sml/fragments.gmk
25
-endif
26
-endif
27
-endif
28
+.ifmake ! ( clean || devclean || distclean )
29
+.sinclude ".depend"
30
+.sinclude "back-end/sml/fragments.gmk"
31
+.endif
32
+#ifneq ($(MAKECMDGOALS),clean)
33
+#ifneq ($(MAKECMDGOALS),devclean)
34
+#ifneq ($(MAKECMDGOALS),distclean)
35
+#sinclude .depend
36
+#sinclude back-end/sml/fragments.gmk
37
+#endif
38
+#endif
39
+#endif
40
 
41
 #################### Cleanup ####################
42
 
(-)files/do-patch-base_compiler_Parse_lex_ml.lex (+10 lines)
Line 0 Link Here
1
--- base/compiler/Parse/lex/ml.lex.orig	2018-05-28 19:11:09.000000000 +0200
2
+++ base/compiler/Parse/lex/ml.lex	2018-07-27 17:27:36.367358000 +0200
3
@@ -66,7 +66,7 @@
4
 real=(~?)(({num}{frac}?{exp})|({num}{frac}{exp}?));
5
 xdigit=[0-9a-fA-F];
6
 hexnum={xdigit}+;
7
-bad_escape="\\"[\000-\008\011\012\014-\031 !#$%&'()*+,\-./:;<=>?@A-Z\[\]_`c-eg-mo-qsuw-z{}|~\127];
8
+bad_escape=\\(]|[-\000-\008\011\012\014-\031 !#$%&'()*+,./:;<=>?@A-Z\[_`c-eg-mo-qsuw-z{}|~\127]);
9
 
10
 %%
(-)files/do-patch-base_compiler_Parse_lex_sml.lex (+11 lines)
Line 0 Link Here
1
--- base/compiler/Parse/lex/sml.lex.orig	2018-05-28 19:11:09.000000000 +0200
2
+++ base/compiler/Parse/lex/sml.lex	2018-07-27 17:58:18.054955000 +0200
3
@@ -114,7 +114,7 @@
4
 frac="."{num};
5
 exp=[eE](~?){num};
6
 real=(~?)(({num}{frac}?{exp})|({num}{frac}{exp}?));
7
-bad_escape="\\"[\000-\008\011\012\014-\031 !#$%&'()*+,\-./:;<=>?@A-Z\[\]_`c-eg-mo-qsuw-z{}|~\127];
8
+bad_escape=\\(]|[-\000-\008\011\012\014-\031 !#$%&'()*+,./:;<=>?@A-Z\[_`c-eg-mo-qsuw-z{}|~\127]);
9
 
10
 %%
11
 
(-)files/do-patch-base_runtime_mach-dep_signal-sysdep.h (-3 / +14 lines)
Lines 1-6 Link Here
1
--- base/runtime/mach-dep/signal-sysdep.h.orig	2018-03-16 11:21:38.240870000 -0700
1
--- base/runtime/mach-dep/signal-sysdep.h.orig	2017-08-27 15:28:34.000000000 +0200
2
+++ base/runtime/mach-dep/signal-sysdep.h	2018-03-16 11:22:06.398280000 -0700
2
+++ base/runtime/mach-dep/signal-sysdep.h	2018-03-17 18:49:11.672602000 +0100
3
@@ -447,8 +447,8 @@ extern void SetFSR();
3
@@ -447,8 +447,8 @@
4
 #  elif defined(OPSYS_FREEBSD)
4
 #  elif defined(OPSYS_FREEBSD)
5
     /** x86, FreeBSD **/
5
     /** x86, FreeBSD **/
6
 #    define SIG_FAULT1		SIGFPE
6
 #    define SIG_FAULT1		SIGFPE
Lines 11-13 Link Here
11
 
11
 
12
 #    define SIG_GetCode(info, scp)	(info)
12
 #    define SIG_GetCode(info, scp)	(info)
13
 #    define SIG_GetPC(scp)		((scp)->sc_pc)
13
 #    define SIG_GetPC(scp)		((scp)->sc_pc)
14
@@ -568,8 +568,8 @@
15
 #  elif defined(OPSYS_FREEBSD)
16
     /** amd64, FreeBSD **/
17
 #    define SIG_FAULT1		SIGFPE
18
-#    define INT_DIVZERO(s, c)	(((s) == SIGFPE) && ((c) == FPE_INTDIV_TRAP))
19
-#    define INT_OVFLW(s, c)	(((s) == SIGFPE) && ((c) == FPE_INTOVF_TRAP))
20
+#    define INT_DIVZERO(s, c)	(((s) == SIGFPE) && ((c) == FPE_INTDIV))
21
+#    define INT_OVFLW(s, c)	(((s) == SIGFPE) && ((c) == FPE_INTOVF))
22
 
23
 #    define SIG_GetCode(info, scp)	(info)
24
 #    define SIG_GetPC(scp)		((scp)->sc_pc)
(-)files/do-patch-base_runtime_objs_makefile (-5 / +24 lines)
Lines 1-6 Link Here
1
--- base/runtime/objs/makefile.orig	2012-04-18 02:28:08.000000000 +0200
1
--- base/runtime/objs/makefile.orig	2012-04-18 02:28:08.000000000 +0200
2
+++ base/runtime/objs/makefile	2014-06-30 20:25:38.000000000 +0200
2
+++ base/runtime/objs/makefile	2018-12-20 21:57:09.499392000 +0100
3
@@ -5,10 +5,10 @@
3
@@ -5,10 +5,11 @@
4
 
4
 
5
 SHELL =		/bin/sh
5
 SHELL =		/bin/sh
6
 MAKE =		make
6
 MAKE =		make
Lines 11-20 Link Here
11
 LD_LIBS =
11
 LD_LIBS =
12
-AS =		as
12
-AS =		as
13
+AS ?=		as
13
+AS ?=		as
14
+ASFLAGS ?=
14
 AR =		ar
15
 AR =		ar
15
 ARFLAGS =	rcv
16
 ARFLAGS =	rcv
16
 RANLIB =	ranlib
17
 RANLIB =	ranlib
17
@@ -38,7 +38,7 @@
18
@@ -38,7 +39,7 @@
18
 CLIB_DIR =	$(ROOT_DIR)/c-libs
19
 CLIB_DIR =	$(ROOT_DIR)/c-libs
19
 CONFIG_DIR =	$(ROOT_DIR)/config
20
 CONFIG_DIR =	$(ROOT_DIR)/config
20
 
21
 
Lines 23-29 Link Here
23
 
24
 
24
 INCLUDES =	-I$(OBJS_DIR) -I$(INC_DIR)
25
 INCLUDES =	-I$(OBJS_DIR) -I$(INC_DIR)
25
 GC_INCLUDES =	$(INCLUDES) -I$(GC_DIR)
26
 GC_INCLUDES =	$(INCLUDES) -I$(GC_DIR)
26
@@ -329,7 +329,7 @@
27
@@ -275,7 +276,7 @@
28
 		$(INC_DIR)/asm-base.h \
29
 		mlstate-offsets.h
30
 	$(CPP) -D_ASM_ $(DEFS) -I$(BC_DIR) $(INCLUDES) $(MACH_DIR)/$(TARGET).prim.asm > prim.s
31
-	$(AS) -o prim.o prim.s
32
+	$(AS) ${ASFLAGS} -o prim.o prim.s
33
 
34
 $(MACH_DIR)/BYTECODE.prim.asm: bc-instr-def.h $(BC_DIR)/bc-instrs.h $(BC_DIR)/bc.h
35
 
36
@@ -317,7 +318,7 @@
37
 primops.o:	$(BC_DIR)/primops.asm \
38
 		$(INC_DIR)/asm-base.h
39
 	$(CPP) -D_ASM_ $(DEFS) $(INCLUDES) $(BC_DIR)/primops.asm > primops.s
40
-	$(AS) -o primops.o primops.s
41
+	$(AS) $(ASFLAGS) -o primops.o primops.s
42
 
43
 bc-instr-def.h:	gen-bc-instr-def \
44
 		$(BC_DIR)/bc.h $(BC_DIR)/print-bc.h
45
@@ -329,7 +330,7 @@
27
 #
46
 #
28
 MK_ARGS =		VERSION="$(VERSION)" \
47
 MK_ARGS =		VERSION="$(VERSION)" \
29
 			MAKE="$(MAKE)" \
48
 			MAKE="$(MAKE)" \
Lines 32-38 Link Here
32
 			AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
51
 			AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
33
 			RANLIB="$(RANLIB)" \
52
 			RANLIB="$(RANLIB)" \
34
 			INCLUDES="$(GC_INCLUDES) -I../bytecode"
53
 			INCLUDES="$(GC_INCLUDES) -I../bytecode"
35
@@ -420,7 +420,7 @@
54
@@ -420,7 +421,7 @@
36
 #
55
 #
37
 LIB_MK_ARGS =		VERSION="$(VERSION)" \
56
 LIB_MK_ARGS =		VERSION="$(VERSION)" \
38
 			MAKE="$(MAKE)" \
57
 			MAKE="$(MAKE)" \
(-)files/do-patch-base_runtime_objs_mk.x86-freebsd (-7 / +7 lines)
Lines 1-5 Link Here
1
--- base/runtime/objs/mk.x86-freebsd.orig	2006-04-20 15:28:53 UTC
1
--- base/runtime/objs/mk.x86-freebsd.orig	2006-04-20 17:28:53.000000000 +0200
2
+++ base/runtime/objs/mk.x86-freebsd
2
+++ base/runtime/objs/mk.x86-freebsd	2018-12-20 21:55:00.154477000 +0100
3
@@ -5,19 +5,19 @@
3
@@ -5,19 +5,19 @@
4
 
4
 
5
 SHELL =		/bin/sh
5
 SHELL =		/bin/sh
Lines 13-19 Link Here
13
-CPP =		gcc -x assembler-with-cpp -E -P 
13
-CPP =		gcc -x assembler-with-cpp -E -P 
14
+CC ?=		gcc -ansi
14
+CC ?=		gcc -ansi
15
+CFLAGS ?=	-O2
15
+CFLAGS ?=	-O2
16
+CPP =		${CC} -x assembler-with-cpp -E -P 
16
+CPP =		$(CC) -x assembler-with-cpp -E -P 
17
 #CPP =		/usr/bin/cpp -P
17
 #CPP =		/usr/bin/cpp -P
18
 
18
 
19
 XOBJS =
19
 XOBJS =
Lines 25-31 Link Here
25
 TARGET =	X86
25
 TARGET =	X86
26
 VERSION =	v-x86-freebsd
26
 VERSION =	v-x86-freebsd
27
 RUNTIME =	run.x86-freebsd
27
 RUNTIME =	run.x86-freebsd
28
@@ -25,6 +25,6 @@ RUNTIME_SO =	run.x86-freebsd.so
28
@@ -25,6 +25,6 @@
29
 RUNTIME_A =	run.x86-freebsd.a
29
 RUNTIME_A =	run.x86-freebsd.a
30
 
30
 
31
 all:
31
 all:
Lines 32-37 Link Here
32
-	($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
32
-	($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" $(RUNTIME))
33
-	($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
33
-	($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared" $(RUNTIME_SO))
34
-	($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
34
-	($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="" $(RUNTIME_A))
35
+	($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME))
35
+	($(MAKE) RUNTIME="$(RUNTIME)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME))
36
+	($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared $(LDFLAGS)" $(RUNTIME_SO))
36
+	($(MAKE) RUNTIME="$(RUNTIME_SO)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="-shared $(LDFLAGS)" $(RUNTIME_SO))
37
+	($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME_A))
37
+	($(MAKE) RUNTIME_A="$(RUNTIME_A)" VERSION="$(VERSION)" MAKE="$(MAKE)" AS="$(AS)" ASFLAGS="$(ASFLAGS)" CC="$(CC)" CFLAGS="$(CFLAGS)" CPP="$(CPP)" TARGET=$(TARGET) DEFS="$(DEFS)" XOBJS="$(XOBJS)" XLIBS="$(XLIBS)" LD_LIBS="$(LD_LIBS)" LDFLAGS="$(LDFLAGS)" $(RUNTIME_A))
(-)files/do-patch-base_system_smlnj_installer_generic-install.sml (-49 lines)
Lines 1-49 Link Here
1
--- base/system/smlnj/installer/generic-install.sml.orig	2014-08-23 04:18:09.000000000 +0200
2
+++ base/system/smlnj/installer/generic-install.sml	2014-08-28 21:51:06.000000000 +0200
3
@@ -233,28 +233,26 @@
4
 	(* ------------------------------ *)
5
 
6
 	(* parse the targets file *)
7
-	fun loop (ml, srcReqs, allsrc) =
8
+	fun loop (ml, allsrc) =
9
 	    case getInputTokens s of
10
-		NONE => (TextIO.closeIn s; (ml, srcReqs, allsrc))
11
+		NONE => (TextIO.closeIn s; (ml, allsrc))
12
 	      | SOME [x as ("dont_move_libraries" | "move_libraries")] =>
13
   		  (warn ["\"", x, "\" no longer supported",
14
 			 " (installer always moves libraries)\n"];
15
-		   loop (ml, srcReqs, allsrc))
16
-	      | SOME ["request", "src-smlnj"] => loop (ml, srcReqs, true)
17
-	      | SOME ["request", module] => if SS.member(allmoduleset, module)
18
-		  then loop (ml, module :: srcReqs, allsrc)
19
-		  else loop (module :: ml, srcReqs, allsrc)
20
-	      | SOME [] => loop (ml, srcReqs, allsrc)
21
+		   loop (ml, allsrc))
22
+	      | SOME ["request", "src-smlnj"] => loop (ml, true)
23
+	      | SOME ["request", module] => loop (module :: ml, allsrc)
24
+	      | SOME [] => loop (ml, allsrc)
25
 	      | SOME l => fail ["ill-formed targets line: ", tokenLine l, "\n"]
26
 
27
-	val (modules, srcReqs, allsrc) = loop ([], [], false)
28
+	val (modules, allsrc) = loop ([], false)
29
 
30
 	(* now resolve dependencies; get full list of modules
31
 	 * in correct build order: *)
32
 	val modules = resolve (modules, depfile)
33
 	val moduleset = SS.addList (SS.empty, modules)
34
 	val srcmoduleset = if allsrc then SS.union (moduleset, allmoduleset)
35
-			   else SS.addList (moduleset, srcReqs)
36
+			   else moduleset
37
 
38
 	(* fetch and unpack source trees, using auxiliary helper command
39
 	 * which takes the root directory as its first and the module
40
@@ -386,7 +384,8 @@
41
 		      salist := (fn () => standalone args) :: (!salist)
42
 	    in case SM.find (actions, module) of
43
 		   SOME al => app perform (rev al)
44
-		 | NONE => fail ["unknown module: ", module, "\n"]
45
+		 | NONE => if SS.member(allmoduleset, module) then ()
46
+		           else fail ["unknown module: ", module, "\n"]
47
 	    end
48
     in
49
 	(command_pathconfig "bindir";	(* dummy -- for CM make tool *)
(-)files/do-patch-smlnj-lib_JSON_json-parser.sml (+102 lines)
Line 0 Link Here
1
--- smlnj-lib/JSON/json-parser.sml.orig	2011-05-10 20:58:08.000000000 +0200
2
+++ smlnj-lib/JSON/json-parser.sml	2017-10-03 22:49:26.569924000 +0200
3
@@ -22,6 +22,26 @@
4
 		  msg, ", found '", JSONTokens.toString tok, "'"
5
 		])
6
 	  val lexer = Lex.lex srcMap
7
+	  fun parse_sequence (is_tok_end, parse_item) (strm : Lex.strm, itms) = let
8
+		fun is_tok_sep tok = case tok of T.COMMA => true | _ => false
9
+		val (tok, pos, strm') = lexer strm
10
+		in if is_tok_sep tok
11
+		   then error (pos, "parsing sequence", tok)
12
+		   else if is_tok_end tok
13
+			then (strm', itms)
14
+			else let val (strm'', itm) = parse_item strm
15
+				 val (tok', pos', strm''') = lexer strm''
16
+			     in if is_tok_end tok'
17
+				then (strm''', itm :: itms)
18
+				else if is_tok_sep tok'
19
+				     then let val (tok'', pos'', _) = lexer strm'''
20
+					  in if is_tok_end tok''
21
+					     then error (pos'', "parsing sequence", tok'')
22
+					     else parse_sequence (is_tok_end, parse_item) (strm''', itm :: itms)
23
+					  end
24
+				     else error (pos', "parsing sequence", tok')
25
+				 end
26
+		end
27
 	  fun parseValue (strm : Lex.strm) = let
28
 		val (tok, pos, strm) = lexer strm
29
 		in
30
@@ -37,50 +57,29 @@
31
 		    | _ => error (pos, "parsing value", tok)
32
 		  (* end case *)
33
 		end
34
-	  and parseArray (strm : Lex.strm) = (case lexer strm
35
-		 of (T.RB, _, strm) => (strm, J.ARRAY[])
36
-		  | _ => let
37
-		      fun loop (strm, items) = let
38
-			    val (strm, v) = parseValue strm
39
-			  (* expect either a "," or a "]" *)
40
-			    val (tok, pos, strm) = lexer strm
41
-			    in
42
-			      case tok
43
-			       of T.RB => (strm, v::items)
44
-				| T.COMMA => loop (strm, v::items)
45
-				| _ => error (pos, "parsing array", tok)
46
-			      (* end case *)
47
-			    end
48
-		      val (strm, items) = loop (strm, [])
49
-		      in
50
-			(strm, J.ARRAY(List.rev items))
51
-		      end
52
-		(* end case *))
53
+	  and parseArray (strm : Lex.strm) = let
54
+		fun is_RB tok = case tok of T.RB => true | _ => false
55
+		val (strm', elmnts) = parse_sequence (is_RB, parseValue) (strm, [])
56
+		in (strm', J.ARRAY(List.rev elmnts))
57
+		end
58
 	  and parseObject (strm : Lex.strm) = let
59
-		fun parseField strm = (case lexer strm
60
-		       of (T.STRING s, pos, strm) => (case lexer strm
61
-			     of (T.COLON, _, strm) => let
62
-				  val (strm, v) = parseValue strm
63
-				  in
64
-				    SOME(strm, (s, v))
65
-				  end
66
-			      | (tok, pos, _) => error (pos, "parsing field", tok)
67
-			    (* end case *))
68
-			| _ => NONE
69
-		      (* end case *))
70
-		fun loop (strm, flds) = (case parseField strm
71
-		       of SOME(strm, fld) => (
72
-			  (* expect either "," or "}" *)
73
-			    case lexer strm
74
-			     of (T.RCB, pos, strm) => (strm, fld::flds)
75
-			      | (T.COMMA, pos, strm) => loop (strm, fld::flds)
76
-			      | (tok, pos, _) => error (pos, "parsing object", tok)
77
-			    (* end case *))
78
-			| NONE => (strm, flds)
79
-		      (* end case *))
80
-		val (strm, flds) = loop (strm, [])
81
-		in
82
-		  (strm, J.OBJECT(List.rev flds))
83
+		fun is_RCB tok = case tok of T.RCB => true | _ => false
84
+		fun parse_field strm = let
85
+			val (tok, pos, strm') = lexer strm
86
+			in case tok
87
+			    of T.STRING s =>
88
+				(case lexer strm'
89
+				  of (T.COLON, _, strm'') => let
90
+					val (strm''', v) = parseValue strm''
91
+					in (strm''', (s, v))
92
+					end
93
+				   | (tok', pos', _) => error (pos', "parsing field", tok')
94
+				 (* end case *))
95
+			     | _ => error (pos, "parsing field", tok)
96
+			   (* end case *)
97
+			end
98
+		val (strm', flds) = parse_sequence (is_RCB, parse_field) (strm, [])
99
+		in (strm', J.OBJECT(List.rev flds))
100
 		end
101
 	  in
102
 	    #2 (parseValue (Lex.streamifyInstream inStrm))
(-)files/do-patch-smlnj-lib_JSON_json-stream-printer.sml (+25 lines)
Line 0 Link Here
1
--- smlnj-lib/JSON/json-stream-printer.sml.orig	2017-07-14 22:32:40.000000000 +0200
2
+++ smlnj-lib/JSON/json-stream-printer.sml	2017-10-25 20:33:53.541874000 +0200
3
@@ -103,14 +103,14 @@
4
 	  fun tr (i, chrs) = (case getWChar i
5
 		 of SOME(wchr, i) => if (wchr <= 0w126)
6
 		      then (case UTF8.toAscii wchr
7
-			 of #"\"" => "\\\""
8
-			  | #"\\" => "\\\\"
9
-			  | #"/" => "\\/"
10
-			  | #"\b" => "\\b"
11
-			  | #"\f" => "\\f"
12
-			  | #"\n" => "\\n"
13
-			  | #"\r" => "\\r"
14
-			  | #"\t" => "\\t"
15
+			 of #"\"" => tr(i, "\\\"" :: chrs)
16
+			  | #"\\" => tr(i, "\\\\" :: chrs)
17
+			  | #"/" => tr(i, "\\/" :: chrs)
18
+			  | #"\b" => tr(i, "\\b" :: chrs)
19
+			  | #"\f" => tr(i, "\\f" :: chrs)
20
+			  | #"\n" => tr(i, "\\n" :: chrs)
21
+			  | #"\r" => tr(i, "\\r" :: chrs)
22
+			  | #"\t" => tr(i, "\\t" :: chrs)
23
 			  | c => if (wchr < 0w32)
24
 			      then tr(i, F.format "\\u%04x" [F.WORD wchr] :: chrs)
25
 			      else tr(i, str c :: chrs)
(-)files/do-patch-smlnj-lib_JSON_json-util.sml (+29 lines)
Line 0 Link Here
1
--- smlnj-lib/JSON/json-util.sml.orig	2017-04-29 17:39:27.000000000 +0200
2
+++ smlnj-lib/JSON/json-util.sml	2017-10-04 00:40:39.574909000 +0200
3
@@ -133,7 +133,7 @@
4
 
5
     fun lookupField (v as J.OBJECT fields) = let
6
 	  fun find lab = (case List.find (fn (l, v) => (l = lab)) fields
7
-		 of NONE => raise FieldNotFound(v, concat["no definition for field \"", lab, "\""])
8
+		 of NONE => raise FieldNotFound(v, lab)
9
 		  | SOME(_, v) => v
10
 		(* end case *))
11
 	  in
12
@@ -197,7 +197,7 @@
13
     fun get (v, []) = v
14
       | get (v as J.OBJECT fields, SEL lab :: rest) =
15
 	  (case List.find (fn (l, v) => (l = lab)) fields
16
-	   of NONE => raise raise FieldNotFound(v, concat["no definition for field \"", lab, "\""])
17
+	   of NONE => raise FieldNotFound(v, lab)
18
 	    | SOME(_, v) => get (v, rest)
19
 	  (* end case *))
20
       | get (v, SEL _ :: _) = raise NotObject v
21
@@ -222,7 +222,7 @@
22
   (* follow a path into a JSON value while constructing a zipper *)
23
     fun unzip (v, []) = (ZNIL, v)
24
       | unzip (v as J.OBJECT fields, SEL lab :: rest) = let
25
-          fun find (_, []) = raise FieldNotFound(v, concat["no definition for field \"", lab, "\""])
26
+          fun find (_, []) = raise FieldNotFound(v, lab)
27
             | find (pre, (l, v)::flds) = if (l = lab)
28
                 then let
29
 		  val (zipper, v) = unzip (v, rest)
(-)files/patch-config___arch-n-opsys (-3 / +3 lines)
Lines 1-6 Link Here
1
--- config/_arch-n-opsys.orig	2014-08-22 15:20:03.000000000 +0200
1
--- config/_arch-n-opsys.orig	2018-06-22 14:49:01 UTC
2
+++ config/_arch-n-opsys	2014-08-23 14:19:47.056122710 +0200
2
+++ config/_arch-n-opsys
3
@@ -85,6 +85,8 @@
3
@@ -91,6 +91,8 @@ case `uname -s` in
4
     HEAP_OPSYS=bsd
4
     HEAP_OPSYS=bsd
5
     case `uname -m` in
5
     case `uname -m` in
6
       *86) ARCH=x86;;
6
       *86) ARCH=x86;;
(-)files/patch-config___heap2exec (-5 / +5 lines)
Lines 1-6 Link Here
1
--- config/_heap2exec.orig	2006-04-20 17:28:53.000000000 +0200
1
--- config/_heap2exec.orig	2006-04-20 15:28:53 UTC
2
+++ config/_heap2exec	2013-06-14 22:18:55.050990989 +0200
2
+++ config/_heap2exec
3
@@ -83,6 +83,7 @@
3
@@ -83,6 +83,7 @@ SO_LIBS=
4
 A_PROG=
4
 A_PROG=
5
 A_FLAGS=
5
 A_FLAGS=
6
 A_LIBS=
6
 A_LIBS=
Lines 8-14 Link Here
8
 
8
 
9
 case ${OPSYS} in
9
 case ${OPSYS} in
10
 	darwin)
10
 	darwin)
11
@@ -96,6 +97,13 @@
11
@@ -96,6 +97,13 @@ case ${OPSYS} in
12
 		A_PROG=${CC}
12
 		A_PROG=${CC}
13
 		A_FLAGS=-Wl,--export-dynamic
13
 		A_FLAGS=-Wl,--export-dynamic
14
 		A_LIBS=-lm
14
 		A_LIBS=-lm
Lines 22-28 Link Here
22
 		;;
22
 		;;
23
 	linux)
23
 	linux)
24
 		SO_PROG=${CC}
24
 		SO_PROG=${CC}
25
@@ -116,7 +124,7 @@
25
@@ -116,7 +124,7 @@ fi
26
 RESULT=0
26
 RESULT=0
27
 if ${H2A} "$heapfile" "$execfile".s ; then
27
 if ${H2A} "$heapfile" "$execfile".s ; then
28
 	if [ -f "$execfile".s ] ; then
28
 	if [ -f "$execfile".s ] ; then
(-)files/patch-config_install.sh (-11 / +11 lines)
Lines 1-4 Link Here
1
--- config/install.sh.orig	2014-08-22 13:20:03 UTC
1
--- config/install.sh.orig	2018-08-28 15:30:41 UTC
2
+++ config/install.sh
2
+++ config/install.sh
3
@@ -17,6 +17,8 @@ else
3
@@ -17,6 +17,8 @@ else
4
     nolib=false
4
     nolib=false
Lines 68-74 Link Here
68
 #
68
 #
69
 # the release version that we are installing
69
 # the release version that we are installing
70
 #
70
 #
71
@@ -326,7 +371,12 @@ fi
71
@@ -344,7 +389,12 @@ fi
72
 # the name of the bin files directory
72
 # the name of the bin files directory
73
 #
73
 #
74
 BOOT_ARCHIVE=boot.$ARCH-unix
74
 BOOT_ARCHIVE=boot.$ARCH-unix
Lines 82-88 Link Here
82
 
82
 
83
 #
83
 #
84
 # build the run-time system
84
 # build the run-time system
85
@@ -335,9 +385,15 @@ if [ -x "$RUNDIR"/run.$ARCH-$OPSYS ]; then
85
@@ -353,9 +403,15 @@ if [ -x "$RUNDIR"/run.$ARCH-$OPSYS ]; then
86
     vsay $this: Run-time system already exists.
86
     vsay $this: Run-time system already exists.
87
 else
87
 else
88
     "$CONFIGDIR"/unpack "$ROOT" runtime
88
     "$CONFIGDIR"/unpack "$ROOT" runtime
Lines 94-105 Link Here
94
     cd "$BASEDIR"/runtime/objs
94
     cd "$BASEDIR"/runtime/objs
95
     echo $this: Compiling the run-time system.
95
     echo $this: Compiling the run-time system.
96
-    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
96
-    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS
97
+    echo "$MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS AS=\""$AS\"" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
97
+    echo "$MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS AS=\"$AS\" ASFLAGS=\"$ASFLAGS\" CFLAGS=\"$CFLAGS\" LDFLAGS=\"$LDFLAGS\""
98
+    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS AS="$AS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
98
+    $MAKE -f mk.$ARCH-$OPSYS $EXTRA_DEFS AS="$AS" ASFLAGS="$ASFLAGS" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS"
99
     if [ -x run.$ARCH-$OPSYS ]; then
99
     if [ -x run.$ARCH-$OPSYS ]; then
100
 	mv run.$ARCH-$OPSYS "$RUNDIR"
100
 	mv run.$ARCH-$OPSYS "$RUNDIR"
101
 	if [ -f runx.$ARCH-$OPSYS ]; then
101
 	if [ -f runx.$ARCH-$OPSYS ]; then
102
@@ -349,7 +405,7 @@ else
102
@@ -367,7 +423,7 @@ else
103
 	if [ -f run.$ARCH-$OPSYS.a ]; then
103
 	if [ -f run.$ARCH-$OPSYS.a ]; then
104
 	    mv run.$ARCH-$OPSYS.a "$RUNDIR"
104
 	    mv run.$ARCH-$OPSYS.a "$RUNDIR"
105
 	fi
105
 	fi
Lines 108-114 Link Here
108
     else
108
     else
109
 	complain "$this: !!! Run-time system build failed for some reason."
109
 	complain "$this: !!! Run-time system build failed for some reason."
110
     fi
110
     fi
111
@@ -375,7 +431,7 @@ if [ -r "$HEAPDIR"/sml.$HEAP_SUFFIX ]; then
111
@@ -393,7 +449,7 @@ if [ -r "$HEAPDIR"/sml.$HEAP_SUFFIX ]; then
112
 	complain "$this !!! Unable to re-create heap image (sml.$HEAP_SUFFIX)."
112
 	complain "$this !!! Unable to re-create heap image (sml.$HEAP_SUFFIX)."
113
     fi
113
     fi
114
 else
114
 else
Lines 117-123 Link Here
117
 
117
 
118
     fish "$ROOT"/"$BOOT_FILES"/smlnj/basis
118
     fish "$ROOT"/"$BOOT_FILES"/smlnj/basis
119
 
119
 
120
@@ -410,7 +466,7 @@ else
120
@@ -428,7 +484,7 @@ else
121
 	    cd "$ROOT"/"$BOOT_FILES"
121
 	    cd "$ROOT"/"$BOOT_FILES"
122
 	    for anchor in * ; do
122
 	    for anchor in * ; do
123
 		if [ -d $anchor ] ; then
123
 		if [ -d $anchor ] ; then
Lines 126-132 Link Here
126
 		    move $anchor "$LIBDIR"/$anchor
126
 		    move $anchor "$LIBDIR"/$anchor
127
 		fi
127
 		fi
128
 	    done
128
 	    done
129
@@ -433,6 +489,18 @@ installdriver _ml-build ml-build
129
@@ -451,6 +507,18 @@ installdriver _ml-build ml-build
130
 
130
 
131
 cd "$ROOT"
131
 cd "$ROOT"
132
 
132
 
Lines 145-151 Link Here
145
 #
145
 #
146
 # Now do all the rest using the precompiled installer
146
 # Now do all the rest using the precompiled installer
147
 # (see base/system/smlnj/installer for details)
147
 # (see base/system/smlnj/installer for details)
148
@@ -442,6 +510,12 @@ if [ $nolib = false ] ; then
148
@@ -460,6 +528,12 @@ if [ $nolib = false ] ; then
149
     export ROOT INSTALLDIR CONFIGDIR BINDIR
149
     export ROOT INSTALLDIR CONFIGDIR BINDIR
150
     CM_TOLERATE_TOOL_FAILURES=true
150
     CM_TOLERATE_TOOL_FAILURES=true
151
     export CM_TOLERATE_TOOL_FAILURES
151
     export CM_TOLERATE_TOOL_FAILURES
Lines 158-164 Link Here
158
     if "$BINDIR"/sml -m \$smlnj/installer.cm
158
     if "$BINDIR"/sml -m \$smlnj/installer.cm
159
     then
159
     then
160
 	vsay $this: Installation complete.
160
 	vsay $this: Installation complete.
161
@@ -449,5 +523,20 @@ if [ $nolib = false ] ; then
161
@@ -467,5 +541,20 @@ if [ $nolib = false ] ; then
162
 	complain "$this: !!! Installation of libraries and programs failed."
162
 	complain "$this: !!! Installation of libraries and programs failed."
163
     fi
163
     fi
164
 fi
164
 fi
(-)files/patch-config_unpack (+12 lines)
Line 0 Link Here
1
--- config/unpack.orig	2016-08-04 14:38:24 UTC
2
+++ config/unpack
3
@@ -291,6 +291,9 @@ do
4
         # cd $ROOT/doc
5
 	# build $ROOT
6
 	;;
7
+      asdl)
8
+	unpack "Abstract Syntax Description Library" "$ROOT" asdl asdl
9
+	;;
10
       *)
11
 	echo Unknown package: ${i}.
12
 	echo Trying default method...
(-)pkg-plist (-4 / +8 lines)
Lines 5-10 Link Here
5
man/man1/sml.1.gz
5
man/man1/sml.1.gz
6
man/man7/smlnj.7.gz
6
man/man7/smlnj.7.gz
7
smlnj/bin/.arch-n-opsys
7
smlnj/bin/.arch-n-opsys
8
smlnj/bin/.heap/asdlgen.%%MLARCH%%-bsd
8
smlnj/bin/.heap/heap2asm.%%MLARCH%%-bsd
9
smlnj/bin/.heap/heap2asm.%%MLARCH%%-bsd
9
smlnj/bin/.heap/ml-antlr.%%MLARCH%%-bsd
10
smlnj/bin/.heap/ml-antlr.%%MLARCH%%-bsd
10
smlnj/bin/.heap/ml-burg.%%MLARCH%%-bsd
11
smlnj/bin/.heap/ml-burg.%%MLARCH%%-bsd
Lines 19-24 Link Here
19
smlnj/bin/.run/run.%%MLARCH%%-freebsd.a
20
smlnj/bin/.run/run.%%MLARCH%%-freebsd.a
20
smlnj/bin/.run/run.%%MLARCH%%-freebsd.so
21
smlnj/bin/.run/run.%%MLARCH%%-freebsd.so
21
smlnj/bin/.run-sml
22
smlnj/bin/.run-sml
23
smlnj/bin/asdlgen
22
smlnj/bin/heap2asm
24
smlnj/bin/heap2asm
23
smlnj/bin/heap2exec
25
smlnj/bin/heap2exec
24
smlnj/bin/ml-antlr
26
smlnj/bin/ml-antlr
Lines 31-36 Link Here
31
smlnj/bin/ml-yacc
33
smlnj/bin/ml-yacc
32
%%EVERYTHING%%smlnj/bin/nowhere
34
%%EVERYTHING%%smlnj/bin/nowhere
33
smlnj/bin/sml
35
smlnj/bin/sml
36
smlnj/lib/SMLNJ-BASIS/.cm/%%MLARCH%%-unix/basis-common.cm
34
smlnj/lib/SMLNJ-BASIS/.cm/%%MLARCH%%-unix/basis.cm
37
smlnj/lib/SMLNJ-BASIS/.cm/%%MLARCH%%-unix/basis.cm
35
smlnj/lib/SMLNJ-LIB/Controls/.cm/%%MLARCH%%-unix/controls-lib.cm
38
smlnj/lib/SMLNJ-LIB/Controls/.cm/%%MLARCH%%-unix/controls-lib.cm
36
smlnj/lib/SMLNJ-LIB/HTML/.cm/%%MLARCH%%-unix/html-lib.cm
39
smlnj/lib/SMLNJ-LIB/HTML/.cm/%%MLARCH%%-unix/html-lib.cm
Lines 59-64 Link Here
59
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/SPARC.cm
62
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/SPARC.cm
60
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/StagedAlloc.cm
63
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/StagedAlloc.cm
61
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/Visual.cm
64
smlnj/lib/SMLNJ-MLRISC/.cm/%%MLARCH%%-unix/Visual.cm
65
%%EVERYTHING%%smlnj/lib/basis-2004.cm/.cm/%%MLARCH%%-unix/basis-2004.cm
66
smlnj/lib/asdl-ext.cm/.cm/%%MLARCH%%-unix/asdl-ext.cm
67
smlnj/lib/asdl-lib.cm/.cm/%%MLARCH%%-unix/asdl-lib.cm
68
smlnj/lib/asdlgen-tool.cm/.cm/%%MLARCH%%-unix/asdlgen-tool.cm
62
smlnj/lib/burg-ext.cm/.cm/%%MLARCH%%-unix/burg-ext.cm
69
smlnj/lib/burg-ext.cm/.cm/%%MLARCH%%-unix/burg-ext.cm
63
smlnj/lib/c/.cm/%%MLARCH%%-unix/c.cm
70
smlnj/lib/c/.cm/%%MLARCH%%-unix/c.cm
64
smlnj/lib/c/internals/.cm/%%MLARCH%%-unix/c-int.cm
71
smlnj/lib/c/internals/.cm/%%MLARCH%%-unix/c-int.cm
Lines 75-80 Link Here
75
smlnj/lib/cml/.cm/%%MLARCH%%-unix/unix-lib.cm
82
smlnj/lib/cml/.cm/%%MLARCH%%-unix/unix-lib.cm
76
smlnj/lib/cml-lib/.cm/%%MLARCH%%-unix/smlnj-lib.cm
83
smlnj/lib/cml-lib/.cm/%%MLARCH%%-unix/smlnj-lib.cm
77
smlnj/lib/cml-lib/.cm/%%MLARCH%%-unix/trace-cml.cm
84
smlnj/lib/cml-lib/.cm/%%MLARCH%%-unix/trace-cml.cm
85
smlnj/lib/compiler/MiscUtil/const-arith/.cm/%%MLARCH%%-unix/sources.cm
78
smlnj/lib/dir-tool.cm/.cm/%%MLARCH%%-unix/dir-tool.cm
86
smlnj/lib/dir-tool.cm/.cm/%%MLARCH%%-unix/dir-tool.cm
79
%%EVERYTHING%%smlnj/lib/eXene.cm/.cm/%%MLARCH%%-unix/eXene.cm
87
%%EVERYTHING%%smlnj/lib/eXene.cm/.cm/%%MLARCH%%-unix/eXene.cm
80
smlnj/lib/grm-ext.cm/.cm/%%MLARCH%%-unix/grm-ext.cm
88
smlnj/lib/grm-ext.cm/.cm/%%MLARCH%%-unix/grm-ext.cm
Lines 115-121 Link Here
115
smlnj/lib/smlnj/.cm/%%MLARCH%%-unix/installer.cm
123
smlnj/lib/smlnj/.cm/%%MLARCH%%-unix/installer.cm
116
smlnj/lib/smlnj/.cm/%%MLARCH%%-unix/library-install.cm
124
smlnj/lib/smlnj/.cm/%%MLARCH%%-unix/library-install.cm
117
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/ALPHA.cm
125
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/ALPHA.cm
118
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/AMD64.cm
119
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/Control.cm
126
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/Control.cm
120
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/Graphs.cm
127
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/Graphs.cm
121
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/HPPA.cm
128
smlnj/lib/smlnj/MLRISC/.cm/%%MLARCH%%-unix/HPPA.cm
Lines 130-136 Link Here
130
smlnj/lib/smlnj/cm/.cm/%%MLARCH%%-unix/cm.cm
137
smlnj/lib/smlnj/cm/.cm/%%MLARCH%%-unix/cm.cm
131
smlnj/lib/smlnj/cm/.cm/%%MLARCH%%-unix/tools.cm
138
smlnj/lib/smlnj/cm/.cm/%%MLARCH%%-unix/tools.cm
132
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/alpha32-unix.cm
139
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/alpha32-unix.cm
133
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/amd64-unix.cm
134
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/current.cm
140
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/current.cm
135
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/hppa-unix.cm
141
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/hppa-unix.cm
136
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/ppc-macos.cm
142
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/ppc-macos.cm
Lines 140-146 Link Here
140
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/x86-win32.cm
146
smlnj/lib/smlnj/cmb/.cm/%%MLARCH%%-unix/x86-win32.cm
141
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/all.cm
147
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/all.cm
142
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/alpha32.cm
148
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/alpha32.cm
143
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/amd64.cm
144
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/compiler.cm
149
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/compiler.cm
145
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/current.cm
150
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/current.cm
146
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/hppa.cm
151
smlnj/lib/smlnj/compiler/.cm/%%MLARCH%%-unix/hppa.cm
Lines 163-169 Link Here
163
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/pp-lib.cm
168
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/pp-lib.cm
164
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/smlnj-lib.cm
169
smlnj/lib/smlnj/smlnj-lib/.cm/%%MLARCH%%-unix/smlnj-lib.cm
165
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/alpha32.cm
170
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/alpha32.cm
166
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/amd64.cm
167
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/basics.cm
171
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/basics.cm
168
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/core.cm
172
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/core.cm
169
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/debugprof.cm
173
smlnj/lib/smlnj/viscomp/.cm/%%MLARCH%%-unix/debugprof.cm

Return to bug 234532