Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/plan9port/, dev-util/plan9port/files/
Date: Tue, 02 Jun 2020 11:13:59
Message-Id: 1591096424.2758e2b15c592747ea4f65172aac35146b190aa7.juippis@gentoo
1 commit: 2758e2b15c592747ea4f65172aac35146b190aa7
2 Author: neeshy <neeshy <AT> tfwno <DOT> gf>
3 AuthorDate: Tue Jun 2 11:09:23 2020 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 2 11:13:44 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2758e2b1
7
8 dev-util/plan9port: bump version to 0_pre20200526
9
10 Signed-off-by: Nima Sadeghi <neeshy <AT> tfwno.gf>
11 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
12
13 dev-util/plan9port/Manifest | 1 +
14 dev-util/plan9port/files/plan9port-builderr.patch | 16 +--
15 dev-util/plan9port/files/plan9port-cflags.patch | 4 +-
16 .../plan9port/files/plan9port-freebsd-10.patch | 11 --
17 .../plan9port/files/plan9port-noexecstack.patch | 6 +-
18 dev-util/plan9port/plan9port-0_pre20200526.ebuild | 132 +++++++++++++++++++++
19 6 files changed, 146 insertions(+), 24 deletions(-)
20
21 diff --git a/dev-util/plan9port/Manifest b/dev-util/plan9port/Manifest
22 index 30bb3ea6606..60d4aeb16d1 100644
23 --- a/dev-util/plan9port/Manifest
24 +++ b/dev-util/plan9port/Manifest
25 @@ -1 +1,2 @@
26 +DIST plan9port-a6ad39aaaa36b8aadc5c35bfc803afbde32918c0.tar.gz 23445647 BLAKE2B 4cb0f08fc404c5618c4be0d7e5710e6a8a32fbe010d28a879b1f9575118256492a3ed2b9b744c35dbbb6c6deae405c05fd7b6606254fb94fc2b40b3a8d14fa71 SHA512 4d9f6ce66d3eebb311cbbb0ec27c01d99cc0e19c6ac8a1c511ff00070c085a349b637048cd0066240af975e90f527388dbeba58f4591bf7dcaa673ee5564430f
27 DIST plan9port-e78ed7a67bbaa37dc57dfb37219f505c48755e14.tar.gz 23442851 BLAKE2B 89e2a8dcdf650cc3640ef0ba496f1c22e74831fda2e4a51cf8419c496da5a480a10324eb295369e9192defbd3c6411ea351bba1c6bdec5d72bc4ee397da58114 SHA512 3cb126eb0f8c58c76c4da5aaca6b3956b9cc30b1955c1b9db4727a01a46cae696f01b538a47f6f009e955f6ed8f308b60b6519d4184e10b255636ea32a1e9099
28
29 diff --git a/dev-util/plan9port/files/plan9port-builderr.patch b/dev-util/plan9port/files/plan9port-builderr.patch
30 index 266f10c4b9d..b1f3d1275ce 100644
31 --- a/dev-util/plan9port/files/plan9port-builderr.patch
32 +++ b/dev-util/plan9port/files/plan9port-builderr.patch
33 @@ -4,15 +4,15 @@ By default, the plan9port INSTALL script doesn't report build error,
34 which can result in a mostly broken build begin installed.
35 --- a/INSTALL
36 +++ b/INSTALL
37 -@@ -41,7 +41,6 @@ echo " "
38 - echo "* Resetting $PLAN9/config"
39 - rm -f config
40 +@@ -65,7 +65,6 @@
41 + ;;
42 + esac
43
44 -(
45 - echo "* Compiler version:"
46 - 9c -v 2>&1 | grep -v 'Configured with:' | grep -i version | sed 's/^/ /'
47 -
48 -@@ -134,7 +133,7 @@ if $dobuild; then
49 + if [ `uname` = SunOS ]; then
50 + # On Solaris x86, uname -p cannot be trusted.
51 + echo "* Running on Solaris: checking architecture..."
52 +@@ -159,7 +158,7 @@
53 echo "* Warning: not all binaries built successfully."
54 fi
55 echo "* Installing everything in $PLAN9/bin..."
56 @@ -21,7 +21,7 @@ which can result in a mostly broken build begin installed.
57 if [ ! -x $PLAN9/bin/cleanname -o ! -x $PLAN9/bin/acme -o ! -x $PLAN9/bin/sam ]; then
58 echo " "
59 echo "* Warning: not all binaries built successfully."
60 -@@ -182,5 +181,4 @@ if $doinstall; then
61 +@@ -211,5 +210,4 @@
62 echo " PLAN9=$PLAN9 export PLAN9"
63 echo ' PATH=$PATH:$PLAN9/bin export PATH'
64 fi
65
66 diff --git a/dev-util/plan9port/files/plan9port-cflags.patch b/dev-util/plan9port/files/plan9port-cflags.patch
67 index c2d2ed6defe..74bd60518d0 100644
68 --- a/dev-util/plan9port/files/plan9port-cflags.patch
69 +++ b/dev-util/plan9port/files/plan9port-cflags.patch
70 @@ -5,10 +5,10 @@ This allows the plan9port build to inherit cflags from the environment.
71 (This patch must be applied after plan9port-noexecstack.patch)
72 --- a/src/mkhdr
73 +++ b/src/mkhdr
74 -@@ -28,8 +28,6 @@ LD=9l
75 +@@ -11,8 +11,6 @@
76 + LD=9l
77 AS=9a
78 AR=9ar
79 - INSTALL=install
80 -CFLAGS=
81 -LDFLAGS=
82 AFLAGS=--noexecstack
83
84 diff --git a/dev-util/plan9port/files/plan9port-freebsd-10.patch b/dev-util/plan9port/files/plan9port-freebsd-10.patch
85 deleted file mode 100644
86 index cc46dc6f450..00000000000
87 --- a/dev-util/plan9port/files/plan9port-freebsd-10.patch
88 +++ /dev/null
89 @@ -1,11 +0,0 @@
90 ---- a/bin/9l 2015-12-09 19:12:50.000000000 +0000
91 -+++ b/bin/9l 2015-12-09 19:13:00.000000000 +0000
92 -@@ -19,7 +19,7 @@ case "$tag" in
93 - 5.2.*)
94 - extralibs="$extralibs -lkse"
95 - ;;
96 -- [5-9].*)
97 -+ [5-9].*|10.*)
98 - extralibs="$extralibs -lpthread"
99 - ;;
100 - esac
101
102 diff --git a/dev-util/plan9port/files/plan9port-noexecstack.patch b/dev-util/plan9port/files/plan9port-noexecstack.patch
103 index fb4f19f21fc..aff60d07a98 100644
104 --- a/dev-util/plan9port/files/plan9port-noexecstack.patch
105 +++ b/dev-util/plan9port/files/plan9port-noexecstack.patch
106 @@ -22,7 +22,7 @@ Patch by Andy Spencer
107 test -f $PLAN9/config && . $PLAN9/config
108
109 aflags=""
110 -@@ -17,5 +12,16 @@ Darwin-*x86_64*)
111 +@@ -17,5 +12,16 @@
112 ;;
113 esac
114
115 @@ -43,8 +43,8 @@ Patch by Andy Spencer
116 +exec as $aflags $opts -o $dst $src
117 --- a/src/mkhdr
118 +++ b/src/mkhdr
119 -@@ -30,7 +30,7 @@ AR=9ar
120 - INSTALL=install
121 +@@ -13,7 +13,7 @@
122 + AR=9ar
123 CFLAGS=
124 LDFLAGS=
125 -AFLAGS=
126
127 diff --git a/dev-util/plan9port/plan9port-0_pre20200526.ebuild b/dev-util/plan9port/plan9port-0_pre20200526.ebuild
128 new file mode 100644
129 index 00000000000..dff9e3605a9
130 --- /dev/null
131 +++ b/dev-util/plan9port/plan9port-0_pre20200526.ebuild
132 @@ -0,0 +1,132 @@
133 +# Copyright 1999-2020 Gentoo Authors
134 +# Distributed under the terms of the GNU General Public License v2
135 +
136 +EAPI=7
137 +
138 +inherit multiprocessing toolchain-funcs readme.gentoo-r1
139 +
140 +MY_HASH="a6ad39aaaa36b8aadc5c35bfc803afbde32918c0"
141 +MY_P="${PN}-${MY_HASH}"
142 +
143 +DESCRIPTION="Port of many Plan 9 programs and libraries"
144 +HOMEPAGE="https://9fans.github.io/plan9port/
145 + https://github.com/9fans/plan9port"
146 +SRC_URI="https://github.com/9fans/${PN}/archive/${MY_HASH}.tar.gz -> ${MY_P}.tar.gz"
147 +
148 +LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
149 +SLOT="0"
150 +KEYWORDS="~amd64 ~x86"
151 +IUSE="X aqua truetype"
152 +REQUIRED_USE="?? ( X aqua )"
153 +
154 +DEPEND="
155 + X? ( x11-apps/xauth )
156 + truetype? (
157 + media-libs/freetype
158 + media-libs/fontconfig
159 + )
160 +"
161 +RDEPEND="${DEPEND}"
162 +
163 +PATCHES=(
164 + "${FILESDIR}/${PN}-noexecstack.patch"
165 + "${FILESDIR}/${PN}-cflags.patch"
166 + "${FILESDIR}/${PN}-builderr.patch"
167 +)
168 +
169 +S="${WORKDIR}/${MY_P}"
170 +
171 +PLAN9="/opt/plan9"
172 +EPLAN9="${EPREFIX}${PLAN9}"
173 +QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
174 +
175 +DOC_CONTENTS="Plan 9 from User Space has been successfully installed into
176 +${PLAN9}. Your PLAN9 and PATH environment variables have
177 +also been appropriately set, please use env-update and
178 +source /etc/profile to bring that into immediate effect.
179 +
180 +Please note that ${PLAN9}/bin has been appended to the
181 +*end* or your PATH to prevent conflicts. To use the Plan9
182 +versions of common UNIX tools, use the absolute path:
183 +${PLAN9}/bin or the 9 command (eg: 9 troff)
184 +
185 +Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
186 +DISABLE_AUTOFORMATTING="yes"
187 +
188 +src_prepare() {
189 + default
190 +
191 + case "${CHOST}" in
192 + *apple*)
193 + sed -i 's/--noexecstack/-noexecstack/' src/mkhdr ||
194 + die "Failed to sed AFLAGS" ;;
195 + esac
196 +
197 + # don't hardcode /bin and /usr/bin in PATH
198 + sed -i '/PATH/s,/bin:/usr/bin:,,' INSTALL || die "sed on INSTALL failed"
199 +
200 + # don't hardcode /usr/{,local/}include and prefix /usr/include/*
201 + sed -Ei -e 's,-I/usr(|/local)/include ,,g' \
202 + -e "s,-I/usr(|/local)/include,-I${EPREFIX}/usr\1/include,g" \
203 + src/cmd/fontsrv/freetyperules.sh INSTALL $(find -name makefile) ||
204 + die "sed failed"
205 +
206 + # Fix paths, done in place of ./INSTALL -c
207 + einfo "Fixing hard-coded /usr/local/plan9 paths"
208 + sed -i "s,/usr/local/plan9,${EPLAN9},g" $(grep -lr /usr/local/plan9) ||
209 + die "sed failed"
210 +}
211 +
212 +src_configure() {
213 + local -a myconf=(
214 + CC9="$(tc-getCC)"
215 + CC9FLAGS="'${CFLAGS} ${LDFLAGS}'"
216 + )
217 +
218 + if use X; then
219 + myconf+=( WSYSTYPE=x11 )
220 + elif use aqua; then
221 + local wsystype="$(awk '{if ($1 > 10.5) print "osx-cocoa"; else print "osx"}' \
222 + <<< "${MACOSX_DEPLOYMENT_TARGET}")"
223 + myconf+=( WSYSTYPE="${wsystype}" )
224 + else
225 + myconf+=( WSYSTYPE=nowsys )
226 + fi
227 +
228 + if use truetype; then
229 + myconf+=( FONTSRV=fontsrv )
230 + else
231 + myconf+=( FONTSRV= )
232 + fi
233 +
234 + printf '%s\n' "${myconf[@]}" >> LOCAL.config ||
235 + die "cannot create configuration"
236 +}
237 +
238 +src_compile() {
239 + # The INSTALL script builds mk then [re]builds everything using that
240 + einfo "Compiling Plan 9 from User Space can take a very long time"
241 + einfo "depending on the speed of your computer. Please be patient!"
242 + NPROC="$(makeopts_jobs)" ./INSTALL -b ||
243 + die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
244 +}
245 +
246 +src_install() {
247 + readme.gentoo_create_doc
248 +
249 + # do* plays with the executable bit, and we should not modify them
250 + dodir "${PLAN9}"
251 + cp -a * "${ED}${PLAN9}" || die "cp failed"
252 +
253 + # build the environment variables and install them in env.d
254 + newenvd - 60plan9 <<-EOF
255 + PLAN9="${EPLAN9}"
256 + PATH="${EPLAN9}/bin"
257 + ROOTPATH="${EPLAN9}/bin"
258 + MANPATH="${EPLAN9}/man"
259 + EOF
260 +}
261 +
262 +pkg_postinst() {
263 + readme.gentoo_print_elog
264 +}