Sync with portage [Thu Dec 29 08:38:38 MSK 2016].

mhiretskiy 698
root 7 years ago
parent fbb65acd09
commit 94df3a90ff

@ -11,7 +11,7 @@ HOMEPAGE="https://github.com/twogood/unshield"
SRC_URI="${HOMEPAGE}/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~hppa ~ppc ~x86"
KEYWORDS="amd64 ~hppa ~ppc ~x86"
# OpenSSL (or LibreSSL) is detected at build time, and used to determine
# whether or not a hand-rolled md5 implementation is used. The build

@ -14,6 +14,6 @@
content's rich meta-data.
</longdescription>
<upstream>
<remote-id type="google-code">xar</remote-id>
<remote-id type="github">mackyle/xar</remote-id>
</upstream>
</pkgmetadata>

@ -1,4 +1,4 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -7,8 +7,8 @@ EAPI=4
inherit autotools base eutils
DESCRIPTION="An easily extensible archive format"
HOMEPAGE="https://code.google.com/p/xar"
SRC_URI="https://xar.googlecode.com/files/${P}.tar.gz"
HOMEPAGE="https://github.com/mackyle/xar"
SRC_URI="https://github.com/mackyle/${PN}/archive/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"

@ -1,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -7,8 +7,8 @@ EAPI="5"
inherit autotools eutils
DESCRIPTION="An easily extensible archive format"
HOMEPAGE="https://code.google.com/p/xar"
SRC_URI="https://xar.googlecode.com/files/${P}.tar.gz"
HOMEPAGE="https://github.com/mackyle/xar"
SRC_URI="https://github.com/mackyle/${PN}/archive/${P}.tar.gz"
LICENSE="BSD-2"
SLOT="0"

@ -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[@]}"
}

@ -12,6 +12,9 @@
sustain server overload, support for the HTTP/1.1 and SSL protocols, and
its extensibility to new workload generators and performance
measurements.</longdescription>
<use>
<flag name="idleconn">Build with the idleconn program</flag>
</use>
<upstream>
<remote-id type="google-code">httperf</remote-id>
<remote-id type="github">httperf/httperf</remote-id>

@ -14,7 +14,7 @@ SRC_URI="https://github.com/akopytov/sysbench/archive/${GITHUB_REV}.tar.gz -> ${
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 ~x86"
IUSE="aio lua mysql postgres test"
RDEPEND="aio? ( dev-libs/libaio )

@ -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,8 +1,7 @@
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
EAPI="5"
inherit eutils flag-o-matic
if [[ ${PV} == "9999" ]] ; then
@ -36,7 +35,7 @@ src_prepare() {
if [[ ${PV} == "9999" ]] ; then
eautoreconf
fi
default
epatch_user
}
src_configure() {

@ -34,9 +34,9 @@ static-user systemtap tci test +threads usb usbredir +uuid vde +vhost-net \
virgl virtfs +vnc vte xattr xen xfs"
COMMON_TARGETS="aarch64 alpha arm cris i386 m68k microblaze microblazeel mips
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64 unicore32
mips64 mips64el mipsel or32 ppc ppc64 s390x sh4 sh4eb sparc sparc64
x86_64"
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore xtensa xtensaeb"
IUSE_SOFTMMU_TARGETS="${COMMON_TARGETS} lm32 moxie ppcemb tricore unicore32 xtensa xtensaeb"
IUSE_USER_TARGETS="${COMMON_TARGETS} armeb mipsn32 mipsn32el ppc64abi32 ppc64le sparc32plus tilegx"
use_softmmu_targets=$(printf ' qemu_softmmu_targets_%s' ${IUSE_SOFTMMU_TARGETS})

@ -3,7 +3,6 @@ DIST lwip-1.3.0.tar.gz 398933 SHA256 772e4d550e07826665ed0528c071dd5404ef7dbe182
DIST newlib-1.16.0.tar.gz 12024353 SHA256 db426394965c48c1d29023e1cc6d965ea6b9a9035d8a849be2750ca4659a3d07 SHA512 40eb96bbc6736a16b6399e0cdb73e853d0d90b685c967e77899183446664d64570277a633fdafdefc351b46ce210a99115769a1d9f47ac749d7e82837d4d1ac3 WHIRLPOOL 47f7afd525f482d79d9e964f0e75ee8a77e59551bd19cd94f9b95ac3af9406afa381c9d8d224f76eb568441ab613b2b194f8e5be50aa222f9ed2d9b9761829db
DIST pciutils-2.2.9.tar.bz2 212265 SHA256 f60ae61cfbd5da1d849d0beaa21f593c38dac9359f0b3ddc612f447408265b24 SHA512 2b3d98d027e46d8c08037366dde6f0781ca03c610ef2b380984639e4ef39899ed8d8b8e4cd9c9dc54df101279b95879bd66bfd4d04ad07fef41e847ea7ae32b5 WHIRLPOOL ce801947fcf7ba0b56710029f25e746d3e03a80699af9d3570efcd417b12b546264f286b2e78b1402cca766c08e35bdd0ff0a692ab4ad419295f00bcfe91130e
DIST polarssl-1.1.4-gpl.tgz 611340 SHA256 2d29fd04a0d0ba29dae6bd29fb418944c08d3916665dcca74afb297ef37584b6 SHA512 88da614e4d3f4409c4fd3bb3e44c7587ba051e3fed4e33d526069a67e8180212e1ea22da984656f50e290049f60ddca65383e5983c0f8884f648d71f698303ad WHIRLPOOL 39448c00dda142a836a78381b446c7b586272a44d8afc867a7ea702228f105bb2adffe757bd6c23af090cff64ef32e7af0c373dccc5145ff4c11552cf3f28383
DIST xen-4.6.4.tar.gz 19709274 SHA256 b795d5631a85fb68295361067195ecd00003656dacede4ec57533fce33ab5109 SHA512 e6278061a16829628030579e115a500970ff575eb6796189bfa1e2d7a8cbbf8aec2c2bd04c77cdc87226d6cc5eaee59d6c62cacb4e74b06e1f1379734b872938 WHIRLPOOL a982f7bbf2ba16781ac0f310ef27a32e9115596e91117609d22827bc1999facb12df4f33d1ba0b7015cbfae90a24302243d508e8c38ba45ea998341b76ba0567
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 zlib-1.2.3.tar.gz 496597 SHA256 1795c7d067a43174113fdf03447532f373e1c6c57c08d61d9e4e9be5e244b05e SHA512 021b958fcd0d346c4ba761bcf0cc40f3522de6186cf5a0a6ea34a70504ce9622b1c2626fce40675bc8282cf5f5ade18473656abc38050f72f5d6480507a2106e WHIRLPOOL 8fd7010faf6a48a9c7ff4bcfe3ce4fe9061eb541259e0a2d0def214e8c4becf2b22e8d6f96f65ca827abffeaa9d96e95ed2402844f99835f7b079fc9f3e84276

@ -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,461 +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='ncurses,xml,threads'
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
MY_PV=${PV/_/-}
MAJOR_V="$(get_version_component_range 1-2)"
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="amd64 ~arm ~arm64 x86"
UPSTREAM_VER=0
SECURITY_VER=19
# xen-tools's gentoo patches tarball
GENTOO_VER=7
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=1
# xen-tools ovmf's patches
OVMF_VER=2
SEABIOS_VER=1.8.2
# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
OVMF_PV=20151110
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
S="${WORKDIR}/xen-${MY_PV}"
fi
DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="http://xen.org/"
DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0/${MAJOR_V}"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
pygrub? ( python )
ovmf? ( hvm )
^^ ( qemu system-qemu )"
COMMON_DEPEND="
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
"
DEPEND="${COMMON_DEPEND}
dev-python/lxml[${PYTHON_USEDEP}]
x86? ( sys-devel/dev86
sys-power/iasl )
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
ovmf? (
!arm? ( dev-lang/nasm )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
sys-firmware/ipxe
sys-devel/dev86
sys-power/iasl )
dev-lang/perl
app-misc/pax-utils
doc? (
app-doc/doxygen
dev-python/markdown[${PYTHON_USEDEP}]
dev-tex/latex2html[png,gif]
media-gfx/graphviz
dev-tex/xcolor
media-gfx/transfig
dev-texlive/texlive-latexextra
virtual/latex-base
dev-tex/latexmk
dev-texlive/texlive-latex
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
hvm? ( x11-proto/xproto
!net-libs/libiscsi )
qemu? (
x11-libs/pixman
sdl? ( media-libs/libsdl[X] )
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )"
RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
usr/share/qemu-xen/qemu/s390-ccw.img"
RESTRICT="test"
pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"
#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"
if has_version dev-libs/libgcrypt:0; then
export "CONFIG_GCRYPT=y"
fi
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif use amd64 ; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
}
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
# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
epatch "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null
# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
epatch "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null
# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo/$i
done
fi
# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
fi
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die
# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# 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 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 {} + || die "failed to re-set custom-cflags"
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS
fi
if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi
if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi
if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi
if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
fi
# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die
# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die
#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi
# use /var instead of /var/lib, consistat with previous ebuild
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
m4/paths.m4 configure tools/configure || die
# use /run instead of /var/run
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
m4/paths.m4 configure tools/configure || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_with system-qemu) \
$(use_enable pam) \
$(use_enable api xenapi) \
$(use_enable ovmf) \
$(use_enable ocaml ocamltools) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use qemu || myconf+=" --with-system-qemu"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
econf ${myconf}
}
src_compile() {
export VARTEXFONTS="${T}/fonts"
local myopt
use debug && myopt="${myopt} debug=y"
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default
# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools
# Fix the remaining Python shebangs.
python_fix_shebang "${D}"
# Remove RedHat-specific stuff
rm -rf "${D}"tmp || die
if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
# for xendomains
keepdir /etc/xen/auto
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
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"
elog ""
elog "Recommended to utilise the xencommons script to config sytem At boot"
elog "Add by use of rc-update on completion of the install"
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi
if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

@ -1,456 +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='ncurses,xml,threads'
inherit eutils bash-completion-r1 flag-o-matic multilib python-single-r1 toolchain-funcs versionator
MY_PV=${PV/_/-}
MAJOR_V="$(get_version_component_range 1-2)"
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
REPO="xen.git"
EGIT_REPO_URI="git://xenbits.xen.org/${REPO}"
S="${WORKDIR}/${REPO}"
else
KEYWORDS="~amd64 ~arm ~arm64 ~x86"
UPSTREAM_VER=
SECURITY_VER=
# xen-tools's gentoo patches tarball
GENTOO_VER=8
# xen-tools's gentoo patches version which apply to this specific ebuild
GENTOO_GPV=0
# xen-tools ovmf's patches
OVMF_VER=2
SEABIOS_VER=1.10.0
# OVMF upstream 52a99493cce88a9d4ec8a02d7f1bd1a1001ce60d
OVMF_PV=20151110
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P/-tools/}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-gentoo-patches-${GENTOO_VER}.tar.xz"
[[ -n ${OVMF_VER} ]] && \
OVMF_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN/-tools}-ovmf-patches-${OVMF_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/xen-${MY_PV}.tar.gz
http://code.coreboot.org/p/seabios/downloads/get/seabios-${SEABIOS_VER}.tar.gz
https://dev.gentoo.org/~dlan/distfiles/seabios-${SEABIOS_VER}.tar.gz
ovmf? ( https://dev.gentoo.org/~dlan/distfiles/ovmf-${OVMF_PV}.tar.bz2
${OVMF_PATCHSET_URI} )
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
S="${WORKDIR}/xen-${MY_PV}"
fi
DESCRIPTION="Xen tools including QEMU and xl"
HOMEPAGE="http://xen.org/"
DOCS=( README docs/README.xen-bugtool )
LICENSE="GPL-2"
SLOT="0/${MAJOR_V}"
# Inclusion of IUSE ocaml on stabalizing requires maintainer of ocaml to (get off his hands and) make
# >=dev-lang/ocaml-4 stable
# Masked in profiles/eapi-5-files instead
IUSE="api custom-cflags debug doc flask hvm +qemu ocaml ovmf +qemu-traditional +pam python pygrub screen sdl static-libs system-qemu system-seabios"
REQUIRED_USE="
${PYTHON_REQUIRED_USE}
pygrub? ( python )
ovmf? ( hvm )
^^ ( qemu system-qemu )"
COMMON_DEPEND="
dev-libs/lzo:2
dev-libs/glib:2
dev-libs/yajl
dev-libs/libaio
dev-libs/libgcrypt:0
sys-libs/zlib
"
DEPEND="${COMMON_DEPEND}
dev-python/lxml[${PYTHON_USEDEP}]
x86? ( sys-devel/dev86
sys-power/iasl )
pam? ( dev-python/pypam[${PYTHON_USEDEP}] )
${PYTHON_DEPS}
api? ( dev-libs/libxml2
net-misc/curl )
ovmf? (
!arm? ( dev-lang/nasm )
$(python_gen_impl_dep sqlite)
)
!amd64? ( >=sys-apps/dtc-1.4.0 )
amd64? ( sys-devel/bin86
system-seabios? ( sys-firmware/seabios )
sys-firmware/ipxe
sys-devel/dev86
sys-power/iasl )
dev-lang/perl
app-misc/pax-utils
doc? (
app-doc/doxygen
dev-python/markdown[${PYTHON_USEDEP}]
dev-tex/latex2html[png,gif]
media-gfx/graphviz
dev-tex/xcolor
media-gfx/transfig
dev-texlive/texlive-latexextra
virtual/latex-base
dev-tex/latexmk
dev-texlive/texlive-latex
dev-texlive/texlive-pictures
dev-texlive/texlive-latexrecommended
)
hvm? ( x11-proto/xproto
!net-libs/libiscsi )
qemu? (
x11-libs/pixman
sdl? ( media-libs/libsdl[X] )
)
system-qemu? ( app-emulation/qemu[xen] )
ocaml? ( dev-ml/findlib
>=dev-lang/ocaml-4 )"
RDEPEND="${COMMON_DEPEND}
sys-apps/iproute2[-minimal]
net-misc/bridge-utils
screen? (
app-misc/screen
app-admin/logrotate
)"
# hvmloader is used to bootstrap a fully virtualized kernel
# Approved by QA team in bug #144032
QA_WX_LOAD="usr/lib/xen/boot/hvmloader
usr/share/qemu-xen/qemu/s390-ccw.img"
RESTRICT="test"
pkg_setup() {
python_setup
export "CONFIG_LOMOUNT=y"
#bug 522642, disable compile tools/tests
export "CONFIG_TESTS=n"
if [[ -z ${XEN_TARGET_ARCH} ]] ; then
if use x86 && use amd64; then
die "Confusion! Both x86 and amd64 are set in your use flags!"
elif use x86; then
export XEN_TARGET_ARCH="x86_32"
elif use amd64 ; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
}
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
# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
# apply qemu-xen/upstream patches
pushd "${S}"/tools/qemu-xen/ > /dev/null
for i in ${XEN_SECURITY_QEMUU}; do
epatch "${WORKDIR}"/patches-security/qemuu/$i
done
popd > /dev/null
# apply qemu-traditional patches
pushd "${S}"/tools/qemu-xen-traditional/ > /dev/null
for i in ${XEN_SECURITY_QEMUT}; do
epatch "${WORKDIR}"/patches-security/qemut/$i
done
popd > /dev/null
fi
# move before Gentoo patch, one patch should apply to seabios, to fix gcc-4.5.x build err
mv ../seabios-${SEABIOS_VER} tools/firmware/seabios-dir-remote || die
pushd tools/firmware/ > /dev/null
ln -s seabios-dir-remote seabios-dir || die
popd > /dev/null
# Gentoo's patchset
if [[ -n ${GENTOO_VER} && -n ${GENTOO_GPV} ]]; then
einfo "Try to apply Gentoo specific patch set"
source "${FILESDIR}"/gentoo-patches.conf
_gpv=_gpv_${PN/-/_}_${PV//./}_${GENTOO_GPV}
for i in ${!_gpv}; do
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo/$i
done
fi
# Ovmf's patchset
if use ovmf; then
if [[ -n ${OVMF_VER} ]];then
einfo "Try to apply Ovmf patch set"
pushd "${WORKDIR}"/ovmf-*/ > /dev/null
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-ovmf
popd > /dev/null
fi
mv ../ovmf-${OVMF_PV} tools/firmware/ovmf-dir-remote || die
fi
mv tools/qemu-xen/qemu-bridge-helper.c tools/qemu-xen/xen-bridge-helper.c || die
# Fix texi2html build error with new texi2html, qemu.doc.html
sed -i -e "/texi2html -monolithic/s/-number//" tools/qemu-xen-traditional/Makefile || die
use api || sed -e "/SUBDIRS-\$(LIBXENAPI_BINDINGS) += libxen/d" -i tools/Makefile || die
sed -e 's:$(MAKE) PYTHON=$(PYTHON) subdirs-$@:LC_ALL=C "$(MAKE)" PYTHON=$(PYTHON) subdirs-$@:' \
-i tools/firmware/Makefile || die
# Drop .config, fixes to gcc-4.6
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
# 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 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 {} + || die "failed to re-set custom-cflags"
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
unset CPPFLAGS
fi
if ! use pygrub; then
sed -e '/^SUBDIRS-y += pygrub/d' -i tools/Makefile || die
fi
if ! use python; then
sed -e '/^SUBDIRS-y += python$/d' -i tools/Makefile || die
fi
if ! use hvm; then
sed -e '/SUBDIRS-$(CONFIG_X86) += firmware/d' -i tools/Makefile || die
# Bug 351648
elif ! use x86 && ! has x86 $(get_all_abis); then
mkdir -p "${WORKDIR}"/extra-headers/gnu || die
touch "${WORKDIR}"/extra-headers/gnu/stubs-32.h || die
export CPATH="${WORKDIR}"/extra-headers
fi
if use qemu; then
if use sdl; then
sed -i -e "s:\$\$source/configure:\0 --enable-sdl:" \
tools/Makefile || die
else
sed -i -e "s:\${QEMU_ROOT\:\-\.}/configure:\0 --disable-sdl:" \
tools/qemu-xen-traditional/xen-setup || die
sed -i -e "s:\$\$source/configure:\0 --disable-sdl:" \
tools/Makefile || die
fi
else
# Don't bother with qemu, only needed for fully virtualised guests
sed -e "s:install-tools\: tools/qemu-xen-traditional-dir:install-tools\: :g" -i Makefile || die
fi
# Reset bash completion dir; Bug 472438
sed -e "s:^BASH_COMPLETION_DIR ?= \$(CONFIG_DIR)/bash_completion.d:BASH_COMPLETION_DIR ?= $(get_bashcompdir):" \
-i Config.mk || die
sed -i -e "/bash-completion/s/xl\.sh/xl/g" tools/libxl/Makefile || die
# xencommons, Bug #492332, sed lighter weight than patching
sed -e 's:\$QEMU_XEN -xen-domid:test -e "\$QEMU_XEN" \&\& &:' \
-i tools/hotplug/Linux/init.d/xencommons.in || die
# respect multilib, usr/lib/libcacard.so.0.0.0
sed -e "/^libdir=/s/\/lib/\/$(get_libdir)/" \
-i tools/qemu-xen/configure || die
#bug 518136, don't build 32bit exactuable for nomultilib profile
if [[ "${ARCH}" == 'amd64' ]] && ! has_multilib_profile; then
sed -i -e "/x86_emulator/d" tools/tests/Makefile || die
fi
# use /var instead of /var/lib, consistat with previous ebuild
sed -i -e "/XEN_LOCK_DIR=/s/\$localstatedir/\/var/g" \
m4/paths.m4 configure tools/configure || die
# use /run instead of /var/run
sed -i -e "/XEN_RUN_DIR=/s/\$localstatedir//g" \
m4/paths.m4 configure tools/configure || die
# uncomment lines in xl.conf
sed -e 's:^#autoballoon=:autoballoon=:' \
-e 's:^#lockfile=:lockfile=:' \
-e 's:^#vif.default.script=:vif.default.script=:' \
-i tools/examples/xl.conf || die
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
local myconf="--prefix=${PREFIX}/usr \
--libdir=${PREFIX}/usr/$(get_libdir) \
--libexecdir=${PREFIX}/usr/libexec \
--disable-werror \
--disable-xen \
--enable-tools \
--enable-docs \
$(use_enable pam) \
$(use_enable api xenapi) \
$(use_enable ovmf) \
$(use_enable ocaml ocamltools) \
--with-xenstored=$(usex ocaml 'oxenstored' 'xenstored') \
"
use system-seabios && myconf+=" --with-system-seabios=/usr/share/seabios/bios.bin"
use system-qemu && myconf+=" --with-system-qemu=/usr/bin/qemu-system-x86_64"
use amd64 && myconf+=" $(use_enable qemu-traditional)"
econf ${myconf}
}
src_compile() {
export VARTEXFONTS="${T}/fonts"
local myopt
use debug && myopt="${myopt} debug=y"
if test-flag-CC -fno-strict-overflow; then
append-flags -fno-strict-overflow
fi
emake V=1 CC="$(tc-getCC)" LD="$(tc-getLD)" AR="$(tc-getAR)" RANLIB="$(tc-getRANLIB)" -C tools ${myopt}
use doc && emake -C docs txt html
emake -C docs man-pages
}
src_install() {
# Override auto-detection in the build system, bug #382573
export INITD_DIR=/tmp/init.d
export CONFIG_LEAF_DIR=../tmp/default
# Let the build system compile installed Python modules.
local PYTHONDONTWRITEBYTECODE
export PYTHONDONTWRITEBYTECODE
emake DESTDIR="${ED}" DOCDIR="/usr/share/doc/${PF}" \
XEN_PYTHON_NATIVE_INSTALL=y install-tools
# Fix the remaining Python shebangs.
python_fix_shebang "${D}"
# Remove RedHat-specific stuff
rm -rf "${D}"tmp || die
if use doc; then
emake DESTDIR="${D}" DOCDIR="/usr/share/doc/${PF}" install-docs
dohtml -r docs/
docinto pdf
dodoc ${DOCS[@]}
[ -d "${D}"/usr/share/doc/xen ] && mv "${D}"/usr/share/doc/xen/* "${D}"/usr/share/doc/${PF}/html
fi
rm -rf "${D}"/usr/share/doc/xen/
doman docs/man?/*
newconfd "${FILESDIR}"/xendomains.confd xendomains
newconfd "${FILESDIR}"/xenstored.confd xenstored
newconfd "${FILESDIR}"/xenconsoled.confd xenconsoled
newinitd "${FILESDIR}"/xendomains.initd-r2 xendomains
newinitd "${FILESDIR}"/xenstored.initd xenstored
newinitd "${FILESDIR}"/xenconsoled.initd xenconsoled
newinitd "${FILESDIR}"/xencommons.initd xencommons
newconfd "${FILESDIR}"/xencommons.confd xencommons
newinitd "${FILESDIR}"/xenqemudev.initd xenqemudev
newconfd "${FILESDIR}"/xenqemudev.confd xenqemudev
if use screen; then
cat "${FILESDIR}"/xendomains-screen.confd >> "${D}"/etc/conf.d/xendomains || die
cp "${FILESDIR}"/xen-consoles.logrotate "${D}"/etc/xen/ || die
keepdir /var/log/xen-consoles
fi
# For -static-libs wrt Bug 384355
if ! use static-libs; then
rm -f "${D}"usr/$(get_libdir)/*.a "${D}"usr/$(get_libdir)/ocaml/*/*.a
fi
# for xendomains
keepdir /etc/xen/auto
# Remove files failing QA AFTER emake installs them, avoiding seeking absent files
find "${D}" \( -name openbios-sparc32 -o -name openbios-sparc64 \
-o -name openbios-ppc -o -name palcode-clipper \) -delete || die
}
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"
elog ""
elog "Recommended to utilise the xencommons script to config sytem At boot"
elog "Add by use of rc-update on completion of the install"
if ! use hvm; then
echo
elog "HVM (VT-x and AMD-V) support has been disabled. If you need hvm"
elog "support enable the hvm use flag."
elog "An x86 or amd64 system is required to build HVM support."
fi
if use qemu; then
elog "The qemu-bridge-helper is renamed to the xen-bridge-helper in the in source"
elog "build of qemu. This allows for app-emulation/qemu to be emerged concurrently"
elog "with the qemu capable xen. It is up to the user to distinguish between and utilise"
elog "the qemu-bridge-helper and the xen-bridge-helper. File bugs of any issues that arise"
fi
}

@ -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

@ -1,193 +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 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=19
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags debug efi flask"
DEPEND="${PYTHON_DEPS}
efi? ( >=sys-devel/binutils-2.22[multitarget] )
!efi? ( >=sys-devel/binutils-2.22 )"
RDEPEND=""
PDEPEND="~app-emulation/xen-tools-${PV}"
# no tests are available for the hypervisor
# prevent the silliness of /usr/lib/debug/usr/lib/debug files
# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
RESTRICT="test splitdebug strip"
# Approved by QA team in bug #144032
QA_WX_LOAD="boot/xen-syms-${PV}"
REQUIRED_USE="arm? ( debug )"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
python-any-r1_pkg_setup
if [[ -z ${XEN_TARGET_ARCH} ]]; then
if use amd64; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
if use flask ; then
export "XSM_ENABLE=y"
export "FLASK_ENABLE=y"
fi
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-efi.patch
# Drop .config
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
if use efi; then
export EFI_VENDOR="gentoo"
export EFI_MOUNTPOINT="boot"
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 {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
src_compile() {
# Send raw LDFLAGS so that --as-needed works
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
}
src_install() {
local myopt
use debug && myopt="${myopt} debug=y"
# The 'make install' doesn't 'mkdir -p' the subdirs
if use efi; then
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
fi
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
# make install likes to throw in some extra EFI bits if it built
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/wiki/Xen/"
use efi && einfo "The efi executable is installed in boot/efi/gentoo"
elog "You can optionally block the installation of /boot/xen-syms by an entry"
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
}

@ -1,193 +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 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=20
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags debug efi flask"
DEPEND="${PYTHON_DEPS}
efi? ( >=sys-devel/binutils-2.22[multitarget] )
!efi? ( >=sys-devel/binutils-2.22 )"
RDEPEND=""
PDEPEND="~app-emulation/xen-tools-${PV}"
# no tests are available for the hypervisor
# prevent the silliness of /usr/lib/debug/usr/lib/debug files
# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
RESTRICT="test splitdebug strip"
# Approved by QA team in bug #144032
QA_WX_LOAD="boot/xen-syms-${PV}"
REQUIRED_USE="arm? ( debug )"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
python-any-r1_pkg_setup
if [[ -z ${XEN_TARGET_ARCH} ]]; then
if use amd64; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
if use flask ; then
export "XSM_ENABLE=y"
export "FLASK_ENABLE=y"
fi
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-efi.patch
# Drop .config
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
if use efi; then
export EFI_VENDOR="gentoo"
export EFI_MOUNTPOINT="boot"
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 {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
src_compile() {
# Send raw LDFLAGS so that --as-needed works
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
}
src_install() {
local myopt
use debug && myopt="${myopt} debug=y"
# The 'make install' doesn't 'mkdir -p' the subdirs
if use efi; then
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
fi
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
# make install likes to throw in some extra EFI bits if it built
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/wiki/Xen/"
use efi && einfo "The efi executable is installed in boot/efi/gentoo"
elog "You can optionally block the installation of /boot/xen-syms by an entry"
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
}

@ -1,193 +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 )
inherit eutils multilib mount-boot flag-o-matic python-any-r1 toolchain-funcs
MY_PV=${PV/_/-}
MY_P=${PN}-${PV/_/-}
if [[ $PV == *9999 ]]; then
inherit git-r3
KEYWORDS=""
EGIT_REPO_URI="git://xenbits.xen.org/xen.git"
SRC_URI=""
else
KEYWORDS="amd64 ~arm -x86"
UPSTREAM_VER=0
SECURITY_VER=19
GENTOO_VER=
[[ -n ${UPSTREAM_VER} ]] && \
UPSTREAM_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${P}-upstream-patches-${UPSTREAM_VER}.tar.xz"
[[ -n ${SECURITY_VER} ]] && \
SECURITY_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-security-patches-${SECURITY_VER}.tar.xz"
[[ -n ${GENTOO_VER} ]] && \
GENTOO_PATCHSET_URI="https://dev.gentoo.org/~dlan/distfiles/${PN}-gentoo-patches-${GENTOO_VER}.tar.xz"
SRC_URI="http://bits.xensource.com/oss-xen/release/${MY_PV}/${MY_P}.tar.gz
${UPSTREAM_PATCHSET_URI}
${SECURITY_PATCHSET_URI}
${GENTOO_PATCHSET_URI}"
fi
DESCRIPTION="The Xen virtual machine monitor"
HOMEPAGE="http://xen.org/"
LICENSE="GPL-2"
SLOT="0"
IUSE="custom-cflags debug efi flask"
DEPEND="${PYTHON_DEPS}
efi? ( >=sys-devel/binutils-2.22[multitarget] )
!efi? ( >=sys-devel/binutils-2.22 )"
RDEPEND=""
PDEPEND="~app-emulation/xen-tools-${PV}"
# no tests are available for the hypervisor
# prevent the silliness of /usr/lib/debug/usr/lib/debug files
# prevent stripping of the debug info from the /usr/lib/debug/xen-syms
RESTRICT="test splitdebug strip"
# Approved by QA team in bug #144032
QA_WX_LOAD="boot/xen-syms-${PV}"
REQUIRED_USE="arm? ( debug )"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
python-any-r1_pkg_setup
if [[ -z ${XEN_TARGET_ARCH} ]]; then
if use amd64; then
export XEN_TARGET_ARCH="x86_64"
elif use arm; then
export XEN_TARGET_ARCH="arm32"
elif use arm64; then
export XEN_TARGET_ARCH="arm64"
else
die "Unsupported architecture!"
fi
fi
if use flask ; then
export "XSM_ENABLE=y"
export "FLASK_ENABLE=y"
fi
}
src_prepare() {
# Upstream's patchset
if [[ -n ${UPSTREAM_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
EPATCH_OPTS="-p1" \
epatch "${WORKDIR}"/patches-upstream
fi
# Security patchset
if [[ -n ${SECURITY_VER} ]]; then
einfo "Try to apply Xen Security patch set"
# apply main xen patches
# Two parallel systems, both work side by side
# Over time they may concdense into one. This will suffice for now
EPATCH_SUFFIX="patch"
EPATCH_FORCE="yes"
source "${WORKDIR}"/patches-security/${PV}.conf
for i in ${XEN_SECURITY_MAIN}; do
epatch "${WORKDIR}"/patches-security/xen/$i
done
fi
# Gentoo's patchset
if [[ -n ${GENTOO_VER} ]]; then
EPATCH_SUFFIX="patch" \
EPATCH_FORCE="yes" \
epatch "${WORKDIR}"/patches-gentoo
fi
epatch "${FILESDIR}"/${PN}-4.6-efi.patch
# Drop .config
sed -e '/-include $(XEN_ROOT)\/.config/d' -i Config.mk || die "Couldn't drop"
if use efi; then
export EFI_VENDOR="gentoo"
export EFI_MOUNTPOINT="boot"
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 {} \; || die "failed to re-set custom-cflags"
fi
# remove -Werror for gcc-4.6's sake
find "${S}" -name 'Makefile*' -o -name '*.mk' -o -name 'common.make' | \
xargs sed -i 's/ *-Werror */ /'
# not strictly necessary to fix this
sed -i 's/, "-Werror"//' "${S}/tools/python/setup.py" || die "failed to re-set setup.py"
# Bug #575868 converted to a sed statement, typo of one char
sed -e "s:granters:granter's:" -i xen/include/public/grant_table.h || die
epatch_user
}
src_configure() {
use arm && myopt="${myopt} CONFIG_EARLY_PRINTK=sun7i"
use debug && myopt="${myopt} debug=y"
if use custom-cflags; then
filter-flags -fPIE -fstack-protector
replace-flags -O3 -O2
else
unset CFLAGS
unset LDFLAGS
unset ASFLAGS
fi
}
src_compile() {
# Send raw LDFLAGS so that --as-needed works
emake V=1 CC="$(tc-getCC)" LDFLAGS="$(raw-ldflags)" LD="$(tc-getLD)" -C xen ${myopt}
}
src_install() {
local myopt
use debug && myopt="${myopt} debug=y"
# The 'make install' doesn't 'mkdir -p' the subdirs
if use efi; then
mkdir -p "${D}"${EFI_MOUNTPOINT}/efi/${EFI_VENDOR} || die
fi
emake LDFLAGS="$(raw-ldflags)" DESTDIR="${D}" -C xen ${myopt} install
# make install likes to throw in some extra EFI bits if it built
use efi || rm -rf "${D}/usr/$(get_libdir)/efi"
}
pkg_postinst() {
elog "Official Xen Guide and the unoffical wiki page:"
elog " https://wiki.gentoo.org/wiki/Xen"
elog " http://en.gentoo-wiki.com/wiki/Xen/"
use efi && einfo "The efi executable is installed in boot/efi/gentoo"
elog "You can optionally block the installation of /boot/xen-syms by an entry"
elog "in folder /etc/portage/env using the portage's feature INSTALL_MASK"
elog "e.g. echo ${msg} > /etc/portage/env/xen.conf"
}

@ -1,4 +1,4 @@
# Copyright 1999-2014 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -10,10 +10,10 @@ PYTHON_REQ_USE="ncurses"
inherit distutils-r1 eutils
DESCRIPTION="Last File Manager is a powerful file manager for the console"
HOMEPAGE="https://code.google.com/p/lfm/"
SRC_URI="https://lfm.googlecode.com/files/${P}.tar.gz"
HOMEPAGE="https://inigo.katxi.org/devel/lfm/"
SRC_URI="https://inigo.katxi.org/devel/${PN}/${P}.tar.gz"
LICENSE="GPL-3"
LICENSE="GPL-3+"
SLOT="0"
KEYWORDS="~amd64 ~x86"

@ -12,7 +12,7 @@ SRC_URI="http://www.han.de/~werner/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~x86"
KEYWORDS="amd64 x86"
IUSE=""
DEPEND="
@ -21,10 +21,9 @@ DEPEND="
"
RDEPEND="${DEPEND}"
src_prepare() {
default
epatch "${FILESDIR}"/${PN}-1.94-bindir.patch
}
PATCHES=( "${FILESDIR}"/${PN}-1.94-bindir.patch )
DOCS=( CHANGES README THANKS ytree.conf )
pkg_setup() {
tc-export CC
@ -32,5 +31,5 @@ pkg_setup() {
src_install() {
emake DESTDIR="${D}usr" install
dodoc CHANGES README THANKS ytree.conf
einstalldocs
}

@ -7,4 +7,5 @@ DIST JabRef-3.3.jar 24456650 SHA256 4c81e72a8585c800a3d5728f15ed2db425a48e14f089
DIST JabRef-3.4.jar 24390719 SHA256 0dbe96ea837ce35a624ddad65458916dee2245b12985b8612ae18b42429735de SHA512 310993160888f31d0ad644b562a7f643abfca18c7c3479a7f24db5620ebbdc04f8285bbaa47f46964aab5b61308f337a334b05200214a1084e0def0c0d32f490 WHIRLPOOL bfaab04c205306d519af71e455228d810065047ef16913e3b309c79274fe084d7aa88f865774d511dbf7d6bfee9bde536817a29bb15743876b6b777df86fd888
DIST JabRef-3.6.jar 25421252 SHA256 85792b7c7200b7a371e5fbcb4f996d63a0ab1963d3bc976f1b8670e7788f0e90 SHA512 756f02fe76b9d04c6a6db149d8f9c6a3365be0922e2bd2af9fba0dd7bc88bbda7ce7843e862e295fc58c1d8c0c95c0d5dee88f024ce51405f09159c308880237 WHIRLPOOL 31dd53db79d850a2892d6092064765026f856dbc4035e8461e6a0950acb6ec79d471165c38cbe93a9c1692403585b000becacafaa74c5aa3021b15ed2bca3d5f
DIST JabRef-3.7.jar 36702576 SHA256 1475552e2956b7a94cbab7b6c8671fc391be0d42cfa1ece3aed75dd0a8c1ecf3 SHA512 74ed9fcfa3e6e4a3facf588d8fa2d73374137d9796ba79aa9c97df6807348af5f5ca9b8670e8909d06847f8501c9a344e300172be444be9b2bd773cd4d6314c4 WHIRLPOOL e482b83bdb7209a802868309cd27dc55f4e645b60a32b27f41cca05d4fb823e65ace0012fe80e9cb706337e8b867a28964680c683892d2508160c021890e9f97
DIST JabRef-3.8.1.jar 36739725 SHA256 8fa5f317a8be62c714dff6d88e3aa3fea5c3b6b1e59f20a221b87d72aa775a85 SHA512 9241fb586da7bc6047dc6eb6e5b31800003bf31d6262033b54629e0c81856b56234a5c671ce7ab87d3b7332a70551c81c2275354e97607ad9f513686c5826780 WHIRLPOOL 90e692b9559b123c4a36694e3e1216ea207650c6073bed57ac9a7d45b27a53f409970a87c818b5129b7a53c7d936cc24570a8762fdec4bf31bf8c37e06567ea1
DIST JabRef-3.8.jar 36714920 SHA256 13bcfd10ab3d2dbe21dfad06ecf4dbf1cd08e4e1fe6a6a93293d844b4c5c3a98 SHA512 15805d06c7a566b60c28035e0f9a1d525b68774395a618e43ed7fdcc053d21e61f5930c658155d2e4ff739821789f2f988ce6e9a5502bd5536ce0a672ee19854 WHIRLPOOL 289997ea41ea77f774034a32b08bb07739b8dc86e69892c611b38d7728d87936a0738d0fde1ccb7bac49b0960659c057093aff4ddb08583a8f788b19d5b2e0e6

@ -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
}

@ -20,7 +20,7 @@
</longdescription>
<upstream>
<remote-id type="sourceforge">jabref</remote-id>
<changelog>https://github.com/JabRef/jabref/blob/v3.8/CHANGELOG.md</changelog>
<changelog>https://github.com/JabRef/jabref/blob/master/CHANGELOG.md</changelog>
<doc>http://help.jabref.org/</doc>
</upstream>
</pkgmetadata>

@ -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

@ -35,7 +35,10 @@ RDEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"
PATCHES=( "${FILESDIR}/${P}-boost-1.59-makefile.patch" )
PATCHES=(
"${FILESDIR}/${P}-boost-1.59-makefile.patch"
"${FILESDIR}/${P}-tests.patch"
)
src_prepare() {
default

@ -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,5 +1,3 @@
DIST Cabal-1.14.0.tar.gz 276517 SHA256 72540a9db8b329121b7815ef207098f4b394f76d11d154d36baf54054327abe4 SHA512 6e31f44cfafd44e1e3987ed0b116a52e12495228cb1de89e9f4ded8dbc06a0d1537bf647c4576c606d623b7d58d10367d243258b500b8c8329db6c48afd9eee3 WHIRLPOOL 22225d5923bc454e2fa24bcc9fe845b07c41c56ea67f45a0815597f0dffc4d60027117d38bdd1eccd4e61cd24d682bd8b3f4026cfaf62481712234fc9cea5321
DIST Cabal-1.16.0.3.tar.gz 284665 SHA256 ef27629d540e46c77cabac08c008583abee4e4a04ed5a5ecb1a84725dbc39f86 SHA512 7dd365c44b5ea489fcc990e0deca8ffcfdd6b867a35b85b422fc0fe9e3c70739df393cacf425575e5e4977729ef875eb0737aaa13a0f20cfaff9d22b39027a85 WHIRLPOOL 84fbe4c41c14377685c89a93b79e03920d19e65c3c8c51a4ef590bfb8ad331e1ae85d224c1cd820e90262a579131c823510a2e62f4566d452af8e67d5cf26be2
DIST Cabal-1.18.1.2.tar.gz 323545 SHA256 594ef792c085f00f06728dad0a02dd63450b49b5ac394484be6c6a0a484b6f5d SHA512 a91abbdb86bcb7a47e871e9b9a2cb4720b41f2cf6998416cc557460ff821e9b711cf8c346bf16c7b07c180815cb901f7b27e5cda3701f3ace554613ceb27e3c6 WHIRLPOOL cfc3872b944ce5209ebc0429e5561ba3fd5ddecf1256aa47e8d4968727bd3498a6dd23f6417161e7a570259728e6f66098d045d7d7b4c7e87f721c5b2edf0f73
DIST Cabal-1.18.1.3.tar.gz 705715 SHA256 25c436290dd9d05b588b6b002f0357302a9b0bf8c2630b8b069c300d803335d4 SHA512 3c6f2d3be36384140007ca1146edcca5461bf0e93cde8d2b32bd9d69f74df51975bfbc91ec7cce92d9c78929f91f9e7e8b595488bc1c328dbed313a6fcd76708 WHIRLPOOL 4679e7e0f6b9f1a887f3bbc9bdd5eccfac0bed8d62fd13cb516a51b7e8d1efe2d654c78fd38207a9678152629f60ff2528080a6fb857e7a05dd349f7c3f5f417
DIST Cabal-1.18.1.5.tar.gz 706722 SHA256 2a5f14599e390e4ed6fc78ad05e16792a671bd5c5b479c6834aa1a000ff45237 SHA512 a5bb21bcb0a95f22572a1d6d4338415bf00eab9b77c2fb4775c81f7554d282fea9160646687bd903197cb5d429f0fcd28b30b577a8915ec92740a91fa13c68ef WHIRLPOOL de3dc78ba6f99107746c75cedbdefd5661dea773cff5362ec73695b1de3ed247f0e034551da5fa39e46084ed81ee6fabbba1907f199a12c4599d66db2f7fb974

@ -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
}

@ -7,11 +7,16 @@ DIST sbt-0.13.11-gentoo-binary.tar.bz2 144170371 SHA256 ca13e6d5751de14ac0fe3542
DIST sbt-0.13.11-ivy2-deps.tar.bz2 139796284 SHA256 d8ad25a99e1dd8ebbc29955844543a1cee8bbd845cca9bb4fa92b62c27673a29 SHA512 e431e00884dbf58ca911d64da726b41b8aeae9987ae2725705c9c45b4601162e45d310f933e4214cf8a4d21ba9e7207365d9ba352cbe1511ce09f59cd33da033 WHIRLPOOL b56ba91892ee2dbb1d9d9609ffd8417184e291fa8c03f8a115757301c412a8d141a17ae315ac916067bab5b49d74f16cb82da497c8790c212f3ccc068721e24f
DIST sbt-0.13.11-sbt-deps.tar.bz2 38783848 SHA256 c2059a2513cbee50afe506d1fb0511b384df99757273d941b136e5bb3155ca7e SHA512 53020538eac11d6ae268436987d98093f017f421750496080908fad36eb9148a4cce41ab1a231ff1a35868c5c07cc8e338f1793fc91d044802b3e95b900e9cc8 WHIRLPOOL 0e4617b728536be9adfcf683b1575a522c5c0f073098c7f685003f0a340bfc4fff06031252016227b8af38f666296185815508b89bb7e82334276e55c707e16e
DIST sbt-0.13.11-src.tar.bz2 35163092 SHA256 1b987725b4e57d6139b02c9d43b18d6ec43880681cccdfca3a29c803e79f6494 SHA512 95065c452fbbf2a206ad8d8518f083abe608e8bad1075848fa7a4ad797e8a10e4127823cdb8502f4d9bd0eb01867298af7d69895eb1470bf71deba354871dd86 WHIRLPOOL 652ba691ea2dccf6eb22ea2b43d9b96e15597cb8ce2325eacd912752a60854f982e1a6fec8c049e144042c10e98b888a66b3fe923c63447ef46e6582786e4a81
DIST sbt-0.13.13-gentoo-binary.tar.xz 58011476 SHA256 5d24c07945c713e265e40634b5e4bf8ff34ecfed2e87df1f5f65e8d907b4a268 SHA512 9763b67ac4838e6ccac1848c17a03608bed61669671a10c93afc4c81d6dad06a3463ac4e4a9b7b3fb91325df5df6e0148847669d482e3cacf4fde957c110ccc1 WHIRLPOOL c1b30ccc325a11b9886de9c0d2ffcd71acd7b15a352faea20e7c8cd2ae0a2a7b7a933f7b795a417f6a64837912a2b287b5e3e91e1c428ce604c708c3549362f3
DIST sbt-0.13.13-ivy2-deps.tar.xz 121677604 SHA256 71dc4487a7fb203750230fb7ddbda5b2b12dad6d1e9f2ed5d2bec36df962799b SHA512 3301447a563e9a83431bb67a6281a6045630669012f1cc5cdde7a2cbae3f7db75f87abed003ecf8243fd230e2adea2ba3666468358ae29c51e346940235f5ed5 WHIRLPOOL a6e66fb56e85b923142cf2fdb9867fe8f75200db01285c5e7f32f391573bf39c68be7f022f80eb679b15442c4425e87111878d0c93e8ddc0e7d4dca1f11eb909
DIST sbt-0.13.13-sbt-deps.tar.xz 34750700 SHA256 a5897a610393c0d2004badbf82ebd40469f85f29b5d29f6a3d76b8ecfbe73776 SHA512 0bfd35a6926545da7340f7ee72e420121f2bb2f83d98d420b7f65b465d207b1b30a48788914e7b1fdf575a4fee870f2632b0717f1a7a2c19e2f2d5794d08b4da WHIRLPOOL 6b1b70b705ea613074a111e7a6cfbc2b31fd91645701f0018120ced4bd678c71e8a785922ece74111648d6ada89bfe714a4e95cb9b513fb409349967ed60d779
DIST sbt-0.13.13-src.tar.xz 35911028 SHA256 1344e49fe870f755ab872f51368f9d939a0076e24c03bd1f7f600e10db8210be SHA512 351f18108a23014ee7ffd5c4713f390728fb98b742efdc139e094e64df7800f399d088600d245631635b0f6f4cb69c6cd327aafa3b0bf8a233fcbf0cb4ac5702 WHIRLPOOL 7998c7e95bd9c85c3b25a2c9ea584cab7651508e90e30304ede1744ca56d41d25b2b095e397c3af52025683e6cf3fb54b6992f438545f3fc8d5afc54308c33d2
DIST sbt-0.13.8-gentoo-binary.tar.bz2 1048674 SHA256 4a2b22c9d9fbe922d5a5336d88ca21f18b2545850fec16485c824aee43df53e1 SHA512 9a5707601387d604b746ea21145a3c7735dd4b6d36541111b47519b66e5abc929ecc96ff52e144ed39a3db947204a1956e19394a1848e3fd8904f9a98ec24816 WHIRLPOOL 4fb1bde15ab57260a25b0a4a1634122af2e2b9d6cd35d3a9c693d9bba6c398bee489f05bf29a763a60d7a04f54823bdd9fc54ec5a2809900b28f890930649fc7
DIST sbt-0.13.8-ivy2-deps.tar.bz2 124672043 SHA256 565ba7434316a3ab2f61f58b4bc57317e5c2ae7c9ee95061c39cfddd5767a355 SHA512 47b2f235b7d5883086f8246265e9081a50dcdaede43550a1c0de1c85a9ebf24b47e1331b662aa5c0faebaf22a37849ffb2c1f25a7592c461e62f582984ad4b70 WHIRLPOOL f92b2cd087d51f0ae31d5ac93d1dca7214ace6df8c06b050287007f05697e81ac14758368730e6df45043ba80167b9581e636b0364d5ba3a5c7352fafd7e5007
DIST sbt-0.13.8-sbt-deps.tar.bz2 88352931 SHA256 d0eab3858f389e201277d1ead68352172830b17dd8343f09e0e63e4880a5e20e SHA512 a6e886f5f18821c26df28a2e8cf2773b4841854fc1bd4dfa43924089966020da5affd635da96a8e13efc7c06be6a5bf53697ca91f5fbf41efcdf8dda00e8428d WHIRLPOOL 54744676b33b11ffb350b5a543986efd5cd629594ce4bac5154a78df233619a92a2a4842659acf9c15533e764d24333183372f136b3b1f7463bbe55347c41b8f
DIST sbt-0.13.8-src.tar.bz2 32766054 SHA256 5225864c54e5718dc68cfcd554a7215bd028947d61ed9522e2ad9d0a19cbdd83 SHA512 f6c834c6294c957e8d5b89a3a616f23a980cca1f882695d09a6e0080d1013227ba3bac86942b39c13e49fb6ac9fb72c3478df24ec8549b8b9812ea352932fff8 WHIRLPOOL 5054578505fe35b6c5f269c72b921920cf232a1efed18da5cd1833457d46f4e4342988be46539001b4dcfcfc6c807785915f4d0791af939dc83018ffcc03effe
DIST sbt-0.13.8-test-deps.tar.bz2 40704285 SHA256 7cb252d69b5868905e0592df7ef9a83ce09f75cb10a72bc9dcd649286bb524a3 SHA512 a79ea9c81abc436168f04f674ffef4fee6f7c7a5dede5a3060e2e2bd9a9863dd5f1c7b31c02f3823fb5a67b2bb43c44d306efb59468f625e4db277cface47cd0 WHIRLPOOL 268ea150c5ca2fe1988317e0616262de814e2aa7213f64b99baf389c3e67e2093a04765ac27f08bd585fe33c77d9dd8c7a0ba8d3bd77d937d9a7260dab72c23a
DIST sbt-launch-0.13.11.jar 1210231 SHA256 c63ade35a7a7aa0d8e3bdc7c2353ce79b045083cfabf6bc6fab88584f6100bc1 SHA512 9db3d3e953e4246b09ce2265b76463b6000c6d1c9d1328eb0deb1b67e9c955816ef67f6aeaeca22dc46e27cc71ba833545ab39c5351b8230609c021ca9e818b9 WHIRLPOOL 6650144da7aef195779c4d23c594fee9c7f79e7b2758bb2c98c83732f75656b0143ec73023a98677201502a813c0e37bbec48cebbc6fe520484ec6bd53fb4019
DIST sbt-launch-0.13.13.jar 1210231 SHA256 9cd7d56eabfb15b5fe68c39116c4cfe6379b5b260d63086d4f5c69fa62521c13 SHA512 78e7ce21c610e83a532b04491e13d53b4193205328adce473252d523fe0ca0f3892dba900f01ff6e28d94a17c3ba1ebbe7d85fd6ce9900c48263bc4816da37ef WHIRLPOOL 20e0cd1bd836cee2b4aaee8af8d1e29812211dc5e9ecda4b058a64c26c607c7645285949751f84ea95e68cee2bfaa4cce14b14c2d602e40d9db967bf8a094217
DIST sbt-launch-0.13.7.jar 1208385 SHA256 6570bb03df6138ffaa7ac0bbe35eb4ea79062d1146b6929c75cf238d14dd9158 SHA512 ddc62dd85b552a7157ae0c19d0161d77a929adeb4ea81042a3a38c3d979e32674b9174aef47d458e9a7c8ea7942c08f1a7177b9bc739f7cd9e0484aef9915204 WHIRLPOOL 63841a401739aa3eab24632fcec41dc5c186502f4b80fe782106a0c6448b1da2321bf2a7a0b0f83473f7c073cce2ac8f5f85440d955acc191a73bd95200cb2cf
DIST sbt-launch-0.13.9.jar 1210236 SHA256 4fddf384322c8aa02671ab89e229ab1e703613eee350e3af6c7790916d43f96d SHA512 c447e7be5b18689e4821dbde699fba230214a34059aa38441dcff13938d3cb351f1bd4266d99a2dcd40a80a7c623a14483755a461417750ab60635ab73c2fdde WHIRLPOOL 61806d9140b9b64b8a60f5f6a0e5d16bb6b16e643185b874780af0b3b32a9e62311d86e4a3fc3526735eb590a1a98f00881e60789c5b079521da660aea319171

@ -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,16 +1,7 @@
DIST binary-0.7.5.0.tar.gz 45764 SHA256 4709c5aa7cc99cb4a465a68de1648968208d0c60c368e2fece476d977530ef19 SHA512 232e7c3da1c0055f3e9f211a86e81c76bc44ab1b70cabd23c93634dbaa42eed8bd9314fbedc16b9703d3ca92b0bbf232e6c30bb1384687dad0e6e85c9abb8947 WHIRLPOOL 1d8dcf9d5125ff398375f4024c0e43fa168004811db7824e2739ec5c0451b38dae9ad74f757c7708427deed0044580b182e35d1c7ecffec25f7b10c70bd32075
DIST binary-0.7.6.1.tar.gz 47086 SHA256 8f85cafc15be660757878a665d024ce595d4422fead174e20a501c9ec8f81067 SHA512 655daa93a52b845a85d440810452933d7bc3398ad1b51e1e955b2d19a0a32679325a0d1751ad50d252531e493528262e14dab32af4b9a515855fe7f64e0730b2 WHIRLPOOL 6853eb2c817e8ae792226c6c7764ce495833f965c3d503fe7e39c0502019d12f7bd46309b72dfdb276c7dbce8c004cb59fdea4936d69ede0a7c8b487acda2702
DIST ghc-7.10.2-src.tar.bz2 12651156 SHA256 908a01ca86238318f4e880fda400ea399d0a0008d699c912b85d0e0f746e5689 SHA512 e3f99a9e848c12b728212da24bf9029ec8cde88cdfa7eeb4ee2ea223ad8bcaae3e7c27456d09d60a3d21efa8f907ccd2490caf5630ca5fe3ce87f04901275a66 WHIRLPOOL dee757e79de8ac6bcf127212703985282ce96d050be50e78c3f249f13dc0212c9fd96899502748ceb26b9fc3a804379a456e19a9bedfef72f6890992b00492da
DIST ghc-7.10.3-src.tar.bz2 13281867 SHA256 3e29a56a74ed6a74d3ee2a6db9389f2462837da46ca6dce9d2965f9c152f0c15 SHA512 97a8282d8a75399c78d85d6faab7ac253a993dc69f1840358572f1878b8fd1a527c28801e5823c8200b5690e268e4a0c00941945ada13790852c75a83b612c17 WHIRLPOOL 04af6ea2738a1cc9e266efbb0e1b41b70d4cd915b48ca1265fade62b1c56cd51056fd1a82fc14cebc19a0c16782609a991c1a181ebe59574f1a10b4f26ad830d
DIST ghc-7.4.2-src.tar.bz2 25836446 SHA256 f2ee1289a33cc70539287129841acc7eaf16112bb60c59b5a6ee91887bfd836d SHA512 5a3d06a36702fa7e337b482c9de92ce1f84a68f18d8560bcc11f3617d6d46f93167fee27e786de6483a9ef0eab3b1ac6909a71dd53908d36156df4e465075050 WHIRLPOOL 61865eed2bf92728e7c4c4a0c48be44081bf728cfd824760d643e2fad838d96c19e173052d3aac073e0795b5efa3720ba5ddf13cca1ec7952b7524bbe1f204bc
DIST ghc-7.6.3-src.tar.bz2 110763823 SHA256 bd43823d31f6b5d0b2ca7b74151a8f98336ab0800be85f45bb591c9c26aac998 SHA512 ac86f18b4feeb0bdc9e867261600b210caf62740d73ae657259bbe8149b8c2c4f5a73d09d74d944d4e50f85cc87503485365f0a0ae65befe8d2b6844e5e1253a WHIRLPOOL 0fe1f5f2987699067494559e6a679d28f027eee8fb2a00c683161dbce5443b1faeebfb51572209b75231cee24c7f0c929cabbc82a93f70e16d05e351fdfe2eaf
DIST ghc-7.8.3-src.tar.xz 9160092 SHA256 b0cd96a549ba3b5e512847a4a8cd1a3174e4b2b75dadfc41c568fb812887b958 SHA512 2cc8c2aa6f18ba565c1e2aa637045e246f1214c2a77e95c2a97dfb97203b8983e4ad3cc13178b4b51aff70c58d59a1f68f94cd813d043745cb02411bad04bb00 WHIRLPOOL 3a2e8eea0db7a150e4732efed488a3a5eb56da00a9a90a3379afcb4090323925a2a7485fec6676e784139f112d7c825e8d18a576c34c760af4a7f3adb22c021a
DIST ghc-7.8.4-ia64-CLOSUREs-regenerated.patch.gz 13268 SHA256 3bdff22e654aee6f942d43edf1bf6cf70404c0152c4fcf89276f10d2c4c5b4b9 SHA512 a655713e06324b56f0041edf70837487e296d28e6f3ee35fe116b9938765aaf3469d25e92645e0940655ed3607dff27d3826fe0f995c84e81b51bfc956816e7d WHIRLPOOL d2cb53bdc6debc0278d554168ea3ab22b0fd8314adac81444637278a92d21b766280fedfb4b7d1b4540c7381c7962dec6b13a799ab2fee4d456fe2875d5c6a5b
DIST ghc-7.8.4-src.tar.bz2 10600755 SHA256 59e3bd514a1820cc1c03e1808282205c0b8518369acae12645ceaf839e6f114b SHA512 079a53891d8ebd8d9b88da96170e60981608a619f8282e4b7948f35244e99bd87277649ac7fcebc227a61a4d21960db8d5e5b9e92f2c69c82d8d68d7fd0a41d3 WHIRLPOOL a9be7641adbd237ed6e0f644c312e655e98be9566097aee5e2c0022e8756d5b2236e42dd86d76c638a001b5ca3f67307e89ec0cd003a92cd112a5d6d3e3d8467
DIST ghc-bin-7.10.2-amd64.tbz2 112028560 SHA256 536297ac402da44ec1aafb1a937960883d12d192db16715ca34ab6469773a4c7 SHA512 207d8032c99d52bf4215ddeea2dbcd5816bb8d4caf2c3c31190e3ca92b49667d98a4f97aaf4cd6b40090f150854d520f75b5420dfe1ade7f036cf35d3dcb5100 WHIRLPOOL 8e43956a61c2c0fead242e3b179cde4918c04f3db7dbb27cc986f00f981261d98028ead82548b87d183d8da928635d5db4aa62ff1161f4077e5370483530a316
DIST ghc-bin-7.10.2-r1-amd64-noncurses.tbz2 111863814 SHA256 782a68a13343ac8d6ed97540b411f714c4e826ccc3d152724198548c9240aceb SHA512 b154dbd7fb4fefc4283ec337b0c6ce6b6b6b3a62e9d889ca9c5dd5b5e5987f811a1c87845239ca94941afea630fc8bf1d8db94eb11a4023abd4b1d772dfb17c1 WHIRLPOOL 1e1f1ec82c831d115cd5f0b27f1914da94d92a9eca9af634210eb5f72b54281de6e08ea8e304bebaec8a456659b40866b9f0e24ef0e72c3f5a63d85296eb172a
DIST ghc-bin-7.10.2-r1-x86-noncurses.tbz2 113572461 SHA256 3ad1e2888d26b6858cd1efe0e9863bc325b97c47be19fdd2e8dd5bbc86f7266b SHA512 573b7228b576a47ca1c3796cc2d4180a6c9dcaff58555cf52fc85a9b487920fc19487ff9ee8e0b6c33d6196ba05b9908f0d984bf3a4c0d91f52667e7389580a5 WHIRLPOOL 2c8cda95d04e9f345aa2f20fe8758761dd35648b788b7bf9b8f571687a8aae92456552883684d83ec2d2acaf22a002121643316df3c82349400c7de3d0300f7d
DIST ghc-bin-7.10.2-x86.tbz2 113900477 SHA256 eefb7a3002e3dcdd6d936b2b2826eadf3cd100352babad4c9a355b944064240a SHA512 61dae4b9c80bfef6b1e0550c77b70f25d11f4a9fbe3b57d6c4ad451b4b584884432405d39dc32b9f85f3a5ad9d02657356ae0ebd99518848f3d330314c74b595 WHIRLPOOL da0d7eb62d2ee2aeb80a3f495da2ff123e29151b7517fbcd212f83ab3722638f10019511f4f237e8e001c68dd957ed2817fb0f1a2b42c2710239343f1d801496
DIST ghc-bin-7.10.3-alpha.tbz2 183558856 SHA256 780ac45b9b38fb40f08eeb7dae741649ac19dce2271df4bc764cac9be6c5c225 SHA512 08709fe9b4036ab41715c9a637a2a160104e3ab9e0ed9efaaf73428e3cfe19619e50c42b72c60bbbd27be2b9c2ea68f63d72c1a27d4519756e7c0d909f724230 WHIRLPOOL f488ecc945c6100ba86b9ae25eb6a472693556be0205a6c8634f2c235e779fe17b391ced7fec5d89c0c6c3d21583fe9f9b80bf628f3307890becf3f3ffb57a96
DIST ghc-bin-7.10.3-amd64.tbz2 112040431 SHA256 c3c71aff288f7de2785d1c3d54f0fd636144eb3dcb590bdda087b0775203e517 SHA512 e1554b3944edbe8e16537de5a29132dc6a22d780d9a700cdc9b76387b94191164398d6f2242bf8199527802572e2bb02545569d4f0930a0ee0dbfdeb25978558 WHIRLPOOL c2497a9565abf7d37e7928f508f7bf7241dd529aa252da708517f9f067e3d016341b7a73cac34888b99c9b84a8d01fd9e8d76f2b332d53e0d708b078f20ee807
DIST ghc-bin-7.10.3-ia64.tbz2 238680956 SHA256 0da9b5966f0920341f4cf041b814817e1ed06060e8a491481ab19a68153767db SHA512 3694011aec8a6dc37889418b318993cb82f9b46a5175dd837713f396c8f59a19a920e0b0669fe3b4ec37d5bd8837c115264c0a8fc97c5a4ce06a3bdd52fcfce5 WHIRLPOOL 9e059a953607b6477ea7c27bf55175d838c6aa3c57fcf92f13fa6112e9e728037073047be300a5a757395d759d30545546cb46816ec879a2d31c3c0a78868e42
@ -18,22 +9,6 @@ DIST ghc-bin-7.10.3-ppc.tbz2 125832171 SHA256 67817636f5b91e04ecf94972c0bfe8e4e9
DIST ghc-bin-7.10.3-ppc64.tbz2 142469712 SHA256 c8fa2ea861d4c5373f7f67fd3a29db4e48593d669c8616c2f349592af7e4846f SHA512 eb59d3abc8b10010311d59df9473c5ea649eb0dd7f9ad41a1929a540a0ef8c20abaccd68254f8abab037fb1fc94d824f474e18e4316b8f2a7a954d0645a2a2a4 WHIRLPOOL 14ccfbcf818a80f1daf39b44dc7562304af925e548407ce0deecd2d4593f4e138da38cfe63d4e5b8b0303c0237c678c27eaac4331288ee9b9dcbcf8be7390f74
DIST ghc-bin-7.10.3-sparc.tbz2 163105069 SHA256 b9ef4179d87f4a56e9a786b28b0674f817118c73784b0dce283affadab296875 SHA512 d467a42487378d7dee311eb33aa1c151f5c16a6e7a4ab5bd8177df229f474adf19da3e1ca1064943a40abafcab6852b0589dd34413da82b33a03ede1ac17bf5d WHIRLPOOL 26ecb662f1d0eae524388008c24b3d25f954668aba781e997afd934c10b379b32e3376bc3a1232b066de84d3e1d1ad838dcef667b0f7606d0ac52acd7ef78a72
DIST ghc-bin-7.10.3-x86.tbz2 113877175 SHA256 a06d54e7256292123b49c4d429761794b53d2440d2efeb98bcfe79920c65b044 SHA512 75096fe9106d975c15e646b0a559c544621fd02791f491bce54926efabf0e55b97150069ddfa7a9f02cc30bb6975d3d3121a82207a9f67b8dda5ebfe17ec4744 WHIRLPOOL 63fea83be14ae317f313251b7c952c974a8e4f9671d78d1b3ef77c3ab317d2194faddc8d71431c5e1fc42215abed1842913f2f40ba383288784e984c47cd27f0
DIST ghc-bin-7.4.2-alpha.tbz2 130483507 SHA256 cd8e72e569574f137bf10fcdb4337bb0dc320deb2a2c4d72529a821735c53ae6 SHA512 6fb99dea706965afa60f4aeb68da3da1c69dda477f5fcfb4e67b73d75b78583193148ce9f623a356679a57f1a740f8010f28a22f08e56ace50f3fcd42142f83f WHIRLPOOL e5ec69ab24dc963ac709f13928c0e35931d5d50ca6b21dfb0aa79f9088c0ce1196b64bb4d9668e35d73dcdf9e2df9c3da59c95eaf3db8b793a6bb65b1f4ba6c0
DIST ghc-bin-7.4.2-amd64-stable-glibc.tbz2 93139900 SHA256 f06dff00585cc1a8ecc8ac29aeca7fdc601d272eed29d7613f7a2f2924cad585 SHA512 9b725f2613dd9013851a16eaea4000ea424c51cbafa97d3860f120fdb9936247f8c65208775a80a2f49b74946ddda2e843a54dec00b78c521197374aa3dd2d50 WHIRLPOOL 9e2630b1de40a059c324be38a1fe68b16ea484bc7afc2a397ea05192263d1964aed1d29fde543622ceab12ed2df111204576fdc72b7e35b2bbf9c6b9519901d1
DIST ghc-bin-7.4.2-ia64.tbz2 155787636 SHA256 a1d89221645832cc5d11cde4937cce75d564e6a79eba334b92a4c465eb3f161f SHA512 c7138ed8eaf40ee7e7559b6063096351b64fc35cbd1adb4c734b2f2c6b77fb98368b1296fcb67c1a0b21b0faf053a82f8f98c3656b89c593e677ce78165d0c74 WHIRLPOOL 7ff2db2932a6d56961dcca386c9ec8f8eb1ee12e1b84230fbb089ff137eeb216117eecaa37b33b4c037ebee0063a07cd380077b754e64ef0219759b54a4f7fe2
DIST ghc-bin-7.4.2-ppc.tbz2 89396808 SHA256 ebf6083a1f3256a978a9408cffa2562e837b641136e5d6ad41a8ab5c2f50e804 SHA512 d7abd4a2612f26b6937dd20c11d2081b2c846178347a8e09f4ef5d8b1ef2ad3eabb9d5429fd0c214f6c5bd53eb194ccf199745904d6b861650c9eef681a48bc1 WHIRLPOOL e2f8a4c8e3209432a744fd8587be39591d7b4fb026dca36755933f49e6f650e1b34e6087d9260aee65206a700f9d70e2fb6cbe42d29645b52f060729845a347e
DIST ghc-bin-7.4.2-ppc64.tbz2 105431655 SHA256 d0aecf47749a9862085aec6403f25197465d99a02a3c721dffd5314bf81d74eb SHA512 f220fb91b1856da37f72166fe050d4908049845eec03626d09c5b6e88701b0002835c3343c3584baf9f9d9efb5c7cbc210eb64c6eb711a58764d0fea92e8ac9f WHIRLPOOL e27022a72c254fd189995fd1b39629d5328927b83237ae4e61e97ab5efb5c451c92fe77f944c724bf9d14130d5a6cd2e0896a7cd6052de1ef7091531aa39fa0f
DIST ghc-bin-7.4.2-sparc.tbz2 121224130 SHA256 e5eaf1f31ddc4790e0226f0075236af340ec9674d98701452d5c51455ca1cb52 SHA512 a3647d82bbb36fe0ca55185ebc9479a264e785eb5a8a33be6c37b8a6cbcf8c55373374801c685eef004de78db5aa1c96760b2bedb2ca0ac9097d39fe286984e9 WHIRLPOOL d2d5f8c5abb001fb5425e68d3d26d941569b832c373e40b5a96aaa11f589db9e2b72eb1cbcf8df7b8d4473e2cc1c61498b284d8b006cc20822c3a203fd0fe2cd
DIST ghc-bin-7.4.2-x86-stable-glibc.tbz2 92394017 SHA256 2c42257a60aec03ae622c1a600cd210a6094f26ac310fbd307006e7f2260e2a4 SHA512 9e8ef72d2aeb5681e6bb71e2eb875587ddd51089cfc3443c33c69f93274a29e5680de4bf4884af05cd84f0e9cea13d66d20f1e89994460137910cbc987b64359 WHIRLPOOL 5722824af91f1191e6a38a8eb4696e765468e3bf54ad411b1d387ae4bcc7cd4cb772bdf2054d7013a3cff41feaaf5607f051b3c0d9f609ca19f1a1f92dd02586
DIST ghc-bin-7.6.3-amd64.tbz2 94441516 SHA256 3ef747e96a40c9d5021e88b8afee0a97838c27b00619d9187783d95279c31779 SHA512 89f6c693d83d6309a0e44fcc68e30279c858adb0a0ea9317dd168b2e632c22a8507da78ed953523f5d7156db98e06c6df56d6edc19c0c50b3941ea578263dc64 WHIRLPOOL 891dfbfc9d88fa579b6a837651f7cc6d9aecef8b8752ec7bcebbdfef2a6d8929d0edaceff27ec61d6160d36d1b0e8406b7829a04a858ed64210b5c57b9c98940
DIST ghc-bin-7.6.3-r1-alpha.tbz2 123486983 SHA256 fb6828d9dff7b90563cc7b3277ed38801907930aebd6042a7e5ba61e5f50db73 SHA512 7821bdf7490283dc062be090d224138dd34641e014cc6742edaa51dcc9cb1de9724d575955b596c9273b878dfe79023daf172b132b124f67567132649cf9a30d WHIRLPOOL 4e51a7e7f54fcb4aeb7a4ade4140533413348f9aacf04f683fe7cc5e20843dc6a95bdd6d79a995e5e1085747be9e584df6ada61430662f06eb600abae0c7eabd
DIST ghc-bin-7.6.3-r1-ia64.tbz2 154480728 SHA256 9a176312f796a189c0354deab9a7c446db274f75f40554963c2f86597a5951fb SHA512 2aa945cebcd3d0c26af5ddb53cf2002ec6d263d071173495905dd52898bd2ab6605370b0025554c1f6afbd28e276abc708708e4add9a9b8cb08b4bb39f8f50a1 WHIRLPOOL 6371531141e707618577e924c01102481a12d91e2c85e24694ba64f9b2545869c248999138146f63ca379a4243ccd0dfa322ea01a23d222b9757584787c5a899
DIST ghc-bin-7.6.3-r1-ppc.tbz2 91800558 SHA256 c9b2262957585c9f02136014aa05423e1b7674c8eb0731a6d991e400e053e33a SHA512 2a101a30a4324780f1a614e044ba614f9094cd57d026c56f2b3ba514ae049c26ce8e4acbc89e93229da451b6fbe05ba0980b500cdd785bb2bce968a60434403a WHIRLPOOL 3a3b7e1eb945be01ab195880c7709514d2d11d25bab12fc15c2257207da48a37e6d6d7699c9ed5c1cc32d01057240a4d795e43cdf9d9d2748a1d94b93fb283ed
DIST ghc-bin-7.6.3-r1-ppc64.tbz2 121213680 SHA256 7d820988a762dc56ec471c9fcb5510f2e0bb47560181aa7dea8a934e73952477 SHA512 17fb269a2eae326db927b8734cd8326061b059ecd50a377c51c37cd657380be1ae61964df299009259de6e4e00aa71a525a9224f8fa607d6cc7994c221848358 WHIRLPOOL 76e9664a535e6be54c5288be683959ab6aadafb04d03c5d2f08f8ee663868b3ed390e2a0c8e6d233a532af694709e03dc0f78d16dfe51b87e201655219da4704
DIST ghc-bin-7.6.3-r1-sparc.tbz2 121641337 SHA256 0fb31b9584c1c6caafb44a51158bfd3d85c28d2313f8201855f58c019a1692c0 SHA512 d71efc47769efb091f93cb288b54a1fadfd4184053149b1cd7c219a0c9c95ed97c32b101c712e20643fea12546357b70a11f2852bebeac2141e961a3e4bf8764 WHIRLPOOL 37d320e01d8e43ecba6e90f8d0a9c440d30ea31ff79d9094a8205d9ce892570f81b8641080034215fdddf71131de1acc364e2a485383af8346190c36201c1e91
DIST ghc-bin-7.6.3-x86.tbz2 93718672 SHA256 a55024f66a048437fcd6ef0f33cdb994a43628998a2f0fe4d094cc9ba83d1615 SHA512 624f2a3238dee15853018d45632d1363e42d34099a77e5e9ce5c8da976cb4c33578144f7c39dbf25ee68c17d8d42910db2347186849eeeda6bc20053ce2be990 WHIRLPOOL bc646fc19906b59416358fb7558b6e2c3f7ad069c2fcf443be36b621894cfcecb0844acf5b5f9c383e034dfff3e24d312a7da0d7a629836134ec5dc1ecd6f139
DIST ghc-bin-7.8.3-amd64.tbz2 100786052 SHA256 af49f547336a4f9f13cd625155d5a6a998e52ae7da8bbbddc856f88b00b6aff4 SHA512 b1826095b67fa2028678057f70909bff4e082b82f3b70f1aedbc91073efad54334fa1864bc8248c9249eec6edab3671dc38ac1650be86f1245e2fecf92528952 WHIRLPOOL 5b44fff77a0d79c6f7c5c8ca792eb6b36987d1de58d5ebc0a9b05da9c19a2c312eca6b9d40e7e63437742b7f9c28c925feb3bea7f9803dda95fac7acaa7a3132
DIST ghc-bin-7.8.3-x86.tbz2 102583755 SHA256 c67f0d2471e594b4fdfc5b219bb6b61e57e6ba75132aa3f63d171550af8cbe3c SHA512 badabbba2f46b5ab3a2601e53997ce6533162afeec7dc36eeb877a62680a9f599aeb05dd3682f45d3e273d71d28b8bd01eee37dcad3c7354e8f83b7be4e58536 WHIRLPOOL 7b99b6bbeb4ad6d203f270d8446285825ad0857a8ab058d8c126155b49e8819e0efc2f6c42b5ff775dc0ece5488e97fcc7ae2459fe87fdceef43d63a75443430
DIST ghc-bin-7.8.4-alpha.tbz2 210691009 SHA256 23c9e5ef97b444fa87d3b9509a7b2b7b68c526ca4139739dd60c08fb1279d48a SHA512 f08230de82f0c4112da9d0b48227ca74d5d0b4a84046d746b023557b7aeeb9678f5ac037fe89a863178df4b9036e5c5c63182d14dfbb42c772011de883e3966f WHIRLPOOL d624b4d5eac8aa68f389b81e68d7fa2ea960c9b9c5fabb27ddf4da5140c18fd0ee9080725fb645e2c532bb0a01ade32da2cf6aac08707f9d89a94ea9752b8e72
DIST ghc-bin-7.8.4-amd64.tbz2 100573133 SHA256 bd9d144c08caa0ff345ada8d7eed7592531b8f8b9ef2f94d0b9a42fd747440aa SHA512 e4416d6dae3c644f74bafb3aecf1a123f985427aba32d0e0c43143a137d64a9220fc5947cd9bde8a3bc44555ae71184fc06a3f7df7976aadd065ad5681b90954 WHIRLPOOL ab0bd6219d68e08cb473cf2f3f15538d65940f28e84f026361032c3a6bc09f7820faf67629e915f27c2afda7de41fa9c6010a1b5cd487df0936d968c7e58a3a4
DIST ghc-bin-7.8.4-ia64.tbz2 222789275 SHA256 8bbbc11ba64d08bad691593afafc4c6a7cf078b10cf33cb8508bf0a0b3ccf523 SHA512 2d8b89e399cbe9bfeae29cf3ceea736bfaa65ea21483fa2ee95d9814e122fcfbb67ce22ad8175493fab088e9a9d0139610c67e9d5c8b4f797b5e14846df32b6e WHIRLPOOL 181d48bbb53d181c8febf63ddae620bec1a6c212a5b5bf938228689df2ff45ba68d7d4a99ebb1b68aa516d5633be41125321e3f8fdef6e5f0cd1e4a7f9b8774c
@ -41,6 +16,5 @@ DIST ghc-bin-7.8.4-ppc.tbz2 112803496 SHA256 a47e0fb17137878af1e7b5a166046bee20d
DIST ghc-bin-7.8.4-ppc64.tbz2 129284515 SHA256 1e8a350af39d1db1e58a74c9bc4a4c57765eceb33e5b32751fb31340b9ff02ff SHA512 53974e15c26cf6b62d8f838607abd209ec57cf0f45fcc48b90ad62736f5e4e7ff263dcd326ae03d8d5557a22eb9730e5eb8ae4eda55e52dd3d973bc73c84935e WHIRLPOOL adaaa92323d319f6576423ac41678f7d263f36e0e30d89fc14ee89104b006772c26d7b408be7f85225d1bddaf5f15ebdcbb7136f5c8bf7bda4bb0938eefbe6c2
DIST ghc-bin-7.8.4-sparc.tbz2 147340595 SHA256 1cde749ce3c47016c5c7a7179423d0aa2b174ddae4af0392ae3b7f57b098ec0c SHA512 ee5f0b2f1cf2693a0f2be9df71ef61b52bc2327225d40b8be955c1584b9901ffc6aaab63c1e46bf9bb352633b605c98378f8fd3e6cd71aef1c089007e4110217 WHIRLPOOL 27d55a016ffb49852553f920c29929c3bdf383e28b4b806ceb9ffc8b46a59b438801101402e498b069aa6eb56870b70a00ba7b1f4098f3fd8d8ddf1b20caa626
DIST ghc-bin-7.8.4-x86.tbz2 102312459 SHA256 4c53148836e5a1ba55b8db5bb7c3eb915103e0955fb503b2facdc5a72f12a974 SHA512 cabc5bd6d8760ce4120e7053f6c1dffca7d161ba454b6201087760096c037c932e3ff8c82e53346c8278855bf0cff1c2f5fb8046242ca4d8307355b060a9556e WHIRLPOOL 0171d67dc1b63381a491e1577a783eb0e8f53cb579ba96a9b4fdf6685d494d78eb2be780f77ff33422d3b7c320ed102d9b48f6e954f8fee5532982575001a4a5
DIST hoopl-3.10.1.0.tar.gz 241582 SHA256 7af615dfd4051670dccf31e5a7e1e71a9ae5f301e6a0668557fd84f61f6bc2d4 SHA512 943fe7034c89f4f914617cf1bccf7f66c3e660328fbbd9ae40f78a3f78a4a5b6fdd86c2afd40c11d4c4c4a34bc8fd47ab7e6227cdf9f3f4887b5cc796720e7aa WHIRLPOOL 3a410081f70c4ebbb563a48d71ec6f1e226a13b965ea12d01ca521b32041308394c7da6d3b3e36e75d1322c188b81fc08f4b2bf6037df5d8ac4998a944326be2
DIST hoopl-3.10.2.0.tar.gz 241940 SHA256 6740814c774e51815e8260ae1b4ac8af6ab69f02e112904450f689c4792f1121 SHA512 083baa8a5eb53247aff8d5b9b2144e0f63adb9400934297bbd80bfcec607dd90a34def4301045a60472ef10b0fb90ab84692fc08f786e7f806c28afdab1ef66a WHIRLPOOL 761e7440d2bc32b594ab55ea967c5b075bb638b2fdba6606beaf9c31a90e20031e914146828004b3d11203668210a6994be9fabc3b0ebb428d516b57cae9ee68
DIST transformers-0.4.3.0.tar.gz 28632 SHA256 b3d0a797e815ca50d411e20c02f781efe7751308007d880af7f0b5c4365c3a9d SHA512 c3ec0893ebba4fbd6087c3202e919552c4a9bff3350b5c0589e7ebb18751a515d98b8cac15b0a3252906ea72b5a0eb09b7fe88c8da88b09d6ce4fbf0f50b2780 WHIRLPOOL 89591781926b1d025056dedcfc5de61705056c1e3a8eba72f2e89789e78d2ed4d8909f84d6560dfc66bc0b360f98cb3dc3835f3a05c2325f747498373c88aa4b

@ -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
}

@ -83,9 +83,15 @@ RDEPEND="
>=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:* )
"
# gentoo binaries are built against ncurses-5
RDEPEND+="
binary? (
|| (
sys-libs/ncurses:0/5
sys-libs/ncurses:5/5
)
)
"
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to

@ -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,4 +1,4 @@
# Copyright 1999-2015 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
@ -76,9 +76,15 @@ RDEPEND="
>=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 )
"
# gentoo binaries are built against ncurses-5
RDEPEND+="
binary? (
|| (
sys-libs/ncurses:0/5
sys-libs/ncurses:5/5
)
)
"
# force dependency on >=gmp-5, even if >=gmp-4.1 would be enough. this is due to

@ -9,6 +9,5 @@
<flag name="binary">Install the binary version directly, rather than using it to build the source version.</flag>
<flag name="ghcbootstrap">Bootstrap from an existing GHC installation.</flag>
<flag name="ghcmakebinary">Build with less runtime depends (bundle libffi for building bootstrap binaries).</flag>
<flag name="llvm">Enable llvm code generator for ghc (-fllvm).</flag>
</use>
</pkgmetadata>

@ -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/*
}

@ -1,3 +1,4 @@
DIST polyml-5.6.tar.gz 6066166 SHA256 20d7b98ae56fe030c64054dbe0644e9dc02bae781caa8994184ea65a94a0a615 SHA512 cd4f25c225831dec512f7136dfda4ba31abd6939d9e8e0cacdb6d48212488b56ba5969c76e76fcbfcfa83d015a67d9cf62457286086f3c2b3f7914a7939d7b59 WHIRLPOOL a50042ed5cd309ca2b148cfb33a98681803b79c80f8efde1ad2b39cabdfb6dd85da6a66dd21f92f603d3be9685008e3fd4f5303eadd24d8cec493acead29acc3
DIST polyml.5.4.1.tar.gz 6107319 SHA256 514d1d07be487b783d4dfa29dbd550b3396640579ce135a9eb5a61f08e7f9cac SHA512 4a7b404ed648b5a9fd9d52917214688d15f4f9a5f4570ba13b52a8304bde1cc4b534f539ffc3c9554283816ae130e4c898a179d776df6d3220fba9743a19b175 WHIRLPOOL 048db0b2210d699c0a86940daaafd24bfc81debae412f7e7dcad2585cd5514253f6c47e0006277ef00b640ab971a031d74e64c78c4abcc09712fa9e8593d1720
DIST polyml.5.5.1.tar.gz 5465794 SHA256 cf8009dabc8b5d308d92e201dcd01f17ce14289d30caa8021a87365f4b8e209a SHA512 283954c8bf5599d83ea69916b827b1acae7137fe4add67537026092da2e6f1a89d71d3a394dbba599bbe9e967ded1446f39f4d81afb90301532db6be949f7a6f WHIRLPOOL 5bfeb8dcedcfe9b0a925ed089abc246d70d1269631ee46e9c78b123d461afb80e68640d6c08d77f47e69b0c244e9c7a27750dd7350741911e007f9dbcb2e7f76
DIST polyml.5.5.2.tar.gz 5599140 SHA256 73fd2be89f7e3ff0567e27ef525ef788775d9f963d6db54069cb34d53040a682 SHA512 248c2a38c4691898bc1243a041f4683bf227d9c8a98c6c3545af2a8a3249ed5ed96f33f90cb2dede8809b42f33c0557650147302cfe046a5fba965ccd93cbc5b WHIRLPOOL d8dae553b6d4effef80b4303ea8fdbb95f8470790ab7ff49e62ae2a47d70d9d0b11b2113caa28302c029049041bd0286ba06a2153b5266b88a6c26eb1714abf7

@ -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…
Cancel
Save