pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ghc98
Module Name: pkgsrc
Committed By: pho
Date: Wed May 1 03:22:33 UTC 2024
Modified Files:
pkgsrc/lang/ghc98: bootstrap.mk distinfo
pkgsrc/lang/ghc98/patches: patch-hadrian_bootstrap_bootstrap.py
Log Message:
lang/ghc98: Fix a build failure that occurs when ${WRKDIR} != ${PKGPATH}/work
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc98/bootstrap.mk
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ghc98/distinfo
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ghc98/bootstrap.mk
diff -u pkgsrc/lang/ghc98/bootstrap.mk:1.1 pkgsrc/lang/ghc98/bootstrap.mk:1.2
--- pkgsrc/lang/ghc98/bootstrap.mk:1.1 Sun Apr 28 05:58:57 2024
+++ pkgsrc/lang/ghc98/bootstrap.mk Wed May 1 03:22:32 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.1 2024/04/28 05:58:57 pho Exp $
+# $NetBSD: bootstrap.mk,v 1.2 2024/05/01 03:22:32 pho Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler on a per-platform basis. See
# ./files/BOOTSTRAP.md for details.
@@ -157,7 +157,7 @@ pre-build:
@${PHASE_MSG} "Building Hadrian for GHC ${BOOT_VERSION}"
${RUN}cd ${WRKSRC}/hadrian/bootstrap && \
- ${PKGSRC_SET_ENV} ${ALL_ENV} \
+ ${PKGSRC_SETENV} ${ALL_ENV} FILESDIR=${FILESDIR:Q} \
python bootstrap.py \
-j ${_MAKE_JOBS_N} \
-s ${DISTDIR}/${DIST_SUBDIR}/${HADRIAN_BOOT_SOURCE}
@@ -325,9 +325,10 @@ ${WRKDIR}/stamp-build-boot: ${WRKDIR}/st
done; \
PATH="$$pruned_path"; \
cd ${WRKSRC}/hadrian/bootstrap && \
- python bootstrap.py \
- -j ${_MAKE_JOBS_N} \
- -s ${DISTDIR}/${DIST_SUBDIR}/${HADRIAN_BOOT_SOURCE}
+ ${PKGSRC_SETENV} FILESDIR=${FILESDIR:Q} \
+ python bootstrap.py \
+ -j ${_MAKE_JOBS_N} \
+ -s ${DISTDIR}/${DIST_SUBDIR}/${HADRIAN_BOOT_SOURCE}
@${PHASE_MSG} "Building bootstrapping compiler ${PKGNAME_NOREV}"
for f in ${BUILDLINK_DIR:Q}/lib/libffi.*; do \
Index: pkgsrc/lang/ghc98/distinfo
diff -u pkgsrc/lang/ghc98/distinfo:1.2 pkgsrc/lang/ghc98/distinfo:1.3
--- pkgsrc/lang/ghc98/distinfo:1.2 Sun Apr 28 16:23:44 2024
+++ pkgsrc/lang/ghc98/distinfo Wed May 1 03:22:32 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2024/04/28 16:23:44 pho Exp $
+$NetBSD: distinfo,v 1.3 2024/05/01 03:22:32 pho Exp $
BLAKE2s (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = a691117b405b9f7954b954acc382b3357a9ff8c98151514c82d18d83da397940
SHA512 (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = 1c917a52a020be3a1878f9d7e8e4c47d31180e54248c127a60706c1053a95b2d8a487f79e7fb5daa725178f271a7cc17e4e7b47ce2119f8546e259c63b9864d8
@@ -28,7 +28,7 @@ SHA1 (patch-compiler_GHC_Driver_Pipeline
SHA1 (patch-compiler_GHC_SysTools_Process.hs) = ceb26657516e207e22d555ec6f87f735344b0d08
SHA1 (patch-configure.ac) = 985482ae70830ddbf1334c9c82a2cec78a34bb4c
SHA1 (patch-hadrian_bindist_Makefile) = 3a91d56be4f1b59c6534eceb5b1a4f8e86d49c68
-SHA1 (patch-hadrian_bootstrap_bootstrap.py) = 7a03b6cf4b07348c7ab8f2ecbb2f234b0817c1f6
+SHA1 (patch-hadrian_bootstrap_bootstrap.py) = a69ba672e9027cf44e96a2326f916d4ac1df8c98
SHA1 (patch-hadrian_bootstrap_src_Main.hs) = 2e0a7ae2ef195013ca07313c150a7e48b6985e32
SHA1 (patch-hadrian_src_Builder.hs) = bbfb1ddc30af900c89ca3cf649a32da2a1c83174
SHA1 (patch-hadrian_src_Rules_BinaryDist.hs) = fb908f74b8b619bccd673fbdb40b1c53ab7a51d8
Index: pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py
diff -u pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.1 pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.2
--- pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py:1.1 Sun Apr 28 05:58:57 2024
+++ pkgsrc/lang/ghc98/patches/patch-hadrian_bootstrap_bootstrap.py Wed May 1 03:22:33 2024
@@ -1,6 +1,6 @@
-$NetBSD: patch-hadrian_bootstrap_bootstrap.py,v 1.1 2024/04/28 05:58:57 pho Exp $
+$NetBSD: patch-hadrian_bootstrap_bootstrap.py,v 1.2 2024/05/01 03:22:33 pho Exp $
-Hunk #0:
+Hunk #0, #1:
bootstrap.py assumes that GHC always has a threaded RTS but our
bootkits don't. It is debatable at least as to whether this should be
upstreamed.
@@ -8,14 +8,22 @@ Hunk #0:
We also need to patch some packages to bootstrap hadrian. Those patch
files are in ${FILESDIR}.
-Hunk #0, #1, #2, #3, #4, #5, #6:
+Hunk #1-#7:
Support --jobs=N for parallel compilation. This makes bootstrapping
hadrian a lot faster.
TODO: Upstream this.
--- hadrian/bootstrap/bootstrap.py.orig 2024-02-22 20:59:45.000000000 +0000
+++ hadrian/bootstrap/bootstrap.py
-@@ -180,24 +180,42 @@ def resolve_dep(dep : BootstrapDep) -> P
+@@ -25,6 +25,7 @@ import sys
+ from textwrap import dedent
+ from typing import Optional, Dict, List, Tuple, \
+ NewType, BinaryIO, NamedTuple
++import os
+
+ #logging.basicConfig(level=logging.INFO)
+
+@@ -180,24 +181,42 @@ def resolve_dep(dep : BootstrapDep) -> P
return sdist_dir
@@ -32,7 +40,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
+
+ # pkgsrc has local patches that need to be applied for bootstrapping
+ # hadrian.
-+ patch_path = Path('..') / '..' / '..' / '..' / 'files' / f'hadrian-{dep.package}.patch'
++ patch_path = Path(os.environ['FILESDIR']) / f'hadrian-{dep.package}.patch'
+ if patch_path.is_file():
+ with open(patch_path) as patch_file:
+ patch = patch_file.read()
@@ -63,7 +71,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
f'--package-db={PKG_DB.resolve()}',
f'--prefix={prefix}',
f'--bindir={BINDIR.resolve()}',
-@@ -207,6 +225,12 @@ def install_sdist(dist_dir: Path, sdist_
+@@ -207,6 +226,12 @@ def install_sdist(dist_dir: Path, sdist_
f'--flags={flags_option}',
]
@@ -76,7 +84,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
def check_call(args: List[str]) -> None:
subprocess_run(args, cwd=sdist_dir, check=True)
-@@ -223,7 +247,7 @@ def install_sdist(dist_dir: Path, sdist_
+@@ -223,7 +248,7 @@ def install_sdist(dist_dir: Path, sdist_
check_call([str(ghc.ghc_path), '--make', '-package-env=-', '-i', f'-odir={setup_dist_dir}', f'-hidir={setup_dist_dir}', '-o', setup, 'Setup'])
check_call([setup, 'configure'] + configure_args)
check_call([setup, 'build'] + build_args)
@@ -85,7 +93,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
def hash_file(h, f: BinaryIO) -> SHA256Hash:
while True:
-@@ -238,7 +262,7 @@ def hash_file(h, f: BinaryIO) -> SHA256H
+@@ -238,7 +263,7 @@ def hash_file(h, f: BinaryIO) -> SHA256H
UnitId = NewType('UnitId', str)
PlanUnit = NewType('PlanUnit', dict)
@@ -94,7 +102,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
if not PKG_DB.exists():
print(f'Creating package database {PKG_DB}')
PKG_DB.parent.mkdir(parents=True, exist_ok=True)
-@@ -248,7 +272,7 @@ def bootstrap(info: BootstrapInfo, ghc:
+@@ -248,7 +273,7 @@ def bootstrap(info: BootstrapInfo, ghc:
check_builtin(dep, ghc)
for dep in info.dependencies:
@@ -103,7 +111,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
# Steps
#######################################################################
-@@ -374,6 +398,8 @@ def main() -> None:
+@@ -374,6 +399,8 @@ def main() -> None:
help='produce a Hadrian distribution archive (default)')
parser.add_argument('--no-archive', dest='want_archive', action='store_false',
help='do not produce a Hadrian distribution archive')
@@ -112,7 +120,7 @@ Hunk #0, #1, #2, #3, #4, #5, #6:
parser.set_defaults(want_archive=True)
subparsers = parser.add_subparsers(dest="command")
-@@ -480,7 +506,8 @@ Alternatively, you could use `bootstrap.
+@@ -480,7 +507,8 @@ Alternatively, you could use `bootstrap.
plan = gen_fetch_plan(info)
fetch_from_plan(plan, TARBALLS)
Home |
Main Index |
Thread Index |
Old Index