3 |
3 |
|
4 |
4 |
EAPI="6"
|
5 |
5 |
|
6 |
|
inherit toolchain-funcs epatch
|
|
6 |
inherit toolchain-funcs
|
7 |
7 |
|
8 |
|
# from 10.8
|
9 |
|
MISC_VER=31
|
10 |
|
SHELL_VER=170
|
|
8 |
# from macOS 10.12
|
|
9 |
MISC_VER=33
|
|
10 |
SHELL_VER=198
|
|
11 |
# from DT 8.1
|
|
12 |
DEV_VER=63
|
11 |
13 |
# from 10.7.4
|
12 |
|
DEV_VER=55
|
13 |
14 |
MD_VER=147 # 148 in 10.8 has no md, bug #428530
|
14 |
15 |
|
15 |
|
DESCRIPTION="Miscellaneous commands used on Darwin/Mac OS X systems, Mountain
|
16 |
|
Lion 10.8"
|
17 |
|
HOMEPAGE="http://www.opensource.apple.com/"
|
18 |
|
SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/misc_cmds-${MISC_VER}.tar.gz
|
19 |
|
http://www.opensource.apple.com/darwinsource/tarballs/other/shell_cmds-${SHELL_VER}.tar.gz
|
20 |
|
http://www.opensource.apple.com/darwinsource/tarballs/other/developer_cmds-${DEV_VER}.tar.gz
|
21 |
|
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.c?txt -> adv_cmds-md-${MD_VER}.c
|
22 |
|
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.1?txt -> adv_cmds-md-${MD_VER}.1"
|
|
16 |
DESCRIPTION="Miscellaneous commands used on macOS, Sierra 10.12"
|
|
17 |
HOMEPAGE="https://www.opensource.apple.com/"
|
|
18 |
SRC_URI="https://opensource.apple.com/tarballs/misc_cmds/misc_cmds-${MISC_VER}.tar.gz
|
|
19 |
https://opensource.apple.com/tarballs/shell_cmds/shell_cmds-${SHELL_VER}.tar.gz
|
|
20 |
https://opensource.apple.com/tarballs/developer_cmds/developer_cmds-${DEV_VER}.tar.gz
|
|
21 |
https://opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.c -> adv_cmds-md-${MD_VER}.c
|
|
22 |
https://opensource.apple.com/source/adv_cmds/adv_cmds-${MD_VER}/md/md.1 -> adv_cmds-md-${MD_VER}.1"
|
23 |
23 |
|
24 |
24 |
LICENSE="BSD"
|
25 |
25 |
SLOT="0"
|
... | ... | |
30 |
30 |
|
31 |
31 |
src_prepare() {
|
32 |
32 |
cd "${S}"/shell_cmds-${SHELL_VER} || die
|
33 |
|
epatch "${FILESDIR}"/${PN}-6-w64.patch
|
|
33 |
eapply "${FILESDIR}"/${PN}-6-w64.patch
|
34 |
34 |
|
35 |
35 |
mkdir -p "${S}"/adv_cmds-${MD_VER}/md || die
|
36 |
36 |
cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.c \
|
... | ... | |
53 |
53 |
)
|
54 |
54 |
|
55 |
55 |
local TS=${S}/misc_cmds-${MISC_VER}
|
56 |
|
# tsort is provided by corepatch
|
|
56 |
# tsort is provided by coreutils
|
57 |
57 |
for t in leave units calendar; do
|
58 |
58 |
cd "${TS}/${t}"
|
59 |
59 |
echo "in ${TS}/${t}:"
|
... | ... | |
73 |
73 |
$(tc-getCC) ${flags[@]} -o cal calendar.o easter.o ncal.o || die "failed to compile cal"
|
74 |
74 |
|
75 |
75 |
TS=${S}/shell_cmds-${SHELL_VER}
|
76 |
|
# only pick those tools not provided by corepatch, findutils
|
|
76 |
# only pick those tools not provided by coreutils, findutils
|
77 |
77 |
for t in \
|
78 |
|
apply getopt hostname jot kill killall \
|
|
78 |
apply getopt hexdump hostname jot kill killall \
|
79 |
79 |
lastcomm renice script shlock time whereis;
|
80 |
80 |
do
|
81 |
81 |
echo "in ${TS}/${t}:"
|
82 |
|
echo "$(tc-getCC) ${flags[@]} -o ${t} ${t}.c"
|
|
82 |
echo "$(tc-getCC) ${flags[@]} -o ${t} *.c"
|
83 |
83 |
cd "${TS}/${t}"
|
84 |
|
$(tc-getCC) ${flags[@]} -o ${t} ${t}.c || die "failed to compile $t"
|
|
84 |
$(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
|
85 |
85 |
done
|
86 |
86 |
cd "${TS}/w"
|
87 |
87 |
sed -i -e '/#include <libutil.h>/d' w.c || die
|
88 |
88 |
echo "in ${TS}/w:"
|
89 |
|
echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c"
|
90 |
|
$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w w.c pr_time.c proc_compare.c \
|
|
89 |
echo "$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w *.c"
|
|
90 |
$(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 -lresolv -o w *.c \
|
91 |
91 |
|| die "failed to compile w"
|
92 |
92 |
|
93 |
93 |
TS=${S}/developer_cmds-${DEV_VER}
|
... | ... | |
95 |
95 |
# do not install lorder, mkdep and vgrind as they are a non-prefix-aware
|
96 |
96 |
# shell scripts
|
97 |
97 |
# don't install rpcgen, as it is heavily related to the OS it runs
|
98 |
|
# on (and this is the Snow Leopard version)
|
99 |
|
for t in asa hexdump unifdef what ; do
|
|
98 |
# on (and this is the Sierra version)
|
|
99 |
for t in asa unifdef what ; do
|
100 |
100 |
echo "in ${TS}/${t}:"
|
101 |
101 |
cd "${TS}/${t}" || die
|
102 |
102 |
echo "$(tc-getCC) ${flags[@]} -o ${t}" *.c
|
103 |
103 |
$(tc-getCC) ${flags[@]} -o ${t} *.c || die "failed to compile $t"
|
104 |
104 |
done
|
105 |
105 |
|
|
106 |
# provide this one for gcc-apple
|
106 |
107 |
TS=${S}/adv_cmds-${MD_VER}
|
107 |
108 |
for t in md ; do
|
108 |
109 |
echo "in ${TS}/${t}:"
|
... | ... | |
129 |
130 |
|
130 |
131 |
TS=${S}/shell_cmds-${SHELL_VER}
|
131 |
132 |
for t in \
|
132 |
|
apply getopt jot killall lastcomm \
|
|
133 |
apply getopt hexdump hostname jot killall lastcomm \
|
133 |
134 |
renice script shlock time w whereis;
|
134 |
135 |
do
|
135 |
136 |
cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
|
... | ... | |
144 |
145 |
done
|
145 |
146 |
|
146 |
147 |
TS=${S}/developer_cmds-${DEV_VER}
|
147 |
|
for t in asa hexdump unifdef what ; do
|
|
148 |
for t in asa unifdef what ; do
|
148 |
149 |
cp "${TS}/${t}/${t}" "${ED}"/usr/bin/
|
149 |
150 |
doman "${TS}/${t}/${t}.1"
|
150 |
151 |
done
|