diff options
author | Gabor Pali <pgj@FreeBSD.org> | 2014-08-10 22:34:50 +0000 |
---|---|---|
committer | Gabor Pali <pgj@FreeBSD.org> | 2014-08-10 22:34:50 +0000 |
commit | cc555442337c7591ab5c3fd19ad8e3e185a256b0 (patch) | |
tree | a6a0dfa4f440949889fc7b609c83f74555f6894e /lang/ghc/Makefile | |
parent | 5e492199d1e024a681c6d21087c8d948cb3b7bc3 (diff) | |
download | ports-cc555442337c7591ab5c3fd19ad8e3e185a256b0.tar.gz ports-cc555442337c7591ab5c3fd19ad8e3e185a256b0.zip |
Notes
Diffstat (limited to 'lang/ghc/Makefile')
-rw-r--r-- | lang/ghc/Makefile | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/lang/ghc/Makefile b/lang/ghc/Makefile index ca69ee618a99..766a7e41b58a 100644 --- a/lang/ghc/Makefile +++ b/lang/ghc/Makefile @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= ghc -PORTVERSION= 7.6.3 -PORTREVISION= 4 +PORTVERSION= 7.8.3 CATEGORIES= lang haskell MASTER_SITES= http://www.haskell.org/ghc/dist/${PORTVERSION}/:source \ ${MASTER_SITE_LOCAL:S/$/:boot/} @@ -23,17 +22,17 @@ HSCOLOUR_VERSION= 1.20.3 DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION} -CONFLICTS= ghc-6.8.* ghc-6.10.* ghc-6.12.* ghc-7.0.* ghc-7.2.* ghc-7.4.* +CONFLICTS= ghc-6.* ghc-7.0.* ghc-7.2.* ghc-7.4.* ghc-7.6.* ghc-7.7.* LIB_DEPENDS+= libgmp.so:${PORTSDIR}/math/gmp USE_AUTOTOOLS= autoconf autoheader USE_PERL5= build -USES= gmake iconv perl5 ncurses tar:bzip2 +USES= gmake iconv:translit perl5 ncurses tar:bzip2 USE_BINUTILS= yes USE_GCC= yes -LICENSE= BSD +LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE MAKE_ENV= LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 @@ -68,15 +67,23 @@ OPTIONS_DEFINE+= BOOTH .include <bsd.port.options.mk> .if ${PORT_OPTIONS:MDYNAMIC} +# The version number is needed as lang/gcc installs a different version LIB_DEPENDS+= libffi.so.6:${PORTSDIR}/devel/libffi .endif +# Earlier versions of FreeBSD 9 cannot do proper resolution for $ORIGIN (due +# to a bug in rtld(1)), so disable it by default there. This shall go away +# once 9.2 becomes the latest supported release in that branch. +.if ${OSVERSION} >= 900000 && ${OSVERSION} < 902001 +EXTRA_PATCHES+= ${PATCHDIR}/nopatch-rules__distdir-way-opts.mk + +BUILD_DEPENDS+= chrpath:${PORTSDIR}/devel/chrpath +.endif + .if empty(PORT_OPTIONS:MBOOT) BOOT_GHC_VERSION= 7.6.3 -EXTRA_PATCHES= ${PATCHDIR}/nopatch-.._ghc-${BOOT_GHC_VERSION}-boot_rts_package.conf.in - .if ${ARCH} == "i386" .if ${OSVERSION} >= 1000043 @@ -118,10 +125,8 @@ CONFIGURE_ARGS= --with-gcc=${CC} \ --with-gmp-includes=${LOCALBASE}/include \ --with-gmp-libraries=${LOCALBASE}/lib -.if ${OSVERSION} < 1000043 CONFIGURE_ARGS+= --with-iconv-includes=${LOCALBASE}/include \ --with-iconv-libraries=${LOCALBASE}/lib -.endif .if ${PORT_OPTIONS:MDYNAMIC} CONFIGURE_ARGS+= --with-system-libffi \ @@ -130,11 +135,11 @@ CONFIGURE_ARGS+= --with-system-libffi \ .endif .if ${PORT_OPTIONS:MLLVM} -BUILD_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32 -RUN_DEPENDS+= ${LOCALBASE}/bin/opt32:${PORTSDIR}/devel/llvm32 +BUILD_DEPENDS+= ${LOCALBASE}/bin/opt34:${PORTSDIR}/devel/llvm34 +RUN_DEPENDS+= ${LOCALBASE}/bin/opt34:${PORTSDIR}/devel/llvm34 -CONFIGURE_ARGS+= --with-opt=${LOCALBASE}/bin/opt32 \ - --with-llc=${LOCALBASE}/bin/llc32 +CONFIGURE_ARGS+= --with-opt=${LOCALBASE}/bin/opt34 \ + --with-llc=${LOCALBASE}/bin/llc34 .endif .if empty(PORT_OPTIONS:MBOOT) @@ -231,8 +236,7 @@ post-extract: @${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=${LOCALBASE}/include" @${ECHO} >> ${WRKSRC}/mk/build.mk "EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=${LOCALBASE}/lib" @${ECHO} >> ${WRKSRC}/mk/build.mk "libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=${NCURSESINC} --configure-option=--with-curses-libraries=${NCURSESLIB}" -# @${ECHO} >> ${WRKSRC}/mk/build.mk "BIN_DIST_NAME = ghc-\$$(ProjectVersion)-boot" -# @${ECHO} >> ${WRKSRC}/mk/build.mk "BIN_DIST_TAR = ghc-\$$(ProjectVersion)-amd64-ash0-freebsd8-boot.tar" + @${ECHO} >> ${WRKSRC}/mk/build.mk "V = 0" post-install-script: @${FIND} -ds ${GHC_LIBDIR} -type f -print | ${SED} -E -e \ @@ -259,31 +263,18 @@ post-install-script: @${FIND} -ds ${GHC_LIBDIR} -type d -print | ${SED} -E -e \ 's,^${STAGEDIR}${PREFIX}/?,@dirrm ,' >> ${TMPPLIST} -#post-build: -# @(cd ${WRKSRC} && ${MAKE_CMD} binary-dist) -# -#do-install: -# @${NONE} - post-patch: -# Hack don't to install the internal haddock. - @${REINPLACE_CMD} -e 's+\(DO_NOT_INSTALL =\)+\1 haddock+' \ - ${WRKSRC}/utils/Makefile - -.if ${PORT_OPTIONS:MBOOT} - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ - ${WRKSRC}/rts/package.conf.in \ - ${WRKSRC}/libraries/Makefile -.else - @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ - ${WRKSRC}/../ghc-${BOOT_GHC_VERSION}-boot/rts/package.conf.in \ - ${WRKSRC}/rts/package.conf.in \ - ${WRKSRC}/libraries/Makefile + @${REINPLACE_CMD} -e 's|%%CC%%|${CC}|; \ + s|%%AR%%|${AR}|; \ + s|%%RANLIB%%|${RANLIB}|; \ + s|%%LD%%|${LD}|' \ + ${WRKSRC}/libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs +# FreeBSD 9.{0,1} oddity workaround, part 2 (see above) +.if ${OSVERSION} >= 900000 && ${OSVERSION} < 902001 + @${REINPLACE_CMD} -e 's|%%GHC_LIBDIR%%|${GHC_LIBDIR}|g' \ + ${WRKSRC}/rules/distdir-way-opts.mk .endif - @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ - ${WRKSRC}/configure - pre-configure: @${MKDIR} ${TMPDIR} .if empty(PORT_OPTIONS:MBOOT) @@ -317,7 +308,6 @@ pre-configure: .endif post-install: - # cabalised hs-foo-ghc ports @${MKDIR} ${STAGEDIR}${PREFIX}/lib/cabal/ghc-${GHC_VERSION} @${MKDIR} ${STAGEDIR}${PREFIX}/share/cabal/ghc-${GHC_VERSION} @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/cabal/ghc-${GHC_VERSION} @@ -326,5 +316,14 @@ post-install: .if ${PORT_OPTIONS:MDOCS} @${LN} -sf haddock-ghc-${GHC_VERSION} ${STAGEDIR}${PREFIX}/bin/haddock .endif +# FreeBSD 9.{0,1} oddity workaround, part 3 (see above) +.if ${OSVERSION} >= 900000 && ${OSVERSION} < 902001 + @(for f in $$(${FIND} ${GHC_LIBDIR}/bin -type f; ${FIND} ${GHC_LIBDIR} -name '*.so' | ${GREP} -v libHSrts); do \ + chrpath -r $$(chrpath $$f | ${CUT} -d '=' -f2 | ${SED} 's|${GHC_LIBDIR}|${PREFIX}/${GHC_LIBDIR_REL}|g') $$f; \ + done) +.endif + @(for f in ${STAGEDIR}${PREFIX}/bin/hp2ps ${GHC_LIBDIR}/unlit ${GHC_LIBDIR}/mkGmpDerivedConstants \ + $$(${FIND} ${GHC_LIBDIR}/bin -type f; ${FIND} ${GHC_LIBDIR} -name '*.so'); do \ + ${STRIP_CMD} $$f; done) .include <bsd.port.mk> |