summaryrefslogtreecommitdiff
path: root/dev-util/plan9port
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-util/plan9port
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-util/plan9port')
-rw-r--r--dev-util/plan9port/Manifest9
-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-freebsd-10.patch11
-rw-r--r--dev-util/plan9port/files/plan9port-noexecstack.patch54
-rw-r--r--dev-util/plan9port/metadata.xml22
-rw-r--r--dev-util/plan9port/plan9port-20140306-r4.ebuild120
7 files changed, 261 insertions, 0 deletions
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
new file mode 100644
index 000000000000..3bc4f7bb8721
--- /dev/null
+++ b/dev-util/plan9port/Manifest
@@ -0,0 +1,9 @@
+AUX plan9port-builderr.patch 936 SHA256 d0d97cac6d9b42c7eaafc1f94e688080bbfe957495ac1e08e55e1cc95880e8a3 SHA512 d95e6c5b4b75d54167721f7250288b8640945ebeb10ff346e989a4690828bb8448e46cbcf30d5e35c27d094680b2995ca04b8106c4dce083260f605fc2024d84 WHIRLPOOL 220c2a759cd70f21107e908c80bf0a35a5663e7073d22160972280421d5c91b0b3ece6660a6d9bfe6bec1f7cf9a58f92f3696e5db8c60e2d1a5ea7518b4a9b44
+AUX plan9port-cflags.patch 328 SHA256 ef9e325972b4f4320bbfcfb4d57cd6e06241c820643b189c2f85feed504df581 SHA512 281b236893cc1efde75d7fc5160168c8602a5eff27229f9b0e2b1284ac36cf73fdbd22f2ae4d3776556f7b881ad63f4dd68d56628942ca6e84abca12b93616bc WHIRLPOOL 73a5afd2adfaa625ee0e5cf3f40c93da6c8859567992e4e3b380dc70b6080f6aba2eb6bc767911a4d7535f3d2034e52a541d5abf693b24f976cf18ba92f876d7
+AUX plan9port-freebsd-10.patch 265 SHA256 b258a8e8680acb7e74a30a10803e03e879dad35a2fc5087a3aa2f2601a0193e9 SHA512 69c8d4ee824afb453bd4ebc8ba9af3e73c37fd31e40d92ae62685a9a6916571ed16e8f3eee8aff32e2db96177439fa34e52bba8d7c52a296328ae1d9d3767c19 WHIRLPOOL 5861044c97ddce95462e13f463fb82b4346d921148cebd7ab398420098a1e834b0c679bcde2e9bd09fc414b704b4de62746b4c1da060e5c3475bb29c87c49526
+AUX plan9port-noexecstack.patch 984 SHA256 eafebec7adf9310eba6b4bc1aec1ea41ad3cdd73b366471278dd4439643351ea SHA512 160f0a793345603c4c905e65a6fa4a25b1a1c1084f0eadd4ada49ba5b6efc48b975031d14926fdfc2bd48d2e3860c987da449d9d9973038ab510f42528383da8 WHIRLPOOL 997262eb672ce3836309216eb31219671051d1e7b936c98811a668cbe481a820140ec07555871940a367e730e7206ab90e7d8705ee9f0fae50fe613c400f5e22
+DIST plan9port-e78ed7a67bbaa37dc57dfb37219f505c48755e14.tar.gz 23442851 SHA256 29628d315c3f26f73157076717684f8ee642083f2213e78c739c79fdf703e458 SHA512 3cb126eb0f8c58c76c4da5aaca6b3956b9cc30b1955c1b9db4727a01a46cae696f01b538a47f6f009e955f6ed8f308b60b6519d4184e10b255636ea32a1e9099 WHIRLPOOL 3ac4474ae9df9fcc032e24ef065a1a9ccd20f3a8fa416ee9d0ec51faad9c883581500c5827ec2a3b2c56bd1779e5a59fc07a84dcd78ce8acbf5f48450635106c
+EBUILD plan9port-20140306-r4.ebuild 3536 SHA256 73e6abe859fa0b15387236cf31f3d6161ae1bd278a0206ce379b771937a42195 SHA512 290a3824ee3aaaa2a813f2e703b16851988126e1d7c1636552767529fb9bcbc01edf86851d6869f1000df71bb8ce8a0fa34af807810c6dd87702e6a9e711685f WHIRLPOOL 10786a9ccf8236ed7fdc288f8a37d478765e06a625e2a1a25fabe93382aad56303bc6354dd99c74a781d7ea05725c866396516fca2d21b9e5e6f871549ffeebe
+MISC ChangeLog 4204 SHA256 558c0ff41e0310adfba1be44a75f9b67eedded2173bed37d4852e2668149eda1 SHA512 20924b8aa8eb74cd8e331b4c81beeb9f20236df2610713ddc0f29b642094904550a4de4818660add97c9db932b1b9e80368a1ef861f74298e22d82587a352030 WHIRLPOOL 3e38e43d5810f96fd6921151c4d4727f4463c3e741f8d4438c7c4f79e4d77221823588810d988df21268120987cc439e3be05b0135fe580f898304d92d5fdb57
+MISC ChangeLog-2015 6800 SHA256 26935902c85acce1c3ff5af5e1c2ed514eeb2b4d5e9c480757f5ae57dc22cfe1 SHA512 605dd2afb2f19e445772be995d8ac754a35fcdc54598891f913825008e1cfece1b0d5594ab3c34fe29bf64d8335b182bd2cc423aa715ebc721c13c5bfa787eeb WHIRLPOOL 964ee61ac81cfffbc0299cc55a9409847f468728f4282c76af3f0d3e4ae409dd7148c1fa312ab915353e8908eefc88d095dcfda063d05ae2c0f5ccb5fed249bb
+MISC metadata.xml 683 SHA256 38651be777925e25decd8d6fbd86fab5357fc229a6202f5d4cde0d0ee57c5f48 SHA512 8d8bc34ae706ed839de9f2c1e32be135545b706208ef800d9ebde98f2f182111a91bc92c1f764c6fa6d26af8615bd528e1dfb87e0597e86d4ffce06f3a0c0b33 WHIRLPOOL b464d24d0b0330faeaf6ac00f72b7a198636c78f885cfcac0db1e9971824436a7c573f5740eb864be9b182ab72f4242af7b2fba2574d211d41f8d3e93c3af780
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-freebsd-10.patch b/dev-util/plan9port/files/plan9port-freebsd-10.patch
new file mode 100644
index 000000000000..cc46dc6f4509
--- /dev/null
+++ b/dev-util/plan9port/files/plan9port-freebsd-10.patch
@@ -0,0 +1,11 @@
+--- 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
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..1ddb5cc0124d
--- /dev/null
+++ b/dev-util/plan9port/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>andy753421@gmail.com</email>
+ </maintainer>
+ <maintainer type="person">
+ <email>blueness@gentoo.org</email>
+ <name>Anthony G. Basile</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</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>
+ <upstream>
+ <remote-id type="github">9fans/plan9port</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-util/plan9port/plan9port-20140306-r4.ebuild b/dev-util/plan9port/plan9port-20140306-r4.ebuild
new file mode 100644
index 000000000000..68a51b267f4e
--- /dev/null
+++ b/dev-util/plan9port/plan9port-20140306-r4.ebuild
@@ -0,0 +1,120 @@
+# 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."
+}