parent
fbb65acd09
commit
94df3a90ff
@ -1,3 +1,3 @@
|
||||
DIST snapper-0.2.8.tar.bz2 475053 SHA256 a44608648ed21a1346f8ae9345044901c39ad01abb501806a22c9d4a771eadc5 SHA512 ce1529062943c34b9de2eafb62c6e28b39bda6f4afc23ec5df5ddd42f213cbaf0d77d94d11d982285114ceecd27bd48206436119af84b2769ed4792aab01c75d WHIRLPOOL 3463cf8beb7adb1f3869645b20928dc21fc9cb72f8ed5275688e0b53c97b8103d0536e3246f12fcdc90c1889d221d13ce131b1920c7298232212c003ea9abb6d
|
||||
DIST snapper-0.3.3.tar.bz2 545800 SHA256 e64f42417fffed65524ce125eb31b5dbdd802a519ef04dd88c9251ef2784fe10 SHA512 f24f6d121f9a613549899b7bf3751f6d9c101db716d7bc3858a2add9f90e08861fc46927ce0130efc232240a91e24934820d0c2b1b65f206ac80d04cdaaec39d WHIRLPOOL 8a55ec12330d13bb1c4a630584418eb0e4f64580324ec8ff9fe444a1d52a4eafddac6c6c6cefc8aec760d84336f24c389e3f6d79ff07d9a40bb69cedbf35c8b7
|
||||
DIST snapper-0.4.0.tar.bz2 570614 SHA256 3818e123c29ffb1e3c62104c7623643cdc1fcab9494ba2c7e71825fbf68f6c77 SHA512 e4e75b31932309fd4cd3abc462826414f727ae5eec4fd79922d34a6fecd80e3e7bd5d8da4d3e5ac6ede021a21e68cb2ca127559567e8089b9d4636b6e6b61711 WHIRLPOOL 7799aba8e26a46d333d801f1733299ca68161a465702a7666bc68780de773f265bfcddc62126c1c703fde21af8052c878ddd4a87a662f5ad48c5230939a16bc5
|
||||
DIST snapper-0.4.1.tar.bz2 570673 SHA256 db9cce7f61ed1197d2663dfca444d313b05d7fb2d50af5ab468c7bdba6dd660f SHA512 23d12a4685039ce629333854bc3e8a90a524bf1207590102ccfbc358473e7bef9ca6a723d2bc8a2f0f7466c4b34dce724b806d24762ae54b26292e730a10a70c WHIRLPOOL 7f6100bc2989c931a4d95dbca3bbb6d3b6b09e3f98a9d4f1121182ef8541b1b20484c6e6591568fba1cf4bdc9045879b50dbc38438ea3336fc387ed937f1bab8
|
||||
|
@ -1 +1,2 @@
|
||||
DIST httperf-0.9.0.tar.gz 425297 SHA256 e1a0bf56bcb746c04674c47b6cfa531fad24e45e9c6de02aea0d1c5f85a2bf1c SHA512 58ea6a3b8a82181a89e5df22fdf18d5be8c7b533c404108702cc03fc727fb1599a43e620d83d41630f8a951d80e48ed99d0c3dd8469ee1fc7626449b777971e1 WHIRLPOOL 7b36e636a063c9af7ff142f7a81947f5b693bb1a3bdbe98c5dfd1f5ac11edb380e97f19c3ad2a0a8d8505c0d63d8d714fe935a6e326f2373cbbb11a940431a7e
|
||||
DIST httperf-0.9.1_p20161228.tar.gz 106357 SHA256 45cf5e92d30cd4191015fff2d0d066b780b54c45e614690bf0e70926633715ed SHA512 e5dbb400e4ab0db3cc1621731d99af9261574a8a1da4279c722ebbd80537d0aae2a3d662f4d51eb9130bc98823c2786710c7819a0144f4ae3f8cf153e28d7dfa WHIRLPOOL 2d0e5ee38b965f8d378cf45038c03782bb64d73981432a24968d6e0b870bacd64e947ee6c0120b2d7927780c4096cf3725ff1866f5f77042498f278cc84683d6
|
||||
|
@ -0,0 +1,38 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit autotools vcs-snapshot
|
||||
|
||||
MY_COMMIT_HASH="cc888437e4572ec29a4a7209f34fbd39c31600f5"
|
||||
|
||||
DESCRIPTION="A tool from HP for measuring web server performance"
|
||||
HOMEPAGE="https://github.com/httperf/httperf"
|
||||
SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_COMMIT_HASH}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+-with-openssl-exception"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~mips ~x86 ~amd64-linux ~x64-macos"
|
||||
IUSE="debug libressl idleconn"
|
||||
|
||||
RDEPEND="!libressl? ( dev-libs/openssl:0= )
|
||||
libressl? ( dev-libs/libressl:0= )
|
||||
idleconn? ( dev-libs/libevent:0= )"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myeconfargs=(
|
||||
--bindir="${EPREFIX}"/usr/bin
|
||||
$(use_enable debug)
|
||||
$(use_enable idleconn)
|
||||
)
|
||||
|
||||
econf "${myeconfargs[@]}"
|
||||
}
|
@ -1,3 +1,3 @@
|
||||
DIST nano-2.5.3.tar.gz 1967760 SHA256 b2b060129b9feff2d4870d803a441178c96531de9aed144ec0b83bd63ccb12ee SHA512 1d859f0bd88b9d907cfcaa84edc212bcaea4335c203922eb5b7378c2b45d88dffe1f3e4cb499a824d33781485834ef564997c58cf1fd92610d08f6ce8dcb67d5 WHIRLPOOL a2ca1c41d3cb26756cc9aba5b5fa0aeaea220626b98d0abfa1c5c4d4d57c3a5ef688d5edf00a6a00849ee25a67b2bbab93c4d454f6eb5a204b10fa01de3e298f
|
||||
DIST nano-2.6.3.tar.gz 2019354 SHA256 4f4054e12f2181c8e436163e931a0a565612242ff9e566c4d1adeda0f91fd503 SHA512 5079c0da976e3cfef9f3980e37c2501837bc66bb98fadd6fe7f02b061b83c99454678833fd43c74e6796cdc4ee9028ccba7a8a05e0f86e7a6517ba4d4c6bc95e WHIRLPOOL 94520ca9c7a11342133adfd3a1e9e9c77a6c07ab18b1b51bf39918b331abc6bd7ebeb937c2ec8ed3e59b8d0468e40f4e5811e66a8aecd469ad42c595c1b61fe4
|
||||
DIST nano-2.7.2.tar.gz 2050098 SHA256 89cc45dd630c6fb7276a14e1b3436a9972cf6d66eed15b14c3583af99070353c SHA512 faff964fda141c925f04528bd1f759b7cc16aec4642549134ab199850bd21e5d0d42bc564ce13bd9660f24bb6d2e5790185c8652b416dcd042b6ac9085f2acff WHIRLPOOL 43a1c6920e1c8e344192118eb826b0f0f00627ea8a98c760d997caf42e164ec3fb72fbabbdd5a672827da83f4ce83aa40def9b3c57f857a1ea562eff9f716ffb
|
||||
DIST nano-2.7.3.tar.gz 2048675 SHA256 3574d4594d051f3b572c47d63bfc3763fb1148c50b811ba7a016bacd94887a88 SHA512 cd159cf193f05b37f770ac79e532fe96be158688d241ab7090861016fe0da9dde2ab504d0703b8feea8043e1deded3f10f0ab4dd5cceba99fe4a1dfcf5062b0b WHIRLPOOL 19b042c29be4c8afca33870e85f0b893aa9f9d958be3043272dcef5ad8d775dc3b43fe1a418efee283c89a301be1503b04b825758666be1a8e25596f3a36b8be
|
||||
|
@ -1,146 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE='xml,threads'
|
||||
|
||||
inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
|
||||
|
||||
XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
|
||||
LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
|
||||
GRUB_URL=mirror://gnu-alpha/grub
|
||||
SRC_URI="
|
||||
http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
|
||||
$GRUB_URL/grub-0.97.tar.gz
|
||||
$XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
|
||||
$LIBPCI_URL/pciutils-2.2.9.tar.bz2
|
||||
$XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
|
||||
$XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
|
||||
$XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz"
|
||||
|
||||
S="${WORKDIR}/xen-${PV}"
|
||||
|
||||
DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="amd64 x86"
|
||||
IUSE="custom-cflags"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
sys-devel/bin86
|
||||
sys-apps/texinfo
|
||||
x11-libs/pixman"
|
||||
|
||||
RDEPEND=">=app-emulation/xen-tools-${PV}"
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
retar-externals() {
|
||||
# Purely to unclutter src_prepare
|
||||
local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
|
||||
|
||||
# epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
|
||||
sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
|
||||
-i "${WORKDIR}"/zlib-1.2.3/configure
|
||||
sed -e 's:^AR=ar rc:AR=ar:' \
|
||||
-e s':$(AR) $@:$(AR) rc $@:' \
|
||||
-i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
|
||||
einfo "zlib Makefile edited"
|
||||
|
||||
cd "${WORKDIR}"
|
||||
tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
|
||||
tar czp grub-0.97 -f grub-0.97.tar.gz
|
||||
tar czp lwip -f lwip-1.3.0.tar.gz
|
||||
tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
|
||||
tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
|
||||
mv $set "${S}"/stubdom/
|
||||
einfo "tarballs moved to source"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
# try and remove all the default custom-cflags
|
||||
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} \;
|
||||
fi
|
||||
|
||||
# Patch the unmergeable newlib, fix most of the leftover gcc QA issues
|
||||
cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
|
||||
|
||||
# Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
|
||||
epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
|
||||
|
||||
# fix jobserver in Makefile
|
||||
epatch "${FILESDIR}"/${PN}-4.2-jserver.patch
|
||||
|
||||
#Substitute for internal downloading. pciutils copied only due to the only .bz2
|
||||
cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
|
||||
retar-externals || die "re-tar procedure failed"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf="--prefix=${PREFIX}/usr \
|
||||
--libdir=${PREFIX}/usr/$(get_libdir) \
|
||||
--libexecdir=${PREFIX}/usr/libexec \
|
||||
--disable-werror \
|
||||
--disable-xen"
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use custom-cflags || unset CFLAGS
|
||||
if test-flag-CC -fno-strict-overflow; then
|
||||
append-flags -fno-strict-overflow
|
||||
fi
|
||||
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
|
||||
|
||||
if use x86; then
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
|
||||
elif use amd64; then
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
|
||||
if has_multilib_profile; then
|
||||
multilib_toolchain_setup x86
|
||||
emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use x86; then
|
||||
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
|
||||
fi
|
||||
if use amd64; then
|
||||
emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
|
||||
if has_multilib_profile; then
|
||||
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the offical wiki page:"
|
||||
elog "https://wiki.gentoo.org/wiki/Xen"
|
||||
elog "http://wiki.xen.org/wiki/Main_Page"
|
||||
}
|
@ -1,161 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
PYTHON_COMPAT=( python2_7 )
|
||||
PYTHON_REQ_USE='xml,threads'
|
||||
|
||||
inherit flag-o-matic eutils multilib python-single-r1 toolchain-funcs
|
||||
|
||||
XEN_EXTFILES_URL="http://xenbits.xensource.com/xen-extfiles"
|
||||
LIBPCI_URL=ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci
|
||||
GRUB_URL=mirror://gnu-alpha/grub
|
||||
|
||||
UPSTREAM_VER=
|
||||
[[ -n ${UPSTREAM_VER} ]] && \
|
||||
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
|
||||
|
||||
SRC_URI="
|
||||
http://bits.xensource.com/oss-xen/release/${PV}/xen-${PV}.tar.gz
|
||||
$GRUB_URL/grub-0.97.tar.gz
|
||||
$XEN_EXTFILES_URL/zlib-1.2.3.tar.gz
|
||||
$LIBPCI_URL/pciutils-2.2.9.tar.bz2
|
||||
$XEN_EXTFILES_URL/lwip-1.3.0.tar.gz
|
||||
$XEN_EXTFILES_URL/newlib/newlib-1.16.0.tar.gz
|
||||
$XEN_EXTFILES_URL/polarssl-1.1.4-gpl.tgz
|
||||
${UPSTREAM_PATCHSET_URI}"
|
||||
|
||||
S="${WORKDIR}/xen-${PV}"
|
||||
|
||||
DESCRIPTION="allows to boot Xen domU kernels from a menu.lst laying inside guest filesystem"
|
||||
HOMEPAGE="http://xen.org/"
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="custom-cflags"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
DEPEND="sys-devel/gettext
|
||||
sys-devel/bin86
|
||||
sys-apps/texinfo
|
||||
x11-libs/pixman"
|
||||
|
||||
RDEPEND=">=app-emulation/xen-tools-${PV}"
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
retar-externals() {
|
||||
# Purely to unclutter src_prepare
|
||||
local set="grub-0.97.tar.gz lwip-1.3.0.tar.gz newlib-1.16.0.tar.gz polarssl-1.1.4-gpl.tgz zlib-1.2.3.tar.gz"
|
||||
|
||||
# epatch can't patch in $WORKDIR, requires a sed; Bug #455194. Patchable, but sed informative
|
||||
sed -e s':AR=${AR-"ar rc"}:AR=${AR-"ar"}:' \
|
||||
-i "${WORKDIR}"/zlib-1.2.3/configure
|
||||
sed -e 's:^AR=ar rc:AR=ar:' \
|
||||
-e s':$(AR) $@:$(AR) rc $@:' \
|
||||
-i "${WORKDIR}"/zlib-1.2.3/{Makefile,Makefile.in}
|
||||
einfo "zlib Makefile edited"
|
||||
|
||||
cd "${WORKDIR}"
|
||||
tar czp zlib-1.2.3 -f zlib-1.2.3.tar.gz
|
||||
tar czp grub-0.97 -f grub-0.97.tar.gz
|
||||
tar czp lwip -f lwip-1.3.0.tar.gz
|
||||
tar czp newlib-1.16.0 -f newlib-1.16.0.tar.gz
|
||||
tar czp polarssl-1.1.4 -f polarssl-1.1.4-gpl.tgz
|
||||
mv $set "${S}"/stubdom/
|
||||
einfo "tarballs moved to source"
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
# Upstream's patchset
|
||||
if [[ -n ${UPSTREAM_VER} ]]; then
|
||||
einfo "Try to apply Xen Upstream patch set"
|
||||
EPATCH_SUFFIX="patch" \
|
||||
EPATCH_FORCE="yes" \
|
||||
EPATCH_OPTS="-p1" \
|
||||
epatch "${WORKDIR}"/patches-upstream
|
||||
fi
|
||||
|
||||
# if the user *really* wants to use their own custom-cflags, let them
|
||||
if use custom-cflags; then
|
||||
einfo "User wants their own CFLAGS - removing defaults"
|
||||
# try and remove all the default custom-cflags
|
||||
find "${S}" -name Makefile -o -name Rules.mk -o -name Config.mk -exec sed \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O3\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-march=i686\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-fomit-frame-pointer\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-g3*\s\(.*\)/CFLAGS\1=\2 \3/' \
|
||||
-e 's/CFLAGS\(.*\)=\(.*\)-O2\(.*\)/CFLAGS\1=\2\3/' \
|
||||
-i {} \;
|
||||
fi
|
||||
|
||||
# Patch the unmergeable newlib, fix most of the leftover gcc QA issues
|
||||
cp "${FILESDIR}"/newlib-implicits.patch stubdom || die
|
||||
|
||||
# Patch stubdom/Makefile to patch insource newlib & prevent internal downloading
|
||||
epatch "${FILESDIR}"/${PN/-pvgrub/}-4.3-externals.patch
|
||||
|
||||
# fix jobserver in Makefile
|
||||
epatch "${FILESDIR}"/${PN}-4.2-jserver.patch
|
||||
|
||||
#Substitute for internal downloading. pciutils copied only due to the only .bz2
|
||||
cp "${DISTDIR}"/pciutils-2.2.9.tar.bz2 ./stubdom/ || die "pciutils not copied to stubdom"
|
||||
retar-externals || die "re-tar procedure failed"
|
||||
|
||||
epatch_user
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
local myconf="--prefix=${PREFIX}/usr \
|
||||
--libdir=${PREFIX}/usr/$(get_libdir) \
|
||||
--libexecdir=${PREFIX}/usr/libexec \
|
||||
--disable-werror \
|
||||
--disable-xen"
|
||||
|
||||
econf ${myconf}
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use custom-cflags || unset CFLAGS
|
||||
if test-flag-CC -fno-strict-overflow; then
|
||||
append-flags -fno-strict-overflow
|
||||
fi
|
||||
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" -C tools/include
|
||||
|
||||
if use x86; then
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
|
||||
elif use amd64; then
|
||||
emake CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_64" -C stubdom pv-grub
|
||||
if has_multilib_profile; then
|
||||
multilib_toolchain_setup x86
|
||||
emake CC="$(tc-getCC)" AR="$(tc-getAR)" \
|
||||
XEN_TARGET_ARCH="x86_32" -C stubdom pv-grub
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use x86; then
|
||||
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
|
||||
fi
|
||||
if use amd64; then
|
||||
emake XEN_TARGET_ARCH="x86_64" DESTDIR="${D}" -C stubdom install-grub
|
||||
if has_multilib_profile; then
|
||||
emake XEN_TARGET_ARCH="x86_32" DESTDIR="${D}" -C stubdom install-grub
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
elog "Official Xen Guide and the offical wiki page:"
|
||||
elog "https://wiki.gentoo.org/wiki/Xen"
|
||||
elog "http://wiki.xen.org/wiki/Main_Page"
|
||||
}
|
@ -1,13 +1,10 @@
|
||||
DIST ovmf-20151110.tar.bz2 27518370 SHA256 74199f6b5c6f756881323242742c396c52096db5f61700a4eb839343f9ab0604 SHA512 dda185af2fc0b9a8d5fc7e1e96db6aa31807782fe77d38491896164d125c30d2277db3d71a7dce7bbd569723b344b97dfebbc78ddddca0a095721f6b1ae3a1d3 WHIRLPOOL 145fb1c873cce96b81b269b44800987ca1b7350425b682fd5a5799648b0270c6c17bb337ad7e06650e6b66a9ac6eef8d9c9239f1478a687be4af187e60c3f3f5
|
||||
DIST seabios-1.10.0.tar.gz 588213 SHA256 8976fc4c1ebcda66ac96689762247dfc99115a5f7acb3a7d4e18d18ff5de12a9 SHA512 f1b83ce37b59070b488e19f98c95ca9f413cf4969663331b631c3ccb884c90b2db793d32a779ef05cead538c2fd123be4b73391ad2fa20c900a1f14237178d8c WHIRLPOOL 77718eac01a59f94c3fa81195925ae09c19e11f80f107b3387e910408d88d3ffc93eaca3b73d6a52b67514538c0e020b0f4078db8277a5ee6361fd0d3ada8598
|
||||
DIST seabios-1.8.2.tar.gz 538497 SHA256 f59479307fdae840de398b75aacb2333c8eba24a5964d68c77e32ca6c987ee61 SHA512 798d222d5f5725a805cde9e6000b5ce714d0551fd4a3c2642cc6e77b2bdab1a9e239939a358a23bbe0e00112f5ad70696c87d20b90655463c835541fc04e1a00 WHIRLPOOL 9cda0ad502a59dd718c543b759ac3fcf5acb4adee70c3da9bfea95ab188415acf6425827de77f45421ec3be8fd9e0c37fb486e62828217ba3e83f88d942a3f4a
|
||||
DIST xen-4.6.4-upstream-patches-0.tar.xz 15280 SHA256 0f2d55e44e2c98fb7caf76997c05f44fe1efdbf7eaa971a4bf234ea3bc95e244 SHA512 26be1b03af1ac0d6a413b0ab8a30d59c733d6d5c4e29ce3b5b90818a1589cbb5c46a50b9ee42b273ef3b37df8ff403241d68e1e2221ce969054fb7e5f13516ab WHIRLPOOL 52420897c49cd1bcfd8896df45a1f9c8df6337cb68dd7a6ff962361e7ab2eab1e6d6699ae8236b105e6b700b5d5b6c8da302ff477ac6493a60a665e4225cff02
|
||||
DIST xen-4.6.4.tar.gz 19709274 SHA256 b795d5631a85fb68295361067195ecd00003656dacede4ec57533fce33ab5109 SHA512 e6278061a16829628030579e115a500970ff575eb6796189bfa1e2d7a8cbbf8aec2c2bd04c77cdc87226d6cc5eaee59d6c62cacb4e74b06e1f1379734b872938 WHIRLPOOL a982f7bbf2ba16781ac0f310ef27a32e9115596e91117609d22827bc1999facb12df4f33d1ba0b7015cbfae90a24302243d508e8c38ba45ea998341b76ba0567
|
||||
DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
|
||||
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
|
||||
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
|
||||
DIST xen-gentoo-patches-7.tar.xz 24148 SHA256 859fb6b69125c0a1079b35a74bb004dce1b04827b05f056a746cc42c1b187557 SHA512 faf2b0ecd67d545366e2af7e7ecab5f808d02354d07f23cbffe1c3cb80dbb5f88cc4aa140d928ad269612e55c41740ff5bf2af3f0a1f16e375d404c3ffa712b1 WHIRLPOOL d75c35fa10dd1f1567a82c5d5cd7ddabc72def6d74ef7095b7bca9ce9adad2b6ff9c88b55bad7cdefe88da027e5c742f9b9dcafce457cf15f408ea35652546f6
|
||||
DIST xen-gentoo-patches-8.tar.xz 24732 SHA256 6e114f3d3bde31f8595a51bd67fafdbb56cbd60793bafad7061fcaaef67f36fb SHA512 05da32f8fca0a9a43d419c2edd01d0c4abe233c0a8cc02e18caf6490ae9938c4302e8e61f7c67339f5fddab412be69504e1f05de895b73ac8b540914745fefd9 WHIRLPOOL 43d5114f455d2465995e9a1bffe5fff1e722540994348d05a3bac5504a970ad6af447f783ddf271a183207c21e75a0b77b6aed0a8ec8c89446e99ec1b377bcbe
|
||||
DIST xen-gentoo-patches-9.tar.xz 27456 SHA256 67c410d12ef4628a8c0a931e5868b425f2eb4b2f0e307304a75384cbe509734b SHA512 9a797be9dd2392c34b3f6561c2274e116b4f5b114f4520dbbd0b51818c774479ceabb45aa916f93c1a2bc49787f4ca6e6c83bc743baa6bdeef91d77276b20f36 WHIRLPOOL c41cde532726bb55acd05d558b35d575b229d2ee64eba7438f7b196df313f0e44154148c1e47bf6e8c810667b3b237bcfa410371b4bb6f097b981f6b2637ead3
|
||||
DIST xen-ovmf-patches-2.tar.xz 4344 SHA256 495d61d718440057f8b0b54fb57061450dd764c6e87fe5f8bda1785bcddba770 SHA512 0bdc83029a01b613f5c1ca029bd45aebe211c332f09db91a0cc7d6b6f85a81dbbfdc20c62f0d20e973ee41b155a6551a4fad518cb792e1d508bf070e23d6a1d3 WHIRLPOOL 8346d68fa5d2a8e8a5c007b55e2b85cf48df045cc8c4818f09c756d28a52dd856671f37b4a53478e9b96ca9d2eca0c67fd15f009a94d1d2dfed8e83e596d9633
|
||||
DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9
|
||||
|
@ -1,7 +1,4 @@
|
||||
DIST xen-4.6.4-upstream-patches-0.tar.xz 15280 SHA256 0f2d55e44e2c98fb7caf76997c05f44fe1efdbf7eaa971a4bf234ea3bc95e244 SHA512 26be1b03af1ac0d6a413b0ab8a30d59c733d6d5c4e29ce3b5b90818a1589cbb5c46a50b9ee42b273ef3b37df8ff403241d68e1e2221ce969054fb7e5f13516ab WHIRLPOOL 52420897c49cd1bcfd8896df45a1f9c8df6337cb68dd7a6ff962361e7ab2eab1e6d6699ae8236b105e6b700b5d5b6c8da302ff477ac6493a60a665e4225cff02
|
||||
DIST xen-4.6.4.tar.gz 19709274 SHA256 b795d5631a85fb68295361067195ecd00003656dacede4ec57533fce33ab5109 SHA512 e6278061a16829628030579e115a500970ff575eb6796189bfa1e2d7a8cbbf8aec2c2bd04c77cdc87226d6cc5eaee59d6c62cacb4e74b06e1f1379734b872938 WHIRLPOOL a982f7bbf2ba16781ac0f310ef27a32e9115596e91117609d22827bc1999facb12df4f33d1ba0b7015cbfae90a24302243d508e8c38ba45ea998341b76ba0567
|
||||
DIST xen-4.7.1-upstream-patches-0.tar.xz 16420 SHA256 cb4724fedadc408ec390f99e9928a44ec75e793fb55cb97793f09980855b6a32 SHA512 79e117c48c6cc3d5783c818218ac11ec494735ce89755b5e263a64c23fb1f0a425bc65b567a24ce2e348b6e3839b26133c7e2c36411e5cc7acb54b855149dfbe WHIRLPOOL 982165da62cbb28cd72d32662c366ca7dac91a511b356eb58bced4b4af5cbc0d94c7e280a2400e5d9c92938d2afee86abd7c688926c2b9cb191d4554be828844
|
||||
DIST xen-4.7.1.tar.gz 20706864 SHA256 e87f4b0575e78657ee23d31470a15ecf1ce8c3a92a771cda46bbcd4d0d671ffe SHA512 eb03244f5fa7b54402fcc1d38f1e69c0ea4536d5ab2f9859b41b5e94920ad9db20fb146e3c3d3635e9ca1d12e93ce0429e57f24bf53d4a2c4b69babc76ec724e WHIRLPOOL 5d7ba29ea58bdedb6a237f7cb1c0aacf361dc35ebb07ec8e55773e07b1f38c1b151615b526e14daeca7c2db235114bde0b6d124219e8818c6e529873b5151fec
|
||||
DIST xen-4.8.0.tar.gz 22499917 SHA256 1e15c713ab7ba3bfda8b4a285ed973529364fd1100e6dd5a61f29583dc667b04 SHA512 70b95553f9813573b12e52999a4df8701dec430f23c36a8dc70d25a46bb4bc9234e5b7feb74a04062af4c8d6b6bcfe947d90b2b172416206812e54bac9797454 WHIRLPOOL 1296c25a05e3ab81730a2587ea1c07c7c022f05cfefc580224185c8d5fc9853531031c1292f69eff944ae2752492c4b95f13e160be3c449a7626aeadf1a21102
|
||||
DIST xen-security-patches-19.tar.xz 3336 SHA256 497a01fbd20fa45df19b41d337be0a87f4808101ac33cc9649461726abf43720 SHA512 d8a4a8ceeab9e2efedf880e7a2007b312a7f528cdb8fb1f748096621bbdc447ff8ee09b8fbe1aae657ccd7b2557e436cf60f6e70dcaef65e8959204e91f3ec57 WHIRLPOOL 26473bc9d7c2648f78f1fbf722e1ebcf42983d9d0e04d40f66eaad73c5a7ec232a397392dd5f66adb1258c571238a8faf0497ceb468674b93f7f86b91539f9b9
|
||||
DIST xen-security-patches-20.tar.xz 5608 SHA256 5bb4b6d93a07a3aa74497848ecdc9b7f0729f38d8a3e90d964c9aa85851ebfba SHA512 17171ca9f212153e49636c84455ec034b08e73be26f912e43995ac245d1927e6d4aa97a160f96d55f05e2c19c44d7ed8617ad10d8f4f27dc75f8f936624f73ce WHIRLPOOL 68e6f0033102298c31bdca88ac426fbcf3ee986250795404cead9e7577cf9bdb73c153f01d40b5cac31a2e845d862fe1dfcbb9022b550abb00779cf784f9b523
|
||||
|
@ -0,0 +1,39 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit eutils java-pkg-2
|
||||
|
||||
MY_PV_1="${PV/_beta/b}"
|
||||
MY_PV="${MY_PV_1/_rc/}"
|
||||
MY_URI_PV_1="${PV/rc/}"
|
||||
MY_URI_PV="${MY_URI_PV_1//_/%20}"
|
||||
|
||||
DESCRIPTION="Java GUI for managing BibTeX and other bibliographies"
|
||||
HOMEPAGE="http://www.jabref.org/"
|
||||
# SRC_URI="mirror://sourceforge/jabref/JabRef-${MY_PV}.jar"
|
||||
SRC_URI="https://github.com/JabRef/jabref/releases/download/v${PV}/JabRef-${MY_PV}.jar"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
|
||||
RDEPEND=">=virtual/jre-1.8"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
src_unpack() {
|
||||
cp -v "${DISTDIR}/${A}" . || die
|
||||
unzip ${A} images/icons/JabRef-icon-48.png || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
java-pkg_newjar "JabRef-${MY_PV}.jar"
|
||||
java-pkg_dolauncher "${PN}" --jar "${PN}.jar"
|
||||
newicon images/icons/JabRef-icon-48.png JabRef-bin-icon.png
|
||||
make_desktop_entry "${PN}" JabRef-bin JabRef-bin-icon Office
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
From 263d95ce191421a51d4b2d088297700032a8987b Mon Sep 17 00:00:00 2001
|
||||
From: eroen <eroen@occam.eroen.eu>
|
||||
Date: Mon, 19 Dec 2016 19:53:15 +0100
|
||||
Subject: [PATCH] Check for librevenge-stream if tests are enabled
|
||||
|
||||
X-Gentoo-Bug: 603098
|
||||
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=603098
|
||||
---
|
||||
configure.ac | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6e00ed5..ecbd14b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -357,6 +357,8 @@ AS_IF([test "x$with_tools" = "xyes"],[
|
||||
PKG_CHECK_MODULES([REVENGE_GENERATORS],[
|
||||
librevenge-generators-0.0
|
||||
])
|
||||
+])
|
||||
+AS_IF([test "x$with_tools" = "xyes" || test "x$enable_tests" = "xyes"],[
|
||||
PKG_CHECK_MODULES([REVENGE_STREAM],[
|
||||
librevenge-stream-0.0
|
||||
])
|
||||
--
|
||||
2.11.0
|
||||
|
@ -1 +1 @@
|
||||
DIST logmerge-0.4-beta.zip 2270 SHA256 9e17f0a52608b83e882d65ca759520a623fad94dd09b780a32ce440ead4e4be5 SHA512 314b2ffc1f07fe32f17ac2f20861abbf8e43b635fded83ba096ee8b99858e219026b86926c5d3ed693fe1f6e1edd96fd69a2a71dedb7cb63da0aae816a945720 WHIRLPOOL eacd5c4f7d3bbb319271a04269c82d541fdfd8018ca909d2560bc83894131f631838ccc30e7e833f871c795d5184db0710dc23006d5ea0610964834866760525
|
||||
DIST logmerge-0.5.2b.tar.gz 3407 SHA256 f24fe4f6f1c2cb543012e1be360a02eeb9119a1cb2ccc0afe7b5d8edc7ebfdf8 SHA512 9185d52c62d2ea68fee0e1c6fa798cda60b4a2b621436f5060d7c9b3e5b15363fdb1c9fb40351f66dc48173498f3b18035c46fcf58fa3063bad0008b9bb5946f WHIRLPOOL ea469ca6dbf5e51e1ddc98988510f094bac9c69a79e12799399bd7d07b586d2a7269fb6d91fa5e97c9007ecc5d4bca69a7c36af975bd4f787f57fac5991c2866
|
||||
|
@ -1,23 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="5"
|
||||
|
||||
MY_PV="${PV/_/-}"
|
||||
DESCRIPTION="Merge multiple logs such that multilined entries appear in chronological order without breaks"
|
||||
HOMEPAGE="https://github.com/ildar-shaimordanov/logmerge"
|
||||
SRC_URI="https://${PN}.googlecode.com/files/${PN}-${MY_PV}.zip"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
S="${WORKDIR}"
|
||||
|
||||
DEPEND="app-arch/unzip"
|
||||
RDEPEND="dev-lang/perl"
|
||||
|
||||
src_install() {
|
||||
dobin ${PN}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="6"
|
||||
|
||||
DESCRIPTION="Small and powerful script to merge two or more logfiles"
|
||||
HOMEPAGE="https://github.com/ildar-shaimordanov/logmerge"
|
||||
SRC_URI="https://github.com/ildar-shaimordanov/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
|
||||
RDEPEND="dev-lang/perl"
|
||||
|
||||
src_install() {
|
||||
default
|
||||
dobin ${PN}
|
||||
}
|
@ -0,0 +1 @@
|
||||
DIST mcu8051ide-1.4.10.tar.gz 5928583 SHA256 8b9d282b8921ae3d064cc60c2c2a0eb0584ed3c2feb024f96bbf4c39493e85c4 SHA512 686c2b7054475aa38bbbe73ef745303141f038e2d6eca86d548317c130febb6b12d7c0e0737a9b15d2c3f4890bcd0238fffae030c689f8367f3b54821ab52866 WHIRLPOOL ee9b70949378f292a368c778b4240365a44217e338f8d28b262b33c2ac33784c8ae45c04a208e324e100ea3c7edc3703fe710b297d5bfee97d095797f360ac64
|
@ -0,0 +1,30 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit cmake-utils
|
||||
|
||||
DESCRIPTION="Graphical IDE for microcontrollers based on 8051."
|
||||
HOMEPAGE="http://www.moravia-microsystems.com/mcu-8051-ide/"
|
||||
SRC_URI="http://www.moravia-microsystems.com/download/${PN}/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
# The doxygen dependency is suspect, but it appears to be used at runtime.
|
||||
RDEPEND=">=dev-embedded/sdcc-2.5[mcs51]
|
||||
>=app-doc/doxygen-1.7
|
||||
>=dev-util/indent-2.2
|
||||
>=app-text/hunspell-1.3
|
||||
>=dev-tcltk/bwidget-1.8
|
||||
>dev-tcltk/itcl-3.3
|
||||
>=dev-lang/tcl-8.5.9:*
|
||||
>=dev-tcltk/tdom-0.8
|
||||
>=dev-tcltk/tcllib-1.11
|
||||
>=dev-lang/tk-8.5.9:*
|
||||
>=dev-tcltk/tkimg-1.4
|
||||
>=dev-tcltk/tclx-8.4"
|
||||
DEPEND="${RDEPEND}"
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>flameeyes@gentoo.org</email>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<maintainer>
|
||||
<!-- Valid on Gentoo Bugzilla -->
|
||||
<email>martin.osmera@gmail.com</email>
|
||||
<name>Martin Osmera</name>
|
||||
</maintainer>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
@ -1,48 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# ebuild generated by hackport 0.2.12
|
||||
|
||||
EAPI="4"
|
||||
|
||||
CABAL_FEATURES="bootstrap lib profile"
|
||||
inherit haskell-cabal eutils versionator
|
||||
|
||||
MY_PN="Cabal"
|
||||
MY_PV=$(get_version_component_range '1-3')
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="A framework for packaging Haskell software"
|
||||
HOMEPAGE="http://www.haskell.org/cabal/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
||||
IUSE="doc"
|
||||
|
||||
RESTRICT="test" # avoid circular deps
|
||||
|
||||
DEPEND=">=dev-lang/ghc-6.10.1
|
||||
<dev-lang/ghc-7.6.0"
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${MY_PV}"
|
||||
|
||||
CABAL_CORE_LIB_GHC_PV="7.4.0.20111219 7.4.0.20120126 7.4.1 7.4.2"
|
||||
|
||||
src_configure() {
|
||||
if ! cabal-is-dummy-lib; then
|
||||
einfo "Bootstrapping Cabal..."
|
||||
$(ghc-getghc) -i -i. -i"${WORKDIR}/${FP_P}" -cpp --make Setup.hs \
|
||||
-o setup || die "compiling Setup.hs failed"
|
||||
cabal-configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! cabal-is-dummy-lib; then
|
||||
cabal-build
|
||||
fi
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# ebuild generated by hackport 0.3.9999
|
||||
|
||||
CABAL_FEATURES="bootstrap lib profile test-suite"
|
||||
inherit haskell-cabal eutils versionator
|
||||
|
||||
MY_PN="Cabal"
|
||||
MY_PV=$(get_version_component_range '1-4')
|
||||
MY_P="${MY_PN}-${PV}"
|
||||
|
||||
DESCRIPTION="A framework for packaging Haskell software"
|
||||
HOMEPAGE="http://www.haskell.org/cabal/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${MY_PN}/${PV}/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-lang/ghc-6.10.4:="
|
||||
DEPEND="${RDEPEND}
|
||||
test? ( dev-haskell/extensible-exceptions
|
||||
dev-haskell/hunit
|
||||
>=dev-haskell/quickcheck-2.1.0.1
|
||||
dev-haskell/test-framework
|
||||
dev-haskell/test-framework-hunit
|
||||
dev-haskell/test-framework-quickcheck2
|
||||
)"
|
||||
|
||||
RESTRICT="test" # Fails own tests
|
||||
|
||||
RDEPEND="${RDEPEND}"
|
||||
|
||||
S="${WORKDIR}/${MY_PN}-${MY_PV}"
|
||||
|
||||
src_configure() {
|
||||
if ! cabal-is-dummy-lib; then
|
||||
einfo "Bootstrapping Cabal..."
|
||||
$(ghc-getghc) ${HCFLAGS} -i -i. -i"${WORKDIR}/${FP_P}" -cpp --make Setup.hs \
|
||||
-o setup || die "compiling Setup.hs failed"
|
||||
cabal-configure
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! cabal-is-dummy-lib; then
|
||||
cabal-build
|
||||
fi
|
||||
}
|
@ -1,7 +1,2 @@
|
||||
DIST haddock-2.10.0.tar.gz 159750 SHA256 d107dba15e8aee5abcb540b818b5dcb8ced98bae7d0714f50192dba26cadb410 SHA512 0680ffafce7a2e6a24ae85869694ea5c590305007da07cdffd6adb8a837164452cdf2de159c9fdcba059f76fc01f30771237dbcd71dd44d04afc0d2317e28563 WHIRLPOOL b584452acbe6e1c3474c97a62b17621e1ce0ef31574845499ca8b6ebdcf54559fed2b37d1890b80b1d526cc9b45d52b51a9acf6ae0d9472e15f93c1a7ff7ef3f
|
||||
DIST haddock-2.13.1.tar.gz 176831 SHA256 6e5e2295cd191e43a046c12544f2f4e8b4260cfda8282d48b15a7a35d8a24e7f SHA512 2cff54f4a3676c605327a6ad926df51976e7ec2bd512e464d0bf84d24f29fa3078dd5f8006329a4a6913607717c2c45f1db2b63d9e9f655d64cbbe92e0fe35fc WHIRLPOOL d1d9202767f4d5ee68ed100f3b95c9be6bff5024b3155b3dbaf3d1d690ac9dc0be2841ef1ea960c095a30005dc2bbb16046dbc4827c6047ee50ad6b1671ae38f
|
||||
DIST haddock-2.13.2-pregenerated-files.patch 206413 SHA256 dd603527692c12055d6a03c59d414f24dc43a0c56cdb815a0755126586a61f4c SHA512 447d7478365f895028fa56a06695ad71792cb3631fe06b18fb051a6d20d1c829eeff6d2c579c90d4d6b5594f245d2aa4f296bff280e5162f090b9b3f98e780c8 WHIRLPOOL 57bdf7bab4077afe003760015aa9535b4af5f2549f51db1a9d7ca87fd67faa842bd1e0adbfabceffee6ff1cb6ad9b4ec6a34b70630190e89b67900f834538e4f
|
||||
DIST haddock-2.13.2.1.tar.gz 208851 SHA256 c9cfe2bd2e8e1201870f88bc9a2ccdb0173315d0a8c734b459ec344feb1af34e SHA512 91e451264ff1c82c801f32a48f33d9fd808d22135e0ca6c73a0bd5b515ec69f2530ca9566ee11109cdf67005c4f794cf5e12b7743cf72e34e1e76f094a5744e2 WHIRLPOOL 42f4c9e37ed928403b4d228a3288f6c95372965b8875e97106482bbe0163a124b3c6a6fc727030ca5c04d7d5cc8f092c5b304147fc763971f81135a380e8fd70
|
||||
DIST haddock-2.13.2.tar.gz 174973 SHA256 25e7d5819d38cbb1c9b1ff967e2a4093c776c3defaa0a249c8eabba1e70892e3 SHA512 6b70f4cc659858e86919cd35a4e936215a53d23767262e25c7add5986cf21d04a761dc3581fe97c6510b3cb0c9867df3e6fa9668732b55e0e9d56b4932dca330 WHIRLPOOL ff06c0d092cdeaf2ddbffd225d30f53239523cd7d482c73f4b7a20100ebcc4e6b6c329bab5cf828ae2730503cff7709061b04cda29ea034939c5acc59191ac52
|
||||
DIST haddock-2.14.3.0.7.8.3.tar.gz 230282 SHA256 8bcdea48e3fbba6e38d2e629edf230da39d07421424bb1c615198c77623ff2c4 SHA512 62ae4a29c877c3b9742828fcda2f1f045357f41b4a2c495a4791a42d412d41b3d206cdcb73e2d1bd4e95c40371dae865f4eaa37031cda6c1bada5dfed963c2be WHIRLPOOL afd36c8f04aa29c007d83d7c7731098347836daa4e8307710b839ecbc764e191624075df5c3e353c8bcd9f640dfe560a07477bf7909d53ed7e13b34a806efc9a
|
||||
DIST haddock-2.16.1.tar.gz 216323 SHA256 46ecd130cb5ad2b5c7452c843f9b75e976f1416d1cf17e6436d65c2c0bdbd6d6 SHA512 709af410f8746819c8c067f3549d79ba0ecaa312fb6b19acf670a9a3e4c94e94b8e546493e08293eceeb488bc0891a8ebe033a58411c4af935b445cd7f3014b8 WHIRLPOOL 0f60978d1e4303d6586b164ab40236f949c14308a0b0ddec9e63ff9b332835ca846187b65de8c122203ace666450f40d55955a3c287f576611d7df2bc6c9161c
|
||||
|
@ -1,22 +0,0 @@
|
||||
--- haddock-2.10.0-orig/src/Haddock/Lex.x 2012-03-04 03:21:18.000000000 +1100
|
||||
+++ haddock-2.10.0/src/Haddock/Lex.x 2012-05-30 22:19:31.858259148 +1000
|
||||
@@ -181,7 +181,7 @@
|
||||
go inp@(pos, _, str) sc =
|
||||
case alexScan inp sc of
|
||||
AlexEOF -> []
|
||||
- AlexError _ -> error "lexical error"
|
||||
+ AlexError _ -> []
|
||||
AlexSkip inp' _ -> go inp' sc
|
||||
AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
|
||||
|
||||
--- haddock-2.10.0-orig/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-03-04 03:21:21.000000000 +1100
|
||||
+++ haddock-2.10.0/dist/build/haddock/haddock-tmp/Haddock/Lex.hs 2012-05-30 22:23:40.209770708 +1000
|
||||
@@ -131,7 +131,7 @@
|
||||
go inp@(pos, _, str) sc =
|
||||
case alexScan inp sc of
|
||||
AlexEOF -> []
|
||||
- AlexError _ -> error "lexical error"
|
||||
+ AlexError _ -> []
|
||||
AlexSkip inp' _ -> go inp' sc
|
||||
AlexToken inp'@(pos',_,_) len act -> act pos (take len str) sc (\sc -> go inp' sc) dflags
|
||||
|
@ -1,26 +0,0 @@
|
||||
diff --git a/haddock.cabal b/haddock.cabal
|
||||
index 84d3c2a..9587450 100644
|
||||
--- a/haddock.cabal
|
||||
+++ b/haddock.cabal
|
||||
@@ -78,10 +78,6 @@ flag test
|
||||
|
||||
executable haddock
|
||||
default-language: Haskell2010
|
||||
- -- In a GHC tree - in particular, in a source tarball - we don't
|
||||
- -- require alex or happy
|
||||
- if !flag(in-ghc-tree)
|
||||
- build-tools: alex >= 2.3, happy >= 1.18
|
||||
build-depends:
|
||||
base >= 4.3 && < 4.6,
|
||||
filepath,
|
||||
@@ -140,10 +136,6 @@ executable haddock
|
||||
|
||||
library
|
||||
default-language: Haskell2010
|
||||
- -- In a GHC tree - in particular, in a source tarball - we don't
|
||||
- -- require alex or happy
|
||||
- if !flag(in-ghc-tree)
|
||||
- build-tools: alex >= 2.3, happy >= 1.18
|
||||
build-depends:
|
||||
base >= 4.3 && < 4.6,
|
||||
filepath,
|
@ -1,30 +0,0 @@
|
||||
--- haddock-2.10.0-orig/src/Haddock/Interface/Create.hs 2012-03-04 03:21:18.000000000 +1100
|
||||
+++ haddock-2.10.0/src/Haddock/Interface/Create.hs 2012-06-27 00:05:37.874840635 +1000
|
||||
@@ -35,6 +35,7 @@
|
||||
import Name
|
||||
import Bag
|
||||
import RdrName (GlobalRdrEnv)
|
||||
+import TcRnTypes
|
||||
|
||||
|
||||
-- | Use a 'TypecheckedModule' to produce an 'Interface'.
|
||||
@@ -50,6 +51,8 @@
|
||||
instances = modInfoInstances mi
|
||||
exportedNames = modInfoExports mi
|
||||
|
||||
+ (TcGblEnv {tcg_rdr_env = gre}, _) = tm_internals_ tm
|
||||
+
|
||||
-- The renamed source should always be available to us, but it's best
|
||||
-- to be on the safe side.
|
||||
(group_, mayExports, mayDocHeader) <-
|
||||
@@ -59,10 +62,6 @@
|
||||
return (emptyRnGroup, Nothing, Nothing)
|
||||
Just (x, _, y, z) -> return (x, y, z)
|
||||
|
||||
- -- The pattern-match should not fail, because createInterface is only
|
||||
- -- done on loaded modules.
|
||||
- Just gre <- liftGhcToErrMsgGhc $ lookupLoadedHomeModuleGRE (moduleName mdl)
|
||||
-
|
||||
opts0 <- liftErrMsg $ mkDocOpts (haddockOptions dflags) flags mdl
|
||||
let opts
|
||||
| Flag_IgnoreAllExports `elem` flags = OptIgnoreExports : opts0
|
@ -1,13 +0,0 @@
|
||||
--- haddock-2.13.1-orig/haddock.cabal 2012-10-11 21:56:14.000000000 +1100
|
||||
+++ haddock-2.13.1/haddock.cabal 2012-10-11 22:21:37.594323046 +1100
|
||||
@@ -108,10 +108,6 @@
|
||||
|
||||
library
|
||||
default-language: Haskell2010
|
||||
- -- In a GHC tree - in particular, in a source tarball - we don't
|
||||
- -- require alex or happy
|
||||
- if !flag(in-ghc-tree)
|
||||
- build-tools: alex >= 2.3, happy >= 1.18
|
||||
build-depends:
|
||||
base >= 4.3 && < 4.7,
|
||||
filepath,
|
@ -1,56 +0,0 @@
|
||||
--- haddock-2.13.1-orig/src/Haddock/Interface/Rename.hs 2012-10-11 21:56:13.000000000 +1100
|
||||
+++ haddock-2.13.1/src/Haddock/Interface/Rename.hs 2013-01-04 10:55:06.725718923 +1100
|
||||
@@ -271,9 +271,20 @@
|
||||
|
||||
HsTyLit x -> return (HsTyLit x)
|
||||
|
||||
+ HsWrapTy a b -> HsWrapTy a <$> renameType b
|
||||
+ HsRecTy a -> HsRecTy <$> mapM renameConDeclFieldField a
|
||||
+ HsCoreTy a -> pure (HsCoreTy a)
|
||||
+ HsExplicitListTy a b -> HsExplicitListTy a <$> mapM renameLType b
|
||||
+ HsExplicitTupleTy a b -> HsExplicitTupleTy a <$> mapM renameLType b
|
||||
+ HsQuasiQuoteTy a -> HsQuasiQuoteTy <$> renameHsQuasiQuote a
|
||||
+ HsSpliceTy _ _ _ -> error "renameType: HsSpliceTy"
|
||||
+
|
||||
_ -> error "renameType"
|
||||
|
||||
|
||||
+renameHsQuasiQuote :: HsQuasiQuote Name -> RnM (HsQuasiQuote DocName)
|
||||
+renameHsQuasiQuote (HsQuasiQuote a b c) = HsQuasiQuote <$> rename a <*> pure b <*> pure c
|
||||
+
|
||||
renameLTyVarBndrs :: LHsTyVarBndrs Name -> RnM (LHsTyVarBndrs DocName)
|
||||
renameLTyVarBndrs (HsQTvs { hsq_kvs = _, hsq_tvs = tvs })
|
||||
= do { tvs' <- mapM renameLTyVarBndr tvs
|
||||
@@ -398,22 +409,25 @@
|
||||
return (decl { con_name = lname', con_qvars = ltyvars', con_cxt = lcontext'
|
||||
, con_details = details', con_res = restype', con_doc = mbldoc' })
|
||||
where
|
||||
- renameDetails (RecCon fields) = return . RecCon =<< mapM renameField fields
|
||||
+ renameDetails (RecCon fields) = return . RecCon =<< mapM renameConDeclFieldField fields
|
||||
renameDetails (PrefixCon ps) = return . PrefixCon =<< mapM renameLType ps
|
||||
renameDetails (InfixCon a b) = do
|
||||
a' <- renameLType a
|
||||
b' <- renameLType b
|
||||
return (InfixCon a' b')
|
||||
|
||||
- renameField (ConDeclField name t doc) = do
|
||||
- name' <- renameL name
|
||||
- t' <- renameLType t
|
||||
- doc' <- mapM renameLDocHsSyn doc
|
||||
- return (ConDeclField name' t' doc')
|
||||
-
|
||||
renameResType (ResTyH98) = return ResTyH98
|
||||
renameResType (ResTyGADT t) = return . ResTyGADT =<< renameLType t
|
||||
|
||||
+
|
||||
+renameConDeclFieldField :: ConDeclField Name -> RnM (ConDeclField DocName)
|
||||
+renameConDeclFieldField (ConDeclField name t doc) = do
|
||||
+ name' <- renameL name
|
||||
+ t' <- renameLType t
|
||||
+ doc' <- mapM renameLDocHsSyn doc
|
||||
+ return (ConDeclField name' t' doc')
|
||||
+
|
||||
+
|
||||
renameSig :: Sig Name -> RnM (Sig DocName)
|
||||
renameSig sig = case sig of
|
||||
TypeSig lnames ltype -> do
|
@ -1,75 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="4"
|
||||
|
||||
CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
|
||||
inherit eutils haskell-cabal pax-utils
|
||||
|
||||
DESCRIPTION="A documentation-generation tool for Haskell libraries"
|
||||
HOMEPAGE="http://www.haskell.org/haddock/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
# ia64 lost as we don't have ghc-7 there yet
|
||||
# ppc64 needs to be rekeyworded due to xhtml not being keyworded
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-haskell/ghc-paths[profile?]
|
||||
=dev-haskell/xhtml-3000.2*[profile?]
|
||||
>=dev-lang/ghc-7.4"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.14"
|
||||
|
||||
RESTRICT="test" # avoid depends on QC
|
||||
|
||||
CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
|
||||
|
||||
src_prepare() {
|
||||
# we would like to avoid happy and alex depends
|
||||
epatch "${FILESDIR}"/${P}-drop-tools.patch
|
||||
# http://www.mail-archive.com/cvs-ghc@haskell.org/msg37186.html
|
||||
epatch "${FILESDIR}"/${P}-dont-crash-on-unicode-strings-in-doc-comments.patch
|
||||
# http://trac.haskell.org/haddock/ticket/202 fixed by upstream in ghc-7.4
|
||||
# branch only (fix is not in master branch on 20120626)
|
||||
epatch "${FILESDIR}/${P}-ticket-202.patch"
|
||||
|
||||
for f in Lex Parse; do
|
||||
rm "src/Haddock/$f."*
|
||||
mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/
|
||||
done
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# create a fake haddock executable. it'll set the right version to cabal
|
||||
# configure, but will eventually get overwritten in src_compile by
|
||||
# the real executable.
|
||||
local exe="${S}/dist/build/haddock/haddock"
|
||||
mkdir -p $(dirname "${exe}")
|
||||
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
|
||||
chmod +x "${exe}"
|
||||
|
||||
# we use 'nocabaldep' to use ghc's bundled Cabal
|
||||
# as external one is likely to break our haddock
|
||||
# (known to work on 1.16.0 and breaks on 1.16.0.1!)
|
||||
haskell-cabal_src_configure \
|
||||
--with-haddock="${exe}" \
|
||||
--constraint="Cabal == $(cabal-version)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# when building the (recursive..) haddock docs, change the datadir to the
|
||||
# current directory, as we're using haddock inplace even if it's built to be
|
||||
# installed into the system first.
|
||||
haddock_datadir="${S}" haskell-cabal_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cabal_src_install
|
||||
# haddock uses GHC-api to process TH source.
|
||||
# TH requires GHCi which needs mmap('rwx') (bug #299709)
|
||||
pax-mark -m "${D}/usr/bin/${PN}"
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
|
||||
inherit eutils haskell-cabal pax-utils
|
||||
|
||||
DESCRIPTION="A documentation-generation tool for Haskell libraries"
|
||||
HOMEPAGE="http://www.haskell.org/haddock/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
# ia64 lost as we don't have ghc-7 there yet
|
||||
# ppc64 needs to be rekeyworded due to xhtml not being keyworded
|
||||
KEYWORDS="~alpha ~amd64 -ia64 ~ppc ~sparc ~x86 ~x86-fbsd"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-haskell/ghc-paths:=[profile?]
|
||||
=dev-haskell/xhtml-3000.2*:=[profile?]
|
||||
>=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.14"
|
||||
|
||||
RESTRICT="test" # avoid depends on QC
|
||||
|
||||
CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
|
||||
|
||||
src_prepare() {
|
||||
# we would like to avoid happy and alex depends
|
||||
epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
|
||||
# Fix: Ticket #213 Haddock fails when advanced typesystem features are used
|
||||
epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# create a fake haddock executable. it'll set the right version to cabal
|
||||
# configure, but will eventually get overwritten in src_compile by
|
||||
# the real executable.
|
||||
local exe="${S}/dist/build/haddock/haddock"
|
||||
mkdir -p $(dirname "${exe}")
|
||||
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
|
||||
chmod +x "${exe}"
|
||||
|
||||
# we use 'nocabaldep' to use ghc's bundled Cabal
|
||||
# as external one is likely to break our haddock
|
||||
# (known to work on 1.16.0 and breaks on 1.16.0.1!)
|
||||
haskell-cabal_src_configure \
|
||||
--with-haddock="${exe}" \
|
||||
--constraint="Cabal == $(cabal-version)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# when building the (recursive..) haddock docs, change the datadir to the
|
||||
# current directory, as we're using haddock inplace even if it's built to be
|
||||
# installed into the system first.
|
||||
haddock_datadir="${S}" haskell-cabal_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cabal_src_install
|
||||
# haddock uses GHC-api to process TH source.
|
||||
# TH requires GHCi which needs mmap('rwx') (bug #299709)
|
||||
pax-mark -m "${D}/usr/bin/${PN}"
|
||||
}
|
@ -1,74 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
|
||||
inherit eutils haskell-cabal pax-utils
|
||||
|
||||
DESCRIPTION="A documentation-generation tool for Haskell libraries"
|
||||
HOMEPAGE="http://www.haskell.org/haddock/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz
|
||||
https://dev.gentoo.org/~qnikst/patches/dev-haskell-${PN}/${P}-pregenerated-files.patch
|
||||
"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
# ia64 lost as we don't have ghc-7 there yet
|
||||
# ppc64 needs to be rekeyworded due to xhtml not being keyworded
|
||||
# x86-fbsd is lost due xhtml
|
||||
KEYWORDS="amd64 -ia64 x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-haskell/ghc-paths:=[profile?]
|
||||
=dev-haskell/xhtml-3000.2*:=[profile?]
|
||||
>=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.14"
|
||||
|
||||
RESTRICT="test" # avoid depends on QC
|
||||
|
||||
CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
|
||||
|
||||
src_prepare() {
|
||||
# we would like to avoid happy and alex depends
|
||||
epatch "${DISTDIR}"/${P}-pregenerated-files.patch
|
||||
epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
|
||||
# Fix: Ticket #213 Haddock fails when advanced typesystem features are used
|
||||
# epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
|
||||
if use doc && [ ! -e "${S}/html" ]; then
|
||||
ln -s "${S}/resources/html" "${S}/html" || die "Could not create symbolic link ${S}/html"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# create a fake haddock executable. it'll set the right version to cabal
|
||||
# configure, but will eventually get overwritten in src_compile by
|
||||
# the real executable.
|
||||
local exe="${S}/dist/build/haddock/haddock"
|
||||
mkdir -p $(dirname "${exe}")
|
||||
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
|
||||
chmod +x "${exe}"
|
||||
|
||||
# we use 'nocabaldep' to use ghc's bundled Cabal
|
||||
# as external one is likely to break our haddock
|
||||
# (known to work on 1.16.0 and breaks on 1.16.0.1!)
|
||||
haskell-cabal_src_configure \
|
||||
--with-haddock="${exe}" \
|
||||
--constraint="Cabal == $(cabal-version)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# when building the (recursive..) haddock docs, change the datadir to the
|
||||
# current directory, as we're using haddock inplace even if it's built to be
|
||||
# installed into the system first.
|
||||
haddock_datadir="${S}" haskell-cabal_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cabal_src_install
|
||||
# haddock uses GHC-api to process TH source.
|
||||
# TH requires GHCi which needs mmap('rwx') (bug #299709)
|
||||
pax-mark -m "${D}/usr/bin/${PN}"
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep test-suite"
|
||||
inherit eutils haskell-cabal pax-utils
|
||||
|
||||
DESCRIPTION="A documentation-generation tool for Haskell libraries"
|
||||
HOMEPAGE="http://www.haskell.org/haddock/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
# ia64 lost as we don't have ghc-7 there yet
|
||||
# ppc64 needs to be rekeyworded due to xhtml not being keyworded
|
||||
# x86-fbsd is lost due xhtml
|
||||
KEYWORDS="~amd64 -ia64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-haskell/ghc-paths:=[profile?]
|
||||
=dev-haskell/xhtml-3000.2*:=[profile?]
|
||||
>=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.14"
|
||||
|
||||
CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
|
||||
|
||||
src_prepare() {
|
||||
# we would like to avoid happy and alex depends
|
||||
epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
|
||||
# pick pregenerated files
|
||||
for f in Lex Parse; do
|
||||
rm "src/Haddock/$f."* || die
|
||||
mv "dist/build/haddock/haddock-tmp/Haddock/$f.hs" src/Haddock/ || die
|
||||
done
|
||||
rm -r "dist/build/"* || die
|
||||
|
||||
# Fix: Ticket #213 Haddock fails when advanced typesystem features are used
|
||||
# epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
|
||||
if [[ ! -e "${S}/html" ]]; then
|
||||
ln -s resources/html "${S}/html" || die "Could not create symbolic link ${S}/html"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# create a fake haddock executable. it'll set the right version to cabal
|
||||
# configure, but will eventually get overwritten in src_compile by
|
||||
# the real executable.
|
||||
local exe="${S}/dist/build/haddock/haddock"
|
||||
mkdir -p $(dirname "${exe}")
|
||||
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
|
||||
chmod +x "${exe}"
|
||||
|
||||
# we use 'nocabaldep' to use ghc's bundled Cabal
|
||||
# as external one is likely to break our haddock
|
||||
# (known to work on 1.16.0 and breaks on 1.16.0.1!)
|
||||
haskell-cabal_src_configure \
|
||||
--with-haddock="${exe}" \
|
||||
--constraint="Cabal == $(cabal-version)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# when building the (recursive..) haddock docs, change the datadir to the
|
||||
# current directory, as we're using haddock inplace even if it's built to be
|
||||
# installed into the system first.
|
||||
haddock_datadir="${S}" haskell-cabal_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cabal_src_install
|
||||
# haddock uses GHC-api to process TH source.
|
||||
# TH requires GHCi which needs mmap('rwx') (bug #299709)
|
||||
pax-mark -m "${D}/usr/bin/${PN}"
|
||||
}
|
@ -1,71 +0,0 @@
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
CABAL_FEATURES="bin lib profile haddock hscolour nocabaldep"
|
||||
inherit eutils haskell-cabal pax-utils
|
||||
|
||||
DESCRIPTION="A documentation-generation tool for Haskell libraries"
|
||||
HOMEPAGE="http://www.haskell.org/haddock/"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
# ia64 lost as we don't have ghc-7 there yet
|
||||
# ppc64 needs to be rekeyworded due to xhtml not being keyworded
|
||||
# x86-fbsd is lost due xhtml
|
||||
KEYWORDS="~amd64 -ia64 ~x86"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND="dev-haskell/ghc-paths:=[profile?]
|
||||
=dev-haskell/xhtml-3000.2*:=[profile?]
|
||||
>=dev-lang/ghc-7.6:= <dev-lang/ghc-7.7:="
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.14"
|
||||
|
||||
RESTRICT="test" # avoid depends on QC
|
||||
|
||||
CABAL_EXTRA_BUILD_FLAGS+=" --ghc-options=-rtsopts"
|
||||
|
||||
src_prepare() {
|
||||
# we would like to avoid happy and alex depends
|
||||
epatch "${FILESDIR}"/${PN}-2.13.1-drop-tools.patch
|
||||
# Fix: Ticket #213 Haddock fails when advanced typesystem features are used
|
||||
# epatch "${FILESDIR}"/${PN}-2.13.1-renameType.patch
|
||||
if use doc && [ ! -e "${S}/html" ]; then
|
||||
ln -s "${S}/resources/html" "${S}/html" || die "Could not create symbolic link ${S}/html"
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
# create a fake haddock executable. it'll set the right version to cabal
|
||||
# configure, but will eventually get overwritten in src_compile by
|
||||
# the real executable.
|
||||
local exe="${S}/dist/build/haddock/haddock"
|
||||
mkdir -p $(dirname "${exe}")
|
||||
echo -e "#!/bin/sh\necho Haddock version ${PV}" > "${exe}"
|
||||
chmod +x "${exe}"
|
||||
|
||||
# we use 'nocabaldep' to use ghc's bundled Cabal
|
||||
# as external one is likely to break our haddock
|
||||
# (known to work on 1.16.0 and breaks on 1.16.0.1!)
|
||||
haskell-cabal_src_configure \
|
||||
--with-haddock="${exe}" \
|
||||
--constraint="Cabal == $(cabal-version)"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# when building the (recursive..) haddock docs, change the datadir to the
|
||||
# current directory, as we're using haddock inplace even if it's built to be
|
||||
# installed into the system first.
|
||||
haddock_datadir="${S}" haskell-cabal_src_compile
|
||||
}
|
||||
|
||||
src_install() {
|
||||
cabal_src_install
|
||||
# haddock uses GHC-api to process TH source.
|
||||
# TH requires GHCi which needs mmap('rwx') (bug #299709)
|
||||
pax-mark -m "${D}/usr/bin/${PN}"
|
||||
}
|
@ -1,2 +1 @@
|
||||
DIST vector-0.10.0.1.tar.gz 102426 SHA256 ece945058b01a77c5fff31e89bbea76ac619677041c41286a2da5e8b515508af SHA512 2595bee97295a62471de26748c0b598f40a9c5a75571e645c24a8f2bc4eef1d7a3e29d576e7ba9a9dca0fb071f0c178a5a3757e063219d1cf25d8c484e645754 WHIRLPOOL 24617c62582a4eb490e263dc69289e4b24ad18ab6dc6191b3fff52bbcb816cfda9d909c6a62b388daa1f7dd68d7bc9318d1c7618ff7a1a3db0b9cd631cc0ae4b
|
||||
DIST vector-0.10.12.3.tar.gz 103617 SHA256 0f765ce0238d89ffdb67656a364f7bf5012d68de9642da6bb2a425b61f88e89a SHA512 2b2c98f1fbaaf4f5e7243e18a08e373e85acb06dddf73a48d34b966bfd736efc72880babec9c47859bd8d6d6928a28ac9acd9134eb0ef61b2f88fa31bf18811b WHIRLPOOL b572031197f4992ad322c0d47843dbe20dc48372c0e3d1d53a6a0fe03a0c0c3d8f99ce7f13994bb5f5998bb8e9ee1fc225a67b15e63421484a8c371aebec5021
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# ebuild generated by hackport 0.3.9999
|
||||
|
||||
CABAL_FEATURES="lib profile haddock hoogle hscolour"
|
||||
inherit haskell-cabal
|
||||
|
||||
DESCRIPTION="Efficient Arrays"
|
||||
HOMEPAGE="http://code.haskell.org/vector"
|
||||
SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz"
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
|
||||
IUSE=""
|
||||
|
||||
RDEPEND=">=dev-haskell/primitive-0.5.0.1:=[profile?] <dev-haskell/primitive-0.6:=[profile?]
|
||||
>=dev-lang/ghc-6.12.3:= <dev-lang/ghc-7.8
|
||||
ppc? ( >=dev-lang/ghc-7.6.1 )
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
>=dev-haskell/cabal-1.2.3"
|
||||
|
||||
src_prepare() {
|
||||
local can_spec_const="yes"
|
||||
|
||||
ghc-supports-interpreter || can_spec_const="no"
|
||||
|
||||
# ghci-less GHC can't do ANN #482960
|
||||
if [[ ${can_spec_const} == "no" ]]; then
|
||||
einfo "Disabling 'ForceSpecConstr' due to bug #482960"
|
||||
sed -e 's/{-# ANN type SPEC ForceSpecConstr #-}/{- # ANN type SPEC ForceSpecConstr #-}/' \
|
||||
-i Data/Vector/Fusion/Stream/Monadic.hs || die
|
||||
fi
|
||||
}
|
@ -0,0 +1,162 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="6"
|
||||
|
||||
# repoman gives LIVEVCS.unmasked even with EGIT_COMMIT, so create snapshot
|
||||
inherit eutils java-pkg-2 # git-r3
|
||||
|
||||
L_PN="sbt-launch"
|
||||
L_P="${L_PN}-${PV}"
|
||||
|
||||
SV="2.11"
|
||||
|
||||
DESCRIPTION="sbt is a build tool for Scala and Java projects that aims to do the basics well"
|
||||
HOMEPAGE="http://www.scala-sbt.org/"
|
||||
EGIT_COMMIT="v${PV}"
|
||||
EGIT_REPO_URI="https://github.com/sbt/sbt.git"
|
||||
SRC_URI="
|
||||
!binary? (
|
||||
https://dev.gentoo.org/~gienah/snapshots/${P}-src.tar.xz
|
||||
https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
|
||||
https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz
|
||||
http://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/${L_PN}/${PV}/${L_PN}.jar -> ${L_P}.jar
|
||||
)
|
||||
binary? (
|
||||
https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz
|
||||
)"
|
||||
LICENSE="BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="binary"
|
||||
|
||||
DEPEND=">=virtual/jdk-1.8
|
||||
>=dev-lang/scala-2.11.8:${SV}"
|
||||
RDEPEND=">=virtual/jre-1.8
|
||||
>=dev-lang/scala-2.11.8:${SV}"
|
||||
|
||||
# test hangs or fails
|
||||
RESTRICT="test"
|
||||
|
||||
JAVA_GENTOO_CLASSPATH="scala-${SV}"
|
||||
|
||||
# Note: to bump sbt, some things to try are:
|
||||
# 1. Create the sbt src snapshot:
|
||||
# git clone https://github.com/sbt/sbt.git ${P}
|
||||
# cd ${P}
|
||||
# git checkout v${PV}
|
||||
# cd ..
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-src.tar.xz ${P}
|
||||
# 2. remove the https://dev.gentoo.org/~gienah/snapshots/${P}-ivy2-deps.tar.xz
|
||||
# https://dev.gentoo.org/~gienah/snapshots/${P}-sbt-deps.tar.xz and
|
||||
# binary? ( https://dev.gentoo.org/~gienah/files/dist/${P}-gentoo-binary.tar.xz )
|
||||
# from SRC_URI
|
||||
# 3. Comment the sbt publishLocal line in src_compile.
|
||||
# 4. try:
|
||||
# FEATURES='noclean -test' emerge -v -1 dev-java/sbt
|
||||
# It should fail in src_install since the sbt publishLocal is not done.
|
||||
# Check if it downloads more stuff in
|
||||
# src_compile to ${WORKDIR}/.ivy2 and ${WORKDIR}/.sbt.
|
||||
# 5. If some of the downloads fail, it might be necessary to run the sbt compile
|
||||
# again manually to obtain all the dependencies, if so:
|
||||
# cd to ${S}
|
||||
# export EROOT=/
|
||||
# export WORKDIR='/var/tmp/portage/dev-java/${P}/work'
|
||||
# export SV="2.11"
|
||||
# export L_P=${P}
|
||||
# export PATH="/usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
|
||||
# sbt compile
|
||||
# cd ${WORKDIR}
|
||||
# find .ivy2 .sbt -uid 0 -exec chown portage:portage {} \;
|
||||
# 6. cd ${WORKDIR}
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-ivy2-deps.tar.xz .ivy2/cache
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-sbt-deps.tar.xz .sbt
|
||||
# Uncomment the sbt publishLocal line in src_compile.
|
||||
# 7. It *might* download more dependencies for src_test, however the presence
|
||||
# of some of these may cause the src_compile to fail. So download them
|
||||
# seperately as root so we can identify the
|
||||
# additional files. As root:
|
||||
# cd ${S}
|
||||
# ${S}/${P} test
|
||||
# cd ${WORKDIR}
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-test-deps.tar.xz \
|
||||
# $(find .ivy2/cache .sbt -uid 0 -type f -print)
|
||||
# Note: It might not download anything in src_test, in which case
|
||||
# ${P}-test-deps.tar.xz is not required.
|
||||
# 8. Create the binary
|
||||
# cd $WORDKIR
|
||||
# XZ_OPT=-9 tar --owner=portage --group=portage \
|
||||
# -cJf /usr/portage/distfiles/${P}-gentoo-binary.tar.xz ${P} .ivy2/local
|
||||
# 9. Undo the earlier temporary edits to the ebuild.
|
||||
|
||||
src_unpack() {
|
||||
# if ! use binary; then
|
||||
# git-r3_src_unpack
|
||||
# fi
|
||||
# Unpack tar files only.
|
||||
for f in ${A} ; do
|
||||
[[ ${f} == *".tar."* ]] && unpack ${f}
|
||||
done
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
if ! use binary; then
|
||||
mkdir "${WORKDIR}/${L_P}" || die
|
||||
cp -p "${DISTDIR}/${L_P}.jar" "${WORKDIR}/${L_P}/${L_PN}.jar" || die
|
||||
cat <<- EOF > "${WORKDIR}/${L_P}/sbt"
|
||||
#!/bin/sh
|
||||
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
|
||||
java -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \${SBT_OPTS} -jar "${WORKDIR}/${L_P}/sbt-launch.jar" "\$@"
|
||||
EOF
|
||||
cat <<- EOF > "${S}/${P}"
|
||||
#!/bin/sh
|
||||
SBT_OPTS="-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
|
||||
java -Djavac.args="-encoding UTF-8" -Duser.home="${WORKDIR}" \${SBT_OPTS} -jar "${S}/launch/target/sbt-launch.jar" "\$@"
|
||||
EOF
|
||||
chmod u+x "${WORKDIR}/${L_P}/sbt" "${S}/${P}" || die
|
||||
sed -e "s@scalaVersion := scala210,@scalaVersion := scala${SV/./},\n scalaHome := Some(file(\"${EROOT}usr/share/scala-${SV}\")),@" \
|
||||
-i "${S}/build.sbt" || die
|
||||
|
||||
# suppress this warning in build.log:
|
||||
# [warn] Credentials file /var/tmp/portage/dev-java/${P}/work/.bintray/.credentials does not exist
|
||||
mkdir -p "${WORKDIR}/.bintray" || die
|
||||
cat <<- EOF > "${WORKDIR}/.bintray/.credentials"
|
||||
realm = Bintray API Realm
|
||||
host = api.bintray.com
|
||||
user =
|
||||
password =
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
export PATH="${EROOT}usr/share/scala-${SV}/bin:${WORKDIR}/${L_P}:${PATH}"
|
||||
einfo "=== sbt compile ..."
|
||||
"${WORKDIR}/${L_P}/sbt" -Dsbt.log.noformat=true compile || die
|
||||
einfo "=== sbt publishLocal with jdk $(java-pkg_get-vm-version) ..."
|
||||
cat <<- EOF | "${WORKDIR}/${L_P}/sbt" -Dsbt.log.noformat=true || die
|
||||
set every javaVersionPrefix in javaVersionCheck := Some("$(java-pkg_get-vm-version)")
|
||||
publishLocal
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
src_test() {
|
||||
export PATH="${EROOT}usr/share/scala-${SV}/bin:${S}:${PATH}"
|
||||
"${S}/${P}" -Dsbt.log.noformat=true test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
# Place sbt-launch.jar at the end of the CLASSPATH
|
||||
java-pkg_dojar $(find "${WORKDIR}"/.ivy2/local -name \*.jar -print | grep -v sbt-launch.jar) \
|
||||
$(find "${WORKDIR}"/.ivy2/local -name sbt-launch.jar -print)
|
||||
local ja="-Dsbt.version=${PV} -Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled"
|
||||
java-pkg_dolauncher sbt --jar sbt-launch.jar --java_args "${ja}"
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
Workaround headers problem in Darwin 8 as well.
|
||||
|
||||
--- rts/PosixSource.h
|
||||
+++ rts/PosixSource.h
|
||||
@@ -11,6 +11,13 @@
|
||||
|
||||
#include <ghcplatform.h>
|
||||
|
||||
+#if defined(darwin_HOST_OS)
|
||||
+/* unfortunately the hack below only works for Darwin 9 and
|
||||
+ * above, so as hack include sys/types early (before setting
|
||||
+ * _POSIX_C_SOURCE) (this obviously obsoletes the hack below) */
|
||||
+#include <sys/types.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined(freebsd_HOST_OS)
|
||||
#define _POSIX_C_SOURCE 200112L
|
||||
#define _XOPEN_SOURCE 600
|
@ -1,89 +0,0 @@
|
||||
diff --git a/rts/RaiseAsync.c b/rts/RaiseAsync.c
|
||||
index 3b206ff..08c031c 100644
|
||||
--- a/rts/RaiseAsync.c
|
||||
+++ b/rts/RaiseAsync.c
|
||||
@@ -56,7 +56,8 @@ static void throwToSendMsg (Capability *cap USED_IF_THREADS,
|
||||
|
||||
static void
|
||||
throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
|
||||
- rtsBool stop_at_atomically, StgUpdateFrame *stop_here)
|
||||
+ rtsBool stop_at_atomically, StgUpdateFrame *stop_here,
|
||||
+ rtsBool dequeue)
|
||||
{
|
||||
// Thread already dead?
|
||||
if (tso->what_next == ThreadComplete || tso->what_next == ThreadKilled) {
|
||||
@@ -64,7 +65,9 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
|
||||
}
|
||||
|
||||
// Remove it from any blocking queues
|
||||
- removeFromQueues(cap,tso);
|
||||
+ if (dequeue) {
|
||||
+ removeFromQueues(cap,tso);
|
||||
+ }
|
||||
|
||||
raiseAsync(cap, tso, exception, stop_at_atomically, stop_here);
|
||||
}
|
||||
@@ -72,20 +75,26 @@ throwToSingleThreaded__ (Capability *cap, StgTSO *tso, StgClosure *exception,
|
||||
void
|
||||
throwToSingleThreaded (Capability *cap, StgTSO *tso, StgClosure *exception)
|
||||
{
|
||||
- throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL);
|
||||
+ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsTrue);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
+throwToSingleThreadedNoDequeue (Capability *cap, StgTSO *tso, StgClosure *exception)
|
||||
+{
|
||||
+ throwToSingleThreaded__(cap, tso, exception, rtsFalse, NULL, rtsFalse);
|
||||
}
|
||||
|
||||
void
|
||||
throwToSingleThreaded_ (Capability *cap, StgTSO *tso, StgClosure *exception,
|
||||
rtsBool stop_at_atomically)
|
||||
{
|
||||
- throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL);
|
||||
+ throwToSingleThreaded__ (cap, tso, exception, stop_at_atomically, NULL, rtsTrue);
|
||||
}
|
||||
|
||||
void // cannot return a different TSO
|
||||
suspendComputation (Capability *cap, StgTSO *tso, StgUpdateFrame *stop_here)
|
||||
{
|
||||
- throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here);
|
||||
+ throwToSingleThreaded__ (cap, tso, NULL, rtsFalse, stop_here, rtsTrue);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
diff --git a/rts/RaiseAsync.h b/rts/RaiseAsync.h
|
||||
index 6bfed8d..2e8a7a3 100644
|
||||
--- a/rts/RaiseAsync.h
|
||||
+++ b/rts/RaiseAsync.h
|
||||
@@ -23,6 +23,10 @@ void throwToSingleThreaded (Capability *cap,
|
||||
StgTSO *tso,
|
||||
StgClosure *exception);
|
||||
|
||||
+void throwToSingleThreadedNoDequeue (Capability *cap,
|
||||
+ StgTSO *tso,
|
||||
+ StgClosure *exception);
|
||||
+
|
||||
void throwToSingleThreaded_ (Capability *cap,
|
||||
StgTSO *tso,
|
||||
StgClosure *exception,
|
||||
diff --git a/rts/posix/Select.c b/rts/posix/Select.c
|
||||
index 4b19235..6889499 100644
|
||||
--- a/rts/posix/Select.c
|
||||
+++ b/rts/posix/Select.c
|
||||
@@ -412,8 +412,12 @@ awaitEvent(rtsBool wait)
|
||||
IF_DEBUG(scheduler,
|
||||
debugBelch("Killing blocked thread %lu on bad fd=%i\n",
|
||||
(unsigned long)tso->id, fd));
|
||||
- throwToSingleThreaded(&MainCapability, tso,
|
||||
- (StgClosure *)blockedOnBadFD_closure);
|
||||
+ /*
|
||||
+ * We can't use throwToSingleThreaded() here
|
||||
+ * as 'RTS_FD_IS_READY' breaks blocked_queue_hd list
|
||||
+ */
|
||||
+ throwToSingleThreadedNoDequeue(&MainCapability, tso,
|
||||
+ (StgClosure *)blockedOnBadFD_closure);
|
||||
break;
|
||||
case RTS_FD_IS_READY:
|
||||
IF_DEBUG(scheduler,
|
@ -1,13 +0,0 @@
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index 11bb003..52df243 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -1545,7 +1545,7 @@ case "$1" in
|
||||
freebsd|netbsd|openbsd|dragonfly|osf1|osf3|hpux|linuxaout|kfreebsdgnu|freebsd2|solaris2|cygwin32|mingw32|darwin|gnu|nextstep2|nextstep3|sunos4|ultrix|irix|aix|haiku)
|
||||
$2="$1"
|
||||
;;
|
||||
- freebsd8) # like i686-gentoo-freebsd8
|
||||
+ freebsd*) # like i686-gentoo-freebsd8 or i686-gentoo-freebsd8.2
|
||||
$2="freebsd"
|
||||
;;
|
||||
darwin*)
|
@ -1,23 +0,0 @@
|
||||
diff --git a/aclocal.m4 b/aclocal.m4
|
||||
index a377cb9..4f8fd69 100644
|
||||
--- a/aclocal.m4
|
||||
+++ b/aclocal.m4
|
||||
@@ -1950,17 +1950,7 @@ AC_DEFUN([XCODE_VERSION],[
|
||||
# --------------------------------
|
||||
# Finds where gcc is
|
||||
AC_DEFUN([FIND_GCC],[
|
||||
- if test "$TargetOS_CPP" = "darwin" &&
|
||||
- test "$XCodeVersion1" -eq 4 &&
|
||||
- test "$XCodeVersion2" -lt 2
|
||||
- then
|
||||
- # In Xcode 4.1, 'gcc-4.2' is the gcc legacy backend (rather
|
||||
- # than the LLVM backend). We prefer the legacy gcc, but in
|
||||
- # Xcode 4.2 'gcc-4.2' was removed.
|
||||
- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc-4.2])
|
||||
- else
|
||||
- FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
|
||||
- fi
|
||||
+ FP_ARG_WITH_PATH_GNU_PROG([CC], [gcc])
|
||||
export CC
|
||||
WhatGccIsCalled="$CC"
|
||||
AC_SUBST(WhatGccIsCalled)
|
@ -1,18 +0,0 @@
|
||||
like the other CHOST patches, but this one catches another case where
|
||||
$host is used (instead of the cannonicalised variables)
|
||||
|
||||
--- aclocal.m4
|
||||
+++ aclocal.m4
|
||||
@@ -93,10 +93,10 @@
|
||||
exeext='.exe'
|
||||
soext='.dll'
|
||||
;;
|
||||
- i386-apple-darwin|powerpc-apple-darwin)
|
||||
+ i386-apple-darwin*|powerpc-apple-darwin*)
|
||||
soext='.dylib'
|
||||
;;
|
||||
- x86_64-apple-darwin)
|
||||
+ x86_64-apple-darwin*)
|
||||
soext='.dylib'
|
||||
;;
|
||||
esac
|
@ -1,28 +0,0 @@
|
||||
From 26f8466507bd9383e0a7d1e62e397eca4a13822a Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Tue, 13 Nov 2012 01:39:14 +0300
|
||||
Subject: [PATCH] Fix unaligned access on alpha and friends (ticket #7339)
|
||||
|
||||
Assume unknown arch (alpha and mips) an alignment sensitive target.
|
||||
Otherwise on alpha it causes ghc-7.4.1 to generate invalud lexers.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
---
|
||||
compiler/cmm/PprC.hs | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
|
||||
index 21826f8..8cdcde6 100644
|
||||
--- a/compiler/cmm/PprC.hs
|
||||
+++ b/compiler/cmm/PprC.hs
|
||||
@@ -963,6 +963,7 @@ cLoad platform expr rep
|
||||
| otherwise
|
||||
= char '*' <> parens (cCast platform (machRepPtrCType rep) expr)
|
||||
where -- On these platforms, unaligned loads are known to cause problems
|
||||
+ bewareLoadStoreAlignment ArchUnknown = True -- like alpha or mips
|
||||
bewareLoadStoreAlignment (ArchARM {}) = True
|
||||
bewareLoadStoreAlignment _ = False
|
||||
|
||||
--
|
||||
1.8.0
|
||||
|
@ -1,119 +0,0 @@
|
||||
Make ghc use the libffi installed on the system instead of the bundled one.
|
||||
|
||||
This patch is based on the one used by Debian and Fedora, but was
|
||||
augmented by additional lines to identify the libffi include directory
|
||||
using pkg-config, as libffi on Gentoo installs into a subdirectory of
|
||||
the system include directory.
|
||||
|
||||
2012-04-24 Martin von Gagern
|
||||
|
||||
References:
|
||||
https://bugs.gentoo.org/411925
|
||||
http://hackage.haskell.org/trac/ghc/ticket/5743
|
||||
|
||||
Index: ghc-7.4.1/ghc.mk
|
||||
===================================================================
|
||||
--- ghc-7.4.1.orig/ghc.mk
|
||||
+++ ghc-7.4.1/ghc.mk
|
||||
@@ -579,7 +579,6 @@ BUILD_DIRS += \
|
||||
driver/ghci \
|
||||
driver/ghc \
|
||||
driver/haddock \
|
||||
- libffi \
|
||||
includes \
|
||||
rts
|
||||
|
||||
Index: ghc-7.4.1/rts/ghc.mk
|
||||
===================================================================
|
||||
--- ghc-7.4.1.orig/rts/ghc.mk
|
||||
+++ ghc-7.4.1/rts/ghc.mk
|
||||
@@ -86,8 +86,7 @@
|
||||
ALL_RTS_DEF_LIBNAMES = base ghc-prim
|
||||
ALL_RTS_DEF_LIBS = \
|
||||
rts/dist/build/win32/libHSbase.dll.a \
|
||||
- rts/dist/build/win32/libHSghc-prim.dll.a \
|
||||
- libffi/build/inst/lib/libffi.dll.a
|
||||
+ rts/dist/build/win32/libHSghc-prim.dll.a
|
||||
|
||||
# -- import libs for the regular Haskell libraries
|
||||
define make-importlib-def # args $1 = lib name
|
||||
@@ -172,12 +171,12 @@
|
||||
# Making a shared library for the RTS.
|
||||
ifneq "$$(findstring dyn, $1)" ""
|
||||
ifeq "$$(HOSTPLATFORM)" "i386-unknown-mingw32"
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/libffi-5.dll
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
|
||||
@@ -188,9 +187,9 @@
|
||||
endif
|
||||
endif
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
|
||||
endif
|
||||
|
||||
@@ -403,6 +402,12 @@
|
||||
rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
|
||||
rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
|
||||
|
||||
+# Use system libffi
|
||||
+libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
|
||||
+rts/Adjustor_CC_OPTS += $(libffi_include_flags)
|
||||
+rts/Interpreter_CC_OPTS += $(libffi_include_flags)
|
||||
+rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
|
||||
+
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add PAPI library if needed
|
||||
|
||||
@@ -504,10 +509,8 @@
|
||||
# installing
|
||||
|
||||
INSTALL_LIBS += $(ALL_RTS_LIBS)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
|
||||
|
||||
-install: install_libffi_headers
|
||||
+install:
|
||||
|
||||
.PHONY: install_libffi_headers
|
||||
install_libffi_headers :
|
||||
Index: ghc-7.4.1/rts/package.conf.in
|
||||
===================================================================
|
||||
--- ghc-7.4.1.orig/rts/package.conf.in
|
||||
+++ ghc-7.4.1/rts/package.conf.in
|
||||
@@ -24,8 +24,9 @@
|
||||
hs-libraries: "HSrts"
|
||||
|
||||
extra-libraries:
|
||||
+ "ffi"
|
||||
#ifdef HAVE_LIBM
|
||||
- "m" /* for ldexp() */
|
||||
+ , "m" /* for ldexp() */
|
||||
#endif
|
||||
#ifdef HAVE_LIBRT
|
||||
, "rt"
|
||||
Index: ghc-7.4.1/compiler/ghc.mk
|
||||
===================================================================
|
||||
--- ghc-7.4.1.orig/compiler/ghc.mk
|
||||
+++ ghc-7.4.1/compiler/ghc.mk
|
||||
@@ -260,6 +260,8 @@
|
||||
|
||||
compiler_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
|
||||
compiler_CPP_OPTS += ${GhcCppOpts}
|
||||
+libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
|
||||
+compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
|
||||
|
||||
$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
|
||||
$(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
|
@ -1,88 +0,0 @@
|
||||
--- ghc-7.5.20120505-orig/ghc.mk 2012-05-06 03:01:29.000000000 +1000
|
||||
+++ ghc-7.5.20120505/ghc.mk 2012-05-06 17:22:01.023416003 +1000
|
||||
@@ -584,7 +584,6 @@
|
||||
$(MAYBE_GHCI) \
|
||||
driver/ghc \
|
||||
driver/haddock \
|
||||
- libffi \
|
||||
includes \
|
||||
rts
|
||||
|
||||
--- ghc-7.5.20120505-orig/rts/ghc.mk 2012-05-06 03:01:30.000000000 +1000
|
||||
+++ ghc-7.5.20120505/rts/ghc.mk 2012-05-06 17:28:31.925897226 +1000
|
||||
@@ -171,12 +171,12 @@
|
||||
# Making a shared library for the RTS.
|
||||
ifneq "$$(findstring dyn, $1)" ""
|
||||
ifeq "$$(HostOS_CPP)" "mingw32"
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
|
||||
@@ -187,9 +187,9 @@
|
||||
endif
|
||||
endif
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
|
||||
endif
|
||||
|
||||
@@ -407,6 +407,12 @@
|
||||
rts/dist/build/sm/Evac_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
|
||||
rts/dist/build/sm/Scav_thr_CC_OPTS += -DPARALLEL_GC -Irts/sm
|
||||
|
||||
+# Use system libffi
|
||||
+libffi_include_flags:=$(shell pkg-config --cflags-only-I libffi)
|
||||
+rts/Adjustor_CC_OPTS += $(libffi_include_flags)
|
||||
+rts/Interpreter_CC_OPTS += $(libffi_include_flags)
|
||||
+rts/sm/Storage_CC_OPTS += $(libffi_include_flags)
|
||||
+
|
||||
#-----------------------------------------------------------------------------
|
||||
# Add PAPI library if needed
|
||||
|
||||
@@ -508,10 +514,8 @@
|
||||
# installing
|
||||
|
||||
INSTALL_LIBS += $(ALL_RTS_LIBS)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
|
||||
|
||||
-install: install_libffi_headers
|
||||
+install:
|
||||
|
||||
.PHONY: install_libffi_headers
|
||||
install_libffi_headers :
|
||||
--- ghc-7.5.20120505-orig/rts/package.conf.in 2012-05-06 03:01:30.000000000 +1000
|
||||
+++ ghc-7.5.20120505/rts/package.conf.in 2012-05-06 17:22:01.025416056 +1000
|
||||
@@ -24,8 +24,9 @@
|
||||
hs-libraries: "HSrts"
|
||||
|
||||
extra-libraries:
|
||||
+ "ffi"
|
||||
#ifdef HAVE_LIBM
|
||||
- "m" /* for ldexp() */
|
||||
+ , "m" /* for ldexp() */
|
||||
#endif
|
||||
#ifdef HAVE_LIBRT
|
||||
, "rt"
|
||||
--- ghc-7.5.20120505-orig/compiler/ghc.mk 2012-05-06 03:01:29.000000000 +1000
|
||||
+++ ghc-7.5.20120505/compiler/ghc.mk 2012-05-06 17:22:01.026416083 +1000
|
||||
@@ -260,6 +260,8 @@
|
||||
|
||||
compiler_CPP_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS))
|
||||
compiler_CPP_OPTS += ${GhcCppOpts}
|
||||
+libffi_include_flags := $(shell pkg-config --cflags-only-I libffi)
|
||||
+compiler/ghci/LibFFI_HSC2HS_OPTS += $(addprefix --cflag=,$(libffi_include_flags))
|
||||
|
||||
$(PRIMOPS_TXT) compiler/parser/Parser.y: %: %.pp compiler/stage1/$(PLATFORM_H)
|
||||
$(CPP) $(RAWCPP_FLAGS) -P $(compiler_CPP_OPTS) -x c $< | grep -v '^#pragma GCC' > $@
|
@ -1,57 +0,0 @@
|
||||
commit de13417726b90b0945aaaf0b9cfbaf8ab975d8b5
|
||||
Author: Gabor Greif <ggreif@gmail.com>
|
||||
Date: Tue Jul 24 14:31:36 2012 +0200
|
||||
|
||||
track integer-gmp and add 'divInteger', 'modInteger'
|
||||
|
||||
diff --git a/libraries/integer-simple/GHC/Integer.hs b/libraries/integer-simple/GHC/Integer.hs
|
||||
index c9b50a7..4122d38 100644
|
||||
--- a/libraries/integer-simple/GHC/Integer.hs
|
||||
+++ b/libraries/integer-simple/GHC/Integer.hs
|
||||
@@ -4,7 +4,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
-- Module : GHC.Integer
|
||||
--- Copyright : (c) Ian Lynagh 2007-2008
|
||||
+-- Copyright : (c) Ian Lynagh 2007-2012
|
||||
-- License : BSD3
|
||||
--
|
||||
-- Maintainer : igloo@earth.li
|
||||
@@ -27,6 +27,7 @@ module GHC.Integer (
|
||||
plusInteger, minusInteger, timesInteger, negateInteger,
|
||||
eqInteger, neqInteger, absInteger, signumInteger,
|
||||
leInteger, gtInteger, ltInteger, geInteger, compareInteger,
|
||||
+ divInteger, modInteger,
|
||||
divModInteger, quotRemInteger, quotInteger, remInteger,
|
||||
encodeFloatInteger, decodeFloatInteger, floatFromInteger,
|
||||
encodeDoubleInteger, decodeDoubleInteger, doubleFromInteger,
|
||||
diff --git a/libraries/integer-simple/GHC/Integer/Type.hs b/libraries/integer-simple/GHC/Integer/Type.hs
|
||||
index c3d812c..67ed19c 100644
|
||||
--- a/libraries/integer-simple/GHC/Integer/Type.hs
|
||||
+++ b/libraries/integer-simple/GHC/Integer/Type.hs
|
||||
@@ -7,7 +7,7 @@
|
||||
-----------------------------------------------------------------------------
|
||||
-- |
|
||||
-- Module : GHC.Integer.Type
|
||||
--- Copyright : (c) Ian Lynagh 2007-2008
|
||||
+-- Copyright : (c) Ian Lynagh 2007-2012
|
||||
-- License : BSD3
|
||||
--
|
||||
-- Maintainer : igloo@earth.li
|
||||
@@ -370,6 +370,16 @@ n `divModInteger` d =
|
||||
then (# q `minusInteger` oneInteger, r `plusInteger` d #)
|
||||
else (# q, r #)
|
||||
|
||||
+{-# NOINLINE divInteger #-}
|
||||
+divInteger :: Integer -> Integer -> Integer
|
||||
+n `divInteger` d = quotient
|
||||
+ where (# quotient, _ #) = n `divModInteger` d
|
||||
+
|
||||
+{-# NOINLINE modInteger #-}
|
||||
+modInteger :: Integer -> Integer -> Integer
|
||||
+n `modInteger` d = modulus
|
||||
+ where (# _, modulus #) = n `divModInteger` d
|
||||
+
|
||||
{-# NOINLINE quotRemInteger #-}
|
||||
quotRemInteger :: Integer -> Integer -> (# Integer, Integer #)
|
||||
Naught `quotRemInteger` (!_) = (# Naught, Naught #)
|
@ -1,387 +0,0 @@
|
||||
The patch set adds support for weak symbols to ghci.
|
||||
|
||||
For gentoo it fixes nonworking ghci / template haskell
|
||||
for package base.
|
||||
|
||||
Steps to reproduce:
|
||||
1. CFLAGS=-Os emerge ghc
|
||||
2. ghci -package base
|
||||
Loading package base ... linking ... ghc: /usr/lib64/ghc-7.6.3/base-4.6.0.1/HSbase-4.6.0.1.o: unknown symbol `stat'
|
||||
|
||||
When built with -O2 weak 'stat' resolved to '__xstat' and we don't see any errors.
|
||||
But on olwer optimization levels 'stat' remains.
|
||||
|
||||
Patches-by: akio
|
||||
Gentoo-bug: http://bugs.gentoo.org/452442
|
||||
Upstream-bug: http://ghc.haskell.org/trac/ghc/ticket/3333
|
||||
|
||||
From 500d57d3a18412c78cab5abc4d91f1564edc964d Mon Sep 17 00:00:00 2001
|
||||
From: Takano Akio <aljee@hyper.cx>
|
||||
Date: Sat, 29 Dec 2012 11:47:22 +0900
|
||||
Subject: [PATCH 1/3] Linker.c: remove stablehash, which is no longer used
|
||||
|
||||
---
|
||||
includes/rts/Linker.h | 3 ---
|
||||
rts/Linker.c | 31 ++-----------------------------
|
||||
2 files changed, 2 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/includes/rts/Linker.h b/includes/rts/Linker.h
|
||||
index e900e85..d20ebc2 100644
|
||||
--- a/includes/rts/Linker.h
|
||||
+++ b/includes/rts/Linker.h
|
||||
@@ -23,9 +23,6 @@ typedef char pathchar;
|
||||
/* initialize the object linker */
|
||||
void initLinker( void );
|
||||
|
||||
-/* insert a stable symbol in the hash table */
|
||||
-void insertStableSymbol(pathchar* obj_name, char* key, StgPtr data);
|
||||
-
|
||||
/* insert a symbol in the hash table */
|
||||
void insertSymbol(pathchar* obj_name, char* key, void* data);
|
||||
|
||||
diff --git a/rts/Linker.c b/rts/Linker.c
|
||||
index fa1de89..513fe3f 100644
|
||||
--- a/rts/Linker.c
|
||||
+++ b/rts/Linker.c
|
||||
@@ -30,1 +30,0 @@
|
||||
-#include "Stable.h"
|
||||
@@ -150,9 +149,6 @@ int dynamicByDefault = 0;
|
||||
/* Hash table mapping symbol names to Symbol */
|
||||
static /*Str*/HashTable *symhash;
|
||||
|
||||
-/* Hash table mapping symbol names to StgStablePtr */
|
||||
-static /*Str*/HashTable *stablehash;
|
||||
-
|
||||
/* List of currently loaded objects */
|
||||
ObjectCode *objects = NULL; /* initially empty */
|
||||
|
||||
@@ -1126,1 +1126,0 @@ typedef struct _RtsSymbolVal {
|
||||
- SymI_HasProto(insertStableSymbol) \
|
||||
@@ -1488,7 +1483,6 @@ initLinker( void )
|
||||
#if defined(THREADED_RTS) && (defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO))
|
||||
initMutex(&dl_mutex);
|
||||
#endif
|
||||
- stablehash = allocStrHashTable();
|
||||
symhash = allocStrHashTable();
|
||||
|
||||
/* populate the symbol table with stuff from the RTS */
|
||||
@@ -1817,17 +1811,6 @@ error:
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
- * insert a stable symbol in the hash table
|
||||
- */
|
||||
-
|
||||
-void
|
||||
-insertStableSymbol(pathchar* obj_name, char* key, StgPtr p)
|
||||
-{
|
||||
- ghciInsertStrHashTable(obj_name, stablehash, key, getStablePtr(p));
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/* -----------------------------------------------------------------------------
|
||||
* insert a symbol in the hash table
|
||||
*/
|
||||
void
|
||||
@@ -4749,8 +4732,6 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
|
||||
#ifdef i386_HOST_ARCH
|
||||
Elf_Addr value;
|
||||
#endif
|
||||
- StgStablePtr stablePtr;
|
||||
- StgPtr stableVal;
|
||||
#ifdef arm_HOST_ARCH
|
||||
int is_target_thm=0, T=0;
|
||||
#endif
|
||||
@@ -4773,16 +4754,8 @@ do_Elf_Rel_relocations ( ObjectCode* oc, char* ehdrC,
|
||||
|
||||
} else {
|
||||
symbol = strtab + sym.st_name;
|
||||
- stablePtr = (StgStablePtr)lookupHashTable(stablehash, (StgWord)symbol);
|
||||
- if (NULL == stablePtr) {
|
||||
- /* No, so look up the name in our global table. */
|
||||
- S_tmp = lookupSymbol( symbol );
|
||||
- S = (Elf_Addr)S_tmp;
|
||||
- } else {
|
||||
- stableVal = deRefStablePtr( stablePtr );
|
||||
- S_tmp = stableVal;
|
||||
- S = (Elf_Addr)S_tmp;
|
||||
- }
|
||||
+ S_tmp = lookupSymbol( symbol );
|
||||
+ S = (Elf_Addr)S_tmp;
|
||||
}
|
||||
if (!S) {
|
||||
errorBelch("%s: unknown symbol `%s'", oc->fileName, symbol);
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
From 2e5e0f7a90dd390adc5ae5fb2a3bc6e879aa42d6 Mon Sep 17 00:00:00 2001
|
||||
From: Takano Akio <aljee@hyper.cx>
|
||||
Date: Sat, 29 Dec 2012 11:59:34 +0900
|
||||
Subject: [PATCH 2/3] ghci: add support for ELF weak symbols
|
||||
|
||||
---
|
||||
rts/Linker.c | 102 ++++++++++++++++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 78 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/rts/Linker.c b/rts/Linker.c
|
||||
index 513fe3f..5105085 100644
|
||||
--- a/rts/Linker.c
|
||||
+++ b/rts/Linker.c
|
||||
@@ -146,7 +146,13 @@ int dynamicByDefault = 1;
|
||||
int dynamicByDefault = 0;
|
||||
#endif
|
||||
|
||||
-/* Hash table mapping symbol names to Symbol */
|
||||
+typedef struct _RtsSymbolInfo {
|
||||
+ void *value;
|
||||
+ const ObjectCode *owner;
|
||||
+ HsBool weak;
|
||||
+} RtsSymbolInfo;
|
||||
+
|
||||
+/* Hash table mapping symbol names to RtsSymbolInfo */
|
||||
static /*Str*/HashTable *symhash;
|
||||
|
||||
/* List of currently loaded objects */
|
||||
@@ -1415,15 +1421,31 @@ static RtsSymbolVal rtsSyms[] = {
|
||||
* Insert symbols into hash tables, checking for duplicates.
|
||||
*/
|
||||
|
||||
-static void ghciInsertStrHashTable ( pathchar* obj_name,
|
||||
- HashTable *table,
|
||||
- char* key,
|
||||
- void *data
|
||||
- )
|
||||
+static void ghciInsertSymbolTable(
|
||||
+ pathchar* obj_name,
|
||||
+ HashTable *table,
|
||||
+ char* key,
|
||||
+ void *data,
|
||||
+ HsBool weak,
|
||||
+ ObjectCode *owner)
|
||||
{
|
||||
- if (lookupHashTable(table, (StgWord)key) == NULL)
|
||||
+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
|
||||
+ if (!pinfo) /* new entry */
|
||||
+ {
|
||||
+ pinfo = stgMallocBytes(sizeof (*pinfo), "ghciInsertToSymbolTable");
|
||||
+ pinfo->value = data;
|
||||
+ pinfo->owner = owner;
|
||||
+ pinfo->weak = weak;
|
||||
+ insertStrHashTable(table, key, pinfo);
|
||||
+ return;
|
||||
+ } else if ((!pinfo->weak || pinfo->value) && weak) {
|
||||
+ return; /* duplicate weak symbol, throw it away */
|
||||
+ } else if (pinfo->weak) /* weak symbol is in the table */
|
||||
{
|
||||
- insertStrHashTable(table, (StgWord)key, data);
|
||||
+ /* override the weak definition with the non-weak one */
|
||||
+ pinfo->value = data;
|
||||
+ pinfo->owner = owner;
|
||||
+ pinfo->weak = HS_BOOL_FALSE;
|
||||
return;
|
||||
}
|
||||
debugBelch(
|
||||
@@ -1444,6 +1466,32 @@ static void ghciInsertStrHashTable ( pathchar* obj_name,
|
||||
);
|
||||
stg_exit(1);
|
||||
}
|
||||
+
|
||||
+static HsBool ghciLookupSymbolTable(HashTable *table,
|
||||
+ const char *key, void **result)
|
||||
+{
|
||||
+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
|
||||
+ if (!pinfo) {
|
||||
+ *result = NULL;
|
||||
+ return HS_BOOL_FALSE;
|
||||
+ }
|
||||
+ if (pinfo->weak)
|
||||
+ IF_DEBUG(linker, debugBelch("lookup: promoting %s\n", key));
|
||||
+ /* Once it's looked up, it can no longer be overridden */
|
||||
+ pinfo->weak = HS_BOOL_FALSE;
|
||||
+
|
||||
+ *result = pinfo->value;
|
||||
+ return HS_BOOL_TRUE;
|
||||
+}
|
||||
+
|
||||
+static void ghciRemoveSymbolTable(HashTable *table, const char *key,
|
||||
+ ObjectCode *owner)
|
||||
+{
|
||||
+ RtsSymbolInfo *pinfo = lookupStrHashTable(table, key);
|
||||
+ if (!pinfo || owner != pinfo->owner) return;
|
||||
+ removeStrHashTable(table, key, NULL);
|
||||
+ stgFree(pinfo);
|
||||
+}
|
||||
/* -----------------------------------------------------------------------------
|
||||
* initialize the object linker
|
||||
*/
|
||||
@@ -1487,8 +1535,8 @@ initLinker( void )
|
||||
|
||||
/* populate the symbol table with stuff from the RTS */
|
||||
for (sym = rtsSyms; sym->lbl != NULL; sym++) {
|
||||
- ghciInsertStrHashTable(WSTR("(GHCi built-in symbols)"),
|
||||
- symhash, sym->lbl, sym->addr);
|
||||
+ ghciInsertSymbolTable(WSTR("(GHCi built-in symbols)"),
|
||||
+ symhash, sym->lbl, sym->addr, HS_BOOL_FALSE, NULL);
|
||||
IF_DEBUG(linker, debugBelch("initLinker: inserting rts symbol %s, %p\n", sym->lbl, sym->addr));
|
||||
}
|
||||
# if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
|
||||
@@ -1816,7 +1864,7 @@ error:
|
||||
void
|
||||
insertSymbol(pathchar* obj_name, char* key, void* data)
|
||||
{
|
||||
- ghciInsertStrHashTable(obj_name, symhash, key, data);
|
||||
+ ghciInsertSymbolTable(obj_name, symhash, key, data, HS_BOOL_FALSE, NULL);
|
||||
}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
@@ -1829,9 +1877,8 @@ lookupSymbol( char *lbl )
|
||||
IF_DEBUG(linker, debugBelch("lookupSymbol: looking up %s\n", lbl));
|
||||
initLinker() ;
|
||||
ASSERT(symhash != NULL);
|
||||
- val = lookupStrHashTable(symhash, lbl);
|
||||
|
||||
- if (val == NULL) {
|
||||
+ if (!ghciLookupSymbolTable(symhash, lbl, &val)) {
|
||||
IF_DEBUG(linker, debugBelch("lookupSymbol: symbol not found\n"));
|
||||
# if defined(OBJFORMAT_ELF)
|
||||
return internal_dlsym(dl_prog_handle, lbl);
|
||||
@@ -1903,7 +1950,7 @@ void ghci_enquire ( char* addr )
|
||||
if (sym == NULL) continue;
|
||||
a = NULL;
|
||||
if (a == NULL) {
|
||||
- a = lookupStrHashTable(symhash, sym);
|
||||
+ ghciLookupSymbolTable(symhash, sym, (void **)&a);
|
||||
}
|
||||
if (a == NULL) {
|
||||
// debugBelch("ghci_enquire: can't find %s\n", sym);
|
||||
@@ -2715,7 +2762,7 @@ unloadObj( pathchar *path )
|
||||
int i;
|
||||
for (i = 0; i < oc->n_symbols; i++) {
|
||||
if (oc->symbols[i] != NULL) {
|
||||
- removeStrHashTable(symhash, oc->symbols[i], NULL);
|
||||
+ ghciRemoveSymbolTable(symhash, oc->symbols[i], oc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3802,7 +3849,8 @@ ocGetNames_PEi386 ( ObjectCode* oc )
|
||||
ASSERT(i >= 0 && i < oc->n_symbols);
|
||||
/* cstring_from_COFF_symbol_name always succeeds. */
|
||||
oc->symbols[i] = (char*)sname;
|
||||
- ghciInsertStrHashTable(oc->fileName, symhash, (char*)sname, addr);
|
||||
+ ghciInsertSymbolTable(oc->fileName, symhash, (char*)sname, addr,
|
||||
+ HS_BOOL_FALSE, oc);
|
||||
} else {
|
||||
# if 0
|
||||
debugBelch(
|
||||
@@ -4595,6 +4643,7 @@ ocGetNames_ELF ( ObjectCode* oc )
|
||||
for (j = 0; j < nent; j++) {
|
||||
|
||||
char isLocal = FALSE; /* avoids uninit-var warning */
|
||||
+ HsBool isWeak = HS_BOOL_FALSE;
|
||||
char* ad = NULL;
|
||||
char* nm = strtab + stab[j].st_name;
|
||||
int secno = stab[j].st_shndx;
|
||||
@@ -4615,6 +4664,7 @@ ocGetNames_ELF ( ObjectCode* oc )
|
||||
else
|
||||
if ( ( ELF_ST_BIND(stab[j].st_info)==STB_GLOBAL
|
||||
|| ELF_ST_BIND(stab[j].st_info)==STB_LOCAL
|
||||
+ || ELF_ST_BIND(stab[j].st_info)==STB_WEAK
|
||||
)
|
||||
/* and not an undefined symbol */
|
||||
&& stab[j].st_shndx != SHN_UNDEF
|
||||
@@ -4638,7 +4688,8 @@ ocGetNames_ELF ( ObjectCode* oc )
|
||||
ad = ehdrC + shdr[ secno ].sh_offset + stab[j].st_value;
|
||||
if (ELF_ST_BIND(stab[j].st_info)==STB_LOCAL) {
|
||||
isLocal = TRUE;
|
||||
- } else {
|
||||
+ isWeak = FALSE;
|
||||
+ } else { /* STB_GLOBAL or STB_WEAK */
|
||||
#ifdef ELF_FUNCTION_DESC
|
||||
/* dlsym() and the initialisation table both give us function
|
||||
* descriptors, so to be consistent we store function descriptors
|
||||
@@ -4649,6 +4700,7 @@ ocGetNames_ELF ( ObjectCode* oc )
|
||||
IF_DEBUG(linker,debugBelch( "addOTabName(GLOB): %10p %s %s\n",
|
||||
ad, oc->fileName, nm ));
|
||||
isLocal = FALSE;
|
||||
+ isWeak = (ELF_ST_BIND(stab[j].st_info)==STB_WEAK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4661,7 +4713,7 @@ ocGetNames_ELF ( ObjectCode* oc )
|
||||
if (isLocal) {
|
||||
/* Ignore entirely. */
|
||||
} else {
|
||||
- ghciInsertStrHashTable(oc->fileName, symhash, nm, ad);
|
||||
+ ghciInsertSymbolTable(oc->fileName, symhash, nm, ad, isWeak, oc);
|
||||
}
|
||||
} else {
|
||||
/* Skip. */
|
||||
@@ -6306,11 +6358,13 @@ ocGetNames_MachO(ObjectCode* oc)
|
||||
else
|
||||
{
|
||||
IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting %s\n", nm));
|
||||
- ghciInsertStrHashTable(oc->fileName, symhash, nm,
|
||||
+ ghciInsertSymbolTable(oc->fileName, symhash, nm,
|
||||
image
|
||||
+ sections[nlist[i].n_sect-1].offset
|
||||
- sections[nlist[i].n_sect-1].addr
|
||||
- + nlist[i].n_value);
|
||||
+ + nlist[i].n_value,
|
||||
+ HS_BOOL_FALSE,
|
||||
+ oc);
|
||||
oc->symbols[curSymbol++] = nm;
|
||||
}
|
||||
}
|
||||
@@ -6341,8 +6395,8 @@ ocGetNames_MachO(ObjectCode* oc)
|
||||
nlist[i].n_value = commonCounter;
|
||||
|
||||
IF_DEBUG(linker, debugBelch("ocGetNames_MachO: inserting common symbol: %s\n", nm));
|
||||
- ghciInsertStrHashTable(oc->fileName, symhash, nm,
|
||||
- (void*)commonCounter);
|
||||
+ ghciInsertSymbolTable(oc->fileName, symhash, nm,
|
||||
+ (void*)commonCounter, HS_BOOL_FALSE, oc);
|
||||
oc->symbols[curSymbol++] = nm;
|
||||
|
||||
commonCounter += sz;
|
||||
@@ -6466,7 +6520,7 @@ machoInitSymbolsWithoutUnderscore(void)
|
||||
|
||||
#undef SymI_NeedsProto
|
||||
#define SymI_NeedsProto(x) \
|
||||
- ghciInsertStrHashTable("(GHCi built-in symbols)", symhash, #x, *p++);
|
||||
+ ghciInsertSymbolTable("(GHCi built-in symbols)", symhash, #x, *p++, HS_BOOL_FALSE, NULL);
|
||||
|
||||
RTS_MACHO_NOUNDERLINE_SYMBOLS
|
||||
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
From 916d7713b34b529ae7ec24eaa836a4eaca7724fc Mon Sep 17 00:00:00 2001
|
||||
From: Takano Akio <aljee@hyper.cx>
|
||||
Date: Sun, 6 Jan 2013 17:51:19 +0900
|
||||
Subject: [PATCH 3/3] Linker.c: add dso_handle to the symbol table
|
||||
|
||||
---
|
||||
rts/Linker.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/rts/Linker.c b/rts/Linker.c
|
||||
index 5105085..0b2bf63 100644
|
||||
--- a/rts/Linker.c
|
||||
+++ b/rts/Linker.c
|
||||
@@ -1542,6 +1542,13 @@ initLinker( void )
|
||||
# if defined(OBJFORMAT_MACHO) && defined(powerpc_HOST_ARCH)
|
||||
machoInitSymbolsWithoutUnderscore();
|
||||
# endif
|
||||
+ /* GCC defines a special symbol __dso_handle which is resolved to NULL if
|
||||
+ referenced from a statically linked module. We need to mimic this, but
|
||||
+ we cannot use NULL because we use it to mean nonexistent symbols. So we
|
||||
+ use an arbitrary (hopefully unique) address here.
|
||||
+ */
|
||||
+ ghciInsertSymbolTable(WSTR("(GHCi special symbols)"),
|
||||
+ symhash, "__dso_handle", (void *)0x12345687, HS_BOOL_FALSE, NULL);
|
||||
|
||||
# if defined(OBJFORMAT_ELF) || defined(OBJFORMAT_MACHO)
|
||||
# if defined(RTLD_DEFAULT)
|
||||
--
|
||||
1.7.9.5
|
||||
|
@ -1,129 +0,0 @@
|
||||
commit 4d4d07704ee78221607a18b8118294b0aea1bac4
|
||||
Author: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Tue Sep 2 00:06:56 2014 +0300
|
||||
|
||||
systools: fix gcc version detecton on non-english locale
|
||||
|
||||
Summary:
|
||||
ghc runs 'gcc -v' to check if we run under vanilla gcc
|
||||
or disaguised clang by checking for string
|
||||
|
||||
"gcc version <something>"
|
||||
|
||||
But this check does not always work as gcc has that string
|
||||
localized via gettext mechanism:
|
||||
|
||||
(some gcc's locale strings)
|
||||
be.po-msgstr "версія gcc %s\n"
|
||||
da.po-msgstr "GCC version %s\n"
|
||||
de.po-msgstr "gcc-Version %s %s\n"
|
||||
el.po-msgstr "έκδοση gcc %s\n"
|
||||
...
|
||||
|
||||
To ping gcc to English locale we now override environment
|
||||
variable with 'LANGUAGE=en' value.
|
||||
|
||||
Fixes Issue #8825
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
Test Plan: validate
|
||||
|
||||
Reviewers: austin
|
||||
|
||||
Reviewed By: austin
|
||||
|
||||
Subscribers: simonmar, ezyang, carter
|
||||
|
||||
Differential Revision: https://phabricator.haskell.org/D185
|
||||
|
||||
GHC Trac Issues: #8825
|
||||
|
||||
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
|
||||
index 72fa19b..67926f5 100644
|
||||
--- a/compiler/main/SysTools.lhs
|
||||
+++ b/compiler/main/SysTools.lhs
|
||||
@@ -492,6 +492,51 @@ readCreateProcess proc = do
|
||||
|
||||
return (ex, output)
|
||||
|
||||
+readProcessEnvWithExitCode
|
||||
+ :: String -- ^ program path
|
||||
+ -> [String] -- ^ program args
|
||||
+ -> [(String, String)] -- ^ environment to override
|
||||
+ -> IO (ExitCode, String, String) -- ^ (exit_code, stdout, stderr)
|
||||
+readProcessEnvWithExitCode prog args env_update = do
|
||||
+ current_env <- getEnvironment
|
||||
+ let new_env = env_update ++ [ (k, v)
|
||||
+ | let overriden_keys = map fst env_update
|
||||
+ , (k, v) <- current_env
|
||||
+ , k `notElem` overriden_keys
|
||||
+ ]
|
||||
+ p = proc prog args
|
||||
+
|
||||
+ (_stdin, Just stdoh, Just stdeh, pid) <-
|
||||
+ createProcess p{ std_out = CreatePipe
|
||||
+ , std_err = CreatePipe
|
||||
+ , env = Just new_env
|
||||
+ }
|
||||
+
|
||||
+ outMVar <- newEmptyMVar
|
||||
+ errMVar <- newEmptyMVar
|
||||
+
|
||||
+ _ <- forkIO $ do
|
||||
+ stdo <- hGetContents stdoh
|
||||
+ _ <- evaluate (length stdo)
|
||||
+ putMVar outMVar stdo
|
||||
+
|
||||
+ _ <- forkIO $ do
|
||||
+ stde <- hGetContents stdeh
|
||||
+ _ <- evaluate (length stde)
|
||||
+ putMVar errMVar stde
|
||||
+
|
||||
+ out <- takeMVar outMVar
|
||||
+ hClose stdoh
|
||||
+ err <- takeMVar errMVar
|
||||
+ hClose stdeh
|
||||
+
|
||||
+ ex <- waitForProcess pid
|
||||
+
|
||||
+ return (ex, out, err)
|
||||
+
|
||||
+-- Don't let gcc localize version info string, #8825
|
||||
+en_locale_env :: [(String, String)]
|
||||
+en_locale_env = [("LANGUAGE", "en")]
|
||||
|
||||
-- If the -B<dir> option is set, add <dir> to PATH. This works around
|
||||
-- a bug in gcc on Windows Vista where it can't find its auxiliary
|
||||
@@ -746,8 +791,9 @@ getLinkerInfo' dflags = do
|
||||
_ -> do
|
||||
-- In practice, we use the compiler as the linker here. Pass
|
||||
-- -Wl,--version to get linker version info.
|
||||
- (exitc, stdo, stde) <- readProcessWithExitCode pgm
|
||||
- ["-Wl,--version"] ""
|
||||
+ (exitc, stdo, stde) <- readProcessEnvWithExitCode pgm
|
||||
+ ["-Wl,--version"]
|
||||
+ en_locale_env
|
||||
-- Split the output by lines to make certain kinds
|
||||
-- of processing easier. In particular, 'clang' and 'gcc'
|
||||
-- have slightly different outputs for '-Wl,--version', but
|
||||
@@ -802,7 +848,8 @@ getCompilerInfo' dflags = do
|
||||
|
||||
-- Process the executable call
|
||||
info <- catchIO (do
|
||||
- (exitc, stdo, stde) <- readProcessWithExitCode pgm ["-v"] ""
|
||||
+ (exitc, stdo, stde) <-
|
||||
+ readProcessEnvWithExitCode pgm ["-v"] en_locale_env
|
||||
-- Split the output by lines to make certain kinds
|
||||
-- of processing easier.
|
||||
parseCompilerInfo (lines stdo) (lines stde) exitc
|
||||
@@ -952,7 +999,8 @@ readElfSection _dflags section exe = do
|
||||
prog = "readelf"
|
||||
args = [Option "-p", Option section, FileOption "" exe]
|
||||
--
|
||||
- r <- readProcessWithExitCode prog (filter notNull (map showOpt args)) ""
|
||||
+ r <- readProcessEnvWithExitCode prog (filter notNull (map showOpt args))
|
||||
+ en_locale_env
|
||||
case r of
|
||||
(ExitSuccess, out, _err) -> return (doFilter (lines out))
|
||||
_ -> return Nothing
|
@ -1,38 +0,0 @@
|
||||
commit 104a66a461f4f89b8e5ad9c829923bb7ca8ceddb
|
||||
Author: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Sat Aug 23 13:11:23 2014 +0300
|
||||
|
||||
rts/Linker.c: declare 'deRefStablePtr' as an exported 'rts' symbol
|
||||
|
||||
$ inplace/bin/ghc-stage2 -fforce-recomp -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts -optc-fno-builtin -fno-ghci-history \
|
||||
testsuite/tests/ffi/should_run/T4038.hs --interactive -v0 -ignore-dot-ghci +RTS -I0.1 -RTS
|
||||
|
||||
*Main> main
|
||||
<interactive>: /tmp/ghc16668_0/ghc16668_5.o: unknown symbol `deRefStablePtr'
|
||||
|
||||
The reference to 'deRefStablePtr' is generated by 'compiler/deSugar/DsForeign.lhs':
|
||||
the_cfun
|
||||
= case maybe_target of
|
||||
Nothing -> text "(StgClosure*)deRefStablePtr(the_stableptr)"
|
||||
Just hs_fn -> char '&' <> ppr hs_fn <> text "_closure"
|
||||
|
||||
Patch fixes all broken tests using 'import wrapper':
|
||||
TEST="ffi013 ffi010 ffi011 ffi005 ffi020 ffi006 ffi019 fed001 T1679 T4038"
|
||||
|
||||
Tests manifested as broken only in DYNAMIC_GHC_PROGRAMS=NO builds,
|
||||
where GHCi's custom linker is used instead of system's linker.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
diff --git a/rts/Linker.c b/rts/Linker.c
|
||||
index e97580d..b24be58 100644
|
||||
--- a/rts/Linker.c
|
||||
+++ b/rts/Linker.c
|
||||
@@ -1092,6 +1092,7 @@ typedef struct _RtsSymbolVal {
|
||||
SymI_HasProto(__word_encodeFloat) \
|
||||
SymI_HasProto(stg_atomicallyzh) \
|
||||
SymI_HasProto(barf) \
|
||||
+ SymI_HasProto(deRefStablePtr) \
|
||||
SymI_HasProto(debugBelch) \
|
||||
SymI_HasProto(errorBelch) \
|
||||
SymI_HasProto(sysErrorBelch) \
|
@ -1,69 +0,0 @@
|
||||
commit e2a8801b9779949010f30db6f6ef66f3c3a70776
|
||||
Author: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Thu Sep 4 17:50:45 2014 +0300
|
||||
|
||||
pprC: declare extern cmm primitives as functions, not data
|
||||
|
||||
Summary:
|
||||
The commit fixes incorrect code generation of
|
||||
integer-gmp package on ia64 due to C prototype mismatch.
|
||||
Before patch prototype was
|
||||
StgWord poizh[];
|
||||
After patch it became
|
||||
StgFunPtr poizh();
|
||||
|
||||
Long story:
|
||||
|
||||
Consider the following simple example:
|
||||
|
||||
{-# LANGUAGE MagicHash, GHCForeignImportPrim, UnliftedFFITypes #-}
|
||||
module M where
|
||||
import GHC.Prim -- Int#
|
||||
foreign import prim "poizh" poi# :: Int# -> Int#
|
||||
|
||||
Before the patch Unregisterised build generated the
|
||||
following 'poizh' reference:
|
||||
EI_(poizh); /* StgWord poizh[]; */
|
||||
FN_(M_poizh_entry) {
|
||||
// ...
|
||||
JMP_((W_)&poizh);
|
||||
}
|
||||
|
||||
After the patch it looks this way:
|
||||
EF_(poizh); /* StgFunPtr poizh(); */
|
||||
FN_(M_poizh_entry) {
|
||||
// ...
|
||||
JMP_((W_)&poizh);
|
||||
}
|
||||
|
||||
On ia64 it leads to different relocation types being generated:
|
||||
incorrect one:
|
||||
addl r14 = @ltoffx(poizh#)
|
||||
ld8.mov r14 = [r14], poizh#
|
||||
correct one:
|
||||
addl r14 = @ltoff(@fptr(poizh#)), gp
|
||||
ld8 r14 = [r14]
|
||||
|
||||
'@fptr(poizh#)' basically instructs assembler to creates
|
||||
another obect consisting of real address to 'poizh' instructions
|
||||
and module address. That '@fptr' object is used as a function "address".
|
||||
This object is different for every module referencing 'poizh' symbol.
|
||||
|
||||
All indirect function calls expect '@fptr' object. That way
|
||||
call site can read real destination address and set destination
|
||||
module address in 'gp' register.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
|
||||
index 02ad026..0f2c0ae 100644
|
||||
--- a/compiler/cmm/CLabel.hs
|
||||
+++ b/compiler/cmm/CLabel.hs
|
||||
@@ -813,6 +813,7 @@ labelType (CmmLabel _ _ CmmClosure) = GcPtrLabel
|
||||
labelType (CmmLabel _ _ CmmCode) = CodeLabel
|
||||
labelType (CmmLabel _ _ CmmInfo) = DataLabel
|
||||
labelType (CmmLabel _ _ CmmEntry) = CodeLabel
|
||||
+labelType (CmmLabel _ _ CmmPrimCall) = CodeLabel
|
||||
labelType (CmmLabel _ _ CmmRetInfo) = DataLabel
|
||||
labelType (CmmLabel _ _ CmmRet) = CodeLabel
|
||||
labelType (RtsLabel (RtsSelectorInfoTable _ _)) = DataLabel
|
@ -1,107 +0,0 @@
|
||||
commit a93ab43ab5f40cadbedea2f6342b93c245e91434
|
||||
Author: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Wed Aug 27 22:19:52 2014 +0300
|
||||
|
||||
driver: pass '-fPIC' option to assembler as well
|
||||
|
||||
Summary:
|
||||
Before the patch '-fPIC' was passed only to C compiler,
|
||||
but not to assembler itself.
|
||||
|
||||
It led to runtime crash in GHC_DYNAMIC_PROGRAMS=YES mode
|
||||
on sparc32.
|
||||
|
||||
Technical details are in 'Note [-fPIC for assembler]'.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
Test Plan: validate on sparc
|
||||
|
||||
Reviewers: simonmar, austin, kgardas
|
||||
|
||||
Reviewed By: austin
|
||||
|
||||
Subscribers: simonmar, ezyang, carter
|
||||
|
||||
Differential Revision: https://phabricator.haskell.org/D177
|
||||
|
||||
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
|
||||
index 183f435..5a18e6e 100644
|
||||
--- a/compiler/main/DriverPipeline.hs
|
||||
+++ b/compiler/main/DriverPipeline.hs
|
||||
@@ -1199,6 +1199,7 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
|
||||
|
||||
as_prog <- whichAsProg
|
||||
let cmdline_include_paths = includePaths dflags
|
||||
+ let pic_c_flags = picCCOpts dflags
|
||||
|
||||
next_phase <- maybeMergeStub
|
||||
output_fn <- phaseOutputFilename next_phase
|
||||
@@ -1212,6 +1213,9 @@ runPhase (RealPhase (As with_cpp)) input_fn dflags
|
||||
= liftIO $ as_prog dflags
|
||||
([ SysTools.Option ("-I" ++ p) | p <- cmdline_include_paths ]
|
||||
|
||||
+ -- See Note [-fPIC for assembler]
|
||||
+ ++ map SysTools.Option pic_c_flags
|
||||
+
|
||||
-- We only support SparcV9 and better because V8 lacks an atomic CAS
|
||||
-- instruction so we have to make sure that the assembler accepts the
|
||||
-- instruction set. Note that the user can still override this
|
||||
@@ -1253,6 +1257,8 @@ runPhase (RealPhase SplitAs) _input_fn dflags
|
||||
osuf = objectSuf dflags
|
||||
split_odir = base_o ++ "_" ++ osuf ++ "_split"
|
||||
|
||||
+ let pic_c_flags = picCCOpts dflags
|
||||
+
|
||||
-- this also creates the hierarchy
|
||||
liftIO $ createDirectoryIfMissing True split_odir
|
||||
|
||||
@@ -1286,6 +1292,9 @@ runPhase (RealPhase SplitAs) _input_fn dflags
|
||||
then [SysTools.Option "-mcpu=v9"]
|
||||
else []) ++
|
||||
|
||||
+ -- See Note [-fPIC for assembler]
|
||||
+ map SysTools.Option pic_c_flags ++
|
||||
+
|
||||
[ SysTools.Option "-c"
|
||||
, SysTools.Option "-o"
|
||||
, SysTools.FileOption "" (split_obj n)
|
||||
@@ -2203,3 +2212,38 @@ haveRtsOptsFlags dflags =
|
||||
isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of
|
||||
RtsOptsSafeOnly -> False
|
||||
_ -> True
|
||||
+
|
||||
+-- Note [-fPIC for assembler]
|
||||
+-- When compiling .c source file GHC's driver pipeline basically
|
||||
+-- does the following two things:
|
||||
+-- 1. ${CC} -S 'PIC_CFLAGS' source.c
|
||||
+-- 2. ${CC} -x assembler -c 'PIC_CFLAGS' source.S
|
||||
+--
|
||||
+-- Why do we need to pass 'PIC_CFLAGS' both to C compiler and assembler?
|
||||
+-- Because on some architectures (at least sparc32) assembler also choses
|
||||
+-- relocation type!
|
||||
+-- Consider the following C module:
|
||||
+--
|
||||
+-- /* pic-sample.c */
|
||||
+-- int v;
|
||||
+-- void set_v (int n) { v = n; }
|
||||
+-- int get_v (void) { return v; }
|
||||
+--
|
||||
+-- $ gcc -S -fPIC pic-sample.c
|
||||
+-- $ gcc -c pic-sample.s -o pic-sample.no-pic.o # incorrect binary
|
||||
+-- $ gcc -c -fPIC pic-sample.s -o pic-sample.pic.o # correct binary
|
||||
+--
|
||||
+-- $ objdump -r -d pic-sample.pic.o > pic-sample.pic.o.od
|
||||
+-- $ objdump -r -d pic-sample.no-pic.o > pic-sample.no-pic.o.od
|
||||
+-- $ diff -u pic-sample.pic.o.od pic-sample.no-pic.o.od
|
||||
+--
|
||||
+-- Most of architectures won't show any difference in this test, but on sparc32
|
||||
+-- the following assembly snippet:
|
||||
+--
|
||||
+-- sethi %hi(_GLOBAL_OFFSET_TABLE_-8), %l7
|
||||
+--
|
||||
+-- generates two kinds or relocations, only 'R_SPARC_PC22' is correct:
|
||||
+--
|
||||
+-- 3c: 2f 00 00 00 sethi %hi(0), %l7
|
||||
+-- - 3c: R_SPARC_PC22 _GLOBAL_OFFSET_TABLE_-0x8
|
||||
+-- + 3c: R_SPARC_HI22 _GLOBAL_OFFSET_TABLE_-0x8
|
@ -1,84 +0,0 @@
|
||||
commit a6ea05e21e175407dc9e45f18c56c1d727fd0f26
|
||||
Author: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
Date: Fri Aug 22 23:24:32 2014 +0300
|
||||
|
||||
UNREG: fix emission of large Integer literals in C codegen
|
||||
|
||||
Summary:
|
||||
On amd64/UNREG build there is many failing tests trying
|
||||
to deal with 'Integer' types.
|
||||
|
||||
Looking at 'overflow1' test I've observed invalid C code generated by
|
||||
GHC.
|
||||
|
||||
Cmm code
|
||||
CInt a = -1; (a == -1)
|
||||
yields 'False' with optimisations enabled via the following C code:
|
||||
StgWord64 a = (StgWord32)0xFFFFffffFFFFffffu; (a == 0xFFFFffffFFFFffffu)
|
||||
|
||||
The patch fixes it by shrinking emitted literals to required sizes:
|
||||
StgWord64 a = (StgWord32)0xFFFFffffu; (a == 0xFFFFffffu)
|
||||
|
||||
Thanks to Reid Barton for tracking down and fixing the issue.
|
||||
|
||||
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
||||
|
||||
Test Plan: validate on UNREG build (amd64)
|
||||
|
||||
Reviewers: simonmar, rwbarton, austin
|
||||
|
||||
Subscribers: simonmar, ezyang, carter
|
||||
|
||||
Differential Revision: https://phabricator.haskell.org/D173
|
||||
|
||||
diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
|
||||
index 93a5d06..8605988 100644
|
||||
--- a/compiler/cmm/PprC.hs
|
||||
+++ b/compiler/cmm/PprC.hs
|
||||
@@ -1221,8 +1221,9 @@ commafy xs = hsep $ punctuate comma xs
|
||||
pprHexVal :: Integer -> Width -> SDoc
|
||||
pprHexVal 0 _ = ptext (sLit "0x0")
|
||||
pprHexVal w rep
|
||||
- | w < 0 = parens (char '-' <> ptext (sLit "0x") <> go (-w) <> repsuffix rep)
|
||||
- | otherwise = ptext (sLit "0x") <> go w <> repsuffix rep
|
||||
+ | w < 0 = parens (char '-' <>
|
||||
+ ptext (sLit "0x") <> intToDoc (-w) <> repsuffix rep)
|
||||
+ | otherwise = ptext (sLit "0x") <> intToDoc w <> repsuffix rep
|
||||
where
|
||||
-- type suffix for literals:
|
||||
-- Integer literals are unsigned in Cmm/C. We explicitly cast to
|
||||
@@ -1237,10 +1238,33 @@ pprHexVal w rep
|
||||
else panic "pprHexVal: Can't find a 64-bit type"
|
||||
repsuffix _ = char 'U'
|
||||
|
||||
+ intToDoc :: Integer -> SDoc
|
||||
+ intToDoc i = go (truncInt i)
|
||||
+
|
||||
+ -- We need to truncate value as Cmm backend does not drop
|
||||
+ -- redundant bits to ease handling of negative values.
|
||||
+ -- Thus the following Cmm code on 64-bit arch, like amd64:
|
||||
+ -- CInt v;
|
||||
+ -- v = {something};
|
||||
+ -- if (v == %lobits32(-1)) { ...
|
||||
+ -- leads to the following C code:
|
||||
+ -- StgWord64 v = (StgWord32)({something});
|
||||
+ -- if (v == 0xFFFFffffFFFFffffU) { ...
|
||||
+ -- Such code is incorrect as it promotes both operands to StgWord64
|
||||
+ -- and the whole condition is always false.
|
||||
+ truncInt :: Integer -> Integer
|
||||
+ truncInt i =
|
||||
+ case rep of
|
||||
+ W8 -> i `rem` (2^(8 :: Int))
|
||||
+ W16 -> i `rem` (2^(16 :: Int))
|
||||
+ W32 -> i `rem` (2^(32 :: Int))
|
||||
+ W64 -> i `rem` (2^(64 :: Int))
|
||||
+ _ -> panic ("pprHexVal/truncInt: C backend can't encode "
|
||||
+ ++ show rep ++ " literals")
|
||||
+
|
||||
go 0 = empty
|
||||
go w' = go q <> dig
|
||||
where
|
||||
(q,r) = w' `quotRem` 16
|
||||
dig | r < 10 = char (chr (fromInteger r + ord '0'))
|
||||
| otherwise = char (chr (fromInteger r - 10 + ord 'a'))
|
||||
-
|
@ -1,25 +0,0 @@
|
||||
http://bugs.gentoo.org/454216
|
||||
|
||||
Mon Jan 7 16:34:47 FET 2013 Judah Jacobson <judah.jacobson@gmail.com>
|
||||
* Search for terminfo in libtinfo; fixes GHC #7281.
|
||||
|
||||
Patch from Paul Johnson.
|
||||
diff -rN -u old-terminfo/configure.ac new-terminfo/configure.ac
|
||||
--- old-terminfo/configure.ac 2013-02-14 00:16:11.816111434 +0300
|
||||
+++ new-terminfo/configure.ac 2013-02-14 00:16:11.819111434 +0300
|
||||
@@ -39,10 +39,11 @@
|
||||
TERMINFO_INCLUDES="$CursesIncludes term.h"
|
||||
fi
|
||||
|
||||
-AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
|
||||
- [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
|
||||
- [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
|
||||
- HaveLibCurses=NO; LibCurses=not-installed)])])
|
||||
+AC_CHECK_LIB(tinfo, setupterm, HaveLibCurses=YES; LibCurses=tinfo,
|
||||
+ [AC_CHECK_LIB(ncursesw, setupterm, HaveLibCurses=YES; LibCurses=ncursesw,
|
||||
+ [AC_CHECK_LIB(ncurses, setupterm, HaveLibCurses=YES; LibCurses=ncurses,
|
||||
+ [AC_CHECK_LIB(curses, setupterm, HaveLibCurses=YES; LibCurses=curses,
|
||||
+ HaveLibCurses=NO; LibCurses=not-installed)])])])
|
||||
|
||||
if test "x$HaveLibCurses" = "xNO" ; then
|
||||
AC_MSG_FAILURE([curses library not found, so this package cannot be built])
|
@ -1,653 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# to make make a crosscompiler use crossdev and symlink ghc tree into
|
||||
# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
|
||||
#
|
||||
# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} = ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
||||
export CTARGET=${CATEGORY/cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
|
||||
inherit multilib pax-utils toolchain-funcs versionator
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PVR}-amd64-noncurses.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PVR}-x86-noncurses.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
#alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
#ia64) return 0 ;;
|
||||
#ppc) return 0 ;;
|
||||
#ppc64) return 0 ;;
|
||||
#sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
GHC_PV=${PV}
|
||||
#GHC_PV=7.10.1.20150630 # uncomment only for -rc ebuilds
|
||||
GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
|
||||
|
||||
#SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
|
||||
# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
|
||||
# many users
|
||||
SRC_URI="!binary? ( http://dev.gentoo.org/~slyfox/distfiles/${GHC_P}-src.tar.bz2 )"
|
||||
S="${WORKDIR}"/${GHC_P}
|
||||
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
|
||||
BUMP_LIBRARIES=(
|
||||
# "hackage-name hackage-version"
|
||||
"binary 0.7.5.0"
|
||||
"hoopl 3.10.1.0"
|
||||
"transformers 0.4.3.0"
|
||||
)
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp"
|
||||
IUSE+=" binary"
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5:=
|
||||
sys-libs/ncurses:=[unicode]
|
||||
!ghcmakebinary? ( virtual/libffi:= )
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17:* )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
|
||||
"
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.17
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
|
||||
REQUIRED_USE="?? ( ghcbootstrap binary )"
|
||||
|
||||
# haskell libraries built with cabal in configure mode, #515354
|
||||
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
|
||||
|
||||
is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
append-ghc-cflags() {
|
||||
local persistent compile assemble link
|
||||
local flag ghcflag
|
||||
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
persistent) persistent="yes";;
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# $1 - lib name (under libraries/)
|
||||
# $2 - lib version
|
||||
# example: bump_lib "transformers" "0.4.2.0"
|
||||
bump_lib() {
|
||||
local pn=$1 pv=$2
|
||||
local p=${pn}-${pv}
|
||||
local f
|
||||
|
||||
einfo "Bumping ${pn} up to ${pv}"
|
||||
|
||||
for f in ghc.mk GNUmakefile; do
|
||||
mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
|
||||
done
|
||||
mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
|
||||
mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
|
||||
}
|
||||
|
||||
update_SRC_URI() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
|
||||
done
|
||||
}
|
||||
|
||||
update_SRC_URI
|
||||
|
||||
bump_libs() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
bump_lib "${pn}" "${pv}"
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
if is_crosscompile; then
|
||||
export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
|
||||
export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
|
||||
einfo "Crosscompiling mode:"
|
||||
einfo " CHOST: ${CHOST}"
|
||||
einfo " CTARGET: ${CTARGET}"
|
||||
einfo " CFLAGS: ${CFLAGS}"
|
||||
einfo " LDFLAGS: ${LDFLAGS}"
|
||||
return
|
||||
fi
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
GHC_PERSISTENT_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Sometimes it's handy to see backtrace of RTS
|
||||
# to get an idea what happens there
|
||||
-g*) append-ghc-cflags compile ${flag};;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
for flag in ${LDFLAGS}; do
|
||||
append-ghc-cflags link ${flag}
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags persistent compile -G0
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# libdir for prebuilt binary and for current system may mismatch
|
||||
# It does for prefix installation for example: bug #476998
|
||||
local bin_ghc_prefix=${WORKDIR}/usr
|
||||
local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
|
||||
local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
if [[ ${bin_libdir} != $(get_libdir) ]]; then
|
||||
einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
|
||||
# moving the dir itself is not strictly needed
|
||||
# but then USE=binary would result in installing
|
||||
# in '${bin_libdir}'
|
||||
mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
|
||||
|
||||
relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
fi
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it should point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages."
|
||||
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
|
||||
if [[ -d "${S}"/libraries/dph ]]; then
|
||||
# Sometimes dph libs get accidentally shipped with ghc
|
||||
# but they are not installed unless user requests it.
|
||||
# We never install them.
|
||||
elog "Removing 'libraries/dph'"
|
||||
rm -rf "${S}"/libraries/dph
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
# UPDATE ME for ghc-7
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.1-T10590-dequeue.patch
|
||||
# Since ${S}/packages does not include base, etc. add them to gen_contents_index
|
||||
sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
|
||||
-i libraries/gen_contents_index || die
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
|
||||
-i utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
bump_libs
|
||||
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use binary; then
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
# app-text/dblatex is not in portage, can not build PDF or PS
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
if use doc; then
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
else
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# this controls presence on 'xhtml' and 'haddock' in final install
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# don't strip anything. Very useful when stage2 SIGSEGVs on you
|
||||
echo "STRIP_CMD = :" >> mk/build.mk
|
||||
|
||||
local econf_args=()
|
||||
|
||||
# GHC embeds 'gcc' it was built by and uses it later.
|
||||
# Don't allow things like ccache or versioned binary slip.
|
||||
# We use stable thing across gcc upgrades.
|
||||
is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
|
||||
|
||||
if use ghcmakebinary; then
|
||||
# When building booting libary we are trying to
|
||||
# bundle or restrict most of external depends
|
||||
# with unstable ABI:
|
||||
# - embed libffi (default GHC behaviour)
|
||||
# - disable ncurses support for ghci (via haskeline)
|
||||
# https://bugs.gentoo.org/557478
|
||||
# - disable ncurses support for ghc-pkg
|
||||
echo "libraries/haskeline_CONFIGURE_OPTS += --flag=-terminfo" >> mk/build.mk
|
||||
echo "utils/ghc-pkg_HC_OPTS += -DBOOTSTRAPPING" >> mk/build.mk
|
||||
else
|
||||
econf_args+=(--with-system-libffi)
|
||||
econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
|
||||
fi
|
||||
|
||||
elog "Final mk/build.mk:"
|
||||
cat mk/build.mk || die
|
||||
|
||||
econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
GHC_P=${PN}-${GHC_PV}
|
||||
fi
|
||||
GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
# 1. build compiler binary first
|
||||
emake ghc/stage2/build/tmp/ghc-stage2
|
||||
# 2. pax-mark (bug #516430)
|
||||
pax-mark -m ghc/stage2/build/tmp/ghc-stage2
|
||||
# 3. and then all the rest
|
||||
emake all
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
else
|
||||
|
||||
emake -j1 install DESTDIR="${D}"
|
||||
dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
|
||||
|
||||
# rename ghc-shipped files to avoid collision
|
||||
# of external packages. Motivating example:
|
||||
# user had installed:
|
||||
# dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
|
||||
# dev-haskell/transformers-0.4.2.0
|
||||
# then user tried to update to
|
||||
# dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
|
||||
# this will lead to single .conf file collision.
|
||||
local shipped_conf renamed_conf
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
|
||||
for shipped_conf in "${package_confdir}"/*.conf; do
|
||||
# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
|
||||
renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
|
||||
mv "${shipped_conf}" "${renamed_conf}" || die
|
||||
done
|
||||
|
||||
# remove link, but leave 'haddock-${GHC_P}'
|
||||
rm -f "${ED}"/usr/bin/haddock
|
||||
|
||||
if [[ ! -f "${S}/VERSION" ]]; then
|
||||
echo "${GHC_PV}" > "${S}/VERSION" \
|
||||
|| die "Could not create file ${S}/VERSION"
|
||||
fi
|
||||
newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
|
||||
newbashcomp utils/completion/ghc.bash ghc
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
# copy the package.conf.d, including timestamp, save it so we can help
|
||||
# users that have a broken package.conf.d
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
@ -1,643 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# to make make a crosscompiler use crossdev and symlink ghc tree into
|
||||
# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
|
||||
#
|
||||
# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} = ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
||||
export CTARGET=${CATEGORY/cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
|
||||
inherit multilib pax-utils toolchain-funcs versionator
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
#alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
#ia64) return 0 ;;
|
||||
#ppc) return 0 ;;
|
||||
#ppc64) return 0 ;;
|
||||
#sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
GHC_PV=${PV}
|
||||
#GHC_PV=7.10.1.20150630 # uncomment only for -rc ebuilds
|
||||
GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
|
||||
|
||||
#SRC_URI="!binary? ( http://downloads.haskell.org/~ghc/${PV/_rc/-rc}/${GHC_P}-src.tar.bz2 )"
|
||||
# Upstream tarball was repackaged and inplace-updated. CDN cached old version for
|
||||
# many users
|
||||
SRC_URI="!binary? ( https://dev.gentoo.org/~slyfox/distfiles/${GHC_P}-src.tar.bz2 )"
|
||||
S="${WORKDIR}"/${GHC_P}
|
||||
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
|
||||
BUMP_LIBRARIES=(
|
||||
# "hackage-name hackage-version"
|
||||
"binary 0.7.5.0"
|
||||
"hoopl 3.10.1.0"
|
||||
"transformers 0.4.3.0"
|
||||
)
|
||||
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp"
|
||||
IUSE+=" binary"
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5:=
|
||||
sys-libs/ncurses:=[unicode]
|
||||
!ghcmakebinary? ( virtual/libffi:= )
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3:* )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17:* )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17:* )
|
||||
"
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.17
|
||||
DEPEND="${RDEPEND}
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
|
||||
REQUIRED_USE="?? ( ghcbootstrap binary )"
|
||||
|
||||
# haskell libraries built with cabal in configure mode, #515354
|
||||
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
|
||||
|
||||
is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
append-ghc-cflags() {
|
||||
local persistent compile assemble link
|
||||
local flag ghcflag
|
||||
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
persistent) persistent="yes";;
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
# $1 - lib name (under libraries/)
|
||||
# $2 - lib version
|
||||
# example: bump_lib "transformers" "0.4.2.0"
|
||||
bump_lib() {
|
||||
local pn=$1 pv=$2
|
||||
local p=${pn}-${pv}
|
||||
local f
|
||||
|
||||
einfo "Bumping ${pn} up to ${pv}"
|
||||
|
||||
for f in ghc.mk GNUmakefile; do
|
||||
mv libraries/"${pn}"/$f "${WORKDIR}"/"${p}"/$f || die
|
||||
done
|
||||
mv libraries/"${pn}" "${WORKDIR}"/"${pn}".old || die
|
||||
mv "${WORKDIR}"/"${p}" libraries/"${pn}" || die
|
||||
}
|
||||
|
||||
update_SRC_URI() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
SRC_URI+=" mirror://hackage/package/${pn}/${pn}-${pv}.tar.gz"
|
||||
done
|
||||
}
|
||||
|
||||
update_SRC_URI
|
||||
|
||||
bump_libs() {
|
||||
local p pn pv
|
||||
for p in "${BUMP_LIBRARIES[@]}"; do
|
||||
set -- $p
|
||||
pn=$1 pv=$2
|
||||
|
||||
bump_lib "${pn}" "${pv}"
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
if is_crosscompile; then
|
||||
export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
|
||||
export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
|
||||
einfo "Crosscompiling mode:"
|
||||
einfo " CHOST: ${CHOST}"
|
||||
einfo " CTARGET: ${CTARGET}"
|
||||
einfo " CFLAGS: ${CFLAGS}"
|
||||
einfo " LDFLAGS: ${LDFLAGS}"
|
||||
return
|
||||
fi
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
GHC_PERSISTENT_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Sometimes it's handy to see backtrace of RTS
|
||||
# to get an idea what happens there
|
||||
-g*) append-ghc-cflags compile ${flag};;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
for flag in ${LDFLAGS}; do
|
||||
append-ghc-cflags link ${flag}
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags persistent compile -G0
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# libdir for prebuilt binary and for current system may mismatch
|
||||
# It does for prefix installation for example: bug #476998
|
||||
local bin_ghc_prefix=${WORKDIR}/usr
|
||||
local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
|
||||
local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
if [[ ${bin_libdir} != $(get_libdir) ]]; then
|
||||
einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
|
||||
# moving the dir itself is not strictly needed
|
||||
# but then USE=binary would result in installing
|
||||
# in '${bin_libdir}'
|
||||
mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
|
||||
|
||||
relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
fi
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it should point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
[[ ${MERGE_TYPE} == binary ]] && return
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages."
|
||||
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
|
||||
if [[ -d "${S}"/libraries/dph ]]; then
|
||||
# Sometimes dph libs get accidentally shipped with ghc
|
||||
# but they are not installed unless user requests it.
|
||||
# We never install them.
|
||||
elog "Removing 'libraries/dph'"
|
||||
rm -rf "${S}"/libraries/dph
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
# UPDATE ME for ghc-7
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.1-rc3-ghc-7.10-bootstrap.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.10.1-T10590-dequeue.patch
|
||||
# Since ${S}/packages does not include base, etc. add them to gen_contents_index
|
||||
sed -e 's@\(for REPO in .*\)@\1 base integer-gmp integer-gmp2 integer-simple template-haskell@' \
|
||||
-i libraries/gen_contents_index || die
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
|
||||
-i utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
bump_libs
|
||||
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use binary; then
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${HCFLAGS} ${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
# app-text/dblatex is not in portage, can not build PDF or PS
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
if use doc; then
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
else
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# this controls presence on 'xhtml' and 'haddock' in final install
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp2" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# don't strip anything. Very useful when stage2 SIGSEGVs on you
|
||||
echo "STRIP_CMD = :" >> mk/build.mk
|
||||
|
||||
elog "Final mk/build.mk:"
|
||||
cat mk/build.mk || die
|
||||
|
||||
local econf_args=()
|
||||
|
||||
# GHC embeds 'gcc' it was built by and uses it later.
|
||||
# Don't allow things like ccache or versioned binary slip.
|
||||
# We use stable thing across gcc upgrades.
|
||||
is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
|
||||
|
||||
if ! use ghcmakebinary; then
|
||||
econf_args+=(--with-system-libffi)
|
||||
econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
|
||||
fi
|
||||
|
||||
econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
GHC_P=${PN}-${GHC_PV}
|
||||
fi
|
||||
GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
# 1. build compiler binary first
|
||||
emake ghc/stage2/build/tmp/ghc-stage2
|
||||
# 2. pax-mark (bug #516430)
|
||||
pax-mark -m ghc/stage2/build/tmp/ghc-stage2
|
||||
# 3. and then all the rest
|
||||
emake all
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
else
|
||||
|
||||
emake -j1 install DESTDIR="${D}"
|
||||
dodoc "distrib/README" "ANNOUNCE" "LICENSE" "VERSION"
|
||||
|
||||
# rename ghc-shipped files to avoid collision
|
||||
# of external packages. Motivating example:
|
||||
# user had installed:
|
||||
# dev-lang/ghc-7.8.4-r0 (with transformers-0.3.0.0)
|
||||
# dev-haskell/transformers-0.4.2.0
|
||||
# then user tried to update to
|
||||
# dev-lang/ghc-7.8.4-r1 (with transformers-0.4.2.0)
|
||||
# this will lead to single .conf file collision.
|
||||
local shipped_conf renamed_conf
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
|
||||
for shipped_conf in "${package_confdir}"/*.conf; do
|
||||
# rename 'pkg-ver-id.conf' to 'pkg-ver-id-gentoo-${PF}.conf'
|
||||
renamed_conf=${shipped_conf%.conf}-gentoo-${PF}.conf
|
||||
mv "${shipped_conf}" "${renamed_conf}" || die
|
||||
done
|
||||
|
||||
# remove link, but leave 'haddock-${GHC_P}'
|
||||
rm -f "${ED}"/usr/bin/haddock
|
||||
|
||||
if [[ ! -f "${S}/VERSION" ]]; then
|
||||
echo "${GHC_PV}" > "${S}/VERSION" \
|
||||
|| die "Could not create file ${S}/VERSION"
|
||||
fi
|
||||
newbashcomp "${FILESDIR}"/ghc-bash-completion ghc-pkg
|
||||
newbashcomp utils/completion/ghc.bash ghc
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
# copy the package.conf.d, including timestamp, save it so we can help
|
||||
# users that have a broken package.conf.d
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
@ -1,640 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# Brief explanation of the bootstrap logic:
|
||||
#
|
||||
# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
|
||||
# where ghc-bin was primarily used for bootstrapping purposes.
|
||||
# From now on, these two ebuilds have been combined, with the
|
||||
# binary USE flag used to determine whether or not the pre-built
|
||||
# binary package should be emerged or whether ghc should be compiled
|
||||
# from source. If the latter, then the relevant ghc-bin for the
|
||||
# arch in question will be used in the working directory to compile
|
||||
# ghc from source.
|
||||
#
|
||||
# This solution has the advantage of allowing us to retain the one
|
||||
# ebuild for both packages, and thus phase out virtual/ghc.
|
||||
|
||||
# Note to users of hardened gcc-3.x:
|
||||
#
|
||||
# If you emerge ghc with hardened gcc it should work fine (because we
|
||||
# turn off the hardened features that would otherwise break ghc).
|
||||
# However, emerging ghc while using a vanilla gcc and then switching to
|
||||
# hardened gcc (using gcc-config) will leave you with a broken ghc. To
|
||||
# fix it you would need to either switch back to vanilla gcc or re-emerge
|
||||
# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
|
||||
# you switch to gcc-4.x that this will also break ghc and you'll need to
|
||||
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
|
||||
# gcc-3.x and 4.x with no problems.
|
||||
|
||||
EAPI="5"
|
||||
|
||||
inherit base autotools bash-completion-r1 eutils flag-o-matic multilib toolchain-funcs ghc-package versionator pax-utils
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64-stable-glibc.tbz2 )"
|
||||
arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64.tbz2 )"
|
||||
arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
|
||||
arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
|
||||
arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86-stable-glibc.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
ia64) return 0 ;;
|
||||
ppc) return 0 ;;
|
||||
ppc64) return 0 ;;
|
||||
sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
# ghc on ia64 needs gcc to support -mcmodel=medium (or some dark hackery) to avoid TOC overflow
|
||||
KEYWORDS="alpha amd64 ia64 ppc ppc64 sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
|
||||
IUSE+=" binary" # don't forget about me later!
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17 )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17 )
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5
|
||||
virtual/libffi
|
||||
!<dev-haskell/haddock-2.10.0
|
||||
sys-libs/ncurses[unicode]"
|
||||
# earlier versions than 2.4.2 of haddock only works with older ghc releases
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.14
|
||||
DEPEND="${RDEPEND}
|
||||
ghcbootstrap? (
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 ) )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.14 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
PDEPEND="
|
||||
${PDEPEND}
|
||||
llvm? ( sys-devel/llvm )"
|
||||
|
||||
# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
|
||||
REQUIRED_USE="ia64? ( !gmp )"
|
||||
|
||||
append-ghc-cflags() {
|
||||
local flag compile assemble link
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
|
||||
[[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
|
||||
[[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Debugging flags don't help either. You can't debug Haskell code
|
||||
# at the C source level and the mangler discards the debug info.
|
||||
-g*) ;;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
FILTERED_LDFLAGS=""
|
||||
for flag in ${LDFLAGS}; do
|
||||
case ${flag} in
|
||||
# Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
|
||||
"-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
|
||||
|
||||
# Ignore all other flags
|
||||
esac
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags compile -G0
|
||||
|
||||
# Unfortunately driver/split/ghc-split.lprl is dumb
|
||||
# enough to preserve stack marking for each split object
|
||||
# and it flags stack marking violation:
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
|
||||
case $($(tc-getAS) -v 2>&1 </dev/null) in
|
||||
*"GNU Binutils"*) # GNU ld
|
||||
append-ghc-cflags compile assemble -Wa,--noexecstack
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/ghc-pkg-${PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it shoult point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages for"
|
||||
ewarn "use with the ghc ebuild's USE=\"binary\" feature."
|
||||
use binary && \
|
||||
die "USE=\"ghcbootstrap binary\" is not a valid combination."
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${P}/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
|
||||
# failed to apply. FIXME
|
||||
#epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.4.1-darwin-CHOST.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
|
||||
|
||||
we_want_libffi_workaround() {
|
||||
use ghcmakebinary && return 1
|
||||
|
||||
# pick only registerised arches
|
||||
# https://bugs.gentoo.org/463814
|
||||
use amd64 && return 0
|
||||
use x86 && return 0
|
||||
return 1
|
||||
}
|
||||
# one mode external depend with unstable ABI be careful to stash it
|
||||
# avoid external libffi runtime when we build binaries
|
||||
we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.4.2-system-libffi.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -i -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
cd "${S}"/libraries/terminfo
|
||||
# bug #454216
|
||||
epatch "${FILESDIR}"/terminfo-0.3.2.5-tinfo.patch
|
||||
|
||||
cd "${S}"
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use binary; then
|
||||
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${FILTERED_LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
if use ghcbootstrap && use doc; then
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
else
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
echo "HADDOCK_DOCS = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# circumvent a very strange bug that seems related with ghc producing
|
||||
# too much output while being filtered through tee (e.g. due to
|
||||
# portage logging) reported as bug #111183
|
||||
echo "SRC_HC_OPTS+=-w" >> mk/build.mk
|
||||
|
||||
# some arches do not support ELF parsing for ghci module loading
|
||||
# PPC64: never worked (should be easy to implement)
|
||||
# alpha: never worked
|
||||
# arm: unimplemented or never worked
|
||||
if use alpha || use ppc64 || use arm; then
|
||||
echo "GhcWithInterpreter=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# we have to tell it to build unregisterised on some arches
|
||||
# ppc64: EvilMangler currently does not understand some TOCs
|
||||
# ia64: EvilMangler bitrot
|
||||
if use alpha || use ia64 || use ppc64; then
|
||||
echo "GhcUnregisterised=YES" >> mk/build.mk
|
||||
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
|
||||
echo "SplitObjs=NO" >> mk/build.mk
|
||||
echo "GhcRTSWays := debug" >> mk/build.mk
|
||||
echo "GhcNotThreaded=YES" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# arm: no EvilMangler support, no NCG support
|
||||
if use arm; then
|
||||
echo "GhcUnregisterised=YES" >> mk/build.mk
|
||||
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Have "ld -r --relax" problem with split-objs on sparc:
|
||||
if use sparc; then
|
||||
echo "SplitObjs=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
if ! use llvm; then
|
||||
echo "GhcWithLlvmCodeGen=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
|
||||
# compiled with, by saving the path to it. The purpose is to make sure
|
||||
# that GHC will use the very same gcc version when it compiles haskell
|
||||
# sources, as the extra-gcc-opts files contains extra gcc options which
|
||||
# match only this GCC version.
|
||||
# However, this is not required in Gentoo, as only modern GCCs are used
|
||||
# (>4).
|
||||
# Instead, this causes trouble when for example ccache is used during
|
||||
# compilation, but we don't want the wrappers to point to ccache.
|
||||
# Due to the above, we simply set GCC to be "gcc". When compiling ghc it
|
||||
# might point to ccache, once installed it will point to the users
|
||||
# regular gcc.
|
||||
|
||||
econf --with-gcc=gcc || die "econf failed"
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
limit_jobs() {
|
||||
if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
|
||||
ewarn "You have requested parallel build which is known to break."
|
||||
ewarn "Please report all breakages upstream."
|
||||
return
|
||||
fi
|
||||
echo $@
|
||||
}
|
||||
# ghc massively parallel make: #409631, #409873
|
||||
# but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
|
||||
emake $(limit_jobs -j1) all
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
|
||||
# Remove the docs if not requested
|
||||
if ! use doc; then
|
||||
rm -rf "${ED}/usr/share/doc/${P}/*/" \
|
||||
"${ED}/usr/share/doc/${P}/*.html" \
|
||||
|| die "could not remove docs (P vs PF revision mismatch?)"
|
||||
fi
|
||||
else
|
||||
local insttarget="install"
|
||||
|
||||
# We only built docs if we were bootstrapping, otherwise
|
||||
# we copy them out of the unpacked binary .tbz2
|
||||
if use doc && ! use ghcbootstrap; then
|
||||
mkdir -p "${ED}/usr/share/doc"
|
||||
mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
|
||||
|| die "failed to copy docs"
|
||||
else
|
||||
dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
|
||||
fi
|
||||
|
||||
emake -j1 ${insttarget} \
|
||||
DESTDIR="${D}" \
|
||||
|| die "make ${insttarget} failed"
|
||||
|
||||
# remove wrapper and linker
|
||||
rm -f "${ED}"/usr/bin/haddock*
|
||||
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
# so mark resulting binary
|
||||
pax-mark -m "${ED}/usr/$(get_libdir)/${P}/ghc"
|
||||
|
||||
dobashcomp "${FILESDIR}/ghc-bash-completion"
|
||||
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${P}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater --upgrade'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
# Be very careful here... Call order when upgrading is (according to PMS):
|
||||
# * src_install for new package
|
||||
# * pkg_preinst for new package
|
||||
# * pkg_postinst for new package
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# so you'll actually be touching the new packages files, not the one you
|
||||
# uninstall, due to that or installation directory ${P} will be the same for
|
||||
# both packages.
|
||||
|
||||
# Call order for reinstalling is (according to PMS):
|
||||
# * src_install
|
||||
# * pkg_preinst
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# * pkg_postinst
|
||||
|
||||
# Overwrite the modified package.cache with a copy of the
|
||||
# original one, so that it will be removed during uninstall.
|
||||
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
@ -1,829 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
# Brief explanation of the bootstrap logic:
|
||||
#
|
||||
# Previous ghc ebuilds have been split into two: ghc and ghc-bin,
|
||||
# where ghc-bin was primarily used for bootstrapping purposes.
|
||||
# From now on, these two ebuilds have been combined, with the
|
||||
# binary USE flag used to determine whether or not the pre-built
|
||||
# binary package should be emerged or whether ghc should be compiled
|
||||
# from source. If the latter, then the relevant ghc-bin for the
|
||||
# arch in question will be used in the working directory to compile
|
||||
# ghc from source.
|
||||
#
|
||||
# This solution has the advantage of allowing us to retain the one
|
||||
# ebuild for both packages, and thus phase out virtual/ghc.
|
||||
|
||||
# Note to users of hardened gcc-3.x:
|
||||
#
|
||||
# If you emerge ghc with hardened gcc it should work fine (because we
|
||||
# turn off the hardened features that would otherwise break ghc).
|
||||
# However, emerging ghc while using a vanilla gcc and then switching to
|
||||
# hardened gcc (using gcc-config) will leave you with a broken ghc. To
|
||||
# fix it you would need to either switch back to vanilla gcc or re-emerge
|
||||
# ghc (or ghc-bin). Note that also if you are using hardened gcc-3.x and
|
||||
# you switch to gcc-4.x that this will also break ghc and you'll need to
|
||||
# re-emerge ghc (or ghc-bin). People using vanilla gcc can switch between
|
||||
# gcc-3.x and 4.x with no problems.
|
||||
|
||||
EAPI="5"
|
||||
|
||||
# to make make a crosscompiler use crossdev and symlink ghc tree into
|
||||
# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
|
||||
#
|
||||
# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} = ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
||||
export CTARGET=${CATEGORY/cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
|
||||
inherit multilib multiprocessing pax-utils toolchain-funcs versionator
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-r1-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
|
||||
arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-r1-ia64.tbz2 )"
|
||||
arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-r1-ppc.tbz2 )"
|
||||
arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-r1-ppc64.tbz2 )"
|
||||
arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-r1-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
ia64) return 0 ;;
|
||||
ppc) return 0 ;;
|
||||
ppc64) return 0 ;;
|
||||
sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV}/${P}-src.tar.bz2 )"
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~alpha amd64 ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp llvm"
|
||||
IUSE+=" binary" # don't forget about me later!
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17 )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17 )
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5
|
||||
virtual/libffi
|
||||
!<dev-haskell/haddock-2.4.2
|
||||
sys-libs/ncurses[unicode]"
|
||||
# earlier versions than 2.4.2 of haddock only works with older ghc releases
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.14
|
||||
DEPEND="${RDEPEND}
|
||||
ghcbootstrap? (
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 ) )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.15 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
PDEPEND="
|
||||
${PDEPEND}
|
||||
llvm? ( sys-devel/llvm )"
|
||||
|
||||
# ia64 fails to return from STG GMP primitives (stage2 always SIGSEGVs)
|
||||
REQUIRED_USE="ia64? ( !gmp )"
|
||||
|
||||
# haskell libraries built with cabal in configure mode, #515354
|
||||
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
|
||||
|
||||
is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
append-ghc-cflags() {
|
||||
local flag compile assemble link
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && GHC_FLAGS="${GHC_FLAGS} -optc${flag}" CFLAGS="${CFLAGS} ${flag}"
|
||||
[[ ${assemble} ]] && GHC_FLAGS="${GHC_FLAGS} -opta${flag}" CFLAGS="${CFLAGS} ${flag}"
|
||||
[[ ${link} ]] && GHC_FLAGS="${GHC_FLAGS} -optl${flag}" FILTERED_LDFLAGS="${FILTERED_LDFLAGS} ${flag}";;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
if is_crosscompile; then
|
||||
export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
|
||||
export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
|
||||
einfo "Crosscompiling mode:"
|
||||
einfo " CHOST: ${CHOST}"
|
||||
einfo " CTARGET: ${CTARGET}"
|
||||
einfo " CFLAGS: ${CFLAGS}"
|
||||
einfo " LDFLAGS: ${LDFLAGS}"
|
||||
return
|
||||
fi
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Sometimes it's handy to see backtrace of RTS
|
||||
# to get an idea what happens there
|
||||
-g*) append-ghc-cflags compile ${flag};;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
FILTERED_LDFLAGS=""
|
||||
for flag in ${LDFLAGS}; do
|
||||
case ${flag} in
|
||||
# Pass the canary. we don't quite respect LDFLAGS, but we have an excuse!
|
||||
"-Wl,--hash-style="*) append-ghc-cflags link ${flag};;
|
||||
|
||||
# Ignore all other flags
|
||||
esac
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags compile -G0 -Os
|
||||
|
||||
# Unfortunately driver/split/ghc-split.lprl is dumb
|
||||
# enough to preserve stack marking for each split object
|
||||
# and it flags stack marking violation:
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__1.o
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__2.o
|
||||
# * !WX --- --- usr/lib64/ghc-7.4.1/base-4.5.0.0/libHSbase-4.5.0.0.a:Fingerprint__3.o
|
||||
case $($(tc-getAS) -v 2>&1 </dev/null) in
|
||||
*"GNU Binutils"*) # GNU ld
|
||||
append-ghc-cflags compile assemble -Wa,--noexecstack
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# libdir for prebuilt binary and for current system may mismatch
|
||||
# It does for prefix installation for example: bug #476998
|
||||
local bin_ghc_prefix=${WORKDIR}/usr
|
||||
local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
|
||||
local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/ghc-pkg-${PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
if [[ ${bin_libdir} != $(get_libdir) ]]; then
|
||||
einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
|
||||
# moving the dir itself is not strictly needed
|
||||
# but then USE=binary would result in installing
|
||||
# in '${bin_libdir}'
|
||||
mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
|
||||
|
||||
relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
|
||||
fi
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${PV}" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it should point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${PV}" \
|
||||
"$gp_back" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages for"
|
||||
ewarn "use with the ghc ebuild's USE=\"binary\" feature."
|
||||
use binary && \
|
||||
die "USE=\"ghcbootstrap binary\" is not a valid combination."
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/ghc-${PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${P}/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
# UPDATE ME for ghc-7
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
# epatch "${FILESDIR}"/${PN}-7.0.4-darwin8.patch
|
||||
# failed to apply. FIXME
|
||||
#epatch "${FILESDIR}"/${PN}-6.12.3-mach-o-relocation-limit.patch
|
||||
|
||||
# epatch "${FILESDIR}"/${PN}-7.4-rc2-macos-prefix-respect-gcc.patch
|
||||
# epatch "${FILESDIR}"/${PN}-7.2.1-freebsd-CHOST.patch
|
||||
|
||||
we_want_libffi_workaround() {
|
||||
use ghcmakebinary && return 1
|
||||
|
||||
# pick only registerised arches
|
||||
# https://bugs.gentoo.org/463814
|
||||
use amd64 && return 0
|
||||
use x86 && return 0
|
||||
return 1
|
||||
}
|
||||
# one mode external depend with unstable ABI be careful to stash it
|
||||
# avoid external libffi runtime when we build binaries
|
||||
we_want_libffi_workaround && epatch "${FILESDIR}"/${PN}-7.5.20120505-system-libffi.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.4.1-ticket-7339-fix-unaligned-unreg.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.6.2-integer-simple-div-mod.patch
|
||||
# ghc-7.8 changed linker code and likely fixed it
|
||||
epatch "${FILESDIR}"/${PN}-7.6.3-trac-3333-weak-syms.patch
|
||||
# bug 518734
|
||||
epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.patch
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
|
||||
-i utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
GHC_PV=${PV} # overrided in live ebuilds
|
||||
|
||||
if ! use binary; then
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${FILTERED_LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
# app-text/dblatex is not in portage, can not build PDF or PS
|
||||
if use ghcbootstrap && use doc; then
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
if is_crosscompile; then
|
||||
# TODO this is a workaround for this build error with the live ebuild with haddock:
|
||||
# make[1]: *** No rule to make target `compiler/stage2/build/Module.hi',
|
||||
# needed by `utils/haddock/dist/build/Main.o'. Stop.
|
||||
echo "HADDOCK_DOCS = NO" >> mk/build.mk
|
||||
else
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
fi
|
||||
else
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
echo "HADDOCK_DOCS = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# circumvent a very strange bug that seems related with ghc producing
|
||||
# too much output while being filtered through tee (e.g. due to
|
||||
# portage logging) reported as bug #111183
|
||||
echo "SRC_HC_OPTS+=-w" >> mk/build.mk
|
||||
|
||||
# some arches do not support ELF parsing for ghci module loading
|
||||
# PPC64: never worked (should be easy to implement)
|
||||
# alpha: never worked
|
||||
# arm: http://hackage.haskell.org/trac/ghc/changeset/27302c9094909e04eb73f200d52d5e9370c34a8a
|
||||
if use alpha || use ppc64; then
|
||||
echo "GhcWithInterpreter=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# we have to tell it to build unregisterised on some arches
|
||||
# ppc64: EvilMangler currently does not understand some TOCs
|
||||
# ia64: EvilMangler bitrot
|
||||
# set GHC_IS_UNREG if you like to build slow unregisterised
|
||||
# host compiler. Handy if you plan to user resulting
|
||||
# host compiler as a booting compiler for crosscompiler
|
||||
# which can work only in unregisterised mode.
|
||||
if use alpha || use ia64 || use ppc64 || [[ -n ${GHC_IS_UNREG} ]]; then
|
||||
echo "GhcUnregisterised=YES" >> mk/build.mk
|
||||
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
|
||||
echo "SplitObjs=NO" >> mk/build.mk
|
||||
echo "GhcRTSWays := debug" >> mk/build.mk
|
||||
echo "GhcNotThreaded=YES" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# arm: no EvilMangler support, no NCG support
|
||||
if use arm; then
|
||||
echo "GhcUnregisterised=YES" >> mk/build.mk
|
||||
echo "GhcWithNativeCodeGen=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Have "ld -r --relax" problem with split-objs on sparc:
|
||||
if use sparc; then
|
||||
echo "SplitObjs=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
if ! use llvm; then
|
||||
echo "GhcWithLlvmCodeGen=NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Since GHC 6.12.2 the GHC wrappers store which GCC version GHC was
|
||||
# compiled with, by saving the path to it. The purpose is to make sure
|
||||
# that GHC will use the very same gcc version when it compiles haskell
|
||||
# sources, as the extra-gcc-opts files contains extra gcc options which
|
||||
# match only this GCC version.
|
||||
# However, this is not required in Gentoo, as only modern GCCs are used
|
||||
# (>4).
|
||||
# Instead, this causes trouble when for example ccache is used during
|
||||
# compilation, but we don't want the wrappers to point to ccache.
|
||||
# Due to the above, we simply set GCC to be "gcc". When compiling ghc it
|
||||
# might point to ccache, once installed it will point to the users
|
||||
# regular gcc.
|
||||
|
||||
local econf_args=()
|
||||
|
||||
is_crosscompile || econf_args+=--with-gcc=${CHOST}-gcc
|
||||
|
||||
econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot \
|
||||
|| die "econf failed"
|
||||
|
||||
[[ ${PV} == *9999* ]] && GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
limit_jobs() {
|
||||
local user_jobs=$(makeopts_jobs)
|
||||
local max_nonbreaking_jobs=$1
|
||||
|
||||
[[ ${user_jobs} -le ${max_nonbreaking_jobs} ]] && return
|
||||
|
||||
if [[ -n ${I_DEMAND_MY_CORES_LOADED} ]]; then
|
||||
ewarn "You have requested parallel build which is known to break."
|
||||
ewarn "Please report all breakages upstream."
|
||||
return
|
||||
else
|
||||
ewarn "Limiting MAKEOPTS -j${user_jobs} -> -j${max_nonbreaking_jobs} (bug #456386)"
|
||||
user_jobs=${max_nonbreaking_jobs}
|
||||
fi
|
||||
echo -j${user_jobs}
|
||||
}
|
||||
# ghc massively parallel make: #409631, #409873
|
||||
# but let users screw it by setting 'I_DEMAND_MY_CORES_LOADED'
|
||||
# 4 parallel jobs usually does not break
|
||||
|
||||
# 1. build compiler binary first
|
||||
emake $(limit_jobs 4) ghc/stage2/build/tmp/ghc-stage2 V=1
|
||||
# 2. pax-mark (bug #516430)
|
||||
pax-mark -m ghc/stage2/build/tmp/ghc-stage2
|
||||
# 3. and then all the rest
|
||||
emake $(limit_jobs 4) all V=1
|
||||
|
||||
if is_crosscompile; then
|
||||
# runghc does not work for a stage1 compiler, we can build it anyway
|
||||
# so it will print the error message: not built for interactive use
|
||||
pushd "${S}/utils/runghc" || die "Could not cd to utils/runghc"
|
||||
if [ ! -f Setup.hs ]; then
|
||||
echo 'import Distribution.Simple; main = defaultMainWithHooks defaultUserHooks' \
|
||||
> Setup.hs || die "failed to create default Setup.hs"
|
||||
fi
|
||||
ghc -o setup --make Setup.hs || die "setup build failed"
|
||||
./setup configure || die "runghc configure failed"
|
||||
sed -e "s@VERSION@\"${GHC_PV}\"@" -i runghc.hs
|
||||
./setup build || die "runghc build failed"
|
||||
popd
|
||||
fi
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
add-c_nonshared-to-ghci-libs() {
|
||||
local ghci_lib
|
||||
local nonshared_dir=${T}/libc_nonshared_objects
|
||||
|
||||
is_crosscompile && return
|
||||
use elibc_glibc || return
|
||||
use prefix && return
|
||||
|
||||
# we expect 'libc.a' bits be self-sufficient
|
||||
if gcc-specs-pie; then
|
||||
use x86 && return # but on x86 pie means linker support: #486140
|
||||
fi
|
||||
|
||||
get-nonshared-objects() {
|
||||
# ns - 'nonshared'
|
||||
local ns_objects=" "
|
||||
local ns_sym
|
||||
local ns_srco
|
||||
local ns_dsto
|
||||
|
||||
# extract
|
||||
mkdir "${nonshared_dir}" || die
|
||||
pushd "${nonshared_dir}" >/dev/null || die
|
||||
$(tc-getAR) x "${ROOT}"/usr/$(get_libdir)/libc.a
|
||||
popd >/dev/null || die
|
||||
|
||||
# they are mostly contents of /usr/$(get_libdir)/libc_nonstahed.a
|
||||
# but 'c_nonstahed' contains PIC variants of symbols.
|
||||
# ghci uses non-PIC ones
|
||||
for ns_sym in \
|
||||
stat fstat lstat mknod \
|
||||
stat64 fstat64 lstat64 \
|
||||
fstatat fstatat64 mknodat
|
||||
do
|
||||
ns_srco=${nonshared_dir}/${ns_sym}.o
|
||||
ns_dsto=${nonshared_dir}/${ns_sym}_weakened.o
|
||||
[[ -f ${ns_srco} ]] || continue
|
||||
# here we do The Magic:
|
||||
# 1. --keep-global-symbol= hides everything to adoid double definition
|
||||
# of stuff like __stat, __fstat and
|
||||
# 2. --weaken converts exported symbols to weak symbols to be available
|
||||
# for redefinition
|
||||
$(tc-getOBJCOPY) \
|
||||
--weaken --keep-global-symbol=${ns_sym} \
|
||||
"${ns_srco}" "${ns_dsto}" || die
|
||||
|
||||
ns_objects+=" ${ns_dsto}"
|
||||
done
|
||||
|
||||
echo "${ns_objects}"
|
||||
}
|
||||
# bug #452442: when building libraries for ghci
|
||||
# ghc basically glues them together:
|
||||
# $ ld -r -o result foo.o bar.o ...
|
||||
# that way some symbols defined in libc_nonshared.a
|
||||
# do not get included into final HS*.o files
|
||||
# We piggyback on one of early loaded wired-in library
|
||||
# loaded before 'base'.
|
||||
while read ghci_lib
|
||||
do
|
||||
einfo "relinking '${ghci_lib}' with c_includes"
|
||||
mv "${ghci_lib}" "${ghci_lib}".unrelinked.o || die
|
||||
$(tc-getLD) -r -o "${ghci_lib}" \
|
||||
"${ghci_lib}".unrelinked.o \
|
||||
$(get-nonshared-objects) || die
|
||||
rm -r "${nonshared_dir}" || die
|
||||
rm "${ghci_lib}".unrelinked.o || die
|
||||
done < <(find "${ED}"/usr/$(get_libdir)/${P}/ -name 'HSghc-prim*.o')
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
|
||||
# Remove the docs if not requested
|
||||
if ! use doc; then
|
||||
rm -rf "${ED}/usr/share/doc/${P}/*/" \
|
||||
"${ED}/usr/share/doc/${P}/*.html" \
|
||||
|| die "could not remove docs (P vs PF revision mismatch?)"
|
||||
fi
|
||||
else
|
||||
local insttarget="install"
|
||||
|
||||
# We only built docs if we were bootstrapping, otherwise
|
||||
# we copy them out of the unpacked binary .tbz2
|
||||
if use doc && ! use ghcbootstrap; then
|
||||
mkdir -p "${ED}/usr/share/doc"
|
||||
mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
|
||||
|| die "failed to copy docs"
|
||||
else
|
||||
dodoc "${S}/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
|
||||
fi
|
||||
|
||||
emake -j1 ${insttarget} \
|
||||
DESTDIR="${D}" \
|
||||
|| die "make ${insttarget} failed"
|
||||
|
||||
# remove wrapper and link
|
||||
rm -f "${ED}"/usr/bin/haddock*
|
||||
|
||||
add-c_nonshared-to-ghci-libs
|
||||
|
||||
if [[ ! -f "${S}/VERSION" ]]; then
|
||||
echo "${GHC_PV}" > "${S}/VERSION" \
|
||||
|| die "Could not create file ${S}/VERSION"
|
||||
fi
|
||||
dobashcomp "${FILESDIR}/ghc-bash-completion"
|
||||
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${PN}-${GHC_PV}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
# copy the package.conf.d, including timestamp, save it so we can help
|
||||
# users that have a broken package.conf.d
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater --upgrade'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
if is_crosscompile; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "GHC built as a cross compiler. The interpreter, ghci and runghc, do"
|
||||
ewarn "not work for a cross compiler."
|
||||
ewarn "For the ghci error: \"<command line>: not built for interactive use\" see:"
|
||||
ewarn "http://www.haskell.org/haskellwiki/GHC:FAQ#When_I_try_to_start_ghci_.28probably_one_I_compiled_myself.29_it_says_ghc-5.02:_not_built_for_interactive_use"
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
# Be very careful here... Call order when upgrading is (according to PMS):
|
||||
# * src_install for new package
|
||||
# * pkg_preinst for new package
|
||||
# * pkg_postinst for new package
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# so you'll actually be touching the new packages files, not the one you
|
||||
# uninstall, due to that or installation directory ${P} will be the same for
|
||||
# both packages.
|
||||
|
||||
# Call order for reinstalling is (according to PMS):
|
||||
# * src_install
|
||||
# * pkg_preinst
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# * pkg_postinst
|
||||
|
||||
# Overwrite the modified package.cache with a copy of the
|
||||
# original one, so that it will be removed during uninstall.
|
||||
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
@ -1,615 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# to make make a crosscompiler use crossdev and symlink ghc tree into
|
||||
# cross overlay. result would look like 'cross-sparc-unknown-linux-gnu/ghc'
|
||||
#
|
||||
# 'CTARGET' definition and 'is_crosscompile' are taken from 'toolchain.eclass'
|
||||
export CTARGET=${CTARGET:-${CHOST}}
|
||||
if [[ ${CTARGET} = ${CHOST} ]] ; then
|
||||
if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
|
||||
export CTARGET=${CATEGORY/cross-}
|
||||
fi
|
||||
fi
|
||||
|
||||
inherit autotools bash-completion-r1 eutils flag-o-matic ghc-package
|
||||
inherit multilib pax-utils toolchain-funcs versionator
|
||||
|
||||
DESCRIPTION="The Glasgow Haskell Compiler"
|
||||
HOMEPAGE="http://www.haskell.org/ghc/"
|
||||
|
||||
# we don't have any binaries yet
|
||||
arch_binaries=""
|
||||
|
||||
# sorted!
|
||||
#arch_binaries="$arch_binaries alpha? ( http://code.haskell.org/~slyfox/ghc-alpha/ghc-bin-${PV}-alpha.tbz2 )"
|
||||
#arch_binaries="$arch_binaries arm? ( http://code.haskell.org/~slyfox/ghc-arm/ghc-bin-${PV}-arm.tbz2 )"
|
||||
arch_binaries="$arch_binaries amd64? ( http://code.haskell.org/~slyfox/ghc-amd64/ghc-bin-${PV}-amd64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ia64? ( http://code.haskell.org/~slyfox/ghc-ia64/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc? ( http://code.haskell.org/~slyfox/ghc-ppc/ghc-bin-${PV}-ppc.tbz2 )"
|
||||
#arch_binaries="$arch_binaries ppc64? ( http://code.haskell.org/~slyfox/ghc-ppc64/ghc-bin-${PV}-ppc64.tbz2 )"
|
||||
#arch_binaries="$arch_binaries sparc? ( http://code.haskell.org/~slyfox/ghc-sparc/ghc-bin-${PV}-sparc.tbz2 )"
|
||||
arch_binaries="$arch_binaries x86? ( http://code.haskell.org/~slyfox/ghc-x86/ghc-bin-${PV}-x86.tbz2 )"
|
||||
|
||||
# various ports:
|
||||
#arch_binaries="$arch_binaries x86-fbsd? ( http://code.haskell.org/~slyfox/ghc-x86-fbsd/ghc-bin-${PV}-x86-fbsd.tbz2 )"
|
||||
|
||||
# 0 - yet
|
||||
yet_binary() {
|
||||
case "${ARCH}" in
|
||||
#alpha) return 0 ;;
|
||||
#arm)
|
||||
# ewarn "ARM binary is built on armv5tel-eabi toolchain. Use with caution."
|
||||
# return 0
|
||||
#;;
|
||||
amd64) return 0 ;;
|
||||
#ia64) return 0 ;;
|
||||
#ppc) return 0 ;;
|
||||
#ppc64) return 0 ;;
|
||||
#sparc) return 0 ;;
|
||||
x86) return 0 ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
GHC_PV=${PV}
|
||||
#GHC_PV=7.8.0.20140228 # uncomment only for -rc ebuilds
|
||||
GHC_P=${PN}-${GHC_PV} # using ${P} is almost never correct
|
||||
|
||||
SRC_URI="!binary? ( http://www.haskell.org/ghc/dist/${PV/_rc/-rc}/${GHC_P}-src.tar.xz )"
|
||||
S="${WORKDIR}"/${GHC_P}
|
||||
|
||||
[[ -n $arch_binaries ]] && SRC_URI+=" !ghcbootstrap? ( $arch_binaries )"
|
||||
LICENSE="BSD"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
|
||||
IUSE="doc ghcbootstrap ghcmakebinary +gmp"
|
||||
IUSE+=" binary"
|
||||
IUSE+=" elibc_glibc" # system stuff
|
||||
|
||||
RDEPEND="
|
||||
>=dev-lang/perl-5.6.1
|
||||
>=dev-libs/gmp-5:=
|
||||
sys-libs/ncurses:=[unicode]
|
||||
!ghcmakebinary? ( virtual/libffi:= )
|
||||
!kernel_Darwin? ( >=sys-devel/gcc-2.95.3 )
|
||||
kernel_linux? ( >=sys-devel/binutils-2.17 )
|
||||
kernel_SunOS? ( >=sys-devel/binutils-2.17 )
|
||||
"
|
||||
|
||||
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to
|
||||
# that we want the binaries to use the latest versioun available, and not to be
|
||||
# built against gmp-4
|
||||
|
||||
# similar for glibc. we have bootstrapped binaries against glibc-2.17
|
||||
DEPEND="${RDEPEND}
|
||||
ghcbootstrap? (
|
||||
doc? ( app-text/docbook-xml-dtd:4.2
|
||||
app-text/docbook-xml-dtd:4.5
|
||||
app-text/docbook-xsl-stylesheets
|
||||
>=dev-libs/libxslt-1.1.2 ) )
|
||||
!ghcbootstrap? ( !prefix? ( elibc_glibc? ( >=sys-libs/glibc-2.17 ) ) )"
|
||||
|
||||
PDEPEND="!ghcbootstrap? ( =app-admin/haskell-updater-1.2* )"
|
||||
|
||||
REQUIRED_USE="?? ( ghcbootstrap binary )"
|
||||
|
||||
# haskell libraries built with cabal in configure mode, #515354
|
||||
QA_CONFIGURE_OPTIONS+=" --with-compiler --with-gcc"
|
||||
|
||||
is_crosscompile() {
|
||||
[[ ${CHOST} != ${CTARGET} ]]
|
||||
}
|
||||
|
||||
append-ghc-cflags() {
|
||||
local persistent compile assemble link
|
||||
local flag ghcflag
|
||||
|
||||
for flag in $*; do
|
||||
case ${flag} in
|
||||
persistent) persistent="yes";;
|
||||
compile) compile="yes";;
|
||||
assemble) assemble="yes";;
|
||||
link) link="yes";;
|
||||
*)
|
||||
[[ ${compile} ]] && ghcflag="-optc${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${assemble} ]] && ghcflag="-opta${flag}" CFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
[[ ${link} ]] && ghcflag="-optl${flag}" LDFLAGS+=" ${flag}" && GHC_FLAGS+=" ${ghcflag}" &&
|
||||
[[ ${persistent} ]] && GHC_PERSISTENT_FLAGS+=" ${ghcflag}"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
}
|
||||
|
||||
ghc_setup_cflags() {
|
||||
if is_crosscompile; then
|
||||
export CFLAGS=${GHC_CFLAGS-"-O2 -pipe"}
|
||||
export LDFLAGS=${GHC_LDFLAGS-"-Wl,-O1"}
|
||||
einfo "Crosscompiling mode:"
|
||||
einfo " CHOST: ${CHOST}"
|
||||
einfo " CTARGET: ${CTARGET}"
|
||||
einfo " CFLAGS: ${CFLAGS}"
|
||||
einfo " LDFLAGS: ${LDFLAGS}"
|
||||
return
|
||||
fi
|
||||
# We need to be very careful with the CFLAGS we ask ghc to pass through to
|
||||
# gcc. There are plenty of flags which will make gcc produce output that
|
||||
# breaks ghc in various ways. The main ones we want to pass through are
|
||||
# -mcpu / -march flags. These are important for arches like alpha & sparc.
|
||||
# We also use these CFLAGS for building the C parts of ghc, ie the rts.
|
||||
strip-flags
|
||||
strip-unsupported-flags
|
||||
|
||||
# Cmm can't parse line numbers #482086
|
||||
replace-flags -ggdb[3-9] -ggdb2
|
||||
|
||||
GHC_FLAGS=""
|
||||
GHC_PERSISTENT_FLAGS=""
|
||||
for flag in ${CFLAGS}; do
|
||||
case ${flag} in
|
||||
|
||||
# Ignore extra optimisation (ghc passes -O to gcc anyway)
|
||||
# -O2 and above break on too many systems
|
||||
-O*) ;;
|
||||
|
||||
# Arch and ABI flags are what we're really after
|
||||
-m*) append-ghc-cflags compile assemble ${flag};;
|
||||
|
||||
# Sometimes it's handy to see backtrace of RTS
|
||||
# to get an idea what happens there
|
||||
-g*) append-ghc-cflags compile ${flag};;
|
||||
|
||||
# Ignore all other flags, including all -f* flags
|
||||
esac
|
||||
done
|
||||
|
||||
for flag in ${LDFLAGS}; do
|
||||
append-ghc-cflags link ${flag}
|
||||
done
|
||||
|
||||
# hardened-gcc needs to be disabled, because the mangler doesn't accept
|
||||
# its output.
|
||||
gcc-specs-pie && append-ghc-cflags persistent compile link -nopie
|
||||
gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector
|
||||
|
||||
# prevent from failind building unregisterised ghc:
|
||||
# http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg171602.html
|
||||
use ppc64 && append-ghc-cflags persistent compile -mminimal-toc
|
||||
# fix the similar issue as ppc64 TOC on ia64. ia64 has limited size of small data
|
||||
# currently ghc fails to build haddock
|
||||
# http://osdir.com/ml/gnu.binutils.bugs/2004-10/msg00050.html
|
||||
use ia64 && append-ghc-cflags persistent compile -G0 -Os
|
||||
}
|
||||
|
||||
# substitutes string $1 to $2 in files $3 $4 ...
|
||||
relocate_path() {
|
||||
local from=$1
|
||||
local to=$2
|
||||
shift 2
|
||||
local file=
|
||||
for file in "$@"
|
||||
do
|
||||
sed -i -e "s|$from|$to|g" \
|
||||
"$file" || die "path relocation failed for '$file'"
|
||||
done
|
||||
}
|
||||
|
||||
# changes hardcoded ghc paths and updates package index
|
||||
# $1 - new absolute root path
|
||||
relocate_ghc() {
|
||||
local to=$1
|
||||
|
||||
# libdir for prebuilt binary and for current system may mismatch
|
||||
# It does for prefix installation for example: bug #476998
|
||||
local bin_ghc_prefix=${WORKDIR}/usr
|
||||
local bin_libpath=$(echo "${bin_ghc_prefix}"/lib*)
|
||||
local bin_libdir=${bin_libpath#${bin_ghc_prefix}/}
|
||||
|
||||
# backup original script to use it later after relocation
|
||||
local gp_back="${T}/ghc-pkg-${GHC_PV}-orig"
|
||||
cp "${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" "$gp_back" || die "unable to backup ghc-pkg wrapper"
|
||||
|
||||
if [[ ${bin_libdir} != $(get_libdir) ]]; then
|
||||
einfo "Relocating '${bin_libdir}' to '$(get_libdir)' (bug #476998)"
|
||||
# moving the dir itself is not strictly needed
|
||||
# but then USE=binary would result in installing
|
||||
# in '${bin_libdir}'
|
||||
mv "${bin_ghc_prefix}/${bin_libdir}" "${bin_ghc_prefix}/$(get_libdir)" || die
|
||||
|
||||
relocate_path "/usr/${bin_libdir}" "/usr/$(get_libdir)" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
fi
|
||||
|
||||
# Relocate from /usr to ${EPREFIX}/usr
|
||||
relocate_path "/usr" "${to}/usr" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/$(get_libdir)/${GHC_P}/package.conf.d/"*
|
||||
|
||||
# this one we will use to regenerate cache
|
||||
# so it should point to current tree location
|
||||
relocate_path "/usr" "${WORKDIR}/usr" "$gp_back"
|
||||
|
||||
if use prefix; then
|
||||
# and insert LD_LIBRARY_PATH entry to EPREFIX dir tree
|
||||
# TODO: add the same for darwin's CHOST and it's DYLD_
|
||||
local new_ldpath='LD_LIBRARY_PATH="'${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir)'${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}"\nexport LD_LIBRARY_PATH'
|
||||
sed -i -e '2i'"$new_ldpath" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghci-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/ghc-pkg-${GHC_PV}" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
"${WORKDIR}/usr/bin/runghc-${GHC_PV}" \
|
||||
"$gp_back" \
|
||||
"${WORKDIR}/usr/bin/hsc2hs" \
|
||||
|| die "Adding LD_LIBRARY_PATH for wrappers failed"
|
||||
fi
|
||||
|
||||
# regenerate the binary package cache
|
||||
"$gp_back" recache || die "failed to update cache after relocation"
|
||||
rm "$gp_back"
|
||||
}
|
||||
|
||||
pkg_setup() {
|
||||
# quiet portage about prebuilt binaries
|
||||
use binary && QA_PREBUILT="*"
|
||||
|
||||
if use ghcbootstrap; then
|
||||
ewarn "You requested ghc bootstrapping, this is usually only used"
|
||||
ewarn "by Gentoo developers to make binary .tbz2 packages."
|
||||
|
||||
[[ -z $(type -P ghc) ]] && \
|
||||
die "Could not find a ghc to bootstrap with."
|
||||
else
|
||||
if ! yet_binary; then
|
||||
eerror "Please try emerging with USE=ghcbootstrap and report build"
|
||||
eerror "sucess or failure to the haskell team (haskell@gentoo.org)"
|
||||
die "No binary available for '${ARCH}' arch yet, USE=ghcbootstrap"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
src_unpack() {
|
||||
# Create the ${S} dir if we're using the binary version
|
||||
use binary && mkdir "${S}"
|
||||
|
||||
# the Solaris and Darwin binaries from ghc (maeder) need to be
|
||||
# unpacked separately, so prevent them from being unpacked
|
||||
local ONLYA=${A}
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*) ONLYA=${GHC_P}-src.tar.bz2 ;;
|
||||
esac
|
||||
unpack ${ONLYA}
|
||||
|
||||
if [[ -d "${S}"/libraries/dph ]]; then
|
||||
# Sometimes dph libs get accidentally shipped with ghc
|
||||
# but they are not installed unless user requests it.
|
||||
# We never install them.
|
||||
elog "Removing 'libraries/dph'"
|
||||
rm -rf "${S}"/libraries/dph
|
||||
fi
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
ghc_setup_cflags
|
||||
|
||||
if ! use ghcbootstrap && [[ ${CHOST} != *-darwin* && ${CHOST} != *-solaris* ]]; then
|
||||
# Modify the wrapper script from the binary tarball to use GHC_PERSISTENT_FLAGS.
|
||||
# See bug #313635.
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${WORKDIR}/usr/bin/ghc-${GHC_PV}"
|
||||
|
||||
# allow hardened users use vanilla binary to bootstrap ghc
|
||||
# ghci uses mmap with rwx protection at it implements dynamic
|
||||
# linking on it's own (bug #299709)
|
||||
pax-mark -m "${WORKDIR}/usr/$(get_libdir)/${GHC_P}/bin/ghc"
|
||||
fi
|
||||
|
||||
if use binary; then
|
||||
if use prefix; then
|
||||
relocate_ghc "${EPREFIX}"
|
||||
fi
|
||||
|
||||
# Move unpacked files to the expected place
|
||||
mv "${WORKDIR}/usr" "${S}"
|
||||
else
|
||||
if ! use ghcbootstrap; then
|
||||
case ${CHOST} in
|
||||
*-darwin* | *-solaris*)
|
||||
# UPDATE ME for ghc-7
|
||||
mkdir "${WORKDIR}"/ghc-bin-installer || die
|
||||
pushd "${WORKDIR}"/ghc-bin-installer > /dev/null || die
|
||||
use sparc-solaris && unpack ghc-6.10.4-sparc-sun-solaris2.tar.bz2
|
||||
use x86-solaris && unpack ghc-7.0.3-i386-unknown-solaris2.tar.bz2
|
||||
use x86-macos && unpack ghc-7.4.1-i386-apple-darwin.tar.bz2
|
||||
use x64-macos && unpack ghc-7.4.1-x86_64-apple-darwin.tar.bz2
|
||||
popd > /dev/null
|
||||
|
||||
pushd "${WORKDIR}"/ghc-bin-installer/ghc-[67].?*.? > /dev/null || die
|
||||
# fix the binaries so they run, on Solaris we need an
|
||||
# LD_LIBRARY_PATH which has our prefix libdirs, on
|
||||
# Darwin we need to replace the frameworks with our libs
|
||||
# from the prefix fix before installation, because some
|
||||
# of the tools are actually used during configure/make
|
||||
if [[ ${CHOST} == *-solaris* ]] ; then
|
||||
export LD_LIBRARY_PATH="${EPREFIX}/$(get_libdir):${EPREFIX}/usr/$(get_libdir):${LD_LIBRARY_PATH}"
|
||||
elif [[ ${CHOST} == *-darwin* ]] ; then
|
||||
local readline_framework=GNUreadline.framework/GNUreadline
|
||||
local gmp_framework=/opt/local/lib/libgmp.10.dylib
|
||||
local ncurses_file=/opt/local/lib/libncurses.5.dylib
|
||||
for binary in $(scanmacho -BRE MH_EXECUTE -F '%F' .) ; do
|
||||
install_name_tool -change \
|
||||
${readline_framework} \
|
||||
"${EPREFIX}"/lib/libreadline.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${gmp_framework} \
|
||||
"${EPREFIX}"/usr/lib/libgmp.dylib \
|
||||
${binary} || die
|
||||
install_name_tool -change \
|
||||
${ncurses_file} \
|
||||
"${EPREFIX}"/usr/lib/libncurses.dylib \
|
||||
${binary} || die
|
||||
done
|
||||
# we don't do frameworks!
|
||||
sed -i \
|
||||
-e 's/\(frameworks = \)\["GMP"\]/\1[]/g' \
|
||||
-e 's/\(extraLibraries = \)\["m"\]/\1["m","gmp"]/g' \
|
||||
rts/package.conf.in || die
|
||||
fi
|
||||
|
||||
# it is autoconf, but we really don't want to give it too
|
||||
# much arguments, in fact we do the make in-place anyway
|
||||
./configure --prefix="${WORKDIR}"/usr || die
|
||||
make install || die
|
||||
popd > /dev/null
|
||||
;;
|
||||
*)
|
||||
relocate_ghc "${WORKDIR}"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
sed -i -e "s|\"\$topdir\"|\"\$topdir\" ${GHC_PERSISTENT_FLAGS}|" \
|
||||
"${S}/ghc/ghc.wrapper"
|
||||
|
||||
cd "${S}" # otherwise epatch will break
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.0.4-CHOST-prefix.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.8.1_rc1-libbfd.patch
|
||||
|
||||
epatch "${FILESDIR}"/${PN}-7.8.2-cgen-constify.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-prim-lm.patch
|
||||
# bug 518734
|
||||
epatch "${FILESDIR}"/${PN}-7.6.3-preserve-inplace-xattr.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-unreg-lit.patch
|
||||
|
||||
# upstream backports
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-linker-warn.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-deRefStablePtr.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-pic-asm.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-pic-sparc.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-cc-lang.patch
|
||||
epatch "${FILESDIR}"/${PN}-7.8.3-ia64-prim.patch
|
||||
|
||||
if use prefix; then
|
||||
# Make configure find docbook-xsl-stylesheets from Prefix
|
||||
sed -e '/^FP_DIR_DOCBOOK_XSL/s:\[.*\]:['"${EPREFIX}"'/usr/share/sgml/docbook/xsl-stylesheets/]:' \
|
||||
-i utils/haddock/doc/configure.ac || die
|
||||
fi
|
||||
|
||||
# as we have changed the build system
|
||||
eautoreconf
|
||||
fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use binary; then
|
||||
# initialize build.mk
|
||||
echo '# Gentoo changes' > mk/build.mk
|
||||
|
||||
# Put docs into the right place, ie /usr/share/doc/ghc-${GHC_PV}
|
||||
echo "docdir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
echo "htmldir = ${EPREFIX}/usr/share/doc/${P}" >> mk/build.mk
|
||||
|
||||
# We also need to use the GHC_FLAGS flags when building ghc itself
|
||||
echo "SRC_HC_OPTS+=${GHC_FLAGS}" >> mk/build.mk
|
||||
echo "SRC_CC_OPTS+=${CFLAGS}" >> mk/build.mk
|
||||
echo "SRC_LD_OPTS+=${LDFLAGS}" >> mk/build.mk
|
||||
|
||||
# We can't depend on haddock except when bootstrapping when we
|
||||
# must build docs and include them into the binary .tbz2 package
|
||||
# app-text/dblatex is not in portage, can not build PDF or PS
|
||||
if use ghcbootstrap && use doc; then
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = YES" >> mk/build.mk
|
||||
echo "HADDOCK_DOCS = YES" >> mk/build.mk
|
||||
else
|
||||
echo "BUILD_DOCBOOK_PDF = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_PS = NO" >> mk/build.mk
|
||||
echo "BUILD_DOCBOOK_HTML = NO" >> mk/build.mk
|
||||
echo "HADDOCK_DOCS = NO" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# allows overriding build flavours for libraries:
|
||||
# v - vanilla (static libs)
|
||||
# p - profiled
|
||||
# dyn - shared libraries
|
||||
# example: GHC_LIBRARY_WAYS="v dyn"
|
||||
if [[ -n ${GHC_LIBRARY_WAYS} ]]; then
|
||||
echo "GhcLibWays=${GHC_LIBRARY_WAYS}" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# Get ghc from the unpacked binary .tbz2
|
||||
# except when bootstrapping we just pick ghc up off the path
|
||||
if ! use ghcbootstrap; then
|
||||
export PATH="${WORKDIR}/usr/bin:${PATH}"
|
||||
fi
|
||||
|
||||
if use gmp; then
|
||||
echo "INTEGER_LIBRARY=integer-gmp" >> mk/build.mk
|
||||
else
|
||||
echo "INTEGER_LIBRARY=integer-simple" >> mk/build.mk
|
||||
fi
|
||||
|
||||
# don't strip anything. Very useful when stage2 SIGSEGVs on you
|
||||
echo "STRIP_CMD = :" >> mk/build.mk
|
||||
|
||||
local econf_args=()
|
||||
|
||||
# GHC embeds 'gcc' it was built by and uses it later.
|
||||
# Don't allow things like ccache or versioned binary slip.
|
||||
# We use stable thing across gcc upgrades.
|
||||
is_crosscompile || econf_args+=(--with-gcc=${CHOST}-gcc)
|
||||
|
||||
if ! use ghcmakebinary; then
|
||||
econf_args+=(--with-system-libffi)
|
||||
econf_args+=(--with-ffi-includes=$(pkg-config libffi --cflags-only-I | sed -e 's@^-I@@'))
|
||||
fi
|
||||
|
||||
econf ${econf_args[@]} --enable-bootstrap-with-devel-snapshot
|
||||
|
||||
if [[ ${PV} == *9999* ]]; then
|
||||
GHC_PV="$(grep 'S\[\"PACKAGE_VERSION\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
GHC_P=${PN}-${GHC_PV}
|
||||
fi
|
||||
GHC_TPF="$(grep 'S\[\"TargetPlatformFull\"\]' config.status | sed -e 's@^.*=\"\(.*\)\"@\1@')"
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
if ! use binary; then
|
||||
# 1. build compiler binary first
|
||||
emake ghc/stage2/build/tmp/ghc-stage2
|
||||
# 2. pax-mark (bug #516430)
|
||||
pax-mark -m ghc/stage2/build/tmp/ghc-stage2
|
||||
# 3. and then all the rest
|
||||
emake all
|
||||
fi # ! use binary
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use binary; then
|
||||
use prefix && mkdir -p "${ED}"
|
||||
mv "${S}/usr" "${ED}"
|
||||
|
||||
# Remove the docs if not requested
|
||||
if ! use doc; then
|
||||
rm -rf "${ED}/usr/share/doc/${P}/*/" \
|
||||
"${ED}/usr/share/doc/${P}/*.html" \
|
||||
|| die "could not remove docs (P vs PF revision mismatch?)"
|
||||
fi
|
||||
else
|
||||
# We only build docs if we were bootstrapping, otherwise
|
||||
# we copy them out of the unpacked binary .tbz2
|
||||
if use doc && ! use ghcbootstrap; then
|
||||
mkdir -p "${ED}/usr/share/doc"
|
||||
mv "${WORKDIR}/usr/share/doc/${P}" "${ED}/usr/share/doc" \
|
||||
|| die "failed to copy docs"
|
||||
else
|
||||
dodoc "${S}/distrib/README" "${S}/ANNOUNCE" "${S}/LICENSE" "${S}/VERSION"
|
||||
fi
|
||||
|
||||
emake -j1 install DESTDIR="${D}"
|
||||
|
||||
# remove link, but leave 'haddock-${GHC_P}'
|
||||
rm -f "${ED}"/usr/bin/haddock
|
||||
|
||||
if [[ ! -f "${S}/VERSION" ]]; then
|
||||
echo "${GHC_PV}" > "${S}/VERSION" \
|
||||
|| die "Could not create file ${S}/VERSION"
|
||||
fi
|
||||
dobashcomp "${FILESDIR}/ghc-bash-completion"
|
||||
|
||||
fi
|
||||
|
||||
# path to the package.cache
|
||||
local package_confdir="${ED}/usr/$(get_libdir)/${GHC_P}/package.conf.d"
|
||||
PKGCACHE="${package_confdir}"/package.cache
|
||||
# copy the package.conf.d, including timestamp, save it so we can help
|
||||
# users that have a broken package.conf.d
|
||||
cp -pR "${package_confdir}"{,.initial} || die "failed to backup intial package.conf.d"
|
||||
|
||||
# copy the package.conf, including timestamp, save it so we later can put it
|
||||
# back before uninstalling, or when upgrading.
|
||||
cp -p "${PKGCACHE}"{,.shipped} \
|
||||
|| die "failed to copy package.conf.d/package.cache"
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
# have we got an earlier version of ghc installed?
|
||||
if has_version "<${CATEGORY}/${PF}"; then
|
||||
haskell_updater_warn="1"
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
ghc-reregister
|
||||
|
||||
# path to the package.cache
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
|
||||
# give the cache a new timestamp, it must be as recent as
|
||||
# the package.conf.d directory.
|
||||
touch "${PKGCACHE}"
|
||||
|
||||
if [[ "${haskell_updater_warn}" == "1" ]]; then
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
ewarn "You have just upgraded from an older version of GHC."
|
||||
ewarn "You may have to run"
|
||||
ewarn " 'haskell-updater --upgrade'"
|
||||
ewarn "to rebuild all ghc-based Haskell libraries."
|
||||
ewarn
|
||||
ewarn "\e[1;31m************************************************************************\e[0m"
|
||||
ewarn
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_prerm() {
|
||||
# Be very careful here... Call order when upgrading is (according to PMS):
|
||||
# * src_install for new package
|
||||
# * pkg_preinst for new package
|
||||
# * pkg_postinst for new package
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# so you'll actually be touching the new packages files, not the one you
|
||||
# uninstall, due to that or installation directory ${GHC_P} will be the same for
|
||||
# both packages.
|
||||
|
||||
# Call order for reinstalling is (according to PMS):
|
||||
# * src_install
|
||||
# * pkg_preinst
|
||||
# * pkg_prerm for the package being replaced
|
||||
# * pkg_postrm for the package being replaced
|
||||
# * pkg_postinst
|
||||
|
||||
# Overwrite the modified package.cache with a copy of the
|
||||
# original one, so that it will be removed during uninstall.
|
||||
|
||||
PKGCACHE="${EROOT}/usr/$(get_libdir)/${GHC_P}/package.conf.d/package.cache"
|
||||
rm -rf "${PKGCACHE}"
|
||||
|
||||
cp -p "${PKGCACHE}"{.shipped,}
|
||||
}
|
||||
|
||||
pkg_postrm() {
|
||||
ghc-package_pkg_postrm
|
||||
}
|
@ -1,9 +1,3 @@
|
||||
DIST MoarVM-2016.03.tar.gz 3318299 SHA256 dfc3914e609f30ff06f14267bcbb4fcc6da3d85782d35c1838701a5ea41d8f2f SHA512 358c48f6b1803e39841e9f287f2fe3cdde743962d9d9c34e629c18b1b7290fd8a713917f24233dd092ed68adf9a6d0aadb25bda22b3e353d40bd57ae58d70216 WHIRLPOOL e68dfbc40bda23a49c28089fe8396e5a182afc0ac2550f9ab5d9f1564943af163fcc68b466feaf0778a2df57cd472c87f0853d47882b9b625434c7740ec5aec4
|
||||
DIST MoarVM-2016.04.tar.gz 3332850 SHA256 6fe9000daada59535747f2557cc73573241ba8a6044271caf1647aa37be33c6d SHA512 ef22145c9f7c32d7d12192cee63f286544500adff40fc2dbaad677d57108bc6efedc348fe8ddf460fe12d2c6b282e885bcb74fb3bcaa1e06b7719754175afe7d WHIRLPOOL e314f80cd785d31768630798647d7f445831bb29aaded88ef32326df3f4705a5d3fba2da00fce6888a2256b57aeb838922e94c3096250d30112f2be2bfacbb92
|
||||
DIST MoarVM-2016.05.tar.gz 3343486 SHA256 d59e3b366cd788a9e9aaa747dc0883dc6f41d97cb76a8fb2815bd565ef75498a SHA512 0cc946962b56cd9075013074228cee008c98b43da9bdaadd8ce91aa06d94510df1c4a2877d36945aff30dada01f3bf66c0ef1028c59967d09c0aec662aa87f99 WHIRLPOOL 1681538cb1a2919bfb49e51fe29877392ee0900d38daed1bbdae92d57332de84888f6ecae3bfbfba5b8132f186ebdfa3151a7cd038f10538e09c97ddae953adc
|
||||
DIST MoarVM-2016.06.tar.gz 3345856 SHA256 5bf567890139cce09ade3ad4979908a7cdb36608b1670f958879ea4c4bb2bb41 SHA512 3c4b0357d5f6a0a8edfe7cf716916b08b733f4c522891d7e21be1cb97d55d4071c8798f3f1e614d400f20294db73f225014214e92e511a35cbb8fcc9bafa12d1 WHIRLPOOL fb78bc0689e21ae898ace27ec30e8774ed4bead1178924bf90df17892487cc5c70c4acf20f8ac2098863182da0017a7abc0df5c78f550454f818ef78e11616b2
|
||||
DIST MoarVM-2016.07.tar.gz 3349812 SHA256 6b78e25a5399744d3e6dc98e896849234dab1760cd618c07cf94a50caac06a6f SHA512 9437b3156556b2363e039e00ab3bcbf3b2436b641bb52edfac16fcbf7d02db2b139a1426ac7d4e1c5387271634a6395160348da492e1be39364d9556af6fb20d WHIRLPOOL a45a5aa7d1c1853be262999cbb0b84441dca3884a4605bc8324c5fd3a6717312a1e3c1636a4f8d28fc28bd3b87734b197ef33d5e8a62b7e78f3b92d942d5e41c
|
||||
DIST MoarVM-2016.08.tar.gz 3350663 SHA256 8e57d3b89c1d92f37d7d8037306b7a20f09e28dc33f47759fc87bf785490746e SHA512 efbd5807684724c99015aee4a42041f5a1843838a09da71df4c9f2c316316a0f76e3d7ed4adddce8965924e633526bec31bff83c56d5f1c921760c396f6f5035 WHIRLPOOL d40109b8dec4f35ad36c35b6e7128c348df07ef1beabac6c9c7f8826df6fe747b4e0d69e97e291d1122666cfaffd5491dd245c7c4e3c6c966c4ff839a11a0217
|
||||
DIST MoarVM-2016.09.tar.gz 3355117 SHA256 12816e61a7cf94e984db81718baaa731b65b16393a4e90e1c60e099ff10a1079 SHA512 b74681943bb07a597b6911161cb3e4e4a4428a6940e9431b2a7225f7cdb44c0fde0c0155d1c6a3d2aff3577b816bb3b977d2273a46e3afaa8637b7a0ddc1e1bc WHIRLPOOL ce1e4a91719102b097a56f20b8ca55d87b17b0ea4cc471da953fcdce2cc2655487f3926c4956453d51d758f9cb4e45d428c78298adfa226351479362221cec79
|
||||
DIST MoarVM-2016.10.tar.gz 3386119 SHA256 d8cb9fe74267dd933c3e405b098dea99cb9c0561aedb06e8efd8ddaef43396d0 SHA512 f8bd5ee1cd8206642408fde92b6f042c18f1ed6513fa52062d1882414ae58c2a601eafcc405f4e82d7d56d7a3d26dd13df2292ab77d26a92880b73334f139157 WHIRLPOOL 723a118d4a9e5c72c306b82efe0593458c5de83ed7fe7844a7c470c1b1d7d499b835a995083c61db53a16b13d061575aab7166c135ce5cf2911c1c139f6f5285
|
||||
DIST MoarVM-2016.11.tar.gz 3402963 SHA256 5eaa8ff47b1c25e023a900947f88222fffe0884ce74652659ecd2265ae2d1387 SHA512 b049f0031a57c468189dcd4f6fd1a5e37e2572b026a769d564cb48e9b4e3e72c28049396481adae03b4e52d1112a24f65871316c67029293f3b024ad65eb2c00 WHIRLPOOL 738b05dd8bb769e392bb0fe567198a6b8f48b8b374455121cdae580d8c87766dc961146068c0e3987db05c48198e7a65cb08e5430637a36c2c9702bd86d61474
|
||||
DIST MoarVM-2016.12.tar.gz 3409704 SHA256 70abf2f9aca87fecb73603843137016dd29aa40b92af0e3e06c608561ecf9721 SHA512 af1db57818fbe3f11a0b8fbe329cb81d953da42bb1e4e6284a79620bdd4fb3fdadf44274420f9e2be254e2642adc7a773e7c9e2d0638242077743a35c46a146e WHIRLPOOL 916431a779a5987bd8e74362dff553908c3f5a17e4d4c733c822909264747a307731bef99f0e7e37fc29772e594546bb517b5a1751640de82b9729670af2f1a1
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
MY_PN="MoarVM"
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="dev-libs/libuv"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl"
|
||||
|
||||
S="${WORKDIR}/MoarVM-${PV}"
|
||||
|
||||
src_configure() {
|
||||
perl Configure.pl --prefix="/usr"|| die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
MY_PN="MoarVM"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
S="${WORKDIR}/${P}"
|
||||
else
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="asan clang debug doc +jit static-libs optimize ubsan"
|
||||
|
||||
RDEPEND="dev-libs/libatomic_ops
|
||||
dev-libs/libtommath
|
||||
dev-libs/libuv
|
||||
jit? ( dev-lang/lua:0[deprecated]
|
||||
dev-lua/LuaBitOp )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
clang? ( >=sys-devel/clang-3.1 )
|
||||
dev-lang/perl"
|
||||
|
||||
PATCHES=( "${FILESDIR}/Configure-2016.04.patch" )
|
||||
DOCS=( CREDITS README.markdown )
|
||||
|
||||
# Tests are conducted via nqp
|
||||
RESTRICT=test
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( docs/* )
|
||||
local myconfigargs=(
|
||||
"--prefix=/usr"
|
||||
"--has-libtommath"
|
||||
"--has-libuv"
|
||||
"--has-libatomic_ops"
|
||||
"--has-libffi"
|
||||
"--libdir=$(get_libdir)"
|
||||
"--compiler=$(usex clang clang gcc)"
|
||||
"$(usex asan --asan)"
|
||||
"$(usex debug --debug --no-debug)"
|
||||
"$(usex jit --lua=/usr/bin/lua --no-jit)"
|
||||
"$(usex optimize --optimize= --no-optimize)"
|
||||
"$(usex static-libs --static)"
|
||||
"$(usex ubsan --ubsan)"
|
||||
)
|
||||
use optimize && filter-flags '-O*'
|
||||
|
||||
perl Configure.pl "${myconfigargs[@]}" || die
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit eutils multilib
|
||||
|
||||
MY_PN="MoarVM"
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="doc"
|
||||
|
||||
RDEPEND="dev-libs/libuv
|
||||
dev-libs/libtommath
|
||||
dev-libs/libatomic_ops
|
||||
dev-libs/libuv
|
||||
"
|
||||
DEPEND="${RDEPEND}
|
||||
dev-lang/perl"
|
||||
|
||||
S="${WORKDIR}/MoarVM-${PV}"
|
||||
|
||||
src_configure() {
|
||||
perl Configure.pl --prefix="/usr" --has-libtommath --has-libatomic_ops --has-libuv || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${D}" install
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
MY_PN="MoarVM"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
S="${WORKDIR}/${P}"
|
||||
else
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="asan clang debug doc +jit static-libs optimize ubsan"
|
||||
|
||||
RDEPEND="dev-libs/libatomic_ops
|
||||
dev-libs/libtommath
|
||||
dev-libs/libuv
|
||||
jit? ( dev-lang/lua:0[deprecated]
|
||||
dev-lua/LuaBitOp )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
clang? ( >=sys-devel/clang-3.1 )
|
||||
dev-lang/perl"
|
||||
|
||||
DOCS=( CREDITS README.markdown )
|
||||
|
||||
# Tests are conducted via nqp
|
||||
RESTRICT=test
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( docs/* )
|
||||
local myconfigargs=(
|
||||
"--prefix=/usr"
|
||||
"--has-libtommath"
|
||||
"--has-libuv"
|
||||
"--has-libatomic_ops"
|
||||
"--has-libffi"
|
||||
"--libdir=$(get_libdir)"
|
||||
"--compiler=$(usex clang clang gcc)"
|
||||
"$(usex asan --asan)"
|
||||
"$(usex debug --debug --no-debug)"
|
||||
"$(usex jit --lua=/usr/bin/lua --no-jit)"
|
||||
"$(usex optimize --optimize= --no-optimize)"
|
||||
"$(usex static-libs --static)"
|
||||
"$(usex ubsan --ubsan)"
|
||||
)
|
||||
use optimize && filter-flags '-O*'
|
||||
|
||||
perl Configure.pl "${myconfigargs[@]}" || die
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
MY_PN="MoarVM"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
S="${WORKDIR}/${P}"
|
||||
else
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="asan clang debug doc +jit static-libs optimize ubsan"
|
||||
|
||||
RDEPEND="dev-libs/libatomic_ops
|
||||
dev-libs/libtommath
|
||||
dev-libs/libuv
|
||||
jit? ( dev-lang/lua:0[deprecated]
|
||||
dev-lua/LuaBitOp )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
clang? ( >=sys-devel/clang-3.1 )
|
||||
dev-lang/perl"
|
||||
|
||||
DOCS=( CREDITS README.markdown )
|
||||
|
||||
# Tests are conducted via nqp
|
||||
RESTRICT=test
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( docs/* )
|
||||
local myconfigargs=(
|
||||
"--prefix=/usr"
|
||||
"--has-libtommath"
|
||||
"--has-libuv"
|
||||
"--has-libatomic_ops"
|
||||
"--has-libffi"
|
||||
"--libdir=$(get_libdir)"
|
||||
"--compiler=$(usex clang clang gcc)"
|
||||
"$(usex asan --asan)"
|
||||
"$(usex debug --debug --no-debug)"
|
||||
"$(usex jit --lua=/usr/bin/lua --no-jit)"
|
||||
"$(usex optimize --optimize= --no-optimize)"
|
||||
"$(usex static-libs --static)"
|
||||
"$(usex ubsan --ubsan)"
|
||||
)
|
||||
use optimize && filter-flags '-O*'
|
||||
|
||||
perl Configure.pl "${myconfigargs[@]}" || die
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
MY_PN="MoarVM"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
S="${WORKDIR}/${P}"
|
||||
else
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="asan clang debug doc +jit static-libs optimize ubsan"
|
||||
|
||||
RDEPEND="dev-libs/libatomic_ops
|
||||
dev-libs/libtommath
|
||||
dev-libs/libuv
|
||||
jit? ( dev-lang/lua:0[deprecated]
|
||||
dev-lua/LuaBitOp )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
clang? ( >=sys-devel/clang-3.1 )
|
||||
dev-lang/perl"
|
||||
|
||||
DOCS=( CREDITS README.markdown )
|
||||
|
||||
# Tests are conducted via nqp
|
||||
RESTRICT=test
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( docs/* )
|
||||
local myconfigargs=(
|
||||
"--prefix=/usr"
|
||||
"--has-libtommath"
|
||||
"--has-libuv"
|
||||
"--has-libatomic_ops"
|
||||
"--has-libffi"
|
||||
"--libdir=$(get_libdir)"
|
||||
"--compiler=$(usex clang clang gcc)"
|
||||
"$(usex asan --asan)"
|
||||
"$(usex debug --debug --no-debug)"
|
||||
"$(usex jit --lua=/usr/bin/lua --no-jit)"
|
||||
"$(usex optimize --optimize= --no-optimize)"
|
||||
"$(usex static-libs --static)"
|
||||
"$(usex ubsan --ubsan)"
|
||||
)
|
||||
use optimize && filter-flags '-O*'
|
||||
|
||||
perl Configure.pl "${myconfigargs[@]}" || die
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=6
|
||||
|
||||
inherit flag-o-matic
|
||||
|
||||
MY_PN="MoarVM"
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/${MY_PN}/${MY_PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
S="${WORKDIR}/${P}"
|
||||
else
|
||||
SRC_URI="http://moarvm.org/releases/${MY_PN}-${PV}.tar.gz"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
S="${WORKDIR}/${MY_PN}-${PV}"
|
||||
fi
|
||||
|
||||
DESCRIPTION="A 6model-based VM for NQP and Rakudo Perl 6"
|
||||
HOMEPAGE="http://moarvm.org"
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="asan clang debug doc +jit static-libs optimize ubsan"
|
||||
|
||||
RDEPEND="dev-libs/libatomic_ops
|
||||
dev-libs/libtommath
|
||||
dev-libs/libuv
|
||||
jit? ( dev-lang/lua:0[deprecated]
|
||||
dev-lua/LuaBitOp )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
clang? ( >=sys-devel/clang-3.1 )
|
||||
dev-lang/perl"
|
||||
|
||||
DOCS=( CREDITS README.markdown )
|
||||
|
||||
# Tests are conducted via nqp
|
||||
RESTRICT=test
|
||||
|
||||
src_configure() {
|
||||
use doc && DOCS+=( docs/* )
|
||||
local myconfigargs=(
|
||||
"--prefix=/usr"
|
||||
"--has-libtommath"
|
||||
"--has-libuv"
|
||||
"--has-libatomic_ops"
|
||||
"--has-libffi"
|
||||
"--libdir=$(get_libdir)"
|
||||
"--compiler=$(usex clang clang gcc)"
|
||||
"$(usex asan --asan)"
|
||||
"$(usex debug --debug --no-debug)"
|
||||
"$(usex jit --lua=/usr/bin/lua --no-jit)"
|
||||
"$(usex optimize --optimize= --no-optimize)"
|
||||
"$(usex static-libs --static)"
|
||||
"$(usex ubsan --ubsan)"
|
||||
)
|
||||
use optimize && filter-flags '-O*'
|
||||
|
||||
perl Configure.pl "${myconfigargs[@]}" || die
|
||||
}
|
@ -1,9 +1,3 @@
|
||||
DIST nqp-2016.03.tar.gz 5126687 SHA256 50731983cfc0800015bf73a2174000f5631ad09b551ff190153fba00a448067f SHA512 707701e22752cb43b0694c8c57ec834cfee3d2a50c2b6ae3ee36af5881728c94ae1d03d07c624367edb6cf58bba18abd26dcc18656b0483f4f979db5dd26a07e WHIRLPOOL 364abefc3d7b005b89fd3a3180e66971dbc56851377b93e38d2a8b2ed546121ec730628e0f93947f77e8f12346d64e60b4af8ffa720dc0a05810fae846b262a4
|
||||
DIST nqp-2016.04.tar.gz 5156494 SHA256 9176422eb2a99db24ab520bc78686f3a2c008ba73bf8c7091a790985f5061019 SHA512 5dcb685a90b26fee3e8dac3ca24da11bd967d034b5328232d18d9db37e27645b57259cabf54ef8e10b3ac508b1aa784072f0a9542d30168d3017f86e610c3cee WHIRLPOOL 0711e1471740b0ed181f9e4504f810a084056e74650c0ffb1c6c17e2976b2c1facb6a7e73df5d991d9ffe43f055fe844f0756dbd816375708b4d499a0f7a9162
|
||||
DIST nqp-2016.05.tar.gz 5159647 SHA256 7fdd76322383632783b4352e8fab144c3d68acbfda5112c1f178d8909277f616 SHA512 c81d2f6ef13fad36ed863869c985049a5e1daa04e979449fbbd3b5b365ff58430711f6a7ed5ac10ff61fe6a78d4f960f76ade7445ecb82eb3100882449747a61 WHIRLPOOL 119237accc6723db4afa27cdbb1409e9d11a572bf24fbd83e8bed3c507193bf2199bb5a1e8a27052d922040892f5ce35ffd30640218bbc15167fff88e70941c7
|
||||
DIST nqp-2016.06.tar.gz 5162457 SHA256 e8142a6fb9ff710fa8a312e84f73986abb0027f537ec53ef2a42b5d6da6df8ac SHA512 76821f63a247fee1e4d8eea87ef2187f6529f72dd3c77fc2cb2829c050e9689b586a7b61d12e4523c507e08618ca2ae7f6d85a95542113f20bae961be6fd024f WHIRLPOOL 62ee4b31e7e9de3c8623f16cf0d7d216214c1bd2232f7192ea02f2cc6edaf0d67707aacd23692757db6d81711c8719409e4d1518d7b7383c25b04911c64f2cb5
|
||||
DIST nqp-2016.07.tar.gz 5163170 SHA256 bf579d9b8bfa35e4cae368db0f5fa74785e3d571970e043278fe0ccefb91d59f SHA512 74ef7af564aafac4c4785431e6618ed6ccf962c70fb2ad91e63f765c8e107e230f03b8095c917db9d2ebd2829aaa42cd426de5eeb826c60f3ac935cabfaaefaf WHIRLPOOL 0a83126d163cb045351bb28e6af6860bd62c83ee5570bf702813d1553428739e91f3d3966f16c6977fa418d844eb9072a28dca4a263f956c9c308a98009d0807
|
||||
DIST nqp-2016.08.1.tar.gz 3931460 SHA256 2eb9c0ea2864a232f50db6f898370caea1e844daabce658b44847aa31dee56ab SHA512 fa771dd46b84aa7cf295a86d4a54953fc99cc3ef90f272ea8331bf02fd30d1e7e4139c5f7518294de98a66d4bac0451e2fe98a8e05ff294fa622ca84d7e45d6f WHIRLPOOL ed4d3b2d035581d4cc031815cb7da00785f96818af9a9970cd7b34d9baef5ecd4955296eaf081df34922667907540309bf3eae22069d29a7c459306ff7d8cfc6
|
||||
DIST nqp-2016.09.tar.gz 3935097 SHA256 24f10be9d1072d9dc3314bc729c1fbbe0df09accd2e4f9b2cb0f403a1c251d57 SHA512 0d6af33cfd856a191027a2ca3001b4142e775f919f4f5bf8ef0c92dae1e6c84b3c19bef17d6ec11202429c03f3a1d21fa719201aea935cabeeb8efc656451680 WHIRLPOOL 2175ec6fb8f7b730fdeb35bd014b619af662621ab89491fb3fb870bc6724f03b8af40d07080154af7ec3f246d1e717f662be1feb6e5d4ee39c3143784576b370
|
||||
DIST nqp-2016.10.tar.gz 3943840 SHA256 d66905006e74b6d55f7abd3fba051fdf9a2583879bbf3cecaab076c07d39d476 SHA512 8a42fd4062237838d71870718e8cb9c166fb022fa05d624543479d9476890aa4eaaba0f4ba0d9c5ca1684559f34d999acdfbb5173d15a462ae94a9aaabbd1dbd WHIRLPOOL 62868016c516888df327601be2f4bb30b156bd0d3a14a3a1e9f7d162c5dfe089f3bf2946b69237eff559e44870a07e702480947bc47e13c6b4b7ca81a947ad31
|
||||
DIST nqp-2016.11.tar.gz 3946759 SHA256 08d3eb664ad049e72bd9821755564ee7cbbf0da4833f1bcc9441e970c5f73ccd SHA512 bd99e286dc09fa5096429cc35847e43893d30a9ce9efdfb55346c04eeeda0c44307fd39217107a2210040b7a4dcc900f69279e19d1cc54a469ab286377e28f6a WHIRLPOOL 373fe379cf8fe965d9c1097042a55472d69322c08e613a9d55749bbb4da084b84adee5c5dfe93c4f9bf81298e28308d697f66482b80a16ada3ea9ea81754f54b
|
||||
DIST nqp-2016.12.tar.gz 3643470 SHA256 3dfd71f7f51b78a8266d159a41a4b9d0a3fff1b93b7366054c2daf14ec5df981 SHA512 5967029227b6f527f25cfdc0f27e5466cbff4286e2ef7252b3767fe5f752210d5637d634c4e946f32797e4e380f2f937523a325497214767fae3fa39764eecb2 WHIRLPOOL 67e7138d8d7bd428f77d37721f206a613498cabb07ea0cdfa9afa730505e303709f86373dc36d0ac149f35e08193e85621e41131832e5bafbd5765d1b0d8ed51
|
||||
|
@ -1,64 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# still not working
|
||||
RESTRICT="test"
|
||||
|
||||
inherit eutils multilib versionator
|
||||
|
||||
GITCRAP=d1e443f
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE="doc java +moar"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
RDEPEND="
|
||||
java? ( >=virtual/jre-1.7 )
|
||||
moar? ( ~dev-lang/moarvm-${PV} )
|
||||
dev-libs/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
S=${WORKDIR}/perl6-nqp-${GITCRAP}
|
||||
|
||||
src_configure() {
|
||||
use java && myconf+="jvm,"
|
||||
use moar && myconf+="moar,"
|
||||
perl Configure.pl --backend=${myconf} --prefix=/usr || die
|
||||
# dirty hack to make dyncall not fail
|
||||
sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
|
||||
sed -i -e 's/-Werror=missing-declarations//' Makefile || die
|
||||
sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
|
||||
|
||||
# more dirty hack to allow building with newer gcc
|
||||
sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
|
||||
sed -i -e 's/-Werror=nested-externs//' Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${ED}" install || die
|
||||
|
||||
dodoc CREDITS README.pod || die
|
||||
|
||||
if use doc; then
|
||||
dodoc -r docs/* || die
|
||||
fi
|
||||
}
|
@ -1,161 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-opt-2 multibuild
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
inherit vcs-snapshot
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="doc clang java +moar test"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
CDEPEND="java? (
|
||||
dev-java/asm:4
|
||||
dev-java/jline:0
|
||||
dev-java/jna:4
|
||||
)
|
||||
moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( >=virtual/jre-1.7 )"
|
||||
DEPEND="${CDEPEND}
|
||||
clang? ( sys-devel/clang )
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
PATCHES=( "${FILESDIR}/enable-external-jars.patch" )
|
||||
|
||||
pkg_pretend() {
|
||||
if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
|
||||
ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
|
||||
ewarn "already being installed. So if it fails, try uninstalling both"
|
||||
ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
|
||||
ewarn "(see Bug #584394)"
|
||||
fi
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# Don't clean stage0 jars.
|
||||
einfo "Cleaning upstream jars"
|
||||
java-pkg_clean 3rdparty/
|
||||
|
||||
# Don't use jars we just deleted.
|
||||
sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
|
||||
src/vm/jvm/runners/nqp-j || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
MULTIBUILD_VARIANTS=()
|
||||
use moar && MULTIBUILD_VARIANTS+=( moar )
|
||||
use java && MULTIBUILD_VARIANTS+=( jvm )
|
||||
|
||||
multibuild_copy_sources
|
||||
|
||||
# This will pull in conditional java_prepare
|
||||
default
|
||||
}
|
||||
|
||||
nqp_configure() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
local myconfargs=(
|
||||
"--backend=${MULTIBUILD_VARIANT}"
|
||||
"--prefix=/usr" )
|
||||
|
||||
perl Configure.pl "${myconfargs[@]}" || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
nqp_compile() {
|
||||
if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
|
||||
JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
|
||||
elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
nqp_test() {
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
test
|
||||
}
|
||||
|
||||
nqp_install() {
|
||||
# This is the actual reason we need multibuild.eclass.
|
||||
# We need to distinguish the install procedure for MoarVM and JVM backends.
|
||||
case "${MULTIBUILD_VARIANT}" in
|
||||
moar)
|
||||
emake \
|
||||
DESTDIR="${ED}" \
|
||||
-C "${BUILD_DIR}" \
|
||||
install
|
||||
;;
|
||||
jvm)
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
# Set JAVA_PKG_JARDEST early.
|
||||
java-pkg_init_paths_
|
||||
|
||||
# Upstream sets the classpath to this location. Perhaps it's
|
||||
# used to locate the additional libraries?
|
||||
java-pkg_addcp "${JAVA_PKG_JARDEST}"
|
||||
|
||||
insinto "${JAVA_PKG_JARDEST}"
|
||||
local jar
|
||||
|
||||
for jar in *.jar; do
|
||||
if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
|
||||
# jars for NQP itself.
|
||||
java-pkg_dojar ${jar}
|
||||
else
|
||||
# jars used by NQP.
|
||||
doins ${jar}
|
||||
fi
|
||||
done
|
||||
|
||||
# Upstream uses -Xbootclasspath/a, which is faster due to lack
|
||||
# of verification, but gjl isn't flexible enough yet. :(
|
||||
java-pkg_dolauncher ${PN}-j --main ${PN}
|
||||
dosym ${PN}-j /usr/bin/${PN}
|
||||
dobin tools/jvm/eval-client.pl
|
||||
popd > /dev/null || die
|
||||
;;
|
||||
*)
|
||||
die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant nqp_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant nqp_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant nqp_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant nqp_install
|
||||
|
||||
dodoc CREDITS README.pod
|
||||
use doc && dodoc -r docs/*
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
# Copyright 1999-2015 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
# still not working
|
||||
RESTRICT="test"
|
||||
|
||||
inherit eutils multilib versionator
|
||||
|
||||
GITCRAP=10d3ecc
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~x86 ~amd64"
|
||||
IUSE="doc java +moar"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
RDEPEND="
|
||||
java? ( >=virtual/jre-1.7 )
|
||||
moar? ( ~dev-lang/moarvm-${PV} )
|
||||
dev-libs/libffi"
|
||||
DEPEND="${RDEPEND}
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
S=${WORKDIR}/perl6-nqp-${GITCRAP}
|
||||
|
||||
src_configure() {
|
||||
use java && myconf+="jvm,"
|
||||
use moar && myconf+="moar,"
|
||||
perl Configure.pl --backend=${myconf} --prefix=/usr || die
|
||||
# dirty hack to make dyncall not fail
|
||||
sed -i -e 's/-Werror=missing-prototypes//' Makefile || die
|
||||
sed -i -e 's/-Werror=missing-declarations//' Makefile || die
|
||||
sed -i -e 's/-Werror=strict-prototypes//' Makefile || die
|
||||
|
||||
# more dirty hack to allow building with newer gcc
|
||||
sed -i -e 's/-Werror=implicit-function-declaration//' Makefile || die
|
||||
sed -i -e 's/-Werror=nested-externs//' Makefile || die
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake -j1 || die
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake -j1 test || die
|
||||
}
|
||||
|
||||
src_install() {
|
||||
emake DESTDIR="${ED}" install || die
|
||||
|
||||
dodoc CREDITS README.pod || die
|
||||
|
||||
if use doc; then
|
||||
dodoc -r docs/* || die
|
||||
fi
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-opt-2 multibuild
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
inherit vcs-snapshot
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="doc clang java +moar test"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
CDEPEND="java? (
|
||||
dev-java/asm:4
|
||||
dev-java/jline:0
|
||||
dev-java/jna:4
|
||||
)
|
||||
moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( >=virtual/jre-1.7 )"
|
||||
DEPEND="${CDEPEND}
|
||||
clang? ( sys-devel/clang )
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
pkg_pretend() {
|
||||
if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
|
||||
ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
|
||||
ewarn "already being installed. So if it fails, try uninstalling both"
|
||||
ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
|
||||
ewarn "(see Bug #584394)"
|
||||
fi
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# Don't clean stage0 jars.
|
||||
einfo "Cleaning upstream jars"
|
||||
java-pkg_clean 3rdparty/
|
||||
|
||||
# Don't use jars we just deleted.
|
||||
sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
|
||||
src/vm/jvm/runners/nqp-j || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
MULTIBUILD_VARIANTS=()
|
||||
use moar && MULTIBUILD_VARIANTS+=( moar )
|
||||
use java && MULTIBUILD_VARIANTS+=( jvm )
|
||||
|
||||
multibuild_copy_sources
|
||||
|
||||
# This will pull in conditional java_prepare
|
||||
default
|
||||
}
|
||||
|
||||
nqp_configure() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
local myconfargs=(
|
||||
"--backend=${MULTIBUILD_VARIANT}"
|
||||
"--prefix=/usr" )
|
||||
|
||||
perl Configure.pl "${myconfargs[@]}" || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
nqp_compile() {
|
||||
if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
|
||||
JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
|
||||
elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
nqp_test() {
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
test
|
||||
}
|
||||
|
||||
nqp_install() {
|
||||
# This is the actual reason we need multibuild.eclass.
|
||||
# We need to distinguish the install procedure for MoarVM and JVM backends.
|
||||
case "${MULTIBUILD_VARIANT}" in
|
||||
moar)
|
||||
emake \
|
||||
DESTDIR="${ED}" \
|
||||
-C "${BUILD_DIR}" \
|
||||
install
|
||||
;;
|
||||
jvm)
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
# Set JAVA_PKG_JARDEST early.
|
||||
java-pkg_init_paths_
|
||||
|
||||
# Upstream sets the classpath to this location. Perhaps it's
|
||||
# used to locate the additional libraries?
|
||||
java-pkg_addcp "${JAVA_PKG_JARDEST}"
|
||||
|
||||
insinto "${JAVA_PKG_JARDEST}"
|
||||
local jar
|
||||
|
||||
for jar in *.jar; do
|
||||
if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
|
||||
# jars for NQP itself.
|
||||
java-pkg_dojar ${jar}
|
||||
else
|
||||
# jars used by NQP.
|
||||
doins ${jar}
|
||||
fi
|
||||
done
|
||||
|
||||
# Upstream uses -Xbootclasspath/a, which is faster due to lack
|
||||
# of verification, but gjl isn't flexible enough yet. :(
|
||||
java-pkg_dolauncher ${PN}-j --main ${PN}
|
||||
dosym ${PN}-j /usr/bin/${PN}
|
||||
dobin tools/jvm/eval-client.pl
|
||||
popd > /dev/null || die
|
||||
;;
|
||||
*)
|
||||
die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant nqp_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant nqp_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant nqp_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant nqp_install
|
||||
|
||||
dodoc CREDITS README.pod
|
||||
use doc && dodoc -r docs/*
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-opt-2 multibuild
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
inherit vcs-snapshot
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="doc clang java +moar test"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
CDEPEND="java? (
|
||||
dev-java/asm:4
|
||||
dev-java/jline:0
|
||||
dev-java/jna:4
|
||||
)
|
||||
moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( >=virtual/jre-1.7 )"
|
||||
DEPEND="${CDEPEND}
|
||||
clang? ( sys-devel/clang )
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
pkg_pretend() {
|
||||
if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
|
||||
ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
|
||||
ewarn "already being installed. So if it fails, try uninstalling both"
|
||||
ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
|
||||
ewarn "(see Bug #584394)"
|
||||
fi
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# Don't clean stage0 jars.
|
||||
einfo "Cleaning upstream jars"
|
||||
java-pkg_clean 3rdparty/
|
||||
|
||||
# Don't use jars we just deleted.
|
||||
sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
|
||||
src/vm/jvm/runners/nqp-j || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
MULTIBUILD_VARIANTS=()
|
||||
use moar && MULTIBUILD_VARIANTS+=( moar )
|
||||
use java && MULTIBUILD_VARIANTS+=( jvm )
|
||||
|
||||
multibuild_copy_sources
|
||||
|
||||
# This will pull in conditional java_prepare
|
||||
default
|
||||
}
|
||||
|
||||
nqp_configure() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
local myconfargs=(
|
||||
"--backend=${MULTIBUILD_VARIANT}"
|
||||
"--prefix=/usr" )
|
||||
|
||||
perl Configure.pl "${myconfargs[@]}" || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
nqp_compile() {
|
||||
if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
|
||||
JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
|
||||
elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
nqp_test() {
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
test
|
||||
}
|
||||
|
||||
nqp_install() {
|
||||
# This is the actual reason we need multibuild.eclass.
|
||||
# We need to distinguish the install procedure for MoarVM and JVM backends.
|
||||
case "${MULTIBUILD_VARIANT}" in
|
||||
moar)
|
||||
emake \
|
||||
DESTDIR="${ED}" \
|
||||
-C "${BUILD_DIR}" \
|
||||
install
|
||||
;;
|
||||
jvm)
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
# Set JAVA_PKG_JARDEST early.
|
||||
java-pkg_init_paths_
|
||||
|
||||
# Upstream sets the classpath to this location. Perhaps it's
|
||||
# used to locate the additional libraries?
|
||||
java-pkg_addcp "${JAVA_PKG_JARDEST}"
|
||||
|
||||
insinto "${JAVA_PKG_JARDEST}"
|
||||
local jar
|
||||
|
||||
for jar in *.jar; do
|
||||
if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
|
||||
# jars for NQP itself.
|
||||
java-pkg_dojar ${jar}
|
||||
else
|
||||
# jars used by NQP.
|
||||
doins ${jar}
|
||||
fi
|
||||
done
|
||||
|
||||
# Upstream uses -Xbootclasspath/a, which is faster due to lack
|
||||
# of verification, but gjl isn't flexible enough yet. :(
|
||||
java-pkg_dolauncher ${PN}-j --main ${PN}
|
||||
dosym ${PN}-j /usr/bin/${PN}
|
||||
dobin tools/jvm/eval-client.pl
|
||||
popd > /dev/null || die
|
||||
;;
|
||||
*)
|
||||
die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant nqp_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant nqp_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant nqp_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant nqp_install
|
||||
|
||||
dodoc CREDITS README.pod
|
||||
use doc && dodoc -r docs/*
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-opt-2 multibuild
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
inherit vcs-snapshot
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="doc clang java +moar test"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
CDEPEND="java? (
|
||||
dev-java/asm:4
|
||||
dev-java/jline:0
|
||||
dev-java/jna:4
|
||||
)
|
||||
moar? ( ~dev-lang/moarvm-2016.08[clang=] )"
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( >=virtual/jre-1.7 )"
|
||||
DEPEND="${CDEPEND}
|
||||
clang? ( sys-devel/clang )
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
pkg_pretend() {
|
||||
if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
|
||||
ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
|
||||
ewarn "already being installed. So if it fails, try uninstalling both"
|
||||
ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
|
||||
ewarn "(see Bug #584394)"
|
||||
fi
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# Don't clean stage0 jars.
|
||||
einfo "Cleaning upstream jars"
|
||||
java-pkg_clean 3rdparty/
|
||||
|
||||
# Don't use jars we just deleted.
|
||||
sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
|
||||
src/vm/jvm/runners/nqp-j || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
MULTIBUILD_VARIANTS=()
|
||||
use moar && MULTIBUILD_VARIANTS+=( moar )
|
||||
use java && MULTIBUILD_VARIANTS+=( jvm )
|
||||
|
||||
multibuild_copy_sources
|
||||
|
||||
# This will pull in conditional java_prepare
|
||||
default
|
||||
}
|
||||
|
||||
nqp_configure() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
local myconfargs=(
|
||||
"--backend=${MULTIBUILD_VARIANT}"
|
||||
"--prefix=/usr" )
|
||||
|
||||
perl Configure.pl "${myconfargs[@]}" || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
nqp_compile() {
|
||||
if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
|
||||
JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
|
||||
elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
nqp_test() {
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
test
|
||||
}
|
||||
|
||||
nqp_install() {
|
||||
# This is the actual reason we need multibuild.eclass.
|
||||
# We need to distinguish the install procedure for MoarVM and JVM backends.
|
||||
case "${MULTIBUILD_VARIANT}" in
|
||||
moar)
|
||||
emake \
|
||||
DESTDIR="${ED}" \
|
||||
-C "${BUILD_DIR}" \
|
||||
install
|
||||
;;
|
||||
jvm)
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
# Set JAVA_PKG_JARDEST early.
|
||||
java-pkg_init_paths_
|
||||
|
||||
# Upstream sets the classpath to this location. Perhaps it's
|
||||
# used to locate the additional libraries?
|
||||
java-pkg_addcp "${JAVA_PKG_JARDEST}"
|
||||
|
||||
insinto "${JAVA_PKG_JARDEST}"
|
||||
local jar
|
||||
|
||||
for jar in *.jar; do
|
||||
if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
|
||||
# jars for NQP itself.
|
||||
java-pkg_dojar ${jar}
|
||||
else
|
||||
# jars used by NQP.
|
||||
doins ${jar}
|
||||
fi
|
||||
done
|
||||
|
||||
# Upstream uses -Xbootclasspath/a, which is faster due to lack
|
||||
# of verification, but gjl isn't flexible enough yet. :(
|
||||
java-pkg_dolauncher ${PN}-j --main ${PN}
|
||||
dosym ${PN}-j /usr/bin/${PN}
|
||||
dobin tools/jvm/eval-client.pl
|
||||
popd > /dev/null || die
|
||||
;;
|
||||
*)
|
||||
die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant nqp_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant nqp_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant nqp_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant nqp_install
|
||||
|
||||
dodoc CREDITS README.pod
|
||||
use doc && dodoc -r docs/*
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI=5
|
||||
|
||||
inherit java-pkg-opt-2 multibuild
|
||||
|
||||
if [[ ${PV} == "9999" ]]; then
|
||||
EGIT_REPO_URI="https://github.com/perl6/${PN}.git"
|
||||
inherit git-r3
|
||||
KEYWORDS=""
|
||||
else
|
||||
SRC_URI="https://github.com/perl6/${PN}/tarball/${PV} -> ${P}.tar.gz"
|
||||
inherit vcs-snapshot
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="Not Quite Perl, a Perl 6 bootstrapping compiler"
|
||||
HOMEPAGE="http://rakudo.org/"
|
||||
|
||||
LICENSE="Artistic-2"
|
||||
SLOT="0"
|
||||
IUSE="doc clang java +moar test"
|
||||
REQUIRED_USE="|| ( java moar )"
|
||||
|
||||
CDEPEND="java? (
|
||||
dev-java/asm:4
|
||||
dev-java/jline:0
|
||||
dev-java/jna:4
|
||||
)
|
||||
moar? ( ~dev-lang/moarvm-${PV}[clang=] )"
|
||||
RDEPEND="${CDEPEND}
|
||||
java? ( >=virtual/jre-1.7 )"
|
||||
DEPEND="${CDEPEND}
|
||||
clang? ( sys-devel/clang )
|
||||
java? ( >=virtual/jdk-1.7 )
|
||||
dev-lang/perl"
|
||||
|
||||
pkg_pretend() {
|
||||
if has_version dev-lang/rakudo || has_version dev-lang/nqp; then
|
||||
ewarn "NQP is known to fail compilation/installation with Rakudo and/or NQP"
|
||||
ewarn "already being installed. So if it fails, try uninstalling both"
|
||||
ewarn "dev-lang/nqp and dev-lang/rakudo, then do a new installation."
|
||||
ewarn "(see Bug #584394)"
|
||||
fi
|
||||
}
|
||||
|
||||
java_prepare() {
|
||||
# Don't clean stage0 jars.
|
||||
einfo "Cleaning upstream jars"
|
||||
java-pkg_clean 3rdparty/
|
||||
|
||||
# Don't use jars we just deleted.
|
||||
sed -i -r 's/(:3rdparty[^:]*)+/:${THIRDPARTY_JARS}/g' \
|
||||
src/vm/jvm/runners/nqp-j || die
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
MULTIBUILD_VARIANTS=()
|
||||
use moar && MULTIBUILD_VARIANTS+=( moar )
|
||||
use java && MULTIBUILD_VARIANTS+=( jvm )
|
||||
|
||||
multibuild_copy_sources
|
||||
|
||||
# This will pull in conditional java_prepare
|
||||
default
|
||||
}
|
||||
|
||||
nqp_configure() {
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
local myconfargs=(
|
||||
"--backend=${MULTIBUILD_VARIANT}"
|
||||
"--prefix=/usr" )
|
||||
|
||||
perl Configure.pl "${myconfargs[@]}" || die
|
||||
popd || die
|
||||
}
|
||||
|
||||
nqp_compile() {
|
||||
if [[ "${MULTIBUILD_VARIANT}" = jvm ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
THIRDPARTY_JARS=$(java-pkg_getjars --with-dependencies asm-4,jline,jna-4) \
|
||||
JAVAC="$(java-pkg_get-javac) $(java-pkg_javac-args)"
|
||||
elif [[ "${MULTIBUILD_VARIANT}" = moar ]]; then
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
nqp_test() {
|
||||
emake -j1 \
|
||||
-C "${BUILD_DIR}" \
|
||||
test
|
||||
}
|
||||
|
||||
nqp_install() {
|
||||
# This is the actual reason we need multibuild.eclass.
|
||||
# We need to distinguish the install procedure for MoarVM and JVM backends.
|
||||
case "${MULTIBUILD_VARIANT}" in
|
||||
moar)
|
||||
emake \
|
||||
DESTDIR="${ED}" \
|
||||
-C "${BUILD_DIR}" \
|
||||
install
|
||||
;;
|
||||
jvm)
|
||||
pushd "${BUILD_DIR}" > /dev/null || die
|
||||
# Set JAVA_PKG_JARDEST early.
|
||||
java-pkg_init_paths_
|
||||
|
||||
# Upstream sets the classpath to this location. Perhaps it's
|
||||
# used to locate the additional libraries?
|
||||
java-pkg_addcp "${JAVA_PKG_JARDEST}"
|
||||
|
||||
insinto "${JAVA_PKG_JARDEST}"
|
||||
local jar
|
||||
|
||||
for jar in *.jar; do
|
||||
if has ${jar} ${PN}.jar ${PN}-runtime.jar; then
|
||||
# jars for NQP itself.
|
||||
java-pkg_dojar ${jar}
|
||||
else
|
||||
# jars used by NQP.
|
||||
doins ${jar}
|
||||
fi
|
||||
done
|
||||
|
||||
# Upstream uses -Xbootclasspath/a, which is faster due to lack
|
||||
# of verification, but gjl isn't flexible enough yet. :(
|
||||
java-pkg_dolauncher ${PN}-j --main ${PN}
|
||||
dosym ${PN}-j /usr/bin/${PN}
|
||||
dobin tools/jvm/eval-client.pl
|
||||
popd > /dev/null || die
|
||||
;;
|
||||
*)
|
||||
die "Unknown MULTIBUILD_VARIANT ${MULTIBUILD_VARIANT}."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
multibuild_foreach_variant nqp_configure
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
multibuild_foreach_variant nqp_compile
|
||||
}
|
||||
|
||||
src_test() {
|
||||
multibuild_foreach_variant nqp_test
|
||||
}
|
||||
|
||||
src_install() {
|
||||
multibuild_foreach_variant nqp_install
|
||||
|
||||
dodoc CREDITS README.pod
|
||||
use doc && dodoc -r docs/*
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
# Copyright 1999-2016 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Id$
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit autotools pax-utils
|
||||
|
||||
DESCRIPTION="Poly/ML is a full implementation of Standard ML"
|
||||
HOMEPAGE="http://www.polyml.org"
|
||||
SRC_URI="https://codeload.github.com/polyml/polyml/tar.gz/v${PV} -> ${P}.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2.1"
|
||||
SLOT="0/${PV}"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="X elibc_glibc +gmp portable test +threads"
|
||||
|
||||
RDEPEND="X? ( x11-libs/motif:0 )
|
||||
gmp? ( >=dev-libs/gmp-5 )
|
||||
elibc_glibc? ( threads? ( >=sys-libs/glibc-2.13 ) )
|
||||
virtual/libffi"
|
||||
DEPEND="${RDEPEND}"
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
econf \
|
||||
--enable-shared \
|
||||
--disable-static \
|
||||
--with-system-libffi \
|
||||
$(use_with X x) \
|
||||
$(use_with gmp) \
|
||||
$(use_with portable) \
|
||||
$(use_with threads)
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Bug 453146 - dev-lang/polyml-5.5.0: fails to build (pax kernel?)
|
||||
pushd libpolyml || die "Could not cd to libpolyml"
|
||||
emake
|
||||
popd
|
||||
emake polyimport
|
||||
pax-mark m "${S}/.libs/polyimport"
|
||||
emake
|
||||
pax-mark m "${S}/.libs/poly"
|
||||
}
|
||||
|
||||
src_test() {
|
||||
emake tests || die "tests failed"
|
||||
}
|
@ -1,9 +1,3 @@
|
||||
DIST rakudo-2016.03.tar.gz 2702229 SHA256 d77b58acb09f34c99af94f32db92698df88cda7015c7630ddb1392adbf703471 SHA512 53619288655edf72f986cb5fe7b72cd70ed88a6b18421d46d5d70a8932ca22eb1067be5ddf98264e576f7d81a84d9bbaca2ac5ac3241e582d2f4672589ba7ab1 WHIRLPOOL 43696dda25214aa9e30be7c1c3323dee8ea0f1c50a5754ca2a08d421b4c59cac5001fa4a63d8086ce0cb97801eb098d4e854ca4b801eaf7d277099bf6d86b655
|
||||
DIST rakudo-2016.04.tar.gz 2706659 SHA256 207d723c9b2d524daf6008a3ed026ea06773d937e76e0fe79b89bfb7dcd0d92b SHA512 08e718643cfa89edbb8995ab9f350f69053e41cff97b33530dd2eb202d2ab2116d219ef1385717b48f5883665c73a181b1b054c1300db302fba31c6081e97532 WHIRLPOOL d49791b696114f57b685221be5cfe1873a88507810819b2a9aace07da2c2d7535eeaecc6c830df3265ecd1ff352effa509cbb3f24cba7e8afc0dc1468553cce6
|
||||
DIST rakudo-2016.05.tar.gz 2786506 SHA256 f3b3236c22ff75427c87dea1fab1dc9a0b4ca3a97296e64a14c3f2695be7a28a SHA512 524a71fa72fc04ed8a04eebe319d68c051d45082ae4ce0894a34b2c08d5dd1f270fd380ffb9a486c1cbad7df20dd96180a11642dc20f2ef343a386ce9df42ac8 WHIRLPOOL 000c74d0c0c26517b2324a20e91d304fafbf4953e028683b84599cc0508e4d79c8324dd78c95fb456e46163b52bb5615e30ec034813df10c8762a3362ae77fae
|
||||
DIST rakudo-2016.06.tar.gz 2751927 SHA256 239a0b50cfd60026ba4bb2a20b5130feaee144ccbbe3e73b6c6633ebb710519c SHA512 5197b1ffec3978a762129de7ac3130b33c6f0a97e6ab8191fc3a7271d47028b1abb35896220ad1443288489ab7789203534121d44869101def29774c6cebc38f WHIRLPOOL dd2d3d75d8ca764e41bd8a2bcd7123d7b62dde34d2d850579b849573c13339618ce7eeed2bf0f20a7b66bb0ffefe47fbb8557700ca950cfae0eaeaa27ecbc376
|
||||
DIST rakudo-2016.07.1.tar.gz 2767818 SHA256 dc71e6cccf71da98846800426a3fa260eb5913e7a3c100a89acc11d7d128d0d1 SHA512 ef5360c33c52d2628745d4d2837aca766e710452246a57cf3305d94cbda292d67e3cce31dbb846c5b7e4f68b3db38cf26dce40790a6fc28770c552da509cdece WHIRLPOOL 72ef2f5bbd0e1af5b2157449106c68d7dcc21e7981e658eafa88f0b29f98653bbe5bf15646a71e704c1a622597bbfbe6427e888c77baccfa62a475aa42b897f8
|
||||
DIST rakudo-2016.08.1.tar.gz 2779156 SHA256 ab0688963b9d19e26cea76eb5e852f6c68da650a9d209b868c21bde904ee34fe SHA512 3edae590c7dd87dfaca821c8676c5256c19e53f93bd5fd534ae235ae5a2449d0329f0b1311b6b344ec7a258f9eeae6a78e904a02d57c49a6b32ab1914ff2ebe8 WHIRLPOOL 9435477144e0dd45e58e831f5239e95104765a3be5411ba9772324af0c803fd43a9f903f107b3b9186409fb3b5af227e923fcf213052603291a242412fe1d2be
|
||||
DIST rakudo-2016.09.tar.gz 2789496 SHA256 fe280bcc511a3f25b805039e842b554f5f0f9c6255043a8fa3d6a1e4f35e47e7 SHA512 68f45dba174d1421b95b30e4ee5aef658576c4d0845d879b6e67e1587166f4438c05da85dee294498da947089c866bbbd29270e967777d72b953557d59943387 WHIRLPOOL b71bc10bcc5f26bd9df8270b10fb4b232df924333628fb32cacb874624604e98f0415aaa7d30ce86bbc0c58152b210a8421996e0bce4cda58055a6118947ee28
|
||||
DIST rakudo-2016.10.tar.gz 2798155 SHA256 a1446049610a5de9609a8570be3f916c48fe90027094ae7c30f82ffafcea1a7c SHA512 b9b4ccd4cd3bbc442b2e1989c43ad76e8a2710562f9006bb43052bbdd6b5f70c845ab2d22260167c3a8a95437f6db2f562dc4db613bf95802e35bd3959f255fe WHIRLPOOL 866a0d6723d27d67f5c546984982a48ec4e9599fe98e2be6648e40b01c60fd028eeb63d2f31da7234995f61ad1cd7ca71f38f6fe2f88fd5aeff7cac32288ebff
|
||||
DIST rakudo-2016.11.tar.gz 2824346 SHA256 49c7231032ebeaf32335d8564a65e54d4021a33c7aa8310db6e5048540f4527f SHA512 81d2491a834c724bc90d0539eeb3ee9ea510fc35542be61c86ccad0098a3a9466a2e9526d97cce1f0de89a3691fc51124159dbf790e74aae8e6670abe088e56b WHIRLPOOL 340fc1ebbe2bad57ebf31191ea199134f61496243018c99a76bf7cbb27dac40e22e9d3bfc81f735f472f53a27e068ccc7afb6b847a09354adf2b1fdc9d422a55
|
||||
DIST rakudo-2016.12.tar.gz 2843706 SHA256 e5b1b7ed8e6e5eb26eae75691e90a61255d87b73c91c595b412cbd30300e7cb8 SHA512 656c654d893b2ca9cc947711d78d433b462d8bb8cf39c5e8e77dd518c57c4754949f1bb87392d31ee82a412c788bc193c251b1e3d852e87e2c9d2fcb1d71a497 WHIRLPOOL b362392e5965c923538ff57187b4e0dade7a5dc0b8ef6dd09716ced7e8d876d46136a8a93e45388c9a74e725201d3aab8f9b94bbef2e4fd74dbf8367b57c6703
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue