Mon Mar 24 22:40:23 2008 UTC ()
Use the correct renamed symbols for opendir, unsetenv, and times.

Solves PR pkg/38263.

Bump PKGREVISION.


(kristerw)
diff -r1.39 -r1.40 pkgsrc/lang/ghc/Makefile
diff -r1.19 -r1.20 pkgsrc/lang/ghc/distinfo
diff -r0 -r1.3 pkgsrc/lang/ghc/patches/patch-ak
diff -r0 -r1.3 pkgsrc/lang/ghc/patches/patch-al
diff -r0 -r1.3 pkgsrc/lang/ghc/patches/patch-am
diff -r0 -r1.3 pkgsrc/lang/ghc/patches/patch-an
diff -r0 -r1.3 pkgsrc/lang/ghc/patches/patch-ao

cvs diff -r1.39 -r1.40 pkgsrc/lang/ghc/Makefile (switch to unified diff)

--- pkgsrc/lang/ghc/Makefile 2008/03/17 15:33:10 1.39
+++ pkgsrc/lang/ghc/Makefile 2008/03/24 22:40:23 1.40
@@ -1,59 +1,60 @@ @@ -1,59 +1,60 @@
1# $NetBSD: Makefile,v 1.39 2008/03/17 15:33:10 kristerw Exp $ 1# $NetBSD: Makefile,v 1.40 2008/03/24 22:40:23 kristerw Exp $
2 2
3DISTNAME= ghc-6.8.2 3DISTNAME= ghc-6.8.2
 4PKGREVISION= 1
4CATEGORIES= lang 5CATEGORIES= lang
5MASTER_SITES= http://www.haskell.org/ghc/dist/6.8.2/ 6MASTER_SITES= http://www.haskell.org/ghc/dist/6.8.2/
6DISTFILES= ghc-6.8.2-src.tar.bz2 \ 7DISTFILES= ghc-6.8.2-src.tar.bz2 \
7 ghc-6.8.2-src-extralibs.tar.bz2 \ 8 ghc-6.8.2-src-extralibs.tar.bz2 \
8 ghc-6.4.2-src.tar.bz2 \ 9 ghc-6.4.2-src.tar.bz2 \
9 ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz 10 ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz
10 11
11MAINTAINER= kristerw@NetBSD.org 12MAINTAINER= kristerw@NetBSD.org
12HOMEPAGE= http://www.haskell.org/ghc/ 13HOMEPAGE= http://www.haskell.org/ghc/
13COMMENT= Compiler for the functional language Haskell 14COMMENT= Compiler for the functional language Haskell
14 15
15SITES.ghc-6.4.2-src.tar.bz2=http://www.haskell.org/ghc/dist/6.4.2/ 16SITES.ghc-6.4.2-src.tar.bz2=http://www.haskell.org/ghc/dist/6.4.2/
16SITES.ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz=${MASTER_SITE_LOCAL} 17SITES.ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz=${MASTER_SITE_LOCAL}
17 18
18ONLY_FOR_PLATFORM= Darwin-*-i386 FreeBSD-*-i386 NetBSD-*-i386 OpenBSD-*-i386 19ONLY_FOR_PLATFORM= Darwin-*-i386 FreeBSD-*-i386 NetBSD-*-i386 OpenBSD-*-i386
19 20
20CHECK_PORTABILITY_SKIP= distrib/prep-bin-dist-mingw 21CHECK_PORTABILITY_SKIP= distrib/prep-bin-dist-mingw
21 22
22# += in a shell script, but in embedded AWK code, so it's ok. 23# += in a shell script, but in embedded AWK code, so it's ok.
23CHECK_PORTABILITY_SKIP+= libraries/base/cbits/ubconfc 24CHECK_PORTABILITY_SKIP+= libraries/base/cbits/ubconfc
24 25
25GNU_CONFIGURE= yes 26GNU_CONFIGURE= yes
26CONFIGURE_ARGS+= --with-ghc=${WRKDIR}/ghc-6.4.2/ghc/compiler/ghc-inplace 27CONFIGURE_ARGS+= --with-ghc=${WRKDIR}/ghc-6.4.2/ghc/compiler/ghc-inplace
27CONFIGURE_ENV+= PerlCmd=${PERL5:Q} 28CONFIGURE_ENV+= PerlCmd=${PERL5:Q}
28USE_GNU_READLINE= yes # uses the UNDO_ constants 29USE_GNU_READLINE= yes # uses the UNDO_ constants
29USE_TOOLS+= gmake perl:run 30USE_TOOLS+= gmake perl:run
30 31
31SUBST_CLASSES+= prefix 32SUBST_CLASSES+= prefix
32SUBST_STAGE.prefix= post-patch 33SUBST_STAGE.prefix= post-patch
33SUBST_FILES.prefix+= ../ghc-6.4.2/mk/bootstrap.mk 34SUBST_FILES.prefix+= ../ghc-6.4.2/mk/bootstrap.mk
34SUBST_FILES.prefix+= ../ghc-6.4.2/ghc/rts/package.conf.in 35SUBST_FILES.prefix+= ../ghc-6.4.2/ghc/rts/package.conf.in
35SUBST_FILES.prefix+= ../ghc-6.4.2/libraries/readline/package.conf.in 36SUBST_FILES.prefix+= ../ghc-6.4.2/libraries/readline/package.conf.in
36SUBST_FILES.prefix+= libraries/readline/configure 37SUBST_FILES.prefix+= libraries/readline/configure
37SUBST_FILES.prefix+= libraries/readline/readline.cabal 38SUBST_FILES.prefix+= libraries/readline/readline.cabal
38SUBST_FILES.prefix+= rts/package.conf.in 39SUBST_FILES.prefix+= rts/package.conf.in
39SUBST_SED.prefix= -e 's,@PREFIX@,${PREFIX},g' 40SUBST_SED.prefix= -e 's,@PREFIX@,${PREFIX},g'
40 41
41pre-configure: 42pre-configure:
42 cd ${WRKDIR}/ghc-6.4.2 && \ 43 cd ${WRKDIR}/ghc-6.4.2 && \
43 ./distrib/hc-build --enable-hc-boot-unregisterised 44 ./distrib/hc-build --enable-hc-boot-unregisterised
44 45
45# The ghc compiler does normally split the generated C files into small 46# The ghc compiler does normally split the generated C files into small
46# parts before sending them to gcc, to enable the linker to eliminate 47# parts before sending them to gcc, to enable the linker to eliminate
47# unused parts. This does however not play nice with the pkgsrc 48# unused parts. This does however not play nice with the pkgsrc
48# framework, and the result is that the build takes more than 5 times 49# framework, and the result is that the build takes more than 5 times
49# as long than when the files are not split. See 50# as long than when the files are not split. See
50# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html 51# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
51# for a description of the problem. 52# for a description of the problem.
52# Disable file splitting until pkgsrc has been improved. 53# Disable file splitting until pkgsrc has been improved.
53pre-build: 54pre-build:
54 ${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk 55 ${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk
55 56
56.include "../../devel/readline/buildlink3.mk" 57.include "../../devel/readline/buildlink3.mk"
57.include "../../devel/gmp/buildlink3.mk" 58.include "../../devel/gmp/buildlink3.mk"
58.include "../../mk/pthread.buildlink3.mk" 59.include "../../mk/pthread.buildlink3.mk"
59.include "../../mk/bsd.pkg.mk" 60.include "../../mk/bsd.pkg.mk"

cvs diff -r1.19 -r1.20 pkgsrc/lang/ghc/distinfo (switch to unified diff)

--- pkgsrc/lang/ghc/distinfo 2008/03/17 15:33:10 1.19
+++ pkgsrc/lang/ghc/distinfo 2008/03/24 22:40:23 1.20
@@ -1,23 +1,28 @@ @@ -1,23 +1,28 @@
1$NetBSD: distinfo,v 1.19 2008/03/17 15:33:10 kristerw Exp $ 1$NetBSD: distinfo,v 1.20 2008/03/24 22:40:23 kristerw Exp $
2 2
3SHA1 (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 29c1a17a83ec0ddec8ff231e009c740ebc61dd6c 3SHA1 (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 29c1a17a83ec0ddec8ff231e009c740ebc61dd6c
4RMD160 (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 5ce775a19797fe257357fedd33db2354dd50d2de 4RMD160 (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 5ce775a19797fe257357fedd33db2354dd50d2de
5Size (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 9927295 bytes 5Size (ghc-6.4.2-i386-unknown-netbsd-hc.tar.gz) = 9927295 bytes
6SHA1 (ghc-6.4.2-src.tar.bz2) = 60bcea323f851caa84d49c7731b86164d5cefa42 6SHA1 (ghc-6.4.2-src.tar.bz2) = 60bcea323f851caa84d49c7731b86164d5cefa42
7RMD160 (ghc-6.4.2-src.tar.bz2) = 19943eb2673e663973e64739cdf23720b6f36d38 7RMD160 (ghc-6.4.2-src.tar.bz2) = 19943eb2673e663973e64739cdf23720b6f36d38
8Size (ghc-6.4.2-src.tar.bz2) = 6954958 bytes 8Size (ghc-6.4.2-src.tar.bz2) = 6954958 bytes
9SHA1 (ghc-6.8.2-src-extralibs.tar.bz2) = b8c9ff989a87e2699a08e595523faa8d11e6e7dc 9SHA1 (ghc-6.8.2-src-extralibs.tar.bz2) = b8c9ff989a87e2699a08e595523faa8d11e6e7dc
10RMD160 (ghc-6.8.2-src-extralibs.tar.bz2) = 10e888cb4cf8a05b1213b171877f63505ff30cdf 10RMD160 (ghc-6.8.2-src-extralibs.tar.bz2) = 10e888cb4cf8a05b1213b171877f63505ff30cdf
11Size (ghc-6.8.2-src-extralibs.tar.bz2) = 1919843 bytes 11Size (ghc-6.8.2-src-extralibs.tar.bz2) = 1919843 bytes
12SHA1 (ghc-6.8.2-src.tar.bz2) = 1f40b0ee2e51be1208fdb579ce4998181ec36a40 12SHA1 (ghc-6.8.2-src.tar.bz2) = 1f40b0ee2e51be1208fdb579ce4998181ec36a40
13RMD160 (ghc-6.8.2-src.tar.bz2) = dc555c3137d9314a6ee6a0b7ad62c0ba16d9d52c 13RMD160 (ghc-6.8.2-src.tar.bz2) = dc555c3137d9314a6ee6a0b7ad62c0ba16d9d52c
14Size (ghc-6.8.2-src.tar.bz2) = 7072545 bytes 14Size (ghc-6.8.2-src.tar.bz2) = 7072545 bytes
15SHA1 (patch-aa) = bcb07fa1a18edddf1629705a9c1557b0489f6d63 15SHA1 (patch-aa) = bcb07fa1a18edddf1629705a9c1557b0489f6d63
16SHA1 (patch-ab) = 488385a706126efa4bf9453bb491728e1b1b4051 16SHA1 (patch-ab) = 488385a706126efa4bf9453bb491728e1b1b4051
17SHA1 (patch-ac) = 76029bb1d2dd549762cea0b3817993d47374d7aa 17SHA1 (patch-ac) = 76029bb1d2dd549762cea0b3817993d47374d7aa
18SHA1 (patch-ad) = b9ad9a80327c5fb50e2029e07fae189256e74132 18SHA1 (patch-ad) = b9ad9a80327c5fb50e2029e07fae189256e74132
19SHA1 (patch-af) = 5721e7653cbc2274db147540b4055e8007662abb 19SHA1 (patch-af) = 5721e7653cbc2274db147540b4055e8007662abb
20SHA1 (patch-ag) = 174ded35ea9e41d6c10722edde82d0198e61c77e 20SHA1 (patch-ag) = 174ded35ea9e41d6c10722edde82d0198e61c77e
21SHA1 (patch-ah) = 12ca06285033d5b45df5ff72b6718869920323ad 21SHA1 (patch-ah) = 12ca06285033d5b45df5ff72b6718869920323ad
22SHA1 (patch-ai) = f157d50386ce8fd032d6f19d1f0b6fbb7baa6269 22SHA1 (patch-ai) = f157d50386ce8fd032d6f19d1f0b6fbb7baa6269
23SHA1 (patch-aj) = 26019891c21907c9c26a7bc21d655172528cfbaa 23SHA1 (patch-aj) = 26019891c21907c9c26a7bc21d655172528cfbaa
 24SHA1 (patch-ak) = f188c5b3a57f6d19b49ca0bec9c19149a58034de
 25SHA1 (patch-al) = 66264014e24c06237911b786bbadb116bd65b5c1
 26SHA1 (patch-am) = 031e830eae53234b3c6b4940d6a4532142ddabd0
 27SHA1 (patch-an) = 3267a1ff00ae74b337e4dbd8f4e1c85cdb1aeed7
 28SHA1 (patch-ao) = ba3c218d3a6fc70986d159bbae9e41e37f4e0d79

File Added: pkgsrc/lang/ghc/patches/patch-ak
$NetBSD: patch-ak,v 1.3 2008/03/24 22:40:23 kristerw Exp $

--- libraries/base/include/HsBase.h.orig	2008-03-24 13:33:49.000000000 +0100
+++ libraries/base/include/HsBase.h	2008-03-24 13:38:50.000000000 +0100
@@ -648,6 +648,10 @@
 #endif
 }
 
+INLINE DIR* __hscore_opendir (const char *filename) {
+	return opendir(filename);
+}
+
 // These are wrapped because on some OSs (eg. Linux) they are
 // macros which redirect to the 64-bit-off_t versions when large file
 // support is enabled.

File Added: pkgsrc/lang/ghc/patches/patch-al
$NetBSD: patch-al,v 1.3 2008/03/24 22:40:23 kristerw Exp $

--- libraries/base/System/Posix/Internals.hs.orig	2008-03-24 13:34:39.000000000 +0100
+++ libraries/base/System/Posix/Internals.hs	2008-03-24 13:44:11.000000000 +0100
@@ -354,7 +354,7 @@
 foreign import ccall unsafe "HsBase.h __hscore_open"
    c_open :: CString -> CInt -> CMode -> IO CInt
 
-foreign import ccall unsafe "HsBase.h opendir" 
+foreign import ccall unsafe "HsBase.h __hscore_opendir" 
    c_opendir :: CString  -> IO (Ptr CDir)
 
 foreign import ccall unsafe "HsBase.h __hscore_mkdir"

File Added: pkgsrc/lang/ghc/patches/patch-am
$NetBSD: patch-am,v 1.3 2008/03/24 22:40:23 kristerw Exp $

--- libraries/unix/include/HsUnix.h.orig	2008-03-24 17:06:03.000000000 +0100
+++ libraries/unix/include/HsUnix.h	2008-03-24 17:12:35.000000000 +0100
@@ -140,6 +140,18 @@
     return mknod(pathname,mode,dev);
 }
 
+#ifdef HAVE_UNSETENV
+INLINE int __hsunix_unsetenv(const char *name)
+{
+    return unsetenv(name);
+}
+#endif
+
+INLINE clock_t __hsunix_times(struct tms *tp)
+{
+    return times(tp);
+}
+
 #ifdef HAVE_PTSNAME
 // I cannot figure out how to make the definitions of the following
 // functions visible in <stdlib.h> on Linux.  But these definitions

File Added: pkgsrc/lang/ghc/patches/patch-an
$NetBSD: patch-an,v 1.3 2008/03/24 22:40:23 kristerw Exp $

--- libraries/unix/System/Posix/Env.hsc.orig	2008-03-24 17:09:39.000000000 +0100
+++ libraries/unix/System/Posix/Env.hsc	2008-03-24 17:10:41.000000000 +0100
@@ -81,7 +81,7 @@
 
 unsetEnv name = withCString name c_unsetenv
 
-foreign import ccall unsafe "unsetenv"
+foreign import ccall unsafe "__hsunix_unsetenv"
    c_unsetenv :: CString -> IO ()
 #else
 unsetEnv name = putEnv (name ++ "=")

File Added: pkgsrc/lang/ghc/patches/patch-ao
$NetBSD: patch-ao,v 1.3 2008/03/24 22:40:23 kristerw Exp $

--- libraries/unix/System/Posix/Process.hsc.orig	2008-03-24 17:10:54.000000000 +0100
+++ libraries/unix/System/Posix/Process.hsc	2008-03-24 17:11:30.000000000 +0100
@@ -177,7 +177,7 @@
 
 type CTms = ()
 
-foreign import ccall unsafe "times"
+foreign import ccall unsafe "__hsunix_times"
   c_times :: Ptr CTms -> IO CClock
 
 -- -----------------------------------------------------------------------------