summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/plan9port')
-rw-r--r--dev-util/plan9port/Manifest3
-rw-r--r--dev-util/plan9port/files/plan9port-9660srv-errno.patch19
-rw-r--r--dev-util/plan9port/files/plan9port-builderr.patch29
-rw-r--r--dev-util/plan9port/files/plan9port-cflags.patch16
-rw-r--r--dev-util/plan9port/files/plan9port-noexecstack.patch54
-rw-r--r--dev-util/plan9port/metadata.xml16
-rw-r--r--dev-util/plan9port/plan9port-20130320.ebuild75
-rw-r--r--dev-util/plan9port/plan9port-20140304.ebuild81
-rw-r--r--dev-util/plan9port/plan9port-20140306.ebuild81
9 files changed, 374 insertions, 0 deletions
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
new file mode 100644
index 000000000000..94a1c252ee7a
--- /dev/null
+++ b/dev-util/plan9port/Manifest
@@ -0,0 +1,3 @@
+DIST plan9port-20130320.tgz 54184719 SHA256 d08fd032edc9c27bc549ee9076963812f210476d0d1f21f5300e9d867699ff55 SHA512 fae40eae76a0f3121f47a3895809f2433beed91fc9e879c8cde25e493ec91dfdfc89fe59e3fe3a8aab7c33a2537a02b30857edb3af7f202df4a98e02cee8ecb7 WHIRLPOOL 5b707c8d18c8f1fa8e3d36e8f14a20213cad9ab3344f088f18942034dce3356ba88675c5817a7d50b66275d71d95e6d5fd3fdefbd18bcca9089790e258dbb60f
+DIST plan9port-20140304.tgz 54512040 SHA256 926f6531603ce5112108cdeec1fa808103c92045ba374b986672f28a40004817 SHA512 3727cb8d135005b0b4af1621c14a341904fdcaacd45df4e8c60c2998d372f57a7444ab296d35bc60dbc49b47e5f075e2c5d6a96f513395225eb996833ee87c83 WHIRLPOOL d2b76ea9be4e365a63bab2b24bfc3d5a6fdc402f44529ca8774c6f7c346de94b635c235d38707fee4c2fa7c6f522ad971036836f8bdb71890e61a4988cf2073f
+DIST plan9port-20140306.tgz 54512505 SHA256 cbb826cde693abdaa2051c49e7ebf75119bf2a4791fe3b3229f1ac36a408eaeb SHA512 a0671163940186fd3d8cf37f06824f0d5a4b9734c1e70eb3174cd7f6b9a1ae769cf78e067dcf4e963192a26a2420b4bb1ce79ed788314ed1783c3bd793fe2aef WHIRLPOOL c19977ef310ac34efcb294e9f7f73f6095e9db0ab52ef359956a05e5a5252a0f9d03f88dd29d21d01bfc82d2e0bdd8ac77bc6a8bb80ef81ce3c773b2dfee0677
diff --git a/dev-util/plan9port/files/plan9port-9660srv-errno.patch b/dev-util/plan9port/files/plan9port-9660srv-errno.patch
new file mode 100644
index 000000000000..a596321669a9
--- /dev/null
+++ b/dev-util/plan9port/files/plan9port-9660srv-errno.patch
@@ -0,0 +1,19 @@
+Defining int errno; resuls in the following error on amd64:
+
+ ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches
+ non-TLS reference in main.o
+
+Patch by Alex Efros:
+
+ http://code.swtch.com/plan9port/issue/39/
+--- plan9/src/cmd/9660srv/main.c
++++ plan9.new/src/cmd/9660srv/main.c
+@@ -38,7 +38,7 @@
+ uchar mdata[Maxiosize];
+ char fdata[Maxfdata];
+ uchar statbuf[STATMAX];
+-int errno;
++#include <errno.h>
+
+
+ extern Xfsub *xsublist[];
diff --git a/dev-util/plan9port/files/plan9port-builderr.patch b/dev-util/plan9port/files/plan9port-builderr.patch
new file mode 100644
index 000000000000..266f10c4b9d5
--- /dev/null
+++ b/dev-util/plan9port/files/plan9port-builderr.patch
@@ -0,0 +1,29 @@
+Prevent mk from ignoring errors
+
+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
+
+-(
+ echo "* Compiler version:"
+ 9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /'
+
+@@ -134,7 +133,7 @@ if $dobuild; then
+ echo "* Warning: not all binaries built successfully."
+ fi
+ echo "* Installing everything in $PLAN9/bin..."
+- mk -k install || exit 1
++ mk install || exit 1
+ 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
+ echo " PLAN9=$PLAN9 export PLAN9"
+ echo ' PATH=$PATH:$PLAN9/bin export PATH'
+ fi
+-) 2>&1 | tee install.log | $awk -f $PLAN9/dist/isum.awk -v 'copy='install.sum
+
diff --git a/dev-util/plan9port/files/plan9port-cflags.patch b/dev-util/plan9port/files/plan9port-cflags.patch
new file mode 100644
index 000000000000..c2d2ed6defe5
--- /dev/null
+++ b/dev-util/plan9port/files/plan9port-cflags.patch
@@ -0,0 +1,16 @@
+Prevent resetting CFLAGS and LDFLAGS
+
+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
+ AS=9a
+ AR=9ar
+ INSTALL=install
+-CFLAGS=
+-LDFLAGS=
+ AFLAGS=--noexecstack
+ CLEANFILES=
+ NUKEFILES=
diff --git a/dev-util/plan9port/files/plan9port-noexecstack.patch b/dev-util/plan9port/files/plan9port-noexecstack.patch
new file mode 100644
index 000000000000..fb4f19f21fc5
--- /dev/null
+++ b/dev-util/plan9port/files/plan9port-noexecstack.patch
@@ -0,0 +1,54 @@
+Remove unneeded executable stack
+
+Assembly routines in libthread and libmp use an executable stack by
+default. This is not needed and can be removed using --noexecstack.
+
+The plan9port 9a wrapper wrapper needs to be modified to pass flags to the
+underlying assembler first though..
+
+Patch by Andy Spencer
+
+ http://code.swtch.com/plan9port/issue/76/
+--- a/bin/9a
++++ b/bin/9a
+@@ -1,10 +1,5 @@
+ #!/bin/sh
+
+-if [ $# != 1 ]; then
+- echo 'usage: 9a file.s' 1>&2
+- exit 1
+-fi
+-
+ test -f $PLAN9/config && . $PLAN9/config
+
+ aflags=""
+@@ -17,5 +12,16 @@ Darwin-*x86_64*)
+ ;;
+ esac
+
+-out=`echo $1 | sed 's/\.s$//;s/$/.o/'`
+-exec as $aflags -o $out $1
++for arg; do
++ case $arg in
++ -*)
++ opts="$opts $arg"
++ ;;
++ *.s)
++ src=$arg
++ dst=$(echo $arg | sed 's/\.s/\.o/')
++ ;;
++ esac
++done
++
++exec as $aflags $opts -o $dst $src
+--- a/src/mkhdr
++++ b/src/mkhdr
+@@ -30,7 +30,7 @@ AR=9ar
+ INSTALL=install
+ CFLAGS=
+ LDFLAGS=
+-AFLAGS=
++AFLAGS=--noexecstack
+ CLEANFILES=
+ NUKEFILES=
+ YACC=9 yacc
diff --git a/dev-util/plan9port/metadata.xml b/dev-util/plan9port/metadata.xml
new file mode 100644
index 000000000000..0e42654984c7
--- /dev/null
+++ b/dev-util/plan9port/metadata.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>proxy-maintainers</herd>
+ <maintainer>
+ <email>andy753421@gmail.com</email>
+ </maintainer>
+ <maintainer>
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <longdescription>
+ Plan9Port is a set of Plan 9 utilities ported to the POSIX
+ environment - also know as Plan 9 from User Space.
+ </longdescription>
+</pkgmetadata>
diff --git a/dev-util/plan9port/plan9port-20130320.ebuild b/dev-util/plan9port/plan9port-20130320.ebuild
new file mode 100644
index 000000000000..de2b2476608f
--- /dev/null
+++ b/dev-util/plan9port/plan9port-20130320.ebuild
@@ -0,0 +1,75 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multiprocessing
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="http://swtch.com/plan9port/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
+
+LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="x11-apps/xauth"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+PLAN9=/usr/lib/plan9
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-"{9660srv-errno,noexecstack,cflags}".patch"
+
+ # 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!${PLAN9}!g"
+}
+
+src_compile() {
+ export NPROC=$(makeopts_jobs)
+
+ # 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
+}
+
+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 * "${D}/${PLAN9}"
+
+ # build the environment variables and install them in env.d
+ cat > "${T}/30plan9" <<-EOF
+ PLAN9="${PLAN9}"
+ PATH="${PLAN9}/bin"
+ ROOTPATH="${PLAN9}/bin"
+ MANPATH="${PLAN9}/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."
+}
diff --git a/dev-util/plan9port/plan9port-20140304.ebuild b/dev-util/plan9port/plan9port-20140304.ebuild
new file mode 100644
index 000000000000..f4b1d0f694da
--- /dev/null
+++ b/dev-util/plan9port/plan9port-20140304.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multiprocessing
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="http://swtch.com/plan9port/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
+
+LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="X? ( x11-apps/xauth )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+PLAN9=/usr/lib/plan9
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-"{noexecstack,cflags,builderr}".patch"
+
+ # 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!${PLAN9}!g"
+}
+
+src_configure() {
+ if ! use X; then
+ echo "WSYSTYPE=nowsys" >> LOCAL.config
+ fi
+}
+
+src_compile() {
+ export NPROC=$(makeopts_jobs)
+
+ # 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 * "${D}/${PLAN9}"
+
+ # build the environment variables and install them in env.d
+ cat > "${T}/30plan9" <<-EOF
+ PLAN9="${PLAN9}"
+ PATH="${PLAN9}/bin"
+ ROOTPATH="${PLAN9}/bin"
+ MANPATH="${PLAN9}/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."
+}
diff --git a/dev-util/plan9port/plan9port-20140306.ebuild b/dev-util/plan9port/plan9port-20140306.ebuild
new file mode 100644
index 000000000000..f4b1d0f694da
--- /dev/null
+++ b/dev-util/plan9port/plan9port-20140306.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils multiprocessing
+
+DESCRIPTION="Port of many Plan 9 programs and libraries"
+HOMEPAGE="http://swtch.com/plan9port/"
+SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
+
+LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="X"
+
+DEPEND="X? ( x11-apps/xauth )"
+RDEPEND="${DEPEND}"
+
+S="${WORKDIR}/${PN}"
+
+PLAN9=/usr/lib/plan9
+QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-"{noexecstack,cflags,builderr}".patch"
+
+ # 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!${PLAN9}!g"
+}
+
+src_configure() {
+ if ! use X; then
+ echo "WSYSTYPE=nowsys" >> LOCAL.config
+ fi
+}
+
+src_compile() {
+ export NPROC=$(makeopts_jobs)
+
+ # 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 * "${D}/${PLAN9}"
+
+ # build the environment variables and install them in env.d
+ cat > "${T}/30plan9" <<-EOF
+ PLAN9="${PLAN9}"
+ PATH="${PLAN9}/bin"
+ ROOTPATH="${PLAN9}/bin"
+ MANPATH="${PLAN9}/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."
+}