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 (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,191 +1,189 @@ @@ -1,191 +1,189 @@
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.
20ONLY_FOR_PLATFORM= \ 21ONLY_FOR_PLATFORM= \
21 Darwin-*-powerpc \ 22 Darwin-*-powerpc \
22 FreeBSD-*-i386 \ 23 FreeBSD-*-i386 \
23 Linux-*-x86_64 \ 24 Linux-*-x86_64 \
24 NetBSD-*-i386 \ 25 NetBSD-*-i386 \
25 NetBSD-*-x86_64 \ 26 NetBSD-*-x86_64 \
26 SunOS-5.11.* 27 SunOS-5.11.*
27 28
28 29
29# ----------------------------------------------------------------------------- 30# -----------------------------------------------------------------------------
30# Distfiles 31# Distfiles
31# 32#
32DISTFILES= ${DISTNAME}-src.tar.bz2 33DISTFILES= ${DISTNAME}-src.tar.bz2
33#.if make(distinfo) 34#.if make(distinfo)
34#DISTFILES+= ${DISTNAME}-boot-i386-unknown-freebsd.tar.xz 35#DISTFILES+= ${DISTNAME}-boot-i386-unknown-freebsd.tar.xz
35#DISTFILES+= ${DISTNAME}-boot-i386-unknown-netbsd.tar.xz 36#DISTFILES+= ${DISTNAME}-boot-i386-unknown-netbsd.tar.xz
36#DISTFILES+= ${DISTNAME}-boot-powerpc-apple-darwin.tar.xz 37#DISTFILES+= ${DISTNAME}-boot-powerpc-apple-darwin.tar.xz
37#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-linux.tar.xz 38#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-linux.tar.xz
38#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-netbsd.tar.xz 39#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-netbsd.tar.xz
39#DISTFILES+= ${DISTNAME}-boot-i386-unknown-solaris2.tar.gz 40#DISTFILES+= ${DISTNAME}-boot-i386-unknown-solaris2.tar.gz
40#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-solaris2.tar.xz 41#DISTFILES+= ${DISTNAME}-boot-x86_64-unknown-solaris2.tar.xz
41#.else 42#.else
42#DISTFILES+= ${BOOT_ARCHIVE} 43#DISTFILES+= ${BOOT_ARCHIVE}
43#.endif 44#.endif
44 45
45 46
46# We don't want to extract all of the DISTFILEs. 47# We don't want to extract all of the DISTFILEs.
47EXTRACT_ONLY= ${DISTNAME}-src.tar.bz2 48EXTRACT_ONLY= ${DISTNAME}-src.tar.bz2
48 49
49 50
50# ----------------------------------------------------------------------------- 51# -----------------------------------------------------------------------------
51# Tools 52# Tools
52# 53#
53USE_TOOLS+= autoconf gmake perl:run 54USE_TOOLS+= autoconf gmake perl:run
54GNU_CONFIGURE= yes 55GNU_CONFIGURE= yes
55USE_GNU_CONFIGURE_HOST= no 56USE_GNU_CONFIGURE_HOST= no
56 57
57CONFIGURE_ARGS+= \ 58CONFIGURE_ARGS+= \
58 --with-gcc=${CC:Q} \ 59 --with-gcc=${CC:Q} \
59 --with-gmp-includes=${BUILDLINK_PREFIX.gmp:Q}/include \ 60 --with-gmp-includes=${BUILDLINK_PREFIX.gmp:Q}/include \
60 --with-gmp-libraries=${BUILDLINK_PREFIX.gmp:Q}/lib \ 61 --with-gmp-libraries=${BUILDLINK_PREFIX.gmp:Q}/lib \
61 --with-iconv-includes=${BUILDLINK_PREFIX.iconv:Q}/include \ 62 --with-iconv-includes=${BUILDLINK_PREFIX.iconv:Q}/include \
62 --with-iconv-libraries=${BUILDLINK_PREFIX.iconv:Q}/lib 63 --with-iconv-libraries=${BUILDLINK_PREFIX.iconv:Q}/lib
63 64
64CONFIGURE_ENV+= \ 65CONFIGURE_ENV+= \
65 CONF_CC_OPTS_STAGE0=${CFLAGS:Q} \ 66 CONF_CC_OPTS_STAGE0=${CFLAGS:Q} \
66 CONF_GCC_LINKER_OPTS_STAGE0=${LDFLAGS:Q} \ 67 CONF_GCC_LINKER_OPTS_STAGE0=${LDFLAGS:Q} \
67 CONF_LD_LINKER_OPTS_STAGE0=${LDFLAGS:Q} \ 68 CONF_LD_LINKER_OPTS_STAGE0=${LDFLAGS:Q} \
68 CONF_CC_OPTS_STAGE1=${CFLAGS:Q} \ 69 CONF_CC_OPTS_STAGE1=${CFLAGS:Q} \
69 CONF_GCC_LINKER_OPTS_STAGE1=${LDFLAGS:Q} \ 70 CONF_GCC_LINKER_OPTS_STAGE1=${LDFLAGS:Q} \
70 CONF_LD_LINKER_OPTS_STAGE1=${LDFLAGS:Q} \ 71 CONF_LD_LINKER_OPTS_STAGE1=${LDFLAGS:Q} \
71 CONF_CC_OPTS_STAGE2=${CFLAGS:Q} \ 72 CONF_CC_OPTS_STAGE2=${CFLAGS:Q} \
72 CONF_GCC_LINKER_OPTS_STAGE2=${LDFLAGS:Q} \ 73 CONF_GCC_LINKER_OPTS_STAGE2=${LDFLAGS:Q} \
73 CONF_LD_LINKER_OPTS_STAGE2=${LDFLAGS:Q} \ 74 CONF_LD_LINKER_OPTS_STAGE2=${LDFLAGS:Q} \
74 PerlCmd=${PERL5:Q} 75 PerlCmd=${PERL5:Q}
75 76
76 77
77# ----------------------------------------------------------------------------- 78# -----------------------------------------------------------------------------
78# Build hooks 79# Build hooks
79# 80#
80 81
81# We patch configure.ac in some directories. 82# We patch configure.ac in some directories.
82post-patch: 83post-patch:
83 @${PHASE_MSG} "Regenerating configuration scripts for ${PKGNAME}" 84 @${PHASE_MSG} "Regenerating configuration scripts for ${PKGNAME}"
84 ${RUN} cd ${WRKSRC:Q}/libraries/integer-gmp && autoconf 85 ${RUN} cd ${WRKSRC:Q}/libraries/integer-gmp && autoconf
85 86
86 87
87# Define the target "pre-configure" and non-standard "bootstrap". 88# Define the target "pre-configure" and non-standard "bootstrap".
88.include "../../lang/ghc7/bootstrap.mk" 89.include "../../lang/ghc7/bootstrap.mk"
89 90
90.for i in ${DISTFILES:M*-boot-*} 91.for i in ${DISTFILES:M*-boot-*}
91SITES.${i}?= ${MASTER_SITE_LOCAL} 92SITES.${i}?= ${MASTER_SITE_LOCAL}
92.endfor 93.endfor
93 94
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
122# appreciate. 123# appreciate.
123 ${RUN} ${ECHO} "HSCOLOUR_SRCS = NO" >> ${WRKSRC:Q}/mk/build.mk 124 ${RUN} ${ECHO} "HSCOLOUR_SRCS = NO" >> ${WRKSRC:Q}/mk/build.mk
124 125
125# Don't even think of PDF. 126# Don't even think of PDF.
126 ${RUN} ${ECHO} "BUILD_DOCBOOK_PS = NO" >> ${WRKSRC:Q}/mk/build.mk 127 ${RUN} ${ECHO} "BUILD_DOCBOOK_PS = NO" >> ${WRKSRC:Q}/mk/build.mk
127 ${RUN} ${ECHO} "BUILD_DOCBOOK_PDF = NO" >> ${WRKSRC:Q}/mk/build.mk 128 ${RUN} ${ECHO} "BUILD_DOCBOOK_PDF = NO" >> ${WRKSRC:Q}/mk/build.mk
128 129
129 130
130# ----------------------------------------------------------------------------- 131# -----------------------------------------------------------------------------
131# Installation/removal hooks 132# Installation/removal hooks
132# 133#
133 134
134# Substitutions for INSTALL and DEINSTALL that handles package.cache. 135# Substitutions for INSTALL and DEINSTALL that handles package.cache.
135FILES_SUBST+= DISTNAME=${DISTNAME} 136FILES_SUBST+= DISTNAME=${DISTNAME}
136 137
137# We don't want package.cache to be in the PLIST. 138# We don't want package.cache to be in the PLIST.
138post-install: 139post-install:
139 ${RM} -f ${DESTDIR:Q}${PREFIX:Q}/lib/${DISTNAME}/package.conf.d/package.cache 140 ${RM} -f ${DESTDIR:Q}${PREFIX:Q}/lib/${DISTNAME}/package.conf.d/package.cache
140 141
141 142
142# ----------------------------------------------------------------------------- 143# -----------------------------------------------------------------------------
143# PLIST 144# PLIST
144# 145#
145# We can't use static PLIST because the package installs some files 146# We can't use static PLIST because the package installs some files
146# whose names are randomly generated, namely 147# whose names are randomly generated, namely
147# lib/${PKGNAME}/package.conf.d/*.conf 148# lib/${PKGNAME}/package.conf.d/*.conf
148# 149#
149PRINT_PLIST_AWK+= /lib\/${PKGNAME_NOREV}\/package\.conf\.d/ { next; } 150PRINT_PLIST_AWK+= /lib\/${PKGNAME_NOREV}\/package\.conf\.d/ { next; }
150 151
151# If we were lucky we could just use "PLIST_TYPE = dynamic", but the 152# If we were lucky we could just use "PLIST_TYPE = dynamic", but the
152# feature has seemingly bitrotted. 153# feature has seemingly bitrotted.
153.include "../../mk/bsd.prefs.mk" 154.include "../../mk/bsd.prefs.mk"
154.if empty(USE_DESTDIR:M[Yy][Ee][Ss]) 155.if empty(USE_DESTDIR:M[Yy][Ee][Ss])
155PKG_FAIL_REASON+="This package can not be built without using DESTDIR.\ 156PKG_FAIL_REASON+="This package can not be built without using DESTDIR.\
156You need to set USE_DESTDIR to \"yes\"." 157You need to set USE_DESTDIR to \"yes\"."
157.else 158.else
158GENERATE_PLIST+= \ 159GENERATE_PLIST+= \
159 cd ${DESTDIR:Q}${PREFIX:Q} && \ 160 cd ${DESTDIR:Q}${PREFIX:Q} && \
160 ${FIND} lib/${PKGNAME_NOREV}/package.conf.d \( -type f -o -type l \) | ${SORT} -d; 161 ${FIND} lib/${PKGNAME_NOREV}/package.conf.d \( -type f -o -type l \) | ${SORT} -d;
161.endif 162.endif
162 163
163 164
164# ----------------------------------------------------------------------------- 165# -----------------------------------------------------------------------------
165# Sanity checks 166# Sanity checks
166# 167#
167 168
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 (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,143 +1,143 @@ @@ -1,143 +1,143 @@
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"
15BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-freebsd.tar.xz 15BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-freebsd.tar.xz
16 16
17.elif ${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD" 17.elif ${MACHINE_ARCH} == "i386" && ${OPSYS} == "NetBSD"
18BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-netbsd.tar.xz 18BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-netbsd.tar.xz
19 19
20.elif ${MACHINE_ARCH} == "powerpc" && ${OPSYS} == "Darwin" 20.elif ${MACHINE_ARCH} == "powerpc" && ${OPSYS} == "Darwin"
21BOOT_ARCHIVE= ${DISTNAME}-boot-powerpc-apple-darwin.tar.xz 21BOOT_ARCHIVE= ${DISTNAME}-boot-powerpc-apple-darwin.tar.xz
22# Existence of libelf makes LeadingUnderscore being "NO", which is 22# Existence of libelf makes LeadingUnderscore being "NO", which is
23# incorrect for this platform. See ${WRKSRC}/aclocal.m4 23# incorrect for this platform. See ${WRKSRC}/aclocal.m4
24# (FP_LEADING_UNDERSCORE) 24# (FP_LEADING_UNDERSCORE)
25CONFLICTS+= libelf-[0-9]* 25CONFLICTS+= libelf-[0-9]*
26 26
27.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "Linux" 27.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "Linux"
28BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-linux.tar.xz 28BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-linux.tar.xz
29 29
30.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "NetBSD" 30.elif ${MACHINE_ARCH} == "x86_64" && ${OPSYS} == "NetBSD"
31BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-netbsd.tar.xz 31BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-netbsd.tar.xz
32 32
33.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-i386) 33.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-i386)
34BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-solaris2.tar.gz 34BOOT_ARCHIVE= ${DISTNAME}-boot-i386-unknown-solaris2.tar.gz
35 35
36.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64) 36.elif !empty(MACHINE_PLATFORM:MSunOS-5.11-x86_64)
37BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-solaris2.tar.xz 37BOOT_ARCHIVE= ${DISTNAME}-boot-x86_64-unknown-solaris2.tar.xz
38 38
39.else 39.else
40PKG_FAIL_REASON+= "internal error: unsupported platform" 40PKG_FAIL_REASON+= "internal error: unsupported platform"
41.endif 41.endif
42 42
43BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//:C/\.gz$//} 43BOOT_TARBALL= ${BOOT_ARCHIVE:C/\.xz$//:C/\.gz$//}
44 44
45 45
46 46
47# ----------------------------------------------------------------------------- 47# -----------------------------------------------------------------------------
48# The "pre-configure" hook 48# The "pre-configure" hook
49# 49#
50# Install a bootstrapping compiler directly into TOOLS_DIR so that 50# Install a bootstrapping compiler directly into TOOLS_DIR so that
51# ./configure can find it. 51# ./configure can find it.
52# 52#
53USE_TOOLS+= gmake xzcat xz 53USE_TOOLS+= gmake xzcat xz
54 54
55pre-configure: 55pre-configure:
56.if !exists(${DISTDIR:Q}/${DIST_SUBDIR:Q}/${BOOT_ARCHIVE}) 56.if !exists(${DISTDIR:Q}/${DIST_SUBDIR:Q}/${BOOT_ARCHIVE})
57 @${FAIL_MSG} "Put your trusted bootstrap archive as ${DISTDIR}/${DIST_SUBDIR}/${BOOT_ARCHIVE}" 57 @${FAIL_MSG} "Put your trusted bootstrap archive as ${DISTDIR}/${DIST_SUBDIR}/${BOOT_ARCHIVE}"
58.else 58.else
59 @${PHASE_MSG} "Extracting bootstrapping compiler for ${PKGNAME}" 59 @${PHASE_MSG} "Extracting bootstrapping compiler for ${PKGNAME}"
60 ${RUN} ${MKDIR} ${WRKDIR:Q}/build-extract 60 ${RUN} ${MKDIR} ${WRKDIR:Q}/build-extract
61 ${RUN} cd ${WRKDIR:Q}/build-extract && \ 61 ${RUN} cd ${WRKDIR:Q}/build-extract && \
62 ${EXTRACT_CMD_DEFAULT} ${DISTDIR:Q}/${DIST_SUBDIR:Q}/${BOOT_ARCHIVE} 62 ${EXTRACT_CMD_DEFAULT} ${DISTDIR:Q}/${DIST_SUBDIR:Q}/${BOOT_ARCHIVE}
63 63
64 @${PHASE_MSG} "Preparing bootstrapping compiler for ${PKGNAME}" 64 @${PHASE_MSG} "Preparing bootstrapping compiler for ${PKGNAME}"
65 ${RUN} cd ${WRKDIR:Q}/build-extract/${DISTNAME}-boot && \ 65 ${RUN} cd ${WRKDIR:Q}/build-extract/${DISTNAME}-boot && \
66 ${SH} ./configure \ 66 ${SH} ./configure \
67 --prefix=${TOOLS_DIR:Q} && \ 67 --prefix=${TOOLS_DIR:Q} && \
68 ${MAKE_PROGRAM} install 68 ${MAKE_PROGRAM} install
69.endif 69.endif
70 70
71 71
72# ----------------------------------------------------------------------------- 72# -----------------------------------------------------------------------------
73# An unusual target "bootstrap" 73# An unusual target "bootstrap"
74# 74#
75# Build a bootstrapping compiler using an already installed GHC. This 75# Build a bootstrapping compiler using an already installed GHC. This
76# can certainly impossible if you don't have one. It's absolutely 76# can certainly impossible if you don't have one. It's absolutely
77# important to build it with the fewest possible run-time 77# important to build it with the fewest possible run-time
78# dependencies, otherwise the resulting binary can easily get 78# dependencies, otherwise the resulting binary can easily get
79# unusable. 79# unusable.
80# 80#
81.PHONY: bootstrap 81.PHONY: bootstrap
82 82
83#BUILDLINK_PASSTHRU_DIRS= ${PREFIX}/lib/${DISTNAME} 83#BUILDLINK_PASSTHRU_DIRS= ${PREFIX}/lib/${DISTNAME}
84 84
85.if exists(${WRKDIR}/${DISTNAME}/mk/config.mk) 85.if exists(${WRKDIR}/${DISTNAME}/mk/config.mk)
86bootstrap: 86bootstrap:
87 @${ERROR_MSG} "You have already configured the package in a way\ 87 @${ERROR_MSG} "You have already configured the package in a way\
88 that building bootstrapping compiler is impossible." 88 that building bootstrapping compiler is impossible."
89 @${FAIL_MSG} "Please run \"${MAKE} clean patch\" first." 89 @${FAIL_MSG} "Please run \"${MAKE} clean patch\" first."
90 90
91.elif !exists(${WRKDIR}/${DISTNAME}/rts/ghc.mk.orig) 91.elif !exists(${WRKDIR}/${DISTNAME}/rts/ghc.mk.orig)
92bootstrap: 92bootstrap:
93 @${FAIL_MSG} "Please run \"${MAKE} patch\" first." 93 @${FAIL_MSG} "Please run \"${MAKE} patch\" first."
94 94
95.else 95.else
96bootstrap: ${WRKDIR}/${BOOT_ARCHIVE} 96bootstrap: ${WRKDIR}/${BOOT_ARCHIVE}
97 @${PHASE_MSG} "Done creating" ${WRKDIR}/${BOOT_ARCHIVE} 97 @${PHASE_MSG} "Done creating" ${WRKDIR}/${BOOT_ARCHIVE}
98 98
99${WRKDIR}/lndir: 99${WRKDIR}/lndir:
100 @${PHASE_MSG} "Building lndir(1) to duplicate the source tree." 100 @${PHASE_MSG} "Building lndir(1) to duplicate the source tree."
101 cd ${WRKSRC:Q}/utils/lndir && \ 101 cd ${WRKSRC:Q}/utils/lndir && \
102 ${CC:Q} lndir.c -o ${.TARGET} 102 ${CC:Q} lndir.c -o ${.TARGET}
103 103
104${WRKDIR}/stamp-lndir-boot: ${WRKDIR}/lndir 104${WRKDIR}/stamp-lndir-boot: ${WRKDIR}/lndir
105 @${PHASE_MSG} "Duplicating the source tree for bootstrapping ${DISTNAME}" 105 @${PHASE_MSG} "Duplicating the source tree for bootstrapping ${DISTNAME}"
106 ${MKDIR} ${WRKDIR:Q}/build-boot 106 ${MKDIR} ${WRKDIR:Q}/build-boot
107 cd ${WRKDIR:Q}/build-boot && \ 107 cd ${WRKDIR:Q}/build-boot && \
108 ${WRKDIR}/lndir -silent ../${DISTNAME:Q} 108 ${WRKDIR}/lndir -silent ../${DISTNAME:Q}
109 ${TOUCH} ${.TARGET} 109 ${TOUCH} ${.TARGET}
110 110
111${WRKDIR}/stamp-configure-boot: ${WRKDIR}/stamp-lndir-boot 111${WRKDIR}/stamp-configure-boot: ${WRKDIR}/stamp-lndir-boot
112 @${PHASE_MSG} "Configuring bootstrapping compiler ${DISTNAME}" 112 @${PHASE_MSG} "Configuring bootstrapping compiler ${DISTNAME}"
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.
140${WRKDIR}/${BOOT_ARCHIVE}: ${WRKDIR}/${BOOT_TARBALL} 140${WRKDIR}/${BOOT_ARCHIVE}: ${WRKDIR}/${BOOT_TARBALL}
141 @${PHASE_MSG} "Compressing binary distribution of bootstrapping ${DISTNAME}" 141 @${PHASE_MSG} "Compressing binary distribution of bootstrapping ${DISTNAME}"
142 ${XZ} --verbose -9 --extreme ${WRKDIR:Q}/${BOOT_TARBALL} 142 ${XZ} --verbose -9 --extreme ${WRKDIR:Q}/${BOOT_TARBALL}
143.endif 143.endif

cvs diff -r1.1 -r1.2 pkgsrc/lang/ghc7/buildlink3.mk (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 (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
@@ -1,35 +1,35 @@ @@ -1,35 +1,35 @@
1# -*- makefile-gmake -*- 1# -*- makefile-gmake -*-
2# 2#
3# This is a build conf for bootstrapping compilers. 3# This is a build conf for bootstrapping compilers.
4# 4#
5 5
6# We don't want any docs. 6# We don't want any docs.
7HADDOCK_DOCS = NO 7HADDOCK_DOCS = NO
8BUILD_DOCBOOK_HTML = NO 8BUILD_DOCBOOK_HTML = NO
9BUILD_DOCBOOK_PS = NO 9BUILD_DOCBOOK_PS = NO
10BUILD_DOCBOOK_PDF = NO 10BUILD_DOCBOOK_PDF = NO
11BUILD_MAN = NO 11BUILD_MAN = NO
12 12
13# Enabling evil-splitter reduces bindist size, which is good. However 13# Enabling evil-splitter reduces bindist size, which is good. However
14# it introduces a run-time dependency on perl, which is unacceptable. 14# it introduces a run-time dependency on perl, which is unacceptable.
15SplitObjs = NO 15SplitObjs = NO
16 16
17# We only want vanilla libraries and rts. No profiling, no shared 17# We only want vanilla libraries and rts. No profiling, no shared
18# libraries, no debugging, no event logging. 18# libraries, no debugging, no event logging.
19GhcLibWays = v 19GhcLibWays = v
20GhcRTSWays = 20GhcRTSWays =
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