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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sat Aug 4 09:39:29 2012 UTC (7 years, 5 months ago) by grobian
Branch: MAIN
CVS Tags: HEAD
Version bump to versions from 10.8 + devtools and md from 10.7.4.  This ebuild no longer provides alias, but adds md for 10.8 users.

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

1 # Copyright 1999-2012 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-9.ebuild,v 1.1 2011/09/03 10:44:37 grobian Exp $
4
5 EAPI="4"
6
7 inherit toolchain-funcs eutils
8
9 # from 10.8
10 MISC_VER=31
11 SHELL_VER=170
12 # from 10.7.4
13 DEV_VER=55
14 MD_VER=147 # 148 in 10.8 has no md, bug #428530
15
16 DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Mountain
17 Lion 10.8"
18 HOMEPAGE="http://www.opensource.apple.com/"
19 SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
20 http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
21 http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz
22 http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.c?txt -> adv_cmds-md-${MD_VER}.c
23 http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.1?txt -> adv_cmds-md-${MD_VER}.1"
24
25 LICENSE="BSD"
26 SLOT="0"
27 KEYWORDS="~ppc-macos ~x64-macos ~x86-macos"
28 IUSE=""
29
30 S=${WORKDIR}
31
32 src_prepare() {
33 cd "${S}"/shell_cmds-${SHELL_VER} || die
34 epatch "${FILESDIR}"/${PN}-6-w64.patch
35
36 mkdir -p "${S}"/adv_cmds-${MD_VER}/md || die
37 cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.c \
38 "${S}"/adv_cmds-${MD_VER}/md/md.c || die
39 cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.1 \
40 "${S}"/adv_cmds-${MD_VER}/md/md.1 || die
41 }
42
43 src_compile() {
44 local flags=(
45 ${CFLAGS}
46 -I.
47 -D__FBSDID=__RCSID
48 -Wsystem-headers
49 -Du_int=uint32_t
50 -include stdint.h
51 ${LDFLAGS}
52 )
53
54 local TS=${S}/misc_cmds-${MISC_VER}
55 # tsort is provided by coreutils
56 for t in leave units calendar; do
57 cd "${TS}/${t}"
58 echo "in ${TS}/${t}:"
59 echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
60 $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
61 done
62 # compile cal separately
63 cd "${TS}/ncal"
64 echo "in ${TS}/ncal:"
65 echo "$(tc-getCC) ${flags[@]} -c calendar.c"
66 $(tc-getCC) ${flags[@]} -c calendar.c || die "failed to compile cal"
67 echo "$(tc-getCC) ${flags[@]} -c easter.c"
68 $(tc-getCC) ${flags[@]} -c easter.c || die "failed to compile cal"
69 echo "$(tc-getCC) ${flags[@]} -c ncal.c"
70 $(tc-getCC) ${flags[@]} -c ncal.c || die "failed to compile cal"
71 echo "$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o"
72 $(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
73
74 TS=${S}/shell_cmds-${SHELL_VER}
75 # only pick those tools not provided by coreutils, findutils
76 for t in \
77 apply getopt hostname jot kill killall \
78 lastcomm renice script shlock time whereis;
79 do
80 echo "in ${TS}/${t}:"
81 echo "$(tc-getCC) ${flags[@]} -o ${t} ${t}.c"
82 cd "${TS}/${t}"
83 $(tc-getCC) ${flags[@]} -o ${t} ${t}.c || die "failed to compile $t"
84 done
85 cd "${TS}/w"
86 sed -i -e '/#include <libutil.h>/d' w.c || die
87 echo "in ${TS}/w:"
88 echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
89 $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
90 || die "failed to compile w"
91
92 TS=${S}/developer_cmds-${DEV_VER}
93 # only pick those tools that do not conflict (no ctags and indent)
94 # do not install lorder, mkdep and vgrind as they are a non-prefix-aware
95 # shell scripts
96 # don't install rpcgen, as it is heavily related to the OS it runs
97 # on (and this is the Snow Leopard version)
98 for t in asa hexdump unifdef what ; do
99 echo "in ${TS}/${t}:"
100 cd "${TS}/${t}" || die
101 echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
102 $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
103 done
104
105 TS=${S}/adv_cmds-${MD_VER}
106 for t in md ; do
107 echo "in ${TS}/${t}:"
108 cd "${TS}/${t}" || die
109 echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
110 $(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
111 done
112 }
113
114 src_install() {
115 mkdir -p "${ED}"/bin
116 mkdir -p "${ED}"/usr/bin
117
118 local TS=${S}/misc_cmds-${MISC_VER}
119 for t in leave units calendar ; do
120 cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
121 doman "${TS}/${t}/${t}.1"
122 done
123 # copy cal separately
124 cp "${TS}/ncal/cal" "${ED}"/usr/bin/
125 dosym /usr/bin/cal /usr/bin/ncal
126 doman "${TS}/ncal/ncal.1"
127 dosym /usr/share/man/man1/ncal.1 /usr/share/man/man1/cal.1
128
129 TS=${S}/shell_cmds-${SHELL_VER}
130 for t in \
131 apply getopt jot killall lastcomm \
132 renice script shlock time w whereis;
133 do
134 cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
135 [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1"
136 [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8"
137 done
138 cp "${TS}/w/w" "${ED}"/usr/bin/uptime
139 doman "${TS}/w/uptime.1"
140 for t in hostname kill; do
141 cp "${TS}/${t}/${t}" "${ED}"/bin/
142 doman "${TS}/${t}/${t}.1"
143 done
144
145 TS=${S}/developer_cmds-${DEV_VER}
146 for t in asa hexdump unifdef what ; do
147 cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
148 doman "${TS}/${t}/${t}.1"
149 done
150
151 TS=${S}/adv_cmds-${MD_VER}
152 for t in md ; do
153 cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
154 doman "${TS}/${t}/${t}.1"
155 done
156 }

  ViewVC Help
Powered by ViewVC 1.1.20