Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/plan9port/
Date: Mon, 28 Nov 2016 01:51:44
Message-Id: 1480297863.c1d1c941932d6606f25baf10737b2686ed292c7b.blueness@gentoo
1 commit: c1d1c941932d6606f25baf10737b2686ed292c7b
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Mon Nov 28 01:49:44 2016 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Mon Nov 28 01:51:03 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c1d1c941
7
8 dev-util/plan9port: switch SRC_URI to github
9
10 Package-Manager: portage-2.3.0
11
12 dev-util/plan9port/Manifest | 1 +
13 dev-util/plan9port/plan9port-20140306-r3.ebuild | 121 ++++++++++++++++++++++++
14 2 files changed, 122 insertions(+)
15
16 diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
17 index 0b191f5..95648e5 100644
18 --- a/dev-util/plan9port/Manifest
19 +++ b/dev-util/plan9port/Manifest
20 @@ -1 +1,2 @@
21 DIST plan9port-20140306.tgz 54512505 SHA256 cbb826cde693abdaa2051c49e7ebf75119bf2a4791fe3b3229f1ac36a408eaeb SHA512 a0671163940186fd3d8cf37f06824f0d5a4b9734c1e70eb3174cd7f6b9a1ae769cf78e067dcf4e963192a26a2420b4bb1ce79ed788314ed1783c3bd793fe2aef WHIRLPOOL c19977ef310ac34efcb294e9f7f73f6095e9db0ab52ef359956a05e5a5252a0f9d03f88dd29d21d01bfc82d2e0bdd8ac77bc6a8bb80ef81ce3c773b2dfee0677
22 +DIST plan9port-e78ed7a67bbaa37dc57dfb37219f505c48755e14.tar.gz 23442851 SHA256 29628d315c3f26f73157076717684f8ee642083f2213e78c739c79fdf703e458 SHA512 3cb126eb0f8c58c76c4da5aaca6b3956b9cc30b1955c1b9db4727a01a46cae696f01b538a47f6f009e955f6ed8f308b60b6519d4184e10b255636ea32a1e9099 WHIRLPOOL 3ac4474ae9df9fcc032e24ef065a1a9ccd20f3a8fa416ee9d0ec51faad9c883581500c5827ec2a3b2c56bd1779e5a59fc07a84dcd78ce8acbf5f48450635106c
23
24 diff --git a/dev-util/plan9port/plan9port-20140306-r3.ebuild b/dev-util/plan9port/plan9port-20140306-r3.ebuild
25 new file mode 100644
26 index 00000000..50a2ce4
27 --- /dev/null
28 +++ b/dev-util/plan9port/plan9port-20140306-r3.ebuild
29 @@ -0,0 +1,121 @@
30 +# Copyright 1999-2016 Gentoo Foundation
31 +# Distributed under the terms of the GNU General Public License v2
32 +# $Id$
33 +
34 +EAPI="5"
35 +
36 +inherit eutils multiprocessing toolchain-funcs
37 +
38 +MY_HASH="e78ed7a67bbaa37dc57dfb37219f505c48755e14"
39 +MY_P="${PN}-${MY_HASH}"
40 +
41 +DESCRIPTION="Port of many Plan 9 programs and libraries"
42 +HOMEPAGE="http://swtch.com/plan9port/"
43 +SRC_URI="https://github.com/9fans/${PN}/archive/${MY_HASH}.tar.gz -> ${MY_P}.tar.gz"
44 +
45 +LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~x86"
48 +IUSE="X aqua truetype"
49 +REQUIRED_USE="?? ( X aqua )"
50 +
51 +DEPEND="X? ( x11-apps/xauth )
52 + truetype? ( media-libs/freetype
53 + media-libs/fontconfig )"
54 +RDEPEND="${DEPEND}"
55 +
56 +S="${WORKDIR}/${MY_P}"
57 +
58 +PLAN9=/usr/lib/plan9
59 +EPLAN9="${EPREFIX}"${PLAN9}
60 +QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
61 +
62 +src_prepare() {
63 + epatch "${FILESDIR}/${PN}-"{noexecstack,cflags,builderr}".patch"
64 + case ${CHOST} in
65 + *freebsd10.*) # patch 9l to use -pthread also on FreeBSD-10
66 + epatch "${FILESDIR}/${PN}-freebsd-10.patch" ;;
67 + *apple*)
68 + sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
69 + die "Failed to sed AFLAGS" ;;
70 + esac
71 +
72 + # don't hardcode /bin and /usr/bin in PATH
73 + sed -i '/PATH/s,/bin:/usr/bin:,,' INSTALL || die "sed on INSTALL failed"
74 +
75 + # don't hardcode /usr/{,local/}include and prefix /usr/include/*
76 + for f in src/cmd/fontsrv/freetyperules.sh INSTALL \
77 + $(find -name makefile); do
78 + sed -r -i -e 's,-I/usr(|/local)/include ,,g' \
79 + -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" ${f} \
80 + || die "sed on ${f} failed"
81 + done
82 +
83 + # Fix paths, done in place of ./INSTALL -c
84 + einfo "Fixing hard-coded /usr/local/plan9 paths"
85 + grep --null -l -r '/usr/local/plan9' |
86 + xargs --null sed -i "s,/usr/local/plan9,${EPLAN9},g"
87 +}
88 +
89 +src_configure() {
90 + local myconf=()
91 + if use X; then
92 + myconf+=("X11=${EPREFIX}/usr" WSYSTYPE=x11)
93 + elif use aqua; then
94 + local wsystype=$(echo ${MACOSX_DEPLOYMENT_TARGET} |
95 + awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}')
96 + myconf+=("WSYSTYPE=${wsystype}")
97 + else
98 + myconf+=(WSYSTYPE=nowsys)
99 + fi
100 +
101 + if use truetype; then
102 + myconf+=(FONTSRV=fontsrv)
103 + else
104 + myconf+=(FONTSRV=)
105 + fi
106 + printf '%s\n' "${myconf[@]}" >> LOCAL.config
107 +}
108 +
109 +src_compile() {
110 + export NPROC=$(makeopts_jobs)
111 + export CC9=$(tc-getCC)
112 +
113 + # The INSTALL script builds mk then [re]builds everything using that
114 + einfo "Compiling Plan 9 from User Space can take a very long time"
115 + einfo "depending on the speed of your computer. Please be patient!"
116 + ./INSTALL -b || die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
117 +}
118 +
119 +src_install() {
120 + dodir "${PLAN9}"
121 +
122 + # P9P's man does not handle compression
123 + docompress -x $PLAN9/man
124 +
125 + # do* plays with the executable bit, and we should not modify them
126 + cp -a * "${ED}/${PLAN9}"
127 +
128 + # build the environment variables and install them in env.d
129 + cat > "${T}/30plan9" <<-EOF
130 + PLAN9="${EPLAN9}"
131 + PATH="${EPLAN9}/bin"
132 + ROOTPATH="${EPLAN9}/bin"
133 + MANPATH="${EPLAN9}/man"
134 + EOF
135 + doenvd "${T}/30plan9"
136 +}
137 +
138 +pkg_postinst() {
139 + elog "Plan 9 from User Space has been successfully installed into"
140 + elog "${PLAN9}. Your PLAN9 and PATH environment variables have"
141 + elog "also been appropriately set, please use env-update and"
142 + elog "source /etc/profile to bring that into immediate effect."
143 + elog
144 + elog "Please note that ${PLAN9}/bin has been appended to the"
145 + elog "*end* or your PATH to prevent conflicts. To use the Plan9"
146 + elog "versions of common UNIX tools, use the absolute path:"
147 + elog "${PLAN9}/bin or the 9 command (eg: 9 troff)"
148 + elog
149 + elog "Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
150 +}