diff --git a/dev-lang/ghc/ghc-7.8.3.recipe b/dev-lang/ghc/ghc-7.8.3.recipe index 1f2a0b696..0c3f3f9fd 100644 --- a/dev-lang/ghc/ghc-7.8.3.recipe +++ b/dev-lang/ghc/ghc-7.8.3.recipe @@ -8,7 +8,7 @@ HOMEPAGE="https://www.haskell.org/ghc/" COPYRIGHT="The Glasgow Haskell Team" LICENSE="BSD (3-clause) GNU LGPL v2.1" -REVISION="11" +REVISION="12" SOURCE_URI_1="https://www.haskell.org/ghc/dist/7.8.3/ghc-7.8.3-src.tar.bz2" CHECKSUM_SHA256_1="2358826f8424bf571dcc313bd882422fe108a340d6e37db4339ff6d5d6ac3f37" SOURCE_URI_2="https://pulkomandy.tk/drop/ghc-7.8.3-i386-unknown-haiku.tar.gz" @@ -42,7 +42,7 @@ PROVIDES=" REQUIRES=" haiku$secondaryArchSuffix >= $haikuVersion lib:libiconv$secondaryArchSuffix - lib:libncursesw$secondaryArchSuffix >= 5 + lib:libncursesw$secondaryArchSuffix >= 6 lib:libz$secondaryArchSuffix " @@ -50,7 +50,7 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel >= $haikuVersion haiku_devel >= $haikuVersion devel:libiconv$secondaryArchSuffix - devel:libncursesw$secondaryArchSuffix >= 5 + devel:libncursesw$secondaryArchSuffix >= 6 devel:libz$secondaryArchSuffix " BUILD_PREREQUIRES=" @@ -65,6 +65,7 @@ BUILD_PREREQUIRES=" cmd:sed cmd:sort cmd:tar + lib:libncursesw$secondaryArchSuffix >= 5 " BUILD() diff --git a/dev-lang/ghc/ghc78-7.8.4.recipe b/dev-lang/ghc/ghc78-7.8.4.recipe new file mode 100644 index 000000000..02e1fb50f --- /dev/null +++ b/dev-lang/ghc/ghc78-7.8.4.recipe @@ -0,0 +1,116 @@ +SUMMARY="The Glasgow Haskell Compiler" +DESCRIPTION=" +The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for Haskell. + +Haskell is \"the\" standard lazy functional programming language. +" +HOMEPAGE="https://www.haskell.org/ghc/" +COPYRIGHT="The Glasgow Haskell Team" +LICENSE="BSD (3-clause) + GNU LGPL v2.1" +REVISION="1" +SOURCE_URI="https://www.haskell.org/ghc/dist/$portVersion/ghc-$portVersion-src.tar.bz2" +CHECKSUM_SHA256="59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b" +SOURCE_DIR="ghc-$portVersion" +#PATCHES="ghc-$portVersion.patchset" + +ARCHITECTURES="!x86" +SECONDARY_ARCHITECTURES="!x86" + +GLOBAL_WRITABLE_FILES=" + settings/ghc directory keep-old + " + +PROVIDES=" + ghc78$secondaryArchSuffix = $portVersion + cmd:ghc = 7.8.4 compat >= 7.8 + cmd:ghc_$portVersion + cmd:ghc_pkg + cmd:ghc_pkg_$portVersion + cmd:ghci + cmd:ghci_$portVersion + cmd:haddock + cmd:haddock_ghc_$portVersion + cmd:hp2ps + cmd:hpc + cmd:hsc2hs + cmd:runghc + cmd:runghc_$portVersion + cmd:runhaskell + " +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion + lib:libiconv$secondaryArchSuffix + lib:libncursesw$secondaryArchSuffix >= 6 + lib:libz$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion + haiku_devel >= $haikuVersion + devel:libiconv$secondaryArchSuffix + devel:libncursesw$secondaryArchSuffix >= 6 + devel:libz$secondaryArchSuffix + docbook_xml_dtd + docbook_xsl_stylesheets + " +BUILD_PREREQUIRES=" + cmd:autoconf + cmd:awk + cmd:find + cmd:gcc$secondaryArchSuffix + cmd:ghc_7.8.3 + cmd:grep + cmd:ld$secondaryArchSuffix + cmd:make + cmd:perl + cmd:sed + cmd:sort + cmd:tar + cmd:xsltproc + " + +BUILD() +{ + # 2. Build GHC using the bootstrap compiler; we create a "dyn" only install + echo "Building GHC proper..." + + cat > mk/build.mk <<-EOF + V = 0 + GhcLibWays = dyn + SRC_HC_OPTS = -O -H64m + GhcStage1HcOpts = -O -fasm + GhcStage2HcOpts = -O2 -fasm + GhcHcOpts = -Rghc-timing + GhcLibHcOpts = -O2 + + DYNAMIC_BY_DEFAULT = YES + + NoFibWays = + STRIP_CMD = : +EOF + + # haikuporter's buildspec confuses GHC, so we omit it, and we can't + # have a gcc2 GHC, so just install directly into $prefix/bin + runConfigure --omit-buildspec --omit-dirs binDir configure --bindir=$prefix/bin --with-ghc=/bin/ghc-7.8.3 --with-gcc=/bin/gcc-x86 + make $jobArgs +} + +INSTALL() +{ + export GHC_PACKAGE_PATH=$settingsDir/ghc/package.conf.d + /tmp/bootstrap/bin/ghc-pkg init $GHC_PACKAGE_PATH + unset GHC_PACKAGE_PATH + # 1. Install our new GHC + echo "Installing GHC!" + make install + + # 2. Move package.conf.d to settings + sed -i -e '/^PKGCONF=/c\ + PKGCONF='"$settingsDir"'/ghc/package.conf.d' $prefix/bin/ghc-pkg-$portVersion + unset GHC_PACKAGE_PATH + + # move package.conf.d files to the right place... + mv $libDir/ghc-$portVersion/package.conf.d/*.conf $settingsDir/ghc/package.conf.d/ + $prefix/bin/ghc-pkg recache +}