pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/smlnj11072 Generate the base/ copy of the runtime...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/2e9f597c2798
branches:  trunk
changeset: 349313:2e9f597c2798
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sun Jul 03 19:13:22 2016 +0000

description:
Generate the base/ copy of the runtime from the src/ copy after
patching, instead of extracting twice.

diffstat:

 lang/smlnj11072/Makefile |  31 +++++++++++++++++++++++--------
 1 files changed, 23 insertions(+), 8 deletions(-)

diffs (54 lines):

diff -r 6e8e2088608f -r 2e9f597c2798 lang/smlnj11072/Makefile
--- a/lang/smlnj11072/Makefile  Sun Jul 03 19:11:15 2016 +0000
+++ b/lang/smlnj11072/Makefile  Sun Jul 03 19:13:22 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2016/07/03 18:23:35 dholland Exp $
+# $NetBSD: Makefile,v 1.3 2016/07/03 19:13:22 dholland Exp $
 #
 
 DISTNAME=      boot.${BOX}-unix
@@ -46,22 +46,37 @@
 
 .include "../../lang/smlnj/Makefile.common"
 
-# create parent directory for the runtime system
+#
+# For smlnj reasons the runtime system needs to be unpacked twice, once
+# in work/src and once in work/base.
+#
+# As of 20160624, instead of inconsistently patching one copy or the
+# other and hoping, or patching both and duplicating all the patches,
+# we'll patch only work/src, and then *after* patching clone work/src
+# into work/base.
+#
+
+# create parent directories for the runtime system
 pre-extract:
        ${MKDIR} ${WRKDIR}/src || ${TRUE}
+       ${MKDIR} ${WRKDIR}/base || ${TRUE}
 
 # make it easier to patch the runtime system
 do-extract:
-       ${RUN} extract_file="${_DISTDIR}/config.tgz"; export extract_file;      \
+       ${RUN} extract_file="${_DISTDIR}/config.tgz";   \
+               export extract_file;                    \
                cd ${WRKDIR}; ${EXTRACT_CMD}
-       ${RUN} extract_file="${_DISTDIR}/runtime.tgz"; export extract_file;     \
+       ${RUN} extract_file="${_DISTDIR}/runtime.tgz";  \
+               export extract_file;                    \
                cd ${WRKDIR}/src; ${EXTRACT_CMD}
-       ${RUN} extract_file="${_DISTDIR}/runtime.tgz"; export extract_file;     \
-               mkdir ${WRKDIR}/base; cd ${WRKDIR}/base; ${EXTRACT_CMD}
 
-# make symlinks to the dist files
+# symlink the rest of the distfiles
 post-extract:
-       cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/*  .
+       cd ${WRKDIR} && ${LN} -sf ${_DISTDIR}/* .
+
+# make the necessary copy of the runtime, _after_ patching src
+post-patch:
+       cd ${WRKDIR}/src && pax -rw runtime ${WRKDIR}/base/
 
 # resolve definition of SML_BASE, CFLAGS in patched files
 do-configure:



Home | Main Index | Thread Index | Old Index