/[gentoo-x86]/dev-util/plan9port/plan9port-20140304.ebuild
Gentoo

Contents of /dev-util/plan9port/plan9port-20140304.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Nov 21 09:56:37 2014 UTC (3 years, 8 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -6 lines
Use makeopts_jobs instead of parsing MAKEOPTS by hand.

(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key D2E96200)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/plan9port/plan9port-20140304.ebuild,v 1.1 2014/03/06 15:17:55 blueness Exp $
4
5 EAPI="4"
6
7 inherit eutils multiprocessing
8
9 DESCRIPTION="Port of many Plan 9 programs and libraries"
10 HOMEPAGE="http://swtch.com/plan9port/"
11 SRC_URI="http://${PN}.googlecode.com/files/${P}.tgz"
12
13 LICENSE="9base BSD-4 MIT LGPL-2.1 BigelowHolmes"
14 SLOT="0"
15 KEYWORDS="~amd64 ~x86"
16 IUSE="X"
17
18 DEPEND="X? ( x11-apps/xauth )"
19 RDEPEND="${DEPEND}"
20
21 S="${WORKDIR}/${PN}"
22
23 PLAN9=/usr/lib/plan9
24 QA_MULTILIB_PATHS="${PLAN9}/.*/.*"
25
26 src_prepare() {
27 epatch "${FILESDIR}/${PN}-"{noexecstack,cflags,builderr}".patch"
28
29 # Fix paths, done in place of ./INSTALL -c
30 einfo "Fixing hard-coded /usr/local/plan9 paths"
31 grep --null -l -r '/usr/local/plan9' |
32 xargs --null sed -i "s!/usr/local/plan9!${PLAN9}!g"
33 }
34
35 src_configure() {
36 if ! use X; then
37 echo "WSYSTYPE=nowsys" >> LOCAL.config
38 fi
39 }
40
41 src_compile() {
42 export NPROC=$(makeopts_jobs)
43
44 # The INSTALL script builds mk then [re]builds everything using that
45 einfo "Compiling Plan 9 from User Space can take a very long time"
46 einfo "depending on the speed of your computer. Please be patient!"
47 ./INSTALL -b || die "Please report bugs to bugs.gentoo.org, NOT Plan9Port."
48 }
49
50 src_install() {
51 dodir "${PLAN9}"
52
53 # P9P's man does not handle compression
54 docompress -x $PLAN9/man
55
56 # do* plays with the executable bit, and we should not modify them
57 cp -a * "${D}/${PLAN9}"
58
59 # build the environment variables and install them in env.d
60 cat > "${T}/30plan9" <<-EOF
61 PLAN9="${PLAN9}"
62 PATH="${PLAN9}/bin"
63 ROOTPATH="${PLAN9}/bin"
64 MANPATH="${PLAN9}/man"
65 EOF
66 doenvd "${T}/30plan9"
67 }
68
69 pkg_postinst() {
70 elog "Plan 9 from User Space has been successfully installed into"
71 elog "${PLAN9}. Your PLAN9 and PATH environment variables have"
72 elog "also been appropriately set, please use env-update and"
73 elog "source /etc/profile to bring that into immediate effect."
74 elog
75 elog "Please note that ${PLAN9}/bin has been appended to the"
76 elog "*end* or your PATH to prevent conflicts. To use the Plan9"
77 elog "versions of common UNIX tools, use the absolute path:"
78 elog "${PLAN9}/bin or the 9 command (eg: 9 troff)"
79 elog
80 elog "Please report any bugs to bugs.gentoo.org, NOT Plan9Port."
81 }

  ViewVC Help
Powered by ViewVC 1.1.20