/[gentoo-x86]/sys-apps/darwin-miscutils/darwin-miscutils-5-r1.ebuild
Gentoo

Contents of /sys-apps/darwin-miscutils/darwin-miscutils-5-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Mar 5 18:04:28 2010 UTC (9 years, 11 months ago) by grobian
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +4 -6 lines
Convert to EAPI=3
(Portage version: 2.2.00.15738-prefix/cvs/Darwin powerpc)

1 grobian 1.4 # Copyright 1999-2010 Gentoo Foundation
2 grobian 1.1 # Distributed under the terms of the GNU General Public License v2
3 grobian 1.5 # $Header: /var/cvsroot/gentoo-x86/sys-apps/darwin-miscutils/darwin-miscutils-5-r1.ebuild,v 1.4 2010/01/08 08:56:43 grobian Exp $
4    
5     EAPI="3"
6 grobian 1.1
7     inherit toolchain-funcs eutils
8    
9     MISC_VER=23
10     SHELL_VER=118
11     DEV_VER=48
12    
13 grobian 1.2 DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Leopard"
14 grobian 1.1 HOMEPAGE="http://www.opensource.apple.com/"
15     SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
16     http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
17     http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz"
18    
19     LICENSE="BSD"
20     SLOT="0"
21 grobian 1.3 KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
22 grobian 1.1 IUSE=""
23    
24     DEPEND=""
25     RDEPEND=""
26    
27     S=${WORKDIR}
28    
29 grobian 1.5 src_prepare() {
30 grobian 1.1 epatch "${FILESDIR}"/${P}-w.patch
31     epatch "${FILESDIR}"/${P}-error.patch
32     epatch "${FILESDIR}"/${P}-stdlib.patch
33     }
34    
35     src_compile() {
36     local TS=${S}/misc_cmds-${MISC_VER}
37     # tsort is provided by coreutils
38     for t in leave units calendar; do
39     cd "${TS}/${t}"
40     echo "in ${TS}/${t}:"
41     echo "$(tc-getCC) -o ${t}" *.c
42     $(tc-getCC) -o ${t} *.c || die "failed to compile $t"
43     done
44     # compile cal separately
45     cd "${TS}/ncal"
46     echo "in ${TS}/ncal:"
47     local flags
48     flags[0]=-I.
49     flags[1]=-D__FBSDID=__RCSID
50     flags[2]=-Wsystem-headers
51     echo "$(tc-getCC) ${flags[@]} -c calendar.c"
52     $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
53     echo "$(tc-getCC) ${flags[@]} -c easter.c"
54     $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
55     echo "$(tc-getCC) ${flags[@]} -c ncal.c"
56     $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
57     echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
58     $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
59    
60     TS=${S}/shell_cmds-${SHELL_VER}
61     # only pick those tools not provided by coreutils, findutils
62     for t in \
63     alias apply getopt hostname jot kill \
64     lastcomm renice shlock time whereis;
65     do
66     echo "in ${TS}/${t}:"
67     echo "$(tc-getCC) -o ${t} ${t}.c"
68     cd "${TS}/${t}"
69     $(tc-getCC) -o ${t} ${t}.c || die "failed to compile $t"
70     done
71     # script and killall need additonal flags
72     for t in \
73     killall script
74     do
75     echo "in ${TS}/${t}:"
76     echo "$(tc-getCC) -D__FBSDID=__RCSID -o ${t} ${t}.c"
77     cd "${TS}/${t}"
78     $(tc-getCC) -D__FBSDID=__RCSID -o ${t} ${t}.c || die "failed to compile $t"
79     done
80     cd "${TS}/su"
81     echo "in ${TS}/su:"
82     echo "$(tc-getCC) -lpam -o su su.c"
83     $(tc-getCC) -lpam -o su su.c || die "failed to compile su"
84     cd "${TS}/w"
85     echo "in ${TS}/w:"
86     echo "$(tc-getCC) -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
87     $(tc-getCC) -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
88     || die "failed to compile w"
89    
90     TS=${S}/developer_cmds-${DEV_VER}
91     # only pick those tools that do not conflict (no ctags and indent)
92     # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
93     # shell scripts
94     # don't install rpcgen, as it is heavily related to the OS it runs
95     # on (and this is the Leopard version)
96     for t in asa error hexdump unifdef what ; do
97     echo "in ${TS}/${t}:"
98     cd "${TS}/${t}"
99     sed -i -e '/^__FBSDID/d' *.c
100     echo "$(tc-getCC) -o ${t}" *.c
101     $(tc-getCC) -o ${t} *.c || die "failed to compile $t"
102     done
103     }
104    
105     src_install() {
106     mkdir -p "${ED}"/bin
107     mkdir -p "${ED}"/usr/bin
108    
109     local TS=${S}/misc_cmds-${MISC_VER}
110     for t in leave units calendar ; do
111     cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
112     doman "${TS}/${t}/${t}.1"
113     done
114     # copy cal separately
115     cp "${TS}/ncal/cal" "${ED}"/usr/bin/
116     dosym /usr/bin/cal /usr/bin/ncal
117     doman "${TS}/ncal/ncal.1"
118     dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
119    
120     TS=${S}/shell_cmds-${SHELL_VER}
121     for t in \
122     alias apply getopt jot killall lastcomm \
123     renice script shlock su time w whereis;
124     do
125     cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
126     [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
127     [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
128     done
129     cp "${TS}/w/w" "${ED}"/usr/bin/uptime
130     doman "${TS}/w/uptime.1"
131     for t in hostname kill; do
132     cp "${TS}/${t}/${t}" "${ED}"/bin/
133     doman "${TS}/${t}/${t}.1"
134     done
135    
136     TS=${S}/developer_cmds-${DEV_VER}
137     for t in asa error hexdump unifdef what ; do
138     cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
139     doman "${TS}/${t}/${t}.1"
140     done
141     }

  ViewVC Help
Powered by ViewVC 1.1.20