summaryrefslogtreecommitdiff
path: root/dev-util/plan9port
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-13 10:39:22 +0100
commit9452a6e87b6c2c70513bc47a2470bf9f1168920e (patch)
tree8ac67e26b45f34d71c5aab3621813b100a0d5f00 /dev-util/plan9port
parentf516638b7fe9592837389826a6152a7e1b251c54 (diff)
gentoo resync : 13.06.2020
Diffstat (limited to 'dev-util/plan9port')
-rw-r--r--dev-util/plan9port/Manifest12
-rw-r--r--dev-util/plan9port/files/plan9port-builderr.patch16
-rw-r--r--dev-util/plan9port/files/plan9port-cflags.patch4
-rw-r--r--dev-util/plan9port/files/plan9port-freebsd-10.patch11
-rw-r--r--dev-util/plan9port/files/plan9port-noexecstack.patch6
-rw-r--r--dev-util/plan9port/plan9port-0_pre20200526.ebuild132
-rw-r--r--dev-util/plan9port/plan9port-20140306-r4.ebuild120
-rw-r--r--dev-util/plan9port/plan9port-9999.ebuild126
8 files changed, 277 insertions, 150 deletions
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
index 0de6f4817210..aacf1b464133 100644
--- a/dev-util/plan9port/Manifest
+++ b/dev-util/plan9port/Manifest
@@ -1,7 +1,7 @@
-AUX plan9port-builderr.patch 936 BLAKE2B 7cf8a229fdf33823522d8de0bf465a7065d74078d5f16391b21c6a2c0de4f6764e07a50680ed21038205d27fa6e2e550ababd24e7e37d76a024d568e22494f61 SHA512 d95e6c5b4b75d54167721f7250288b8640945ebeb10ff346e989a4690828bb8448e46cbcf30d5e35c27d094680b2995ca04b8106c4dce083260f605fc2024d84
-AUX plan9port-cflags.patch 328 BLAKE2B 2f96d9b44760655807cfe845193fe8bca3faf2eb6b1bf3c024c554da4cc90c4dd41454d20ea4c7b065fe2351c9f51cf01dc7437597e619232233c9cedcb3e02c SHA512 281b236893cc1efde75d7fc5160168c8602a5eff27229f9b0e2b1284ac36cf73fdbd22f2ae4d3776556f7b881ad63f4dd68d56628942ca6e84abca12b93616bc
-AUX plan9port-freebsd-10.patch 265 BLAKE2B 0a942f899bd05d3ad671134a3277a5bf8e41bf2fc7ab8c11a8be9cd27a2c334a85a44e583d36efb1253347f0877171cf82094f18a2e9a4251df9ca8259a5ff74 SHA512 69c8d4ee824afb453bd4ebc8ba9af3e73c37fd31e40d92ae62685a9a6916571ed16e8f3eee8aff32e2db96177439fa34e52bba8d7c52a296328ae1d9d3767c19
-AUX plan9port-noexecstack.patch 984 BLAKE2B 5e7dc7b084096b3b49eda81e244dc16849fe7fb66bc17b15fcba2d35aec63067eb75dff73ea74bad02878e50353ba145ba101ade8e086434a5be2568c416df02 SHA512 160f0a793345603c4c905e65a6fa4a25b1a1c1084f0eadd4ada49ba5b6efc48b975031d14926fdfc2bd48d2e3860c987da449d9d9973038ab510f42528383da8
-DIST plan9port-e78ed7a67bbaa37dc57dfb37219f505c48755e14.tar.gz 23442851 BLAKE2B 89e2a8dcdf650cc3640ef0ba496f1c22e74831fda2e4a51cf8419c496da5a480a10324eb295369e9192defbd3c6411ea351bba1c6bdec5d72bc4ee397da58114 SHA512 3cb126eb0f8c58c76c4da5aaca6b3956b9cc30b1955c1b9db4727a01a46cae696f01b538a47f6f009e955f6ed8f308b60b6519d4184e10b255636ea32a1e9099
-EBUILD plan9port-20140306-r4.ebuild 3536 BLAKE2B 257db122e1fbd1939aa60dd640cccd5c461792dddd05fa168b6b89e4813c5089781fd6c5c4ebe45131ac25112cf86fcf459905ed379d928b5a3f3d14f30efb5f SHA512 290a3824ee3aaaa2a813f2e703b16851988126e1d7c1636552767529fb9bcbc01edf86851d6869f1000df71bb8ce8a0fa34af807810c6dd87702e6a9e711685f
+AUX plan9port-builderr.patch 882 BLAKE2B 1526bad2833a416cfb214f047f2f14bda89ca82293fa45c02e8165a4ee6050adccea91e2ac2e4d898b6c5b2005afddc82373f16939fe392b141bf664c5afea84 SHA512 38d071d37683f6408f948ee5dea2772ea988945da80c349cdf1731641010d7bff391468c9d4e65507a2a545d3d02a899ade4ea68ac476664e39bb68e587e4940
+AUX plan9port-cflags.patch 312 BLAKE2B d09a4bb70451beb0cb6de05be37c6d68334d51f4db882debde4e3f3accf3aec25054ad5411a3c7289df6b556f59c1a729005f1c21247545158879c429462843d SHA512 29c4419bbc36330b322541b625bbe9131ed14d01008ba2ab2865a175918506de1e96a2b078246d1d6b6bc48537f90f74b1a72b223d74dc73d13cb7cf63d33c58
+AUX plan9port-noexecstack.patch 951 BLAKE2B 76df9fda4dc0124be25dd562ed804f6be75438c426a4e50b86e5806f34624f30a51ad30dd403a4a7ffd0829bc658cd307ed4c148de299016a1bf767011e6889e SHA512 1cb3defd59c3dd86474e23cc5b0ac397f645ab5a0b476a7f3532bee62bf5d2ffb1996945baed755e7cd61060bf8713b227c67472ca0f1a45ceab9aa82c524883
+DIST plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.tar.gz 23445647 BLAKE2B 4cb0f08fc404c5618c4be0d7e5710e6a8a32fbe010d28a879b1f9575118256492a3ed2b9b744c35dbbb6c6deae405c05fd7b6606254fb94fc2b40b3a8d14fa71 SHA512 4d9f6ce66d3eebb311cbbb0ec27c01d99cc0e19c6ac8a1c511ff00070c085a349b637048cd0066240af975e90f527388dbeba58f4591bf7dcaa673ee5564430f
+EBUILD plan9port-0_pre20200526.ebuild 3497 BLAKE2B 572e4e4354f4caa1b8ee64defafbdb97e93904b03d4d902d8bc5bb3d7b7b814d998d32e95e3298f57156cdca770a35251f6c1706d035ac6393406e690f57c922 SHA512 317f1de1ec6e17cd084fe930e38d8fa84ee03a6fd5b73c3e4c5b81fa8c4b9de2fac525ff40da8050350d7719f74b34b01a943d86bd5bd338b25500af4ad51a86
+EBUILD plan9port-9999.ebuild 3347 BLAKE2B b26dd95b59ee9603a7506a25e15ac949c986c00c03b558832adcfff0365dfd32d2bccb54deb0e1bce1e1b779ee4535a36f450125e08181628cf2787606542527 SHA512 70f79b52d1d3ca4bcf665eb07e30c9d236167c67da51538c046e2474faea585fd48227b8ad57a875995e212913ed983444b28b0690521b4f0f693ea03e78dc31
MISC metadata.xml 485 BLAKE2B 562cc265d88d43f48e39421d1ee8be547b74741a6ef9fa4ac6c46ae9fe19d8f1745b71439d21a95370eae39cd0ad5b87b710be375f4141510f6510fa5a721186 SHA512 655f45ad6e519ef7d350fd5df2ad4bb77e08730d80f3da2fc4572522d162279af23e82a79df55b2952135c8348565e1d706c38b1576ec2fd7e68a422deddf068
diff --git a/dev-util/plan9port/files/plan9port-builderr.patch b/dev-util/plan9port/files/plan9port-builderr.patch
index 266f10c4b9d5..b1f3d1275ce8 100644
--- a/dev-util/plan9port/files/plan9port-builderr.patch
+++ b/dev-util/plan9port/files/plan9port-builderr.patch
@@ -4,15 +4,15 @@ By default, the plan9port INSTALL script doesn't report build error,
which can result in a mostly broken build begin installed.
--- a/INSTALL
+++ b/INSTALL
-@@ -41,7 +41,6 @@ echo " "
- echo "* Resetting $PLAN9/config"
- rm -f config
+@@ -65,7 +65,6 @@
+ ;;
+ esac
-(
- echo "* Compiler version:"
- 9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /'
-
-@@ -134,7 +133,7 @@ if $dobuild; then
+ if [ `uname` = SunOS ]; then
+ # On Solaris x86, uname -p cannot be trusted.
+ echo "* Running on Solaris: checking architecture..."
+@@ -159,7 +158,7 @@
echo "* Warning: not all binaries built successfully."
fi
echo "* Installing everything in $PLAN9/bin..."
@@ -21,7 +21,7 @@ which can result in a mostly broken build begin installed.
if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
echo " "
echo "* Warning: not all binaries built successfully."
-@@ -182,5 +181,4 @@ if $doinstall; then
+@@ -211,5 +210,4 @@
echo " PLAN9=$PLAN9 export PLAN9"
echo ' PATH=$PATH:$PLAN9/bin export PATH'
fi
diff --git a/dev-util/plan9port/files/plan9port-cflags.patch b/dev-util/plan9port/files/plan9port-cflags.patch
index c2d2ed6defe5..74bd60518d08 100644
--- a/dev-util/plan9port/files/plan9port-cflags.patch
+++ b/dev-util/plan9port/files/plan9port-cflags.patch
@@ -5,10 +5,10 @@ This allows the plan9port build to inherit cflags from the environment.
(This patch must be applied after plan9port-noexecstack.patch)
--- a/src/mkhdr
+++ b/src/mkhdr
-@@ -28,8 +28,6 @@ LD=9l
+@@ -11,8 +11,6 @@
+ LD=9l
AS=9a
AR=9ar
- INSTALL=install
-CFLAGS=
-LDFLAGS=
AFLAGS=--noexecstack
diff --git a/dev-util/plan9port/files/plan9port-freebsd-10.patch b/dev-util/plan9port/files/plan9port-freebsd-10.patch
deleted file mode 100644
index cc46dc6f4509..000000000000
--- a/dev-util/plan9port/files/plan9port-freebsd-10.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/bin/9l 2015-12-09 19:12:50.000000000 +0000
-+++ b/bin/9l 2015-12-09 19:13:00.000000000 +0000
-@@ -19,7 +19,7 @@ case "$tag" in
- 5.2.*)
- extralibs="$extralibs -lkse"
- ;;
-- [5-9].*)
-+ [5-9].*|10.*)
- extralibs="$extralibs -lpthread"
- ;;
- esac
diff --git a/dev-util/plan9port/files/plan9port-noexecstack.patch b/dev-util/plan9port/files/plan9port-noexecstack.patch
index fb4f19f21fc5..aff60d07a989 100644
--- a/dev-util/plan9port/files/plan9port-noexecstack.patch
+++ b/dev-util/plan9port/files/plan9port-noexecstack.patch
@@ -22,7 +22,7 @@ Patch by Andy Spencer
test -f $PLAN9/config && . $PLAN9/config
aflags=""
-@@ -17,5 +12,16 @@ Darwin-*x86_64*)
+@@ -17,5 +12,16 @@
;;
esac
@@ -43,8 +43,8 @@ Patch by Andy Spencer
+exec as $aflags $opts -o $dst $src
--- a/src/mkhdr
+++ b/src/mkhdr
-@@ -30,7 +30,7 @@ AR=9ar
- INSTALL=install
+@@ -13,7 +13,7 @@
+ AR=9ar
CFLAGS=
LDFLAGS=
-AFLAGS=
diff --git a/dev-util/plan9port/plan9port-0_pre20200526.ebuild b/dev-util/plan9port/plan9port-0_pre20200526.ebuild
new file mode 100644
index 000000000000..dff9e3605a98
--- /dev/null
+++ b/dev-util/plan9port/plan9port-0_pre20200526.ebuild
@@ -0,0 +1,132 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multiprocessing toolchain-funcs readme.gentoo-r1
+
+MY_HASH="a6ad39aaaa36b8aadc5c35bfc803afbde32918c0"
+MY_P="${PN}-${MY_HASH}"
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="https://9fans.github.io/plan9port/
+ https://github.com/9fans/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}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-noexecstack.patch"
+ "${FILESDIR}/${PN}-cflags.patch"
+ "${FILESDIR}/${PN}-builderr.patch"
+)
+
+S="${WORKDIR}/${MY_P}"
+
+PLAN9="/opt/plan9"
+EPLAN9="${EPREFIX}${PLAN9}"
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+DOC_CONTENTS="Plan 9 from User Space has been successfully installed into
+${PLAN9}. Your PLAN9 and PATH environment variables have
+also been appropriately set, please use env-update and
+source /etc/profile to bring that into immediate effect.
+
+Please note that ${PLAN9}/bin has been appended to the
+*end* or your PATH to prevent conflicts. To use the Plan9
+versions of common UNIX tools, use the absolute path:
+${PLAN9}/bin or the 9 command (eg: 9 troff)
+
+Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
+DISABLE_AUTOFORMATTING="yes"
+
+src_prepare() {
+ default
+
+ case "${CHOST}" in
+ *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/*
+ sed -Ei -e 's,-I/usr(|/local)/include ,,g' \
+ -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" \
+ src/cmd/fontsrv/freetyperules.sh INSTALL $(find -name makefile) ||
+ die "sed failed"
+
+ # Fix paths, done in place of ./INSTALL -c
+ einfo "Fixing hard-coded /usr/local/plan9 paths"
+ sed -i "s,/usr/local/plan9,${EPLAN9},g" $(grep -lr /usr/local/plan9) ||
+ die "sed failed"
+}
+
+src_configure() {
+ local -a myconf=(
+ CC9="$(tc-getCC)"
+ CC9FLAGS="'${CFLAGS} ${LDFLAGS}'"
+ )
+
+ if use X; then
+ myconf+=( WSYSTYPE=x11 )
+ elif use aqua; then
+ local wsystype="$(awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}' \
+ <<< "${MACOSX_DEPLOYMENT_TARGET}")"
+ 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 ||
+ die "cannot create configuration"
+}
+
+src_compile() {
+ # 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!"
+ NPROC="$(makeopts_jobs)" ./INSTALL -b ||
+ die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ # do* plays with the executable bit, and we should not modify them
+ dodir "${PLAN9}"
+ cp -a * "${ED}${PLAN9}" || die "cp failed"
+
+ # build the environment variables and install them in env.d
+ newenvd - 60plan9 <<-EOF
+ PLAN9="${EPLAN9}"
+ PATH="${EPLAN9}/bin"
+ ROOTPATH="${EPLAN9}/bin"
+ MANPATH="${EPLAN9}/man"
+ EOF
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}
diff --git a/dev-util/plan9port/plan9port-20140306-r4.ebuild b/dev-util/plan9port/plan9port-20140306-r4.ebuild
deleted file mode 100644
index 68a51b267f4e..000000000000
--- a/dev-util/plan9port/plan9port-20140306-r4.ebuild
+++ /dev/null
@@ -1,120 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-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}/60plan9" <<-EOF
- PLAN9="${EPLAN9}"
- PATH="${EPLAN9}/bin"
- ROOTPATH="${EPLAN9}/bin"
- MANPATH="${EPLAN9}/man"
- EOF
- doenvd "${T}/60plan9"
-}
-
-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."
-}
diff --git a/dev-util/plan9port/plan9port-9999.ebuild b/dev-util/plan9port/plan9port-9999.ebuild
new file mode 100644
index 000000000000..4c1e286476b1
--- /dev/null
+++ b/dev-util/plan9port/plan9port-9999.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit multiprocessing toolchain-funcs git-r3 readme.gentoo-r1
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="https://9fans.github.io/plan9port/
+ https://github.com/9fans/plan9port"
+EGIT_REPO_URI="https://github.com/9fans/${PN}.git"
+
+LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+SLOT="0"
+IUSE="X aqua truetype"
+REQUIRED_USE="?? ( X aqua )"
+
+DEPEND="
+ X? ( x11-apps/xauth )
+ truetype? (
+ media-libs/freetype
+ media-libs/fontconfig
+ )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-noexecstack.patch"
+ "${FILESDIR}/${PN}-cflags.patch"
+ "${FILESDIR}/${PN}-builderr.patch"
+)
+
+PLAN9="/opt/plan9"
+EPLAN9="${EPREFIX}${PLAN9}"
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+DOC_CONTENTS="Plan 9 from User Space has been successfully installed into
+${PLAN9}. Your PLAN9 and PATH environment variables have
+also been appropriately set, please use env-update and
+source /etc/profile to bring that into immediate effect.
+
+Please note that ${PLAN9}/bin has been appended to the
+*end* or your PATH to prevent conflicts. To use the Plan9
+versions of common UNIX tools, use the absolute path:
+${PLAN9}/bin or the 9 command (eg: 9 troff)
+
+Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
+DISABLE_AUTOFORMATTING="yes"
+
+src_prepare() {
+ default
+
+ case "${CHOST}" in
+ *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/*
+ sed -Ei -e 's,-I/usr(|/local)/include ,,g' \
+ -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" \
+ src/cmd/fontsrv/freetyperules.sh INSTALL $(find -name makefile) ||
+ die "sed failed"
+
+ # Fix paths, done in place of ./INSTALL -c
+ einfo "Fixing hard-coded /usr/local/plan9 paths"
+ sed -i "s,/usr/local/plan9,${EPLAN9},g" $(grep -lr /usr/local/plan9) ||
+ die "sed failed"
+}
+
+src_configure() {
+ local -a myconf=(
+ CC9="$(tc-getCC)"
+ CC9FLAGS="'${CFLAGS} ${LDFLAGS}'"
+ )
+
+ if use X; then
+ myconf+=( WSYSTYPE=x11 )
+ elif use aqua; then
+ local wsystype="$(awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}' \
+ <<< "${MACOSX_DEPLOYMENT_TARGET}")"
+ 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 ||
+ die "cannot create configuration"
+}
+
+src_compile() {
+ # 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!"
+ NPROC="$(makeopts_jobs)" ./INSTALL -b ||
+ die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
+}
+
+src_install() {
+ readme.gentoo_create_doc
+
+ # do* plays with the executable bit, and we should not modify them
+ dodir "${PLAN9}"
+ cp -a * "${ED}${PLAN9}" || die "cp failed"
+
+ # build the environment variables and install them in env.d
+ newenvd - 60plan9 <<-EOF
+ PLAN9="${EPLAN9}"
+ PATH="${EPLAN9}/bin"
+ ROOTPATH="${EPLAN9}/bin"
+ MANPATH="${EPLAN9}/man"
+ EOF
+}
+
+pkg_postinst() {
+ readme.gentoo_print_elog
+}