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

Contents of /sys-apps/darwin-miscutils/darwin-miscutils-9.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Sep 3 10:44:37 2011 UTC (8 years, 4 months ago) by grobian
Branch: MAIN
CVS Tags: HEAD
Bump to Lion version 10.7

(Portage version: 2.2.01.19120-prefix/cvs/Darwin i386)

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

  ViewVC Help
Powered by ViewVC 1.1.20