summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/xnu-headers/xnu-headers-3789.70.16.ebuild')
-rw-r--r--sys-kernel/xnu-headers/xnu-headers-3789.70.16.ebuild45
1 files changed, 45 insertions, 0 deletions
diff --git a/sys-kernel/xnu-headers/xnu-headers-3789.70.16.ebuild b/sys-kernel/xnu-headers/xnu-headers-3789.70.16.ebuild
new file mode 100644
index 000000000000..f9ba384a3ea5
--- /dev/null
+++ b/sys-kernel/xnu-headers/xnu-headers-3789.70.16.ebuild
@@ -0,0 +1,45 @@
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="System headers provided by XNU-${PV}, macOS 10.12.6"
+HOMEPAGE="https://opensource.apple.com/source/xnu"
+SRC_URI="https://opensource.apple.com/tarballs/xnu/xnu-${PV}.tar.gz"
+
+LICENSE="APSL-2"
+SLOT="10.12"
+KEYWORDS="~x64-macos"
+IUSE="+man"
+
+S=${WORKDIR}/xnu-${PV}
+
+src_compile() {
+ : ; # nothing to compile
+}
+
+src_install() {
+ insinto /usr/include
+ doins EXTERNAL_HEADERS/AssertMacros.h EXTERNAL_HEADERS/Availability*.h
+
+ cd bsd || die
+
+ get_datafiles() {
+ local f="$1"/Makefile
+ sed -n -e '/^DATAFILES \?=/,/^$/p' "${f}" \
+ | sed -e '1s/^DATAFILES \?=//' -e '/\s*#/d' \
+ | sed -e 's/\\$//'
+ }
+
+ local d
+ local files
+ for d in 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[*]}
+ doins ${files[@]/#/$d/}
+ done
+
+ use man && doman man/man*/*.[234579]
+}