sys-kernel/xnu-headers: include some more system headers
authorFabian Groffen <grobian@gentoo.org>
Wed, 13 Nov 2019 10:26:13 +0000 (11:26 +0100)
committerFabian Groffen <grobian@gentoo.org>
Thu, 14 Nov 2019 08:52:56 +0000 (09:52 +0100)
Package-Manager: Portage-2.3.76, Repoman-2.3.16
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
sys-kernel/xnu-headers/xnu-headers-3789.70.16-r2.ebuild [moved from sys-kernel/xnu-headers/xnu-headers-3789.70.16-r1.ebuild with 54% similarity]
sys-kernel/xnu-headers/xnu-headers-4570.71.2-r2.ebuild [moved from sys-kernel/xnu-headers/xnu-headers-4570.71.2-r1.ebuild with 54% similarity]
sys-kernel/xnu-headers/xnu-headers-4903.241.1-r2.ebuild [moved from sys-kernel/xnu-headers/xnu-headers-4903.241.1-r1.ebuild with 54% similarity]

similarity index 54%
rename from sys-kernel/xnu-headers/xnu-headers-3789.70.16-r1.ebuild
rename to sys-kernel/xnu-headers/xnu-headers-3789.70.16-r2.ebuild
index 6368a081634a20a885b818d8980cc6e5529bc820..64fd0c53ce05a712d842ae1847056e31c421e478 100644 (file)
@@ -38,24 +38,37 @@ src_compile() {
 src_install() {
        insinto /usr/include
        doins EXTERNAL_HEADERS/AssertMacros.h EXTERNAL_HEADERS/Availability*.h
+       doins libsyscall/wrappers/gethostuuid.h
+       doins -r libsyscall/mach/mach
 
        # generated during src_compile
        insinto /usr/include/sys
        doins syscall.h _posix_availability.h _symbol_aliasing.h
 
-       cd bsd || die
+       pushd bsd > /dev/null || die
+
+       get_files_list() {
+               local s="$1"
+               local f="$2"/Makefile
+               sed -n -e '/^'"${s}"' \?=/,/^$/p' "${f}" \
+                       | sed -e '1s/^'"${s}"' \?=//' -e '/\s*#/d' \
+                       | sed -e 's/\\$//' -e '/^[A-Z]\+ \?=/,/^$/d'
+       }
 
        get_datafiles() {
-               local f="$1"/Makefile
-               sed -n -e '/^DATAFILES \?=/,/^$/p' "${f}" \
-                       | sed -e '1s/^DATAFILES \?=//' -e '/\s*#/d' \
-                       | sed -e 's/\\$//'
+               local entry
+               get_files_list DATAFILES "$@" | while read entry ; do
+                       [[ ${entry} == '${'?*'}' ]] \
+                               && get_files_list ${entry:2:-1} "$@" \
+                               || echo "${entry}"
+               done
        }
 
        local d
        local files
-       for d in i386 machine miscfs/{devfs,specfs,union} net \
-               netinet{,6} netkey nfs sys{,/_types} uuid vfs ; do
+       for d in bsm i386 machine miscfs/{devfs,specfs,union} net \
+               netinet{,6} netkey nfs sys{,/_types} uuid vfs ;
+       do
                insinto /usr/include/${d}
                files=( $(get_datafiles ${d}) )
                einfo "${d}:" ${files[*]}
@@ -63,4 +76,35 @@ src_install() {
        done
 
        use man && doman man/man*/*.[234579]
+
+       popd > /dev/null || die
+
+       pushd osfmk > /dev/null || die
+
+       for d in mach{,/i386,/machine} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       for d in i386 ; do
+               insinto /usr/include/${d}
+               files=( $(get_files_list INSTALL_MD_LIST ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
+
+       pushd libkern > /dev/null || die
+
+       for d in libkern{,/i386,/machine,/c++,/crypto} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
 }
similarity index 54%
rename from sys-kernel/xnu-headers/xnu-headers-4570.71.2-r1.ebuild
rename to sys-kernel/xnu-headers/xnu-headers-4570.71.2-r2.ebuild
index 406e29dca6274e49004ef780aec41ac828e1eed7..706a54fbe08abbe8169fb9e3eb438d4ce3dbac86 100644 (file)
@@ -38,24 +38,37 @@ src_compile() {
 src_install() {
        insinto /usr/include
        doins EXTERNAL_HEADERS/AssertMacros.h EXTERNAL_HEADERS/Availability*.h
+       doins libsyscall/wrappers/gethostuuid.h
+       doins -r libsyscall/mach/mach
 
        # generated during src_compile
        insinto /usr/include/sys
        doins syscall.h _posix_availability.h _symbol_aliasing.h
 
-       cd bsd || die
+       pushd bsd > /dev/null || die
+
+       get_files_list() {
+               local s="$1"
+               local f="$2"/Makefile
+               sed -n -e '/^'"${s}"' \?=/,/^$/p' "${f}" \
+                       | sed -e '1s/^'"${s}"' \?=//' -e '/\s*#/d' \
+                       | sed -e 's/\\$//' -e '/^[A-Z]\+ \?=/,/^$/d'
+       }
 
        get_datafiles() {
-               local f="$1"/Makefile
-               sed -n -e '/^DATAFILES \?=/,/^$/p' "${f}" \
-                       | sed -e '1s/^DATAFILES \?=//' -e '/\s*#/d' \
-                       | sed -e 's/\\$//'
+               local entry
+               get_files_list DATAFILES "$@" | while read entry ; do
+                       [[ ${entry} == '${'?*'}' ]] \
+                               && get_files_list ${entry:2:-1} "$@" \
+                               || echo "${entry}"
+               done
        }
 
        local d
        local files
-       for d in arm i386 machine miscfs/{devfs,specfs,union} net \
-               netinet{,6} netkey nfs sys{,/_types} uuid vfs ; do
+       for d in arm bsm i386 machine miscfs/{devfs,specfs,union} net \
+               netinet{,6} netkey nfs sys{,/_types} uuid vfs ;
+       do
                insinto /usr/include/${d}
                files=( $(get_datafiles ${d}) )
                einfo "${d}:" ${files[*]}
@@ -63,4 +76,35 @@ src_install() {
        done
 
        use man && doman man/man*/*.[234579]
+
+       popd > /dev/null || die
+
+       pushd osfmk > /dev/null || die
+
+       for d in mach{,/arm,/i386,/machine} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       for d in i386 ; do
+               insinto /usr/include/${d}
+               files=( $(get_files_list INSTALL_MD_LIST ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
+
+       pushd libkern > /dev/null || die
+
+       for d in libkern{,/arm,/i386,/machine,/c++,/crypto} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
 }
similarity index 54%
rename from sys-kernel/xnu-headers/xnu-headers-4903.241.1-r1.ebuild
rename to sys-kernel/xnu-headers/xnu-headers-4903.241.1-r2.ebuild
index cfe5c3e1d6c2a68efdf94966facb7208caac6b24..208bdea9b24846dba11513e667609dc214a47878 100644 (file)
@@ -38,24 +38,37 @@ src_compile() {
 src_install() {
        insinto /usr/include
        doins EXTERNAL_HEADERS/AssertMacros.h EXTERNAL_HEADERS/Availability*.h
+       doins libsyscall/wrappers/gethostuuid.h
+       doins -r libsyscall/mach/mach
 
        # generated during src_compile
        insinto /usr/include/sys
        doins syscall.h _posix_availability.h _symbol_aliasing.h
 
-       cd bsd || die
+       pushd bsd > /dev/null || die
+
+       get_files_list() {
+               local s="$1"
+               local f="$2"/Makefile
+               sed -n -e '/^'"${s}"' \?=/,/^$/p' "${f}" \
+                       | sed -e '1s/^'"${s}"' \?=//' -e '/\s*#/d' \
+                       | sed -e 's/\\$//' -e '/^[A-Z]\+ \?=/,/^$/d'
+       }
 
        get_datafiles() {
-               local f="$1"/Makefile
-               sed -n -e '/^DATAFILES \?=/,/^$/p' "${f}" \
-                       | sed -e '1s/^DATAFILES \?=//' -e '/\s*#/d' \
-                       | sed -e 's/\\$//'
+               local entry
+               get_files_list DATAFILES "$@" | while read entry ; do
+                       [[ ${entry} == '${'?*'}' ]] \
+                               && get_files_list ${entry:2:-1} "$@" \
+                               || echo "${entry}"
+               done
        }
 
        local d
        local files
-       for d in arm i386 machine miscfs/{devfs,specfs,union} net \
-               netinet{,6} netkey nfs sys{,/_types} uuid vfs ; do
+       for d in arm bsm i386 machine miscfs/{devfs,specfs,union} net \
+               netinet{,6} netkey nfs sys{,/_types} uuid vfs ;
+       do
                insinto /usr/include/${d}
                files=( $(get_datafiles ${d}) )
                einfo "${d}:" ${files[*]}
@@ -63,4 +76,35 @@ src_install() {
        done
 
        use man && doman man/man*/*.[234579]
+
+       popd > /dev/null || die
+
+       pushd osfmk > /dev/null || die
+
+       for d in mach{,/arm,/i386,/machine} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       for d in i386 ; do
+               insinto /usr/include/${d}
+               files=( $(get_files_list INSTALL_MD_LIST ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
+
+       pushd libkern > /dev/null || die
+
+       for d in libkern{,/arm,/i386,/machine,/c++,/crypto} ; do
+               insinto /usr/include/${d}
+               files=( $(get_datafiles ${d}) )
+               einfo "${d}:" ${files[*]}
+               doins ${files[@]/#/$d/}
+       done
+
+       popd > /dev/null || die
 }