summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2016-11-27 20:49:44 -0500
committerAnthony G. Basile <blueness@gentoo.org>2016-11-27 20:51:03 -0500
commitc1d1c941932d6606f25baf10737b2686ed292c7b (patch)
tree6f48c7eef3c33e1abb2fea63221b4b7510958f84 /dev-util/plan9port
parentdev-libs/npth: version bump to 1.3 (diff)
downloadgentoo-c1d1c941932d6606f25baf10737b2686ed292c7b.tar.gz
gentoo-c1d1c941932d6606f25baf10737b2686ed292c7b.tar.bz2
gentoo-c1d1c941932d6606f25baf10737b2686ed292c7b.zip
dev-util/plan9port: switch SRC_URI to github
Package-Manager: portage-2.3.0
Diffstat (limited to 'dev-util/plan9port')
-rw-r--r--dev-util/plan9port/Manifest1
-rw-r--r--dev-util/plan9port/plan9port-20140306-r3.ebuild121
2 files changed, 122 insertions, 0 deletions
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
index 0b191f57973c..95648e526fc4 100644
--- a/dev-util/plan9port/Manifest
+++ b/dev-util/plan9port/Manifest
@@ -1 +1,2 @@
DIST plan9port-20140306.tgz 54512505 SHA256 cbb826cde693abdaa2051c49e7ebf75119bf2a4791fe3b3229f1ac36a408eaeb SHA512 a0671163940186fd3d8cf37f06824f0d5a4b9734c1e70eb3174cd7f6b9a1ae769cf78e067dcf4e963192a26a2420b4bb1ce79ed788314ed1783c3bd793fe2aef WHIRLPOOL c19977ef310ac34efcb294e9f7f73f6095e9db0ab52ef359956a05e5a5252a0f9d03f88dd29d21d01bfc82d2e0bdd8ac77bc6a8bb80ef81ce3c773b2dfee0677
+DIST plan9port-e78ed7a67bbaa37dc57dfb37219f505c48755e14.tar.gz 23442851 SHA256 29628d315c3f26f73157076717684f8ee642083f2213e78c739c79fdf703e458 SHA512 3cb126eb0f8c58c76c4da5aaca6b3956b9cc30b1955c1b9db4727a01a46cae696f01b538a47f6f009e955f6ed8f308b60b6519d4184e10b255636ea32a1e9099 WHIRLPOOL 3ac4474ae9df9fcc032e24ef065a1a9ccd20f3a8fa416ee9d0ec51faad9c883581500c5827ec2a3b2c56bd1779e5a59fc07a84dcd78ce8acbf5f48450635106c
diff --git a/dev-util/plan9port/plan9port-20140306-r3.ebuild b/dev-util/plan9port/plan9port-20140306-r3.ebuild
new file mode 100644
index 000000000000..50a2ce47d7cc
--- /dev/null
+++ b/dev-util/plan9port/plan9port-20140306-r3.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils multiprocessing toolchain-funcs
+
+MY_HASH="e78ed7a67bbaa37dc57dfb37219f505c48755e14"
+MY_P="${PN}-${MY_HASH}"
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="http://swtch.com/plan9port/"
+SRC_URI="https://github.com/9fans/${PN}/archive/${MY_HASH}.tar.gz -> ${MY_P}.tar.gz"
+
+LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X aqua truetype"
+REQUIRED_USE="?? ( X aqua )"
+
+DEPEND="X? ( x11-apps/xauth )
+ truetype? ( media-libs/freetype
+ media-libs/fontconfig )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${MY_P}"
+
+PLAN9=/usr/lib/plan9
+EPLAN9="${EPREFIX}"${PLAN9}
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-"{noexecstack,cflags,builderr}".patch"
+ case ${CHOST} in
+ *freebsd10.*) # patch 9l to use -pthread also on FreeBSD-10
+ epatch "${FILESDIR}/${PN}-freebsd-10.patch" ;;
+ *apple*)
+ sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
+ die "Failed to sed AFLAGS" ;;
+ esac
+
+ # don't hardcode /bin and /usr/bin in PATH
+ sed -i '/PATH/s,/bin:/usr/bin:,,' INSTALL || die "sed on INSTALL failed"
+
+ # don't hardcode /usr/{,local/}include and prefix /usr/include/*
+ for f in src/cmd/fontsrv/freetyperules.sh INSTALL \
+ $(find -name makefile); do
+ sed -r -i -e 's,-I/usr(|/local)/include ,,g' \
+ -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" ${f} \
+ || die "sed on ${f} failed"
+ done
+
+ # Fix paths, done in place of ./INSTALL -c
+ einfo "Fixing hard-coded /usr/local/plan9 paths"
+ grep --null -l -r '/usr/local/plan9' |
+ xargs --null sed -i "s,/usr/local/plan9,${EPLAN9},g"
+}
+
+src_configure() {
+ local myconf=()
+ if use X; then
+ myconf+=("X11=${EPREFIX}/usr" WSYSTYPE=x11)
+ elif use aqua; then
+ local wsystype=$(echo ${MACOSX_DEPLOYMENT_TARGET} |
+ awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}')
+ myconf+=("WSYSTYPE=${wsystype}")
+ else
+ myconf+=(WSYSTYPE=nowsys)
+ fi
+
+ if use truetype; then
+ myconf+=(FONTSRV=fontsrv)
+ else
+ myconf+=(FONTSRV=)
+ fi
+ printf '%s\n' "${myconf[@]}" >> LOCAL.config
+}
+
+src_compile() {
+ export NPROC=$(makeopts_jobs)
+ export CC9=$(tc-getCC)
+
+ # The INSTALL script builds mk then [re]builds everything using that
+ einfo "Compiling Plan 9 from User Space can take a very long time"
+ einfo "depending on the speed of your computer. Please be patient!"
+ ./INSTALL -b || die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
+}
+
+src_install() {
+ dodir "${PLAN9}"
+
+ # P9P's man does not handle compression
+ docompress -x $PLAN9/man
+
+ # do* plays with the executable bit, and we should not modify them
+ cp -a * "${ED}/${PLAN9}"
+
+ # build the environment variables and install them in env.d
+ cat > "${T}/30plan9" <<-EOF
+ PLAN9="${EPLAN9}"
+ PATH="${EPLAN9}/bin"
+ ROOTPATH="${EPLAN9}/bin"
+ MANPATH="${EPLAN9}/man"
+ EOF
+ doenvd "${T}/30plan9"
+}
+
+pkg_postinst() {
+ elog "Plan 9 from User Space has been successfully installed into"
+ elog "${PLAN9}. Your PLAN9 and PATH environment variables have"
+ elog "also been appropriately set, please use env-update and"
+ elog "source /etc/profile to bring that into immediate effect."
+ elog
+ elog "Please note that ${PLAN9}/bin has been appended to the"
+ elog "*end* or your PATH to prevent conflicts. To use the Plan9"
+ elog "versions of common UNIX tools, use the absolute path:"
+ elog "${PLAN9}/bin or the 9 command (eg: 9 troff)"
+ elog
+ elog "Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
+}