summaryrefslogtreecommitdiff
path: root/sys-libs/libhugetlbfs
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-libs/libhugetlbfs
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-libs/libhugetlbfs')
-rw-r--r--sys-libs/libhugetlbfs/Manifest14
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch135
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch31
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch44
-rw-r--r--sys-libs/libhugetlbfs/files/libhugetlbfs-2.9-build.patch31
-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.19.ebuild148
-rw-r--r--sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild166
-rw-r--r--sys-libs/libhugetlbfs/metadata.xml15
10 files changed, 894 insertions, 0 deletions
diff --git a/sys-libs/libhugetlbfs/Manifest b/sys-libs/libhugetlbfs/Manifest
new file mode 100644
index 000000000000..09c8a8506814
--- /dev/null
+++ b/sys-libs/libhugetlbfs/Manifest
@@ -0,0 +1,14 @@
+AUX libhugetlbfs-2.20-noexec-stack.patch 3513 SHA256 05e23ca6c2386c066c1d7e6a801f0b2e84901c9d94ee889fd7206ad72098bd03 SHA512 b8146512167da9530f107d3db4695d8e1174568c2f10bab41c3c3f8dff27b1357cef409e95cea75fbce177366a84904d80a7f1cfb7653dc6e8e10c0abfd8ef0b WHIRLPOOL 2440080979aca4dc38b14078b7eca168f0e3de535f19c594610ef780b2c481bcf80472c9b761dae9034e8bdfbe284a6f5dff07a7d5083a718d93c36c9fef5c87
+AUX libhugetlbfs-2.6-fixup-testsuite.patch 1231 SHA256 60d0e4a9a3a99e7ceab04f1479e6893403d43cb50bb740e8f2f632b05a2ec523 SHA512 af9ee541ac4a30260e17baab1616cee13fdcc679ae3fdceed29ca6282c12a6b60d24b04bb61e3aa5f42092e017eb3bae59a56fd2b03954e40803f9f6f2cc4f80 WHIRLPOOL c9a803d10b17de076a4a425dc3c5783fc31a51270d98a6e821808263f0fb7f23e688a922bcf62cf78e27f6bae3be0c3268e547bc373a33f8231ecadbf50b2377
+AUX libhugetlbfs-2.6-noexec-stack.patch 1497 SHA256 24de0b668c25568b70c705dbd3e1533c6358ad774ee96720b963ab7cd5226f2f SHA512 8aa87edbd238d28c03c61755480fa2ec6e8454f378f267054d911d26a8b9282ea0ca4d36fe4328205b838ba9a775eb8401316662e022fd673495272296556de4 WHIRLPOOL 360ff3ce07e7a48ad2d0c8aa539f7dc4fe81182100af25abf73fc59fbc6ce2f9af3d9ec60a9fd21fc73a861831507626c44a4478ece0b6f44f056c5c4dfe9606
+AUX libhugetlbfs-2.9-build.patch 1163 SHA256 7814841600b4cbaa67d041e61a42e81c243f73f3d689b09d23744e9c943c0f78 SHA512 d6443875d2dd2e44abfd470ec793b70d0cf5a69931e2c2889a7b204d1c27bc2abc3b0c7149a495845e080cb797b759844c330ad5c467aed7dae0669b7f5b7ff2 WHIRLPOOL 42551cf59b47a0598c04a2321f9ebb1c6177ee561350ac10840ab55588f4adc07372509241c4bd47c7498bb5e786f964ef047bb10b01ad279f771e8be3727fb5
+DIST libhugetlbfs-2.18.tar.gz 181275 SHA256 8c6ed5e884988e0c879a3705455ece153cf805f69cb9c710334e2711acbb6a06 SHA512 6dcdbf571d6a723a40c15e10b24533f16d65f67fe149aa2d25bee48a034d003419d4cf4b6e55fcd385e1214fc4f6b4dda72ba429b9eea9b38be9b1a393528746 WHIRLPOOL da0b17ca4d2a61be919ea47733b3da485714ce29cdc5e854e143ef0e9c0e45517a37649cb056eeeb74efe8c538f566267152aaad5d53ff837a3a15a9e11070cd
+DIST libhugetlbfs-2.19.tar.gz 181504 SHA256 a5ecb6e925ab2e491bcaa4049fbd6484740950da47d474e7af06dfc6bd1f690b SHA512 d21781fe68736eb3bbafeb8f36f4f34d30f290f2f6744b52c1a40161caf2e28b823cd8e9b9c74ec4e6d11f7d398d909f80eb736cc39a64ecc7bf571018bfec7c WHIRLPOOL bd76e6334acd11e55dec790170781aa418a74e4b1bd0007a15c0b65f5c0f4fd977d02eb89d6b16d48b4e4c7fd980ed2bd7ac9a8246179c0480874afe901da851
+DIST libhugetlbfs-2.20.tar.gz 186750 SHA256 feb51a17456e6ec9806e78720d4ae17a1211a5db8c9bb4ae654b7251a3f76166 SHA512 817fca3f8e3b127b9b877e0a03d0a94bf0c3ec481d3becf995986ce6ae0532629c5460100eb9f2ef3452ed59a3b9d3ac8362df8f87b387803c36d35ab7af0902 WHIRLPOOL e6c0244d47cee5966f1a51d7f39ea1cd0f26a7b1698b4471c6813ed9b2f194bc72d4087f62f72f5c2e5d99fcf00226b72b783a993ec39016625106f8ed17baca
+EBUILD libhugetlbfs-2.18.ebuild 3813 SHA256 6ff31b2068128e195f08bacde9c6171f457423b4940f636fba17a4a1ff57c9a2 SHA512 805aa633c2f036bd0d40f183f40169f2becd24c619d0198dfe8c088f97634ffb1c44a4e014a6349e9e11268c4c81f9e5cdc37b585cedecaeff1dd07bf8f6a205 WHIRLPOOL 0b6932e6acfb0f18beef139363d049bc73ff081e912ac5574c50b26ebc804b7970595a18337754d77a46087fb2fbfccb91249848d26b0c5141f26fd7eaddc4b7
+EBUILD libhugetlbfs-2.19-r1.ebuild 4376 SHA256 558dd593924e79beabda68a1822a13d99b73b91c8c2a3252cf05652245950f94 SHA512 874219cb5ee1cc94e66b1ee48ef2c0fdff1c045ec6964b7ad0038134d71c41691f657eca5c0721d5608417dd4b75fe4c63fd52f2fe3d8b9f230bb3dec25e2337 WHIRLPOOL 39edfe78b39734707c3894e85a671aa23c167940cb0e2955959761d0d17ea341a3c90896440132b82412af42fe413e2d554b2aa3f9d98426572e6d7db62842af
+EBUILD libhugetlbfs-2.19.ebuild 3956 SHA256 47c76e38efc0c8bc3fb5bcca6da6194b7f1f4a748ea1dbd050b97452fd8f6ebe SHA512 56f989b031415aa6398b8de29a131bde9e6e3c5c9c659717aeb7ee099af5ef920f1f335156baf58ec24dfa8be63dda9150d7a88298fa04b3c6eaf2416cbbb967 WHIRLPOOL d0fadad5214698c3db8140501cc02bcd1bd06aedab19a5509a359d6fd362255114667f6c4347183907968da99c2963e76590972736072e06ac3bab018344cc62
+EBUILD libhugetlbfs-2.20.ebuild 4461 SHA256 a1969a4712d10ccdaa717541ca63927f660f981899f33cff53db173797931109 SHA512 c8db19646892d790c08abd9e577c96bbfcb52de3e45087782a4019f0f5fffe0311079b5d8e61e96a75e5af56d3e9b0961e6a3d0b43f3d29ecf57c85fc12ce108 WHIRLPOOL 20199c138affb8af2a1c6bdac64371350d77f1915ba935d9e2ddac00d22676bd0d304f01b540e9c1a885e1a704d7e10649efccb66312597f80364b5db5e8d6a7
+MISC ChangeLog 4529 SHA256 63a38b3da64ec59b1554af344133e669b69c3936b8543ec0f3afcf689fae9d91 SHA512 762955da09786c023900dda3f5b61fd52bb3f7c36f679e1987c32567d97aa925bdf0b4b33c6205cc8c2fb278a882901dbe8290ab4d5a0fc7499c40b81ec5c81d WHIRLPOOL 6d33a9685c83d01020077d3928c472188800ccad485bbfc5bd379992c6ce2e2bd9982a0ef06f0e4b0866a51cf87bedb884e2b034dce269684fc0e1d046ede429
+MISC ChangeLog-2015 2477 SHA256 660726369b6c2a892c712f219d7cbfe1d7e6c5e2379a6c8dcea8346c43dcb310 SHA512 2b1c1b3c8634605a3569b1a42391aec26d91a6375c3ce9bdf3ea1f0b010c2b88d60c5904c8790ebbefcc64b9a82901b96d65625dee4de74d559add51af018ae0 WHIRLPOOL 2c2719f6db030e532b0696affaafd8f7271132fe0e63d520a8c2f9abaa86ec35101f8247551f6ee5999d8f93fd73c85ab1b467a4beebcf44b6506b0c48eca1a1
+MISC metadata.xml 484 SHA256 6d777c7cc038e8218eb0db9bb390f5facf45e24c1ef3ffb8e4eb2d8730d02ba0 SHA512 0dee09cbd2ca1a730dbe2a3c62ef1099959ab307c96f3106c483854310430dd59b45a7135a2db56a28684b0a4245898341527b1f67bb335456c8cdc14ae611fd WHIRLPOOL b44a940471183e80679e321a78dfc1c07a19bf1f803b1056119374f2132d386409e6a9fedef0c0f48c5a8bd2926afb6fa6dd2171a7cf019e4be06acdd681aea9
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
new file mode 100644
index 000000000000..04c8baee37b8
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.20-noexec-stack.patch
@@ -0,0 +1,135 @@
+https://github.com/libhugetlbfs/libhugetlbfs/pull/9
+
+From 1c41d751d57a598919c40ab9c27514a98da93273 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Sat, 31 Oct 2009 07:59:57 +0000
+Subject: [PATCH] set noexec markers in the asm file directly
+
+Using -Wl,-z,noexecstack can hide real exec stack issues coming from other
+files, and is a bit unportable. Instead, set proper section markers in the
+assembly files directly. It also means people using the static libraries
+won't have to use -Wl,-z,noexecstack when they link their code.
+---
+ Makefile | 2 +-
+ sys-aarch64elf.S | 4 ++++
+ sys-armelf_linux_eabi.S | 4 ++++
+ sys-elf32ppclinux.S | 4 ++++
+ sys-elf64_s390.S | 4 ++++
+ sys-elf64ppc.S | 4 ++++
+ sys-elf_i386.S | 4 ++++
+ sys-elf_s390.S | 4 ++++
+ sys-elf_x86_64.S | 4 ++++
+ 9 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 73ebad7..ca987d9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,7 +27,7 @@ NODEPTARGETS=<version.h> <clean>
+
+ INSTALL = install
+
+-LDFLAGS += -Wl,-z,noexecstack -ldl
++LDFLAGS += -ldl
+ CFLAGS ?= -O2 -g
+ CFLAGS += -Wall -fPIC
+ CPPFLAGS += -D__LIBHUGETLBFS__
+diff --git a/sys-aarch64elf.S b/sys-aarch64elf.S
+index 54799d3..210558b 100644
+--- a/sys-aarch64elf.S
++++ b/sys-aarch64elf.S
+@@ -32,3 +32,7 @@ direct_syscall:
+ mov x6, x7
+ svc 0x0
+ ret
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-armelf_linux_eabi.S b/sys-armelf_linux_eabi.S
+index dfa7407..265b75d 100644
+--- a/sys-armelf_linux_eabi.S
++++ b/sys-armelf_linux_eabi.S
+@@ -31,3 +31,7 @@ direct_syscall:
+ swi 0x0
+ ldmfd sp!, {r4, r5, r6, r7}
+ bx lr
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf32ppclinux.S b/sys-elf32ppclinux.S
+index 65d8b3f..6ba3f22 100644
+--- a/sys-elf32ppclinux.S
++++ b/sys-elf32ppclinux.S
+@@ -32,3 +32,7 @@ direct_syscall:
+ mr 8,9
+ sc
+ blr
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf64_s390.S b/sys-elf64_s390.S
+index 425a387..5c31899 100644
+--- a/sys-elf64_s390.S
++++ b/sys-elf64_s390.S
+@@ -20,3 +20,7 @@ direct_syscall:
+ lgr %r5,%r6
+ svc 0
+ br %r14
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf64ppc.S b/sys-elf64ppc.S
+index d50f4a6..b57a345 100644
+--- a/sys-elf64ppc.S
++++ b/sys-elf64ppc.S
+@@ -46,3 +46,7 @@ direct_syscall:
+ mr 8,9
+ sc
+ blr
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf_i386.S b/sys-elf_i386.S
+index ab30c8d..6182b3d 100644
+--- a/sys-elf_i386.S
++++ b/sys-elf_i386.S
+@@ -40,3 +40,7 @@ direct_syscall:
+ pop %edi
+ pop %ebp
+ ret
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf_s390.S b/sys-elf_s390.S
+index 40630d1..e6a9a96 100644
+--- a/sys-elf_s390.S
++++ b/sys-elf_s390.S
+@@ -20,3 +20,7 @@ direct_syscall:
+ lr %r5,%r6
+ svc 0
+ br %r14
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+diff --git a/sys-elf_x86_64.S b/sys-elf_x86_64.S
+index 6af06ad..561f49b 100644
+--- a/sys-elf_x86_64.S
++++ b/sys-elf_x86_64.S
+@@ -32,3 +32,7 @@ direct_syscall:
+ mov 0x8(%rsp),%r9
+ syscall
+ retq
++
++#if defined(__linux__) && defined(__ELF__)
++ .section .note.GNU-stack,"",%progbits
++#endif
+--
+2.6.2
+
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
new file mode 100644
index 000000000000..12548a884a6f
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-fixup-testsuite.patch
@@ -0,0 +1,31 @@
+diff -Nuar --exclude '*.S' --exclude Makefile libhugetlbfs-2.6.orig/tests/run_tests.py libhugetlbfs-2.6/tests/run_tests.py
+--- libhugetlbfs-2.6.orig/tests/run_tests.py 2009-08-24 05:56:07.000000000 -0700
++++ libhugetlbfs-2.6/tests/run_tests.py 2009-10-31 00:40:28.520387427 -0700
+@@ -56,6 +56,11 @@
+ local_env["LD_LIBRARY_PATH"] = "../obj%d:obj%d:%s" \
+ % (bits, bits, local_env.get("LD_LIBRARY_PATH", ""))
+ local_env["HUGETLB_DEFAULT_PAGE_SIZE"] = repr(pagesize)
++ if isinstance(cmd, types.StringType):
++ cmd = 'obj%d/%s' % (bits, cmd)
++ else:
++ s = 'obj%d/%s' % (bits, cmd[0])
++ cmd = (s,)+(cmd[1:])
+
+ p = subprocess.Popen(cmd, env=local_env, stdout=subprocess.PIPE)
+ try:
+@@ -523,10 +528,11 @@
+ elfshare_test("linkshare")
+ elflink_and_share_test("linkhuge")
+
+- # elflink_rw tests
+- elflink_rw_test("linkhuge_rw")
+- # elflink_rw sharing tests
+- elflink_rw_and_share_test("linkhuge_rw")
++ if 32 in wordsizes:
++ # elflink_rw tests
++ elflink_rw_test("linkhuge_rw")
++ # elflink_rw sharing tests
++ elflink_rw_and_share_test("linkhuge_rw")
+
+ # Accounting bug tests
+ # reset free hpages because sharing will have held some
diff --git a/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
new file mode 100644
index 000000000000..bf964cda7a68
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.6-noexec-stack.patch
@@ -0,0 +1,44 @@
+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/files/libhugetlbfs-2.9-build.patch b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.9-build.patch
new file mode 100644
index 000000000000..827e2a58d101
--- /dev/null
+++ b/sys-libs/libhugetlbfs/files/libhugetlbfs-2.9-build.patch
@@ -0,0 +1,31 @@
+--- Makefile.orig 2010-08-13 20:14:18.000000000 -0400
++++ Makefile 2010-08-13 20:14:42.000000000 -0400
+@@ -314,24 +314,24 @@
+ $(BIN_OBJ_DIR)/hugectl: $(BIN_OBJ_DIR)/hugectl.o
+ @$(VECHO) LDHOST $@
+ mkdir -p $(BIN_OBJ_DIR)
+- $(CCBIN) $(CPPFLAGS) $(CFLAGS) -o $@ $^
++ $(CCBIN) $(CPPFLAGS) $(CFLAGS) -o $@ $^ $(LDFLAGS)
+
+ $(BIN_OBJ_DIR)/hugeedit: $(BIN_OBJ_DIR)/hugeedit.o
+ @$(VECHO) LDHOST $@
+ mkdir -p $(BIN_OBJ_DIR)
+- $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^
++ $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^ $(LDFLAGS)
+
+ HUGEADM_OBJ=hugeadm.o libhugetlbfs_privutils.a
+ $(BIN_OBJ_DIR)/hugeadm: $(foreach file,$(HUGEADM_OBJ),$(BIN_OBJ_DIR)/$(file))
+ @$(VECHO) LDHOST $@
+ mkdir -p $(BIN_OBJ_DIR)
+- $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^
++ $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^ $(LDFLAGS)
+
+ PAGESIZE_OBJ=pagesize.o libhugetlbfs_privutils.a
+ $(BIN_OBJ_DIR)/pagesize: $(foreach file,$(PAGESIZE_OBJ),$(BIN_OBJ_DIR)/$(file))
+ @$(VECHO) LDHOST $@
+ mkdir -p $(BIN_OBJ_DIR)
+- $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^
++ $(CCBIN) $(CPPFLAGS) $(CFLAGS) $(LIBPATHS) -o $@ $^ $(LDFLAGS)
+
+ clean:
+ @$(VECHO) CLEAN
diff --git a/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
new file mode 100644
index 000000000000..3725a9c49750
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.18.ebuild
@@ -0,0 +1,146 @@
+# 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
new file mode 100644
index 000000000000..030f4c4f9894
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19-r1.ebuild
@@ -0,0 +1,164 @@
+# 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.19.ebuild
new file mode 100644
index 000000000000..07b65a2775a2
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.19.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2015 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="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="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.20.ebuild b/sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild
new file mode 100644
index 000000000000..c3c800361c4d
--- /dev/null
+++ b/sys-libs/libhugetlbfs/libhugetlbfs-2.20.ebuild
@@ -0,0 +1,166 @@
+# 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="https://github.com/libhugetlbfs/libhugetlbfs/archive/${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~s390 ~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.20-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
+
+ # Tarballs from github don't have the version set.
+ # https://github.com/libhugetlbfs/libhugetlbfs/issues/7
+ [[ -f version ]] || echo "${PV}" > version
+}
+
+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/metadata.xml b/sys-libs/libhugetlbfs/metadata.xml
new file mode 100644
index 000000000000..534f22e29cc0
--- /dev/null
+++ b/sys-libs/libhugetlbfs/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+</maintainer>
+<use>
+ <flag name="perl">Install the cpupcstat tool and some perl modules</flag>
+</use>
+<upstream>
+ <remote-id type="github">libhugetlbfs/libhugetlbfs</remote-id>
+ <remote-id type="sourceforge">libhugetlbfs</remote-id>
+</upstream>
+</pkgmetadata>