summaryrefslogtreecommitdiff
path: root/sys-libs/libhugetlbfs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-09-21 18:00:10 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-09-21 18:00:10 +0100
commit265dbe5dbc14c199299496c6db8fce3f76647015 (patch)
treeab18b5617d138f6684566b619405090989d55a2c /sys-libs/libhugetlbfs
parent586819755b4dbfdffdc8a725ab7c0f86095b8489 (diff)
gentoo resync : 21.09.2018
Diffstat (limited to 'sys-libs/libhugetlbfs')
-rw-r--r--sys-libs/libhugetlbfs/Manifest8
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch44
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild146
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild164
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild (renamed from sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild)37
5 files changed, 25 insertions, 374 deletions
diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
index 33731bedf7c1..3e42c146d085 100644
--- a/sys-libs/libhugetlbfs/Manifest
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -1,12 +1,8 @@
AUX libhugetlbfs-2.20-noexec-stack.patch 3513 BLAKE2B b33aa3f5891e1c55c00c61e7d7232504466dc78c6b4d232f64ec5047c45c6044058bdebea02ddb1f67deb20f298e970d96d2fe8a76a017984d46863c179c0924 SHA512 b8146512167da9530f107d3db4695d8e1174568c2f10bab41c3c3f8dff27b1357cef409e95cea75fbce177366a84904d80a7f1cfb7653dc6e8e10c0abfd8ef0b
AUX libhugetlbfs-2.6-fixup-testsuite.patch 1231 BLAKE2B e49ac448b4ac17a6ce9c32543e3ad7391bc8525e147d7a5100ef7ae15e4b0cf48b58ff1fe62d9a0fa61f142b7b8366228974c6628999edaa61d96114371bc09d SHA512 af9ee541ac4a30260e17baab1616cee13fdcc679ae3fdceed29ca6282c12a6b60d24b04bb61e3aa5f42092e017eb3bae59a56fd2b03954e40803f9f6f2cc4f80
-AUX libhugetlbfs-2.6-noexec-stack.patch 1497 BLAKE2B 6098a094db5caa31c4b2761a5d8618de051e2ec986a64448abae43a89e5d1e47579193f4e563f84ae8c694f4ae66902174bfae510bd99e0accdb62f33e3cec2a SHA512 8aa87edbd238d28c03c61755480fa2ec6e8454f378f267054d911d26a8b9282ea0ca4d36fe4328205b838ba9a775eb8401316662e022fd673495272296556de4
AUX libhugetlbfs-2.9-build.patch 1163 BLAKE2B 782c802c12ba86c637fa693dda3d8fb618068f156ccaae5a60623d077997d4dcc7a27e3b2fa4e3b7ec0a34ae8db2e9571bad077de103ca6b65de533b6fc896c9 SHA512 d6443875d2dd2e44abfd470ec793b70d0cf5a69931e2c2889a7b204d1c27bc2abc3b0c7149a495845e080cb797b759844c330ad5c467aed7dae0669b7f5b7ff2
-DIST libhugetlbfs-2.18.tar.gz 181275 BLAKE2B 1f0ca8d73d9bdf05eb08706be4854f110b8cbe5b0c7554fdddb437fc9644e69d0bc42d9d8bedf23bf2dda4901977f093d0f46ed039304f8b5184b2fcac157d47 SHA512 6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746
-DIST libhugetlbfs-2.19.tar.gz 181504 BLAKE2B 27d5e5729e48b82311d6f4317f8c0bb5a04054242bca6fd9745265e2590f18ec49de6a9cdfa7ea28be47f794e91e70c5fcecdb418bf8e8cb0cb5b78d0948e563 SHA512 d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c
DIST libhugetlbfs-2.20.tar.gz 186750 BLAKE2B 758482a41254d6d14795efdfb2959248af2ff00bc6cafbae9b2002b7eaa50921a72ef928910bc0d2061a414e9c73346848eead108af077c96429870c734495aa SHA512 817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902
-EBUILD libhugetlbfs-2.18.ebuild 3813 BLAKE2B 331325608da6512201deab24126759dac306a0cac2824173627b01a4279c7fdebb48f8182d02f69a65706a2b5ac045e3f129569142bfe98142abc3844bc006ae SHA512 805aa633c2f036bd0d40f183f40169f2becd24c619d0198dfe8c088f97634ffb1c44a4e014a6349e9e11268c4c81f9e5cdc37b585cedecaeff1dd07bf8f6a205
-EBUILD libhugetlbfs-2.19-r1.ebuild 4376 BLAKE2B 452f7d21e9b0c948abc217638ffdab083682639189a8e2028be83d14fb4b95959c69962850d1c4cd3646b2ba1a8b40ed7beda87b33109aed60bb402539e664ae SHA512 874219cb5ee1cc94e66b1ee48ef2c0fdff1c045ec6964b7ad0038134d71c41691f657eca5c0721d5608417dd4b75fe4c63fd52f2fe3d8b9f230bb3dec25e2337
-EBUILD libhugetlbfs-2.19.ebuild 3956 BLAKE2B 5a1aba77044c286b8e32c93916cfda7f105b19e96857c6d76a39e3988192543afffa5e2af8b8d4cb955ae109b12a196afc5d12f7e9c74b2cd7a2d093a300f7cc SHA512 56f989b031415aa6398b8de29a131bde9e6e3c5c9c659717aeb7ee099af5ef920f1f335156baf58ec24dfa8be63dda9150d7a88298fa04b3c6eaf2416cbbb967
+DIST libhugetlbfs-2.21.tar.gz 173052 BLAKE2B a65fdeee3ed9ad8cb69f772847646befbf5deef0b82d6cb7338e5ff448d5c2461ceb1e381b9515e79f4243482589bb0203874cc52e5c8c6d98667df4eacffa8b SHA512 87fd95a826bedc2c53b1aa440f5db7ff3ece482d520545b597d4d1231cf84276103c312899b812166872444331bc7b6f1692f0d3b7cbff691efdcf9c2e99b1d0
EBUILD libhugetlbfs-2.20.ebuild 4461 BLAKE2B 4ba750e430f3c3de3282fe628a3229d58af3f2af9ed2f795e5584e967d34b6a3ef5158cd0f29c2f78d5400ed1ddaff391847b3b180687e21957880f03731868e SHA512 c8db19646892d790c08abd9e577c96bbfcb52de3e45087782a4019f0f5fffe0311079b5d8e61e96a75e5af56d3e9b0961e6a3d0b43f3d29ecf57c85fc12ce108
+EBUILD libhugetlbfs-2.21.ebuild 4068 BLAKE2B 903b0db5f72e4926e8185d15bc4ad970fc77926381bdb6ad0205aa9bcbb7fe6a8936f38a4b783d2a418ad0523ca045cca45db7ed1650e892edd58db1f04de233 SHA512 9df56b646c5df82903a03562e7de61b019d3182a9b8d9b24506ad3bd0edf2ba68b4cd00ba5c47410c8f60876d0fe79b360b50d6c40f6a08d9db6c688cfbfc36d
MISC metadata.xml 484 BLAKE2B 8f4e5877068e5af69e5a53695d10c44fbc899eb53f3128c41a4cef162ce3c0213002c169c6d7e89fff6a39126b3e387f565480e1ef2323b354a2c6181ecb8167 SHA512 0dee09cbd2ca1a730dbe2a3c62ef1099959ab307c96f3106c483854310430dd59b45a7135a2db56a28684b0a4245898341527b1f67bb335456c8cdc14ae611fd
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
deleted file mode 100644
index bf964cda7a68..000000000000
--- a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf32ppclinux.S libhugetlbfs-2.6/sys-elf32ppclinux.S
---- libhugetlbfs-2.6.orig/sys-elf32ppclinux.S 2009-08-24 12:56:07.000000000 +0000
-+++ libhugetlbfs-2.6/sys-elf32ppclinux.S 2009-10-31 06:43:49.040319417 +0000
-@@ -32,3 +32,7 @@
- mr 8,9
- sc
- blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+ .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf64ppc.S libhugetlbfs-2.6/sys-elf64ppc.S
---- libhugetlbfs-2.6.orig/sys-elf64ppc.S 2009-08-24 12:56:07.000000000 +0000
-+++ libhugetlbfs-2.6/sys-elf64ppc.S 2009-10-31 06:43:54.303652251 +0000
-@@ -41,3 +41,7 @@
- mr 8,9
- sc
- blr
-+
-+#if defined(__linux__) && defined(__ELF__)
-+ .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf_i386.S libhugetlbfs-2.6/sys-elf_i386.S
---- libhugetlbfs-2.6.orig/sys-elf_i386.S 2009-08-24 12:56:07.000000000 +0000
-+++ libhugetlbfs-2.6/sys-elf_i386.S 2009-10-31 06:43:57.536975670 +0000
-@@ -40,3 +40,7 @@
- pop %edi
- pop %ebp
- ret
-+
-+#if defined(__linux__) && defined(__ELF__)
-+ .section .note.GNU-stack,"",%progbits
-+#endif
-diff -Nuar libhugetlbfs-2.6.orig/sys-elf_x86_64.S libhugetlbfs-2.6/sys-elf_x86_64.S
---- libhugetlbfs-2.6.orig/sys-elf_x86_64.S 2009-08-24 12:56:07.000000000 +0000
-+++ libhugetlbfs-2.6/sys-elf_x86_64.S 2009-10-31 06:44:26.943648847 +0000
-@@ -32,3 +32,7 @@
- mov 0x8(%rsp),%r9
- syscall
- retq
-+
-+#if defined(__linux__) && defined(__ELF__)
-+ .section .note.GNU-stack,"",%progbits
-+#endif
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
deleted file mode 100644
index 3725a9c49750..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2014 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="4"
-
-inherit eutils multilib toolchain-funcs
-
-DESCRIPTION="easy hugepage access"
-HOMEPAGE="http://libhugetlbfs.sourceforge.net/"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="static-libs"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
- epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
- epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
- sed -i \
- -e '/^PREFIX/s:/local::' \
- -e '1iBUILDTYPE = NATIVEONLY' \
- -e '1iV = 1' \
- -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
- -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
- Makefile
- if [ "$(get_libdir)" == "lib64" ]; then
- sed -i \
- -e "/^LIB\(32\)/s:=.*:= lib32:" \
- Makefile
- fi
-}
-
-src_compile() {
- tc-export AR
- emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
- default
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
- rm "${D}"/usr/bin/oprofile* || die
-}
-
-src_test_alloc_one() {
- hugeadm="$1"
- sign="$2"
- pagesize="$3"
- pagecount="$4"
- ${hugeadm} \
- --pool-pages-max ${pagesize}:${sign}${pagecount} \
- && \
- ${hugeadm} \
- --pool-pages-min ${pagesize}:${sign}${pagecount}
- return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
- [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
- einfo "Building testsuite"
- emake -j1 tests || die "Failed to build tests"
-
- hugeadm='obj/hugeadm'
- allocated=''
- rc=0
- # the testcases need 64MiB per pagesize.
- MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
- einfo "Planning allocation"
- PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
- # Need to do this before we can create the mountpoints.
- for pagesize in ${PAGESIZES} ; do
- # The kernel depends on the location :-(
- mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- done
- addwrite /proc/sys/vm/
- addwrite /proc/sys/kernel/shmall
- addwrite /proc/sys/kernel/shmmax
- addwrite /proc/sys/kernel/shmmni
-
- einfo "Checking HugeTLB mountpoints"
- ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
-
- # -----------------------------------------------------
- # --------- die is unsafe after this point. -----------
- # -----------------------------------------------------
-
- einfo "Starting allocation"
- for pagesize in ${PAGESIZES} ; do
- pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
- einfo " ${pagecount} @ ${pagesize}"
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
- rc=$?
- if [[ $rc -eq 0 ]]; then
- allocated="${allocated} ${pagesize}:${pagecount}"
- else
- eerror "Failed to add ${pagecount} pages of size ${pagesize}"
- fi
- done
-
- einfo "Allocation status"
- ${hugeadm} --pool-list
-
- if [[ -n "${allocated}" ]]; then
- # All our allocations worked, so time to run.
- einfo "Starting tests"
- cd "${S}"/tests
- TESTOPTS="-t func"
- case $ARCH in
- amd64|ppc64)
- TESTOPTS="${TESTOPTS} -b 64"
- ;;
- x86)
- TESTOPTS="${TESTOPTS} -b 32"
- ;;
- esac
- # This needs a bit of work to give a nice exit code still.
- ./run_tests.py ${TESTOPTS}
- rc=$?
- else
- eerror "Failed to make HugeTLB allocations."
- rc=1
- fi
-
- einfo "Cleaning up memory"
- cd "${S}"
- # Cleanup memory allocation
- for alloc in ${allocated} ; do
- pagesize="${alloc/:*}"
- pagecount="${alloc/*:}"
- einfo " ${pagecount} @ ${pagesize}"
- src_test_alloc_one "$hugeadm" "-" "${pagesize}" "${pagecount}"
- done
-
- # ---------------------------------------------------------
- # --------- die is safe again after this point. -----------
- # ---------------------------------------------------------
-
- return $rc
-}
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
deleted file mode 100644
index 030f4c4f9894..000000000000
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
+++ /dev/null
@@ -1,164 +0,0 @@
-# Copyright 1999-2015 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-PYTHON_COMPAT=( python2_7 )
-
-inherit eutils multilib toolchain-funcs perl-functions python-any-r1
-
-DESCRIPTION="easy hugepage access"
-HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-# Switch to github tarball w/next release.
-#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="perl static-libs test"
-
-DEPEND="test? ( ${PYTHON_DEPS} )"
-RDEPEND="perl? ( dev-lang/perl:= )"
-
-src_prepare() {
- perl_set_version
-
- epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
- epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
- epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
- sed -i \
- -e '/^PREFIX/s:/local::' \
- -e '1iBUILDTYPE = NATIVEONLY' \
- -e '1iV = 1' \
- -e '/gzip.*MANDIR/d' \
- -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
- -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
- -e "/^PMDIR = .*\/perl5\/TLBC/s::PMDIR = ${VENDOR_LIB}\/TLBC:" \
- Makefile || die "sed failed"
- if [ "$(get_libdir)" == "lib64" ]; then
- sed -i \
- -e "/^LIB\(32\)/s:=.*:= lib32:" \
- Makefile
- fi
-}
-
-src_compile() {
- tc-export AR
- emake CC="$(tc-getCC)" libs tools
-}
-
-src_install() {
- default
- use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
- rm "${ED}"/usr/bin/oprofile* || die
- if ! use perl ; then
- rm -r \
- "${ED}"/usr/bin/cpupcstat \
- "${ED}"/usr/share/man/man8/cpupcstat.8 \
- "${ED}/${VENDOR_LIB}" \
- || die
- fi
-}
-
-src_test_alloc_one() {
- hugeadm="$1"
- sign="$2"
- pagesize="$3"
- pagecount="$4"
- ${hugeadm} \
- --pool-pages-max ${pagesize}:${sign}${pagecount} \
- && \
- ${hugeadm} \
- --pool-pages-min ${pagesize}:${sign}${pagecount}
- return $?
-}
-
-# die is NOT allowed in this src_test block after the marked point, so that we
-# can clean up memory allocation. You'll leak at LEAST 64MiB per run otherwise.
-src_test() {
- [[ $UID -eq 0 ]] || die "Need FEATURES=-userpriv to run this testsuite"
- einfo "Building testsuite"
- emake -j1 tests || die "Failed to build tests"
-
- hugeadm='obj/hugeadm'
- allocated=''
- rc=0
- # the testcases need 64MiB per pagesize.
- MIN_HUGEPAGE_RAM=$((64*1024*1024))
-
- einfo "Planning allocation"
- PAGESIZES="$(${hugeadm} --page-sizes-all)"
-
- # Need to do this before we can create the mountpoints.
- for pagesize in ${PAGESIZES} ; do
- # The kernel depends on the location :-(
- mkdir -p /var/lib/hugetlbfs/pagesize-${pagesize}
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- done
- addwrite /proc/sys/vm/
- addwrite /proc/sys/kernel/shmall
- addwrite /proc/sys/kernel/shmmax
- addwrite /proc/sys/kernel/shmmni
-
- einfo "Checking HugeTLB mountpoints"
- ${hugeadm} --create-mounts || die "Failed to set up hugetlb mountpoints."
-
- # -----------------------------------------------------
- # --------- die is unsafe after this point. -----------
- # -----------------------------------------------------
-
- einfo "Starting allocation"
- for pagesize in ${PAGESIZES} ; do
- pagecount=$((${MIN_HUGEPAGE_RAM}/${pagesize}))
- einfo " ${pagecount} @ ${pagesize}"
- addwrite /var/lib/hugetlbfs/pagesize-${pagesize}
- src_test_alloc_one "$hugeadm" "+" "${pagesize}" "${pagecount}"
- rc=$?
- if [[ $rc -eq 0 ]]; then
- allocated="${allocated} ${pagesize}:${pagecount}"
- else
- eerror "Failed to add ${pagecount} pages of size ${pagesize}"
- fi
- done
-
- einfo "Allocation status"
- ${hugeadm} --pool-list
-
- if [[ -n "${allocated}" ]]; then
- # All our allocations worked, so time to run.
- einfo "Starting tests"
- cd "${S}"/tests
- TESTOPTS="-t func"
- case $ARCH in
- amd64|ppc64)
- TESTOPTS="${TESTOPTS} -b 64"
- ;;
- x86)
- TESTOPTS="${TESTOPTS} -b 32"
- ;;
- esac
- # This needs a bit of work to give a nice exit code still.
- ./run_tests.py ${TESTOPTS}
- rc=$?
- else
- eerror "Failed to make HugeTLB allocations."
- rc=1
- fi
-
- einfo "Cleaning up memory"
- cd "${S}"
- # Cleanup memory allocation
- for alloc in ${allocated} ; do
- pagesize="${alloc/:*}"
- pagecount="${alloc/*:}"
- einfo " ${pagecount} @ ${pagesize}"
- src_test_alloc_one "$hugeadm" "-" "${pagesize}" "${pagecount}"
- done
-
- # ---------------------------------------------------------
- # --------- die is safe again after this point. -----------
- # ---------------------------------------------------------
-
- return $rc
-}
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
index 07b65a2775a2..e7aae65f6050 100644
--- a/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.21.ebuild
@@ -1,37 +1,47 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
+EAPI=6
-inherit eutils multilib toolchain-funcs
+PYTHON_COMPAT=( python2_7 )
+
+inherit multilib toolchain-funcs python-any-r1
DESCRIPTION="easy hugepage access"
HOMEPAGE="https://github.com/libhugetlbfs/libhugetlbfs"
-SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
-# Switch to github tarball w/next release.
-#SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
+SRC_URI="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc64 ~x86"
-IUSE="static-libs"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~x86"
+IUSE="static-libs test"
+
+DEPEND="test? ( ${PYTHON_DEPS} )"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+)
src_prepare() {
- epatch "${FILESDIR}"/${PN}-2.9-build.patch #332517
- epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
- epatch "${FILESDIR}"/${PN}-2.6-fixup-testsuite.patch
+ default
sed -i \
-e '/^PREFIX/s:/local::' \
-e '1iBUILDTYPE = NATIVEONLY' \
-e '1iV = 1' \
+ -e '/gzip.*MANDIR/d' \
-e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
-e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
- Makefile
+ -e 's@^\(ARCH\) ?=@\1 =@' \
+ Makefile || die "sed failed"
if [ "$(get_libdir)" == "lib64" ]; then
sed -i \
-e "/^LIB\(32\)/s:=.*:= lib32:" \
Makefile
fi
+
+ # Tarballs from github don't have the version set.
+ # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
+ [[ -f version ]] || echo "${PV}" > version
}
src_compile() {
@@ -41,8 +51,7 @@ src_compile() {
src_install() {
default
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.a
- rm "${D}"/usr/bin/oprofile* || die
+ use static-libs || rm -f "${ED%/}"/usr/$(get_libdir)/*.a
}
src_test_alloc_one() {