Thu Jan 30 07:57:35 2014 UTC ()
works with builtin curses (with NetBSD-6).

Bump PKGREVISION.


(obache)
diff -r1.4 -r1.5 pkgsrc/lang/ghc7/Makefile
diff -r1.2 -r1.3 pkgsrc/lang/ghc7/bootstrap.mk
diff -r1.1 -r1.2 pkgsrc/lang/ghc7/buildlink3.mk
diff -r1.1 -r1.2 pkgsrc/lang/ghc7/files/bootstrap.build.mk

cvs diff -r1.4 -r1.5 pkgsrc/lang/ghc7/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/Makefile 2013/12/17 01:08:30 1.4
+++ pkgsrc/lang/ghc7/Makefile 2014/01/30 07:57:35 1.5
@@ -1,19 +1,20 @@ @@ -1,19 +1,20 @@
1# $NetBSD: Makefile,v 1.4 2013/12/17 01:08:30 obache Exp $ 1# $NetBSD: Makefile,v 1.5 2014/01/30 07:57:35 obache Exp $
2# ----------------------------------------------------------------------------- 2# -----------------------------------------------------------------------------
3# Package metadata 3# Package metadata
4# 4#
5DISTNAME= ghc-${VERSION} 5DISTNAME= ghc-${VERSION}
6VERSION= 7.6.3 6VERSION= 7.6.3
 7PKGREVISION= 1
7CATEGORIES= lang 8CATEGORIES= lang
8MASTER_SITES= http://www.haskell.org/ghc/dist/${VERSION}/ 9MASTER_SITES= http://www.haskell.org/ghc/dist/${VERSION}/
9MAINTAINER= pho@cielonegro.org 10MAINTAINER= pho@cielonegro.org
10HOMEPAGE= http://www.haskell.org/ghc/ 11HOMEPAGE= http://www.haskell.org/ghc/
11COMMENT= Compiler for the functional language Haskell 12COMMENT= Compiler for the functional language Haskell
12LICENSE= modified-bsd 13LICENSE= modified-bsd
13 14
14# GHC requires GHC to build itself. Formerly we could work around this 15# GHC requires GHC to build itself. Formerly we could work around this
15# bootstrapping problem by creating a special archive containing C 16# bootstrapping problem by creating a special archive containing C
16# sources compiled from Haskell sources, but that's no longer 17# sources compiled from Haskell sources, but that's no longer
17# possible. So we have to prepare stripped-down binaries sufficient to 18# possible. So we have to prepare stripped-down binaries sufficient to
18# bootstrap compilers for each platforms. If you want to build them 19# bootstrap compilers for each platforms. If you want to build them
19# yourself, follow an instruction in the ./TODO file. 20# yourself, follow an instruction in the ./TODO file.
@@ -94,28 +95,28 @@ SITES.${i}?= ${MASTER_SITE_LOCAL} @@ -94,28 +95,28 @@ SITES.${i}?= ${MASTER_SITE_LOCAL}
94# Our pre-configure phase installs a bindist of bootstrapping compiler 95# Our pre-configure phase installs a bindist of bootstrapping compiler
95# directly into TOOLS_DIR so that ./configure can find it. 96# directly into TOOLS_DIR so that ./configure can find it.
96do-configure: 97do-configure:
97 ${RUN} cd ${WRKSRC:Q} && \ 98 ${RUN} cd ${WRKSRC:Q} && \
98 ${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS} 99 ${SETENV} ${CONFIGURE_ENV} ${SH} ./configure ${CONFIGURE_ARGS}
99 100
100# Here we generate mk/build.mk dynamically. 101# Here we generate mk/build.mk dynamically.
101 ${RUN} ${RM} -f ${WRKSRC:Q}/mk/build.mk 102 ${RUN} ${RM} -f ${WRKSRC:Q}/mk/build.mk
102 103
103# We need to tell the libraries/terminfo/configure that our ncurses is 104# We need to tell the libraries/terminfo/configure that our ncurses is
104# in a non-standard path. Without that, the resulting GHC tries to 105# in a non-standard path. Without that, the resulting GHC tries to
105# link programs by executing ld(1) without passing it -L${PREFIX:Q}/lib. 106# link programs by executing ld(1) without passing it -L${PREFIX:Q}/lib.
106 ${RUN} ${ECHO} "libraries/terminfo_CONFIGURE_OPTS += \ 107 ${RUN} ${ECHO} "libraries/terminfo_CONFIGURE_OPTS += \
107 --configure-option=--with-curses-includes=${BUILDLINK_PREFIX.ncurses:Q}/include \ 108 --configure-option=--with-curses-includes=${BUILDLINK_PREFIX.curses:Q}/include \
108 --configure-option=--with-curses-libraries=${BUILDLINK_PREFIX.ncurses:Q}/lib" >> ${WRKSRC:Q}/mk/build.mk 109 --configure-option=--with-curses-libraries=${BUILDLINK_PREFIX.curses:Q}/lib" >> ${WRKSRC:Q}/mk/build.mk
109 110
110# The ghc compiler does normally split the generated asm files into small 111# The ghc compiler does normally split the generated asm files into small
111# parts before sending them to gcc, to enable the linker to eliminate 112# parts before sending them to gcc, to enable the linker to eliminate
112# unused parts. This does however not play nice with the pkgsrc 113# unused parts. This does however not play nice with the pkgsrc
113# framework, and the result is that the build takes more than 5 times 114# framework, and the result is that the build takes more than 5 times
114# as long than when the files are not split. See 115# as long than when the files are not split. See
115# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html 116# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
116# for a description of the problem. 117# for a description of the problem.
117# Disable file splitting until pkgsrc gets improved. 118# Disable file splitting until pkgsrc gets improved.
118 ${RUN} ${ECHO} "SplitObjs = NO" >> ${WRKSRC:Q}/mk/build.mk 119 ${RUN} ${ECHO} "SplitObjs = NO" >> ${WRKSRC:Q}/mk/build.mk
119 120
120# If there is HsColour is in the PATH, GHC's build system tries to use 121# If there is HsColour is in the PATH, GHC's build system tries to use
121# it without even checking if it really works. That's not what we 122# it without even checking if it really works. That's not what we
@@ -168,24 +169,21 @@ GENERATE_PLIST+= \ @@ -168,24 +169,21 @@ GENERATE_PLIST+= \
168# There is an unused script which don't pass the portability test. 169# There is an unused script which don't pass the portability test.
169CHECK_PORTABILITY_SKIP+= distrib/prep-bin-dist-mingw 170CHECK_PORTABILITY_SKIP+= distrib/prep-bin-dist-mingw
170 171
171# GHC currently *requires* ${PREFIX}/lib to be in 172# GHC currently *requires* ${PREFIX}/lib to be in
172# "/etc/ld-elf.so.conf". See 173# "/etc/ld-elf.so.conf". See
173# http://hackage.haskell.org/trac/ghc/ticket/2933 174# http://hackage.haskell.org/trac/ghc/ticket/2933
174CHECK_SHLIBS_SUPPORTED= no 175CHECK_SHLIBS_SUPPORTED= no
175 176
176 177
177# ----------------------------------------------------------------------------- 178# -----------------------------------------------------------------------------
178# Dependencies 179# Dependencies
179# 180#
180 181
181# I guess pdcurses works well but not tested. 
182USE_NCURSES= yes 
183 
184BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt 182BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
185BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl 183BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
186 184
187.include "../../converters/libiconv/buildlink3.mk" 185.include "../../converters/libiconv/buildlink3.mk"
188.include "../../devel/gmp/buildlink3.mk" 186.include "../../devel/gmp/buildlink3.mk"
189.include "../../devel/ncurses/buildlink3.mk" 187.include "../../mk/curses.buildlink3.mk"
190.include "../../mk/pthread.buildlink3.mk" 188.include "../../mk/pthread.buildlink3.mk"
191.include "../../mk/bsd.pkg.mk" 189.include "../../mk/bsd.pkg.mk"

cvs diff -r1.2 -r1.3 pkgsrc/lang/ghc7/bootstrap.mk (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/bootstrap.mk 2013/12/16 06:23:09 1.2
+++ pkgsrc/lang/ghc7/bootstrap.mk 2014/01/30 07:57:35 1.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bootstrap.mk,v 1.2 2013/12/16 06:23:09 obache Exp $ 1# $NetBSD: bootstrap.mk,v 1.3 2014/01/30 07:57:35 obache Exp $
2# ----------------------------------------------------------------------------- 2# -----------------------------------------------------------------------------
3# Select a bindist of bootstrapping compiler based on a per-platform 3# Select a bindist of bootstrapping compiler based on a per-platform
4# basis. 4# basis.
5# 5#
6# BOOT_ARCHIVE 6# BOOT_ARCHIVE
7# This variable is set to the name of compressed archive file of a 7# This variable is set to the name of compressed archive file of a
8# bootstrapping compiler for the current platform. 8# bootstrapping compiler for the current platform.
9# 9#
10# BOOT_TARBALL 10# BOOT_TARBALL
11# Similar to BOOT_ARCHIVE, but "*.tar" not "*.tar.xz". 11# Similar to BOOT_ARCHIVE, but "*.tar" not "*.tar.xz".
12# 12#
13.include "../../mk/bsd.prefs.mk" 13.include "../../mk/bsd.prefs.mk"
14.if ${MACHINE_ARCH} == "i386" && ${OPSYS} == "FreeBSD" 14.if ${MACHINE_ARCH} == "i386" && ${OPSYS} == "FreeBSD"
@@ -113,27 +113,27 @@ ${WRKDIR}/stamp-configure-boot: ${WRKDIR @@ -113,27 +113,27 @@ ${WRKDIR}/stamp-configure-boot: ${WRKDIR
113 ${MKDIR} ${WRKDIR:Q}/build-boot 113 ${MKDIR} ${WRKDIR:Q}/build-boot
114 cd ${WRKDIR:Q}/build-boot && \ 114 cd ${WRKDIR:Q}/build-boot && \
115 ${PKGSRC_SETENV} PATH=${PATH} \ 115 ${PKGSRC_SETENV} PATH=${PATH} \
116 CONF_CC_OPTS_STAGE0=${CFLAGS:Q} \ 116 CONF_CC_OPTS_STAGE0=${CFLAGS:Q} \
117 CONF_GCC_LINKER_OPTS_STAGE0="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \ 117 CONF_GCC_LINKER_OPTS_STAGE0="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
118 CONF_LD_LINKER_OPTS_STAGE0="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \ 118 CONF_LD_LINKER_OPTS_STAGE0="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \
119 CONF_CC_OPTS_STAGE1=${CFLAGS:Q} \ 119 CONF_CC_OPTS_STAGE1=${CFLAGS:Q} \
120 CONF_GCC_LINKER_OPTS_STAGE1="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \ 120 CONF_GCC_LINKER_OPTS_STAGE1="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
121 CONF_LD_LINKER_OPTS_STAGE1="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \ 121 CONF_LD_LINKER_OPTS_STAGE1="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \
122 CONF_CC_OPTS_STAGE2=${CFLAGS:Q} \ 122 CONF_CC_OPTS_STAGE2=${CFLAGS:Q} \
123 CONF_GCC_LINKER_OPTS_STAGE2="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \ 123 CONF_GCC_LINKER_OPTS_STAGE2="-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib" \
124 CONF_LD_LINKER_OPTS_STAGE2="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \ 124 CONF_LD_LINKER_OPTS_STAGE2="-L${PREFIX}/lib ${LINKER_RPATH_FLAG}${PREFIX}/lib" \
125 ${SH} ./configure && \ 125 ${SH} ./configure && \
126 ${SED} -e "s,@NCURSES_PREFIX@,${BUILDLINK_PREFIX.ncurses:Q},g" /${FILESDIR:Q}/bootstrap.build.mk > mk/build.mk 126 ${SED} -e "s,@CURSES_PREFIX@,${BUILDLINK_PREFIX.curses:Q},g" /${FILESDIR:Q}/bootstrap.build.mk > mk/build.mk
127 ${TOUCH} ${.TARGET} 127 ${TOUCH} ${.TARGET}
128 128
129${WRKDIR}/stamp-build-boot: ${WRKDIR}/stamp-configure-boot 129${WRKDIR}/stamp-build-boot: ${WRKDIR}/stamp-configure-boot
130 @${PHASE_MSG} "Building bootstrapping compiler ${DISTNAME}" 130 @${PHASE_MSG} "Building bootstrapping compiler ${DISTNAME}"
131 ${RUN} cd ${WRKDIR:Q}/build-boot && ${BUILD_MAKE_CMD} 131 ${RUN} cd ${WRKDIR:Q}/build-boot && ${BUILD_MAKE_CMD}
132 ${TOUCH} ${.TARGET} 132 ${TOUCH} ${.TARGET}
133 133
134${WRKDIR}/${BOOT_TARBALL}: ${WRKDIR}/stamp-build-boot 134${WRKDIR}/${BOOT_TARBALL}: ${WRKDIR}/stamp-build-boot
135 @${PHASE_MSG} "Creating binary distribution of bootstrapping ${DISTNAME}" 135 @${PHASE_MSG} "Creating binary distribution of bootstrapping ${DISTNAME}"
136 ${RUN} cd ${WRKDIR:Q}/build-boot && ${BUILD_MAKE_CMD} binary-dist 136 ${RUN} cd ${WRKDIR:Q}/build-boot && ${BUILD_MAKE_CMD} binary-dist
137 ${MV} -f ${WRKDIR:Q}/build-boot/${BOOT_TARBALL} ${.TARGET} 137 ${MV} -f ${WRKDIR:Q}/build-boot/${BOOT_TARBALL} ${.TARGET}
138 138
139# This can take up half an hour. Memory usage is also very high, about 680 MiB. 139# This can take up half an hour. Memory usage is also very high, about 680 MiB.

cvs diff -r1.1 -r1.2 pkgsrc/lang/ghc7/buildlink3.mk (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/buildlink3.mk 2013/12/12 12:47:17 1.1
+++ pkgsrc/lang/ghc7/buildlink3.mk 2014/01/30 07:57:35 1.2
@@ -1,16 +1,16 @@ @@ -1,16 +1,16 @@
1# $NetBSD: buildlink3.mk,v 1.1 2013/12/12 12:47:17 obache Exp $ 1# $NetBSD: buildlink3.mk,v 1.2 2014/01/30 07:57:35 obache Exp $
2 2
3BUILDLINK_TREE+= ghc 3BUILDLINK_TREE+= ghc
4 4
5.if !defined(GHC_BUILDLINK3_MK) 5.if !defined(GHC_BUILDLINK3_MK)
6GHC_BUILDLINK3_MK:= 6GHC_BUILDLINK3_MK:=
7 7
8BUILDLINK_API_DEPENDS.ghc+= ghc>=7.6.3 8BUILDLINK_API_DEPENDS.ghc+= ghc>=7.6.3
9BUILDLINK_PKGSRCDIR.ghc?= ../../lang/ghc7 9BUILDLINK_PKGSRCDIR.ghc?= ../../lang/ghc7
10 10
11.include "../../converters/libiconv/buildlink3.mk" 11.include "../../converters/libiconv/buildlink3.mk"
12.include "../../devel/gmp/buildlink3.mk" 12.include "../../devel/gmp/buildlink3.mk"
13.include "../../devel/ncurses/buildlink3.mk" 13.include "../../mk/curses/buildlink3.mk"
14.endif # GHC_BUILDLINK3_MK 14.endif # GHC_BUILDLINK3_MK
15 15
16BUILDLINK_TREE+= -ghc 16BUILDLINK_TREE+= -ghc

cvs diff -r1.1 -r1.2 pkgsrc/lang/ghc7/files/bootstrap.build.mk (expand / switch to unified diff)

--- pkgsrc/lang/ghc7/files/bootstrap.build.mk 2013/12/12 12:47:17 1.1
+++ pkgsrc/lang/ghc7/files/bootstrap.build.mk 2014/01/30 07:57:35 1.2
@@ -21,15 +21,15 @@ GhcRTSWays = @@ -21,15 +21,15 @@ GhcRTSWays =
21 21
22# I'm not sure disabling GHCi significantly reduces the bindist size, 22# I'm not sure disabling GHCi significantly reduces the bindist size,
23# but we don't need it anyway. 23# but we don't need it anyway.
24GhcWithInterpreter = NO 24GhcWithInterpreter = NO
25 25
26# We don't want in-place GMP to be statically linked as it increases 26# We don't want in-place GMP to be statically linked as it increases
27# the bindist size. Dynamic linkage is even worse. 27# the bindist size. Dynamic linkage is even worse.
28INTEGER_LIBRARY = integer-simple 28INTEGER_LIBRARY = integer-simple
29 29
30# We'd like to distinguish bootstrapping bindists from normal ones. 30# We'd like to distinguish bootstrapping bindists from normal ones.
31BIN_DIST_NAME = ghc-$(ProjectVersion)-boot 31BIN_DIST_NAME = ghc-$(ProjectVersion)-boot
32 32
33libraries/terminfo_CONFIGURE_OPTS += \ 33libraries/terminfo_CONFIGURE_OPTS += \
34 --configure-option=--with-curses-includes=@NCURSES_PREFIX@/include \ 34 --configure-option=--with-curses-includes=@CURSES_PREFIX@/include \
35 --configure-option=--with-curses-libraries=@NCURSES_PREFIX@/lib 35 --configure-option=--with-curses-libraries=@CURSES_PREFIX@/lib