diff options
Diffstat (limited to 'dev-util/plan9port')
-rw-r--r-- | dev-util/plan9port/Manifest | 7 | ||||
-rw-r--r-- | dev-util/plan9port/files/plan9port-builderr.patch | 29 | ||||
-rw-r--r-- | dev-util/plan9port/files/plan9port-cflags.patch | 16 | ||||
-rw-r--r-- | dev-util/plan9port/files/plan9port-freebsd-10.patch | 11 | ||||
-rw-r--r-- | dev-util/plan9port/files/plan9port-noexecstack.patch | 54 | ||||
-rw-r--r-- | dev-util/plan9port/metadata.xml | 22 | ||||
-rw-r--r-- | dev-util/plan9port/plan9port-20140306-r4.ebuild | 120 |
7 files changed, 259 insertions, 0 deletions
diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest new file mode 100644 index 000000000000..04919201779f --- /dev/null +++ b/dev-util/plan9port/Manifest @@ -0,0 +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 +MISC metadata.xml 683 BLAKE2B 4a52db553cb90ab9472d190a70260e4d8937037008d8aec07b6b92dd336b1506a1753bec4e916b655f177fdd4efd793f645be51d1613124e6bcba570255c3273 SHA512 8d8bc34ae706ed839de9f2c1e32be135545b706208ef800d9ebde98f2f182111a91bc92c1f764c6fa6d26af8615bd528e1dfb87e0597e86d4ffce06f3a0c0b33 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." +} |