diff options
Diffstat (limited to 'sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild')
-rw-r--r-- | sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild | 96 |
1 files changed, 20 insertions, 76 deletions
diff --git a/sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild b/sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild index 5762a7cf8207..c8f3e71d0567 100644 --- a/sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild +++ b/sys-apps/darwin-miscutils/darwin-miscutils-12-r1.ebuild @@ -5,27 +5,20 @@ EAPI=8 inherit edo toolchain-funcs -# from macOS 10.13 -MISC_VER=34 -SHELL_VER=203 # from DT 8.2.1 DEV_VER=63 # from 10.7.4 MD_VER=147 # adv_cmds-148 in 10.8 has no md, bug #428530 DESCRIPTION="Miscellaneous commands used on macOS, High Sierra 10.13" -HOMEPAGE=" - https://www.opensource.apple.com/ - https://github.com/apple-oss-distributions" +HOMEPAGE="https://github.com/apple-oss-distributions" SRC_URI=" https://github.com/apple-oss-distributions/adv_cmds/blob/c8dbac91aa855b2d05282f45709b318f8bc3693d/md/md.1 \ -> adv_cmds-md-${MD_VER}.1 https://github.com/apple-oss-distributions/adv_cmds/blob/c8dbac91aa855b2d05282f45709b318f8bc3693d/md/md.c \ -> adv_cmds-md-${MD_VER}.c https://642666.bugs.gentoo.org/attachment.cgi?id=511988 -> adv_cmds-md-${MD_VER}-compile.patch - https://opensource.apple.com/tarballs/misc_cmds/misc_cmds-${MISC_VER}.tar.gz - https://opensource.apple.com/tarballs/shell_cmds/shell_cmds-${SHELL_VER}.tar.gz - https://opensource.apple.com/tarballs/developer_cmds/developer_cmds-${DEV_VER}.tar.gz" + https://github.com/apple-oss-distributions/developer_cmds/archive/refs/tags/developer_cmds-${DEV_VER}.tar.gz" S="${WORKDIR}" LICENSE="BSD" @@ -33,25 +26,23 @@ SLOT="0" KEYWORDS="~arm64-macos ~ppc-macos ~x64-macos" # for ncal -DEPEND="sys-libs/ncurses:=" +DEPEND="" RDEPEND="${DEPEND}" src_prepare() { - cd "${S}"/shell_cmds-${SHELL_VER} || die - eapply "${FILESDIR}"/${PN}-6-w64.patch - mkdir -p "${S}"/adv_cmds-${MD_VER}/md || die cd "${S}"/adv_cmds-${MD_VER} || die cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.c md/md.c || die cp "${DISTDIR}"/adv_cmds-md-${MD_VER}.1 md/md.1 || die - eapply "${DISTDIR}"/adv_cmds-md-${MD_VER}-compile.patch - eapply "${FILESDIR}"/${PN}-12-md-register.patch + eapply "${FILESDIR}"/${PN}-12-md-modern-c.patch cd "${S}" || die eapply_user } src_compile() { + local t + local TS local flags=( ${CFLAGS} -I. @@ -60,38 +51,17 @@ src_compile() { -include stdint.h ) - local TS="${S}/misc_cmds-${MISC_VER}" - local t - # tsort is provided by coreutils - for t in leave units calendar; do - cd "${TS}/${t}" || die - echo "in ${TS}/${t}:" - edo $(tc-getCC) ${flags[@]} -o ${t} ${LDFLAGS} *.c - done - # compile cal separately - cd "${TS}/ncal" || die - echo "in ${TS}/ncal:" - edo $(tc-getCC) ${flags[@]} -c calendar.c - edo $(tc-getCC) ${flags[@]} -c easter.c - edo $(tc-getCC) ${flags[@]} -c ncal.c - edo $(tc-getCC) -o cal ${LDFLAGS} -lncurses calendar.o easter.o ncal.o - - TS="${S}/shell_cmds-${SHELL_VER}" - # only pick those tools not provided by coreutils, findutils - for t in \ - apply getopt hexdump hostname jot kill killall \ - lastcomm renice script shlock time whereis; - do - echo "in ${TS}/${t}:" - cd "${TS}/${t}" || die - edo $(tc-getCC) ${flags[@]} -o ${t} ${LDFLAGS} *.c - done - cd "${TS}/w" || die - sed -i -e '/#include <libutil.h>/d' w.c || die - echo "in ${TS}/w:" - edo $(tc-getCC) ${flags[@]} -DHAVE_UTMPX=1 ${LDFLAGS} -lresolv -o w *.c - - TS="${S}/developer_cmds-${DEV_VER}" + # grobian 2024-04-07: + # removed most tools here that are provided by host as well, but + # newer versions, and they are in no way critical, but better + # figured out by Apple (e.g. tools like w/uptime and hostname) + # what's left here is developer tools that GCC interacts with + # tools from developer_cmds we could probably loose, but they've + # always worked up sofar, and they are needed on old targets + # (Darwin9) most likely, so keep them. md is just plain missing, so + # keep it in any case + + TS="${S}/developer_cmds-developer_cmds-${DEV_VER}" # new github archives # only pick those tools that do not conflict (no ctags and indent) # do not install lorder, mkdep and vgrind as they are a non-prefix-aware # shell scripts @@ -113,37 +83,11 @@ src_compile() { } src_install() { - mkdir -p "${ED}"/{,usr/}bin || die - - local TS="${S}/misc_cmds-${MISC_VER}" local t - for t in leave units calendar ; do - cp "${TS}/${t}/${t}" "${ED}"/usr/bin/ || die - doman "${TS}/${t}/${t}.1" - done - # copy cal separately - cp "${TS}/ncal/cal" "${ED}"/usr/bin/ncal || die - dosym ncal /usr/bin/cal - doman "${TS}/ncal/ncal.1" - dosym ncal.1 /usr/share/man/man1/cal.1 - - TS="${S}/shell_cmds-${SHELL_VER}" - for t in \ - apply getopt hexdump hostname jot killall lastcomm \ - renice script shlock time w whereis; - do - cp "${TS}/${t}/${t}" "${ED}"/usr/bin/ || die - [[ -f "${TS}/${t}/${t}.1" ]] && doman "${TS}/${t}/${t}.1" - [[ -f "${TS}/${t}/${t}.8" ]] && doman "${TS}/${t}/${t}.8" - done - cp "${TS}/w/w" "${ED}"/usr/bin/uptime || die - doman "${TS}/w/uptime.1" - for t in hostname kill; do - cp "${TS}/${t}/${t}" "${ED}"/bin/ || die - doman "${TS}/${t}/${t}.1" - done + local TS + mkdir -p "${ED}"/{,usr/}bin || die - TS="${S}/developer_cmds-${DEV_VER}" + TS="${S}/developer_cmds-developer_cmds-${DEV_VER}" # new github archives for t in asa unifdef what ; do cp "${TS}/${t}/${t}" "${ED}"/usr/bin/ || die doman "${TS}/${t}/${t}.1" |