pkgsrc/lang/ghc-bootstrap/Makefile

114 lines
3.6 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.5 2016/07/09 06:38:25 wiz Exp $
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
DISTNAME= ghc-6.8.3
PKGNAME= ghc-bootstrap-6.8.3
PKGREVISION= 4
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
CATEGORIES= lang
MASTER_SITES= http://www.haskell.org/ghc/dist/6.8.3/
DISTFILES= ghc-6.8.3-src.tar.bz2
OWNER= dholland@NetBSD.org
HOMEPAGE= http://www.haskell.org/ghc/
COMMENT= Bootstrap kit generator for the GHC Haskell compiler
#
# build defs
#
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
CONFLICTS+= ghc-[0-9]*
# Disable this (at least for now) so bootstrap kits get built by autobuilds.
#NOT_FOR_BULK_PLATFORM= *-*-* # Package is useful only for maintainers.
CHECK_PORTABILITY_SKIP= distrib/prep-bin-dist-mingw
# += in a shell script, but in embedded AWK code, so it's ok.
CHECK_PORTABILITY_SKIP+= libraries/base/cbits/ubconfc
GNU_CONFIGURE= yes
#CONFIGURE_ARGS+= --with-ghc=${WRKDIR}/ghc-6.4.2/ghc/compiler/ghc-inplace
CONFIGURE_ARGS+= --with-ghc=${BUILDLINK_PREFIX.ghc}/bin/ghc
CONFIGURE_ENV+= PerlCmd=${PERL5:Q}
#USE_TOOLS+= gmake pkg-config perl:run
USE_TOOLS+= gmake pkg-config perl
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
SUBST_CLASSES+= prefix
SUBST_STAGE.prefix= pre-configure
SUBST_FILES.prefix+= mk/bootstrap.mk
SUBST_FILES.prefix+= libraries/readline/configure
SUBST_FILES.prefix+= libraries/readline/readline.cabal
SUBST_FILES.prefix+= rts/package.conf.in
SUBST_SED.prefix= -e 's,@PREFIX@,${PREFIX},g'
#
# Build system settings.
#
# 1. The ghc compiler normally splits the generated C files into small
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
# parts before sending them to gcc, to enable the linker to eliminate
# unused parts. This does however not play nice with the pkgsrc
# framework, and the result is that the build takes more than 5 times
# as long than when the files are not split. See
# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
# for a description of the problem.
# Disable file splitting until pkgsrc has been improved.
#
# 2. For the bootstrap kit, set GhcLibWays=v; this excludes p
# (profiling libs) which take time to build and are quite useless for
# bootstrapping.
#
# 3. Later GHC versions let you set INTEGER_LIBRARY=integer-simple to
# avoid depending on gmp. This is not available in 6.8.3; instead we
# have GHC build with the rather old copy of gmp it comes with. It is
# important for the bootstrap kit to not depend on the pkgsrc shared
# gmp library, since then if its major version changes you'd be stuck.
#
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
pre-configure:
${ECHO} "SplitObjs=NO" > ${WRKSRC}/mk/build.mk
${ECHO} "GhcLibWays=v" >> ${WRKSRC}/mk/build.mk
# ${ECHO} "INTEGER_LIBRARY=integer-simple" >> ${WRKSRC}/mk/build.mk
#
# Configure script hacks.
#
# Disable readline, and disable external gmp in favor of the in-tree
# copy shipped with ghc 6.8.3. The bootstrap kit should not depend on
# shared libs from pkgsrc, as if they get their major versions bumped
# you get stuck.
#
CONFIGURE_ENV+= ac_cv_header_readline_readline_h=no \
ac_cv_header_readline_history_h=no \
fp_cv_ghc_has_readline=no \
ac_cv_lib_gmp___gmpz_fdiv_qr=no
#.include "../../devel/gmp/buildlink3.mk"
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
#
# As an additional measure, delete the readline and gmp .so files from
# the buildlink directory.
#
post-wrapper:
rm -f ${WRKDIR}/.buildlink/lib/libreadline.so*
rm -f ${WRKDIR}/.buildlink/lib/libgmp.so*
rm -f ${WRKDIR}/.buildlink/lib/libgmpxx.so*
#
# By request of Joerg link libgcc statically so the bootstrap kit
# works on a clang-only system.
#
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mgcc)
LDFLAGS+= -static-libgcc
.endif
# We need to use lang/ghc to compile, and for now at least that requires
# buildlinking the compiler.
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
.include "../../lang/ghc/buildlink3.mk"
# Threads are required.
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
.include "../../mk/pthread.buildlink3.mk"
#
# make it go
#
Add a ghc-bootstrap package for making ghc binary bootstrap kits. This is a ghc 6.8.3 package based on lang/ghc. As of ghc 7.something, the old system of bootstrapping ghc from generated C sources has been deprecated. While in theory we could move pkgsrc up to that point using C bootstrap kits like the one currently used by lang/ghc, there are several reasons not to: (1) it's a dead end; (2) there is no available infrastructure for building such kits, as in the past it was done by hand by the package maintainer; (3) building ghc from C sources wasn't ever really fully supported anyway and usually requires fiddling to make it work. For this reason, by the power invested in me as one of the few people who actually uses ghc for something nontrivial (much as I perhaps regret doing so)... we will switch to binary bootstrap kits now. The bootstrap kits generated here are just installable ghc packages under a different name. This package depends on lang/ghc and uses the installed ghc to build another copy; then that copy becomes the bootstrap kit. That is, the bootstrap kit is the pkgsrc package you get by doing 'make package' in this directory. I have a (tested and working) patch to switch lang/ghc to use a new bootstrap kit generated here, but I am intentionally holding off on committing it until after 2013q4 is branched. That way anyone who wants a bootstrap kit for a platform currently supported by lang/ghc can get one by checking out 2013q4, building ghc, and then building ghc-bootstrap. Note that these bootstrap kits cannot be used with the wip/ghc package; it uses a built but not installed ghc source tree as the bootstrap kit. You can capture one of these from here if you really want to by doing 'make' and then tarring up work/ghc-6.8.3... I think. I haven't tested that, and for now it won't work anyway as wip/ghc is too many versions ahead for such a build to be supported. Because ghc can only be built with a recent ghc, updating lang/ghc to a recent version will require a ping/pong process with ghc and ghc-bootstrap. This is the chief reason to have a separate ghc-bootstrap package; it should be perfectly possible to build lang/ghc with a lang/ghc package as the bootstrap too.
2013-12-15 03:00:07 +01:00
.include "../../mk/bsd.pkg.mk"