pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ghc90
Module Name: pkgsrc
Committed By: pho
Date: Fri Apr 30 03:05:31 UTC 2021
Modified Files:
pkgsrc/lang/ghc90: Makefile bootstrap.mk distinfo
pkgsrc/lang/ghc90/files: bootstrap.build.mk
pkgsrc/lang/ghc90/patches: patch-ghc.mk
Added Files:
pkgsrc/lang/ghc90/patches: patch-rts_posix_GetTime.c
Log Message:
Add a bootkit for SunOS/x86_64
Also fixed a bug in the previous commit which would produce
non-installable bootkits.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 pkgsrc/lang/ghc90/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/ghc90/bootstrap.mk
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/ghc90/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ghc90/files/bootstrap.build.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc90/patches/patch-ghc.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/ghc90/patches/patch-rts_posix_GetTime.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ghc90/Makefile
diff -u pkgsrc/lang/ghc90/Makefile:1.10 pkgsrc/lang/ghc90/Makefile:1.11
--- pkgsrc/lang/ghc90/Makefile:1.10 Thu Apr 29 07:02:42 2021
+++ pkgsrc/lang/ghc90/Makefile Fri Apr 30 03:05:30 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2021/04/29 07:02:42 pho Exp $
+# $NetBSD: Makefile,v 1.11 2021/04/30 03:05:30 pho Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
@@ -27,7 +27,7 @@ BROKEN_EXCEPT_ON_PLATFORM+= Darwin-*-x86
BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-i386
BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-x86_64
BROKEN_EXCEPT_ON_PLATFORM+= NetBSD-*-x86_64
-#BROKEN_EXCEPT_ON_PLATFORM+= SunOS-*-x86_64 # Not available yet
+BROKEN_EXCEPT_ON_PLATFORM+= SunOS-*-x86_64
# -----------------------------------------------------------------------------
@@ -215,6 +215,12 @@ ALL_ENV+= LD_LIBRARY_PATH=${PREFIX}/emul
# libterminfo.so.1. See ./bootstrap.mk
.endif
+# On Solaris-based platforms our bootkit tends to depend on
+# pkgsrc-installed shlibs.
+.if ${OPSYS} == "SunOS"
+ALL_ENV+= LD_LIBRARY_PATH=${PREFIX}/lib
+.endif
+
.include "../../converters/libiconv/buildlink3.mk"
.include "../../devel/libffi/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
Index: pkgsrc/lang/ghc90/bootstrap.mk
diff -u pkgsrc/lang/ghc90/bootstrap.mk:1.8 pkgsrc/lang/ghc90/bootstrap.mk:1.9
--- pkgsrc/lang/ghc90/bootstrap.mk:1.8 Thu Apr 29 07:02:42 2021
+++ pkgsrc/lang/ghc90/bootstrap.mk Fri Apr 30 03:05:30 2021
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.8 2021/04/29 07:02:42 pho Exp $
+# $NetBSD: bootstrap.mk,v 1.9 2021/04/30 03:05:30 pho Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler on a per-platform basis.
#
@@ -46,21 +46,18 @@ DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE}
# this bootkit.
DISTFILES+= netbsd-9.0-amd64-libterminfo.tar.gz
EXTRACT_ONLY+= netbsd-9.0-amd64-libterminfo.tar.gz
+SITES.netbsd-9.0-amd64-libterminfo.tar.gz?= ${MASTER_SITE_LOCAL}
. endif
.endif
-#.if !empty(MACHINE_PLATFORM:MSunOS-*-i386) || make(distinfo) || make (makesum) || make(mdi)
-#BOOT_VERSION:= 8.4.4
-#BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-i386-unknown-solaris2.tar.xz
-#DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
-#.endif
-
-#.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
-#BOOT_VERSION:= 8.4.4
-#BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-solaris2.tar.xz
+.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
+# Built on OmniOS r151036-a13510b579 + gcc10. Hope it works on other
+# Solaris-based platforms as well.
+BOOT_VERSION:= 9.0.1
+BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-solaris2.tar.xz
#SITES.${BOOT_ARCHIVE}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
-#DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE}
-#.endif
+DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
+.endif
.if empty(BOOT_ARCHIVE)
BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-unknown.tar.xz
@@ -70,13 +67,28 @@ PKG_FAIL_REASON+= "internal error: unsup
# For package developers, please do not upload any bootkits unsafely
# built. That is, machines shared with someone or on a cloud hosting
# service should be avoided for building bootkits.
-.for i in ${DISTFILES:M*-boot-*} netbsd-9.0-amd64-libterminfo.tar.gz
+.for i in ${DISTFILES:M*-boot-*}
SITES.${i}?= ${MASTER_SITE_LOCAL}
.endfor
-# current bootstrap binary kit for SmartOS is built with ncurses5
-.if !empty(MACHINE_PLATFORM:MSunOS-*) && ${OS_VARIANT:U} == "SmartOS"
-BUILD_DEPENDS+= ncurses>=5.0:../../devel/ncurses
+# Current bootstrap binary kit for SunOS is built with GNU libiconv
+# and ncurses6.
+.if !empty(MACHINE_PLATFORM:MSunOS-*)
+BUILD_DEPENDS+= libiconv>=1.9.1:../../converters/libiconv
+BUILD_DEPENDS+= ncurses>=6.0:../../devel/ncurses
+.endif
+
+# On OmniOS, if one tries to create a hard link with the default ln(1)
+# whose target is itself a symbolic link, it creates a hard link to
+# the symbolic link without first resolving it. ${WRKSRC}/configure.ac
+# doesn't work as expected in this case. Maybe we should do this in
+# ../../mk/platform/SunOS.mk but I'm not sure if it's really safe to
+# do.
+.if ${OPSYS} == "SunOS" && ${OS_VARIANT:U} == "OmniOS"
+TOOLS_PLATFORM.ln= /usr/xpg4/bin/ln
+# Also cpp is missing from /usr/bin. Why? This leads
+# ${WRKSRC}/libffi/configure to fail.
+TOOLS_PLATFORM.cpp= /usr/lib/cpp
.endif
@@ -86,7 +98,7 @@ BUILD_DEPENDS+= ncurses>=5.0:../../devel
# Install a bootstrapping compiler directly into TOOLS_DIR so that
# ./configure can find it.
#
-USE_TOOLS+= gmake xzcat xz gtar
+USE_TOOLS+= gmake xzcat xz gtar cpp
pre-configure:
${RUN}${TEST} -f ${DISTDIR}/${DIST_SUBDIR}/${BOOT_ARCHIVE} || \
Index: pkgsrc/lang/ghc90/distinfo
diff -u pkgsrc/lang/ghc90/distinfo:1.7 pkgsrc/lang/ghc90/distinfo:1.8
--- pkgsrc/lang/ghc90/distinfo:1.7 Thu Apr 29 07:02:42 2021
+++ pkgsrc/lang/ghc90/distinfo Fri Apr 30 03:05:30 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2021/04/29 07:02:42 pho Exp $
+$NetBSD: distinfo,v 1.8 2021/04/30 03:05:30 pho Exp $
SHA1 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 3ff01d768393b3866e7a7543f9f55646aaffce7a
RMD160 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 39bf10b13054a6316c8477609fb98abe4277fa6c
@@ -16,6 +16,10 @@ SHA1 (ghc-9.0.1-boot-x86_64-unknown-free
RMD160 (ghc-9.0.1-boot-x86_64-unknown-freebsd.tar.xz) = f284af547d6a2e6f31ae78d429d2e093b7e6f2da
SHA512 (ghc-9.0.1-boot-x86_64-unknown-freebsd.tar.xz) = 01b196eca0a23b64687cb795601ca02a409ea0a1b2db48f5b9ab90a95a1db05a254ac92db43726f15382f4cc9e54052685959467a2925fb67ebe5f68570c1eca
Size (ghc-9.0.1-boot-x86_64-unknown-freebsd.tar.xz) = 49644112 bytes
+SHA1 (ghc-9.0.1-boot-x86_64-unknown-solaris2.tar.xz) = 19fa8860969d332baced6ea281616cdc5ec32d67
+RMD160 (ghc-9.0.1-boot-x86_64-unknown-solaris2.tar.xz) = deb39ae711a2cfa5cec9419e993d2be05e054770
+SHA512 (ghc-9.0.1-boot-x86_64-unknown-solaris2.tar.xz) = 92694ef783274f42800d899af4dd558087e3c2ce13e175558a23f5187c944333a2872cee1df9b14683903a0542954a8483c7413343aacaa2b1676d10a6d27a6d
+Size (ghc-9.0.1-boot-x86_64-unknown-solaris2.tar.xz) = 59903112 bytes
SHA1 (ghc-9.0.1-src.tar.xz) = adaec1c05cd03d6af02716d59ab5f597434b700b
RMD160 (ghc-9.0.1-src.tar.xz) = 2bed45072ccb838418ae0405f5cfe64a237315e3
SHA512 (ghc-9.0.1-src.tar.xz) = bee7950a5118be8d8cefe0db5070139a5a93ca21c5bc6f8bf453429831f0c44f5e0fb5ee569865d6b8b92749044ee4123be06920928ac7a1ec9cffa9404a3e53
@@ -26,7 +30,7 @@ SHA512 (netbsd-9.0-amd64-libterminfo.tar
Size (netbsd-9.0-amd64-libterminfo.tar.gz) = 27744 bytes
SHA1 (patch-aclocal.m4) = 66d27cc50de048beeebee31302107501d5802388
SHA1 (patch-configure.ac) = 0905a0e5358d8c3f3f8366b597a59dd824f294d8
-SHA1 (patch-ghc.mk) = 9bfa82ee29c2786e7bae800279823bee72e4fab1
+SHA1 (patch-ghc.mk) = fdcbc5b0c48b616eb96868e49681536d773eaddd
SHA1 (patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs) = a4c82b1282c0580a7945be8c3b9d38bc760db99f
SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
SHA1 (patch-libraries_base_System_CPUTime_Posix_Times.hsc) = 2bfb779d534d12073287274ce5e90b99e457a860
@@ -41,6 +45,7 @@ SHA1 (patch-libraries_unix_System_Posix_
SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
SHA1 (patch-rts_ProfHeap.c) = 38b0623effbe46e04b98fb221591b4ec329a1b37
SHA1 (patch-rts_ghc.mk) = 6e3daf71fb7e656131aa2aeeb0346c651520216a
+SHA1 (patch-rts_posix_GetTime.c) = a0e94043a270697f3754c8e97461fbee36ca78ed
SHA1 (patch-rts_posix_OSThreads.c) = d5873aad8836067b5f29b37250666e37db67a4be
SHA1 (patch-rules_build-package-way.mk) = ec73df0bbc85e962f76a9068683879a1a1ba1815
SHA1 (patch-rules_distdir-way-opts.mk) = a058c6428faf02ef94aab3336d2d2874f2726f4e
Index: pkgsrc/lang/ghc90/files/bootstrap.build.mk
diff -u pkgsrc/lang/ghc90/files/bootstrap.build.mk:1.2 pkgsrc/lang/ghc90/files/bootstrap.build.mk:1.3
--- pkgsrc/lang/ghc90/files/bootstrap.build.mk:1.2 Fri Apr 23 00:08:02 2021
+++ pkgsrc/lang/ghc90/files/bootstrap.build.mk Fri Apr 30 03:05:31 2021
@@ -18,9 +18,9 @@ GhcRTSWays =
# but we don't need it anyway.
GhcWithInterpreter = NO
-# We don't want in-place GMP to be statically linked as it increases
+# We don't want in-tree GMP to be statically linked as it increases
# the bindist size. Dynamic linkage is even worse.
-INTEGER_LIBRARY = integer-simple
+BIGNUM_BACKEND = native
# We'd like to distinguish bootstrapping bindists from normal ones.
BIN_DIST_NAME = ghc-$(ProjectVersion)-boot
Index: pkgsrc/lang/ghc90/patches/patch-ghc.mk
diff -u pkgsrc/lang/ghc90/patches/patch-ghc.mk:1.1 pkgsrc/lang/ghc90/patches/patch-ghc.mk:1.2
--- pkgsrc/lang/ghc90/patches/patch-ghc.mk:1.1 Thu Apr 29 07:02:42 2021
+++ pkgsrc/lang/ghc90/patches/patch-ghc.mk Fri Apr 30 03:05:31 2021
@@ -1,16 +1,16 @@
-$NetBSD: patch-ghc.mk,v 1.1 2021/04/29 07:02:42 pho Exp $
+$NetBSD: patch-ghc.mk,v 1.2 2021/04/30 03:05:31 pho Exp $
Use the wrapper scripts for ghc as we can't use the ones from the DESTDIR
as the libraries are not in the right place yet.
---- ghc.mk.orig 2020-07-08 16:43:03.000000000 +0000
+--- ghc.mk.orig 2021-01-25 16:30:28.000000000 +0000
+++ ghc.mk
-@@ -959,7 +959,7 @@ endif
+@@ -938,7 +938,7 @@ endif
INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d
-ifeq "$(BINDIST) $(CrossCompiling)" "NO YES"
-+ifeq "UseWrappers" "UseWrappers"
++ifeq "$(BINDIST)" "NO"
# when installing ghc-stage2 we can't run target's
# 'ghc-pkg' and 'ghc-stage2' but those are needed for registration.
INSTALLED_GHC_REAL=$(TOP)/inplace/bin/ghc-stage1
Added files:
Index: pkgsrc/lang/ghc90/patches/patch-rts_posix_GetTime.c
diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-rts_posix_GetTime.c:1.1
--- /dev/null Fri Apr 30 03:05:31 2021
+++ pkgsrc/lang/ghc90/patches/patch-rts_posix_GetTime.c Fri Apr 30 03:05:31 2021
@@ -0,0 +1,28 @@
+$NetBSD: patch-rts_posix_GetTime.c,v 1.1 2021/04/30 03:05:31 pho Exp $
+
+OmniOS defines CLOCK_THREAD_CPUTIME_ID but it isn't actually usable:
+clock_gettime(2) always returns EINVAL. Use Solaris-specific
+gethrvtime(3) instead.
+
+--- rts/posix/GetTime.c.orig 2021-04-29 21:06:04.382045075 +0000
++++ rts/posix/GetTime.c
+@@ -32,6 +32,10 @@
+ #include <mach/mach_port.h>
+ #endif
+
++#if defined(solaris2_HOST_OS)
++#include <sys/time.h>
++#endif
++
+ #if defined(HAVE_GETTIMEOFDAY) && defined(HAVE_GETRUSAGE)
+ // we'll implement getProcessCPUTime() and getProcessElapsedTime()
+ // separately, using getrusage() and gettimeofday() respectively
+@@ -81,6 +85,8 @@ Time getCurrentThreadCPUTime(void)
+ sysErrorBelch("getThreadCPUTime");
+ stg_exit(EXIT_FAILURE);
+ }
++#elif defined(solaris2_HOST_OS)
++ return NSToTime(gethrvtime());
+ #elif defined(HAVE_CLOCK_GETTIME) && \
+ defined(CLOCK_PROCESS_CPUTIME_ID) && \
+ defined(HAVE_SYSCONF)
Home |
Main Index |
Thread Index |
Old Index