Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libhugetlbfs: ChangeLog libhugetlbfs-2.6.ebuild
Date: Sat, 31 Oct 2009 07:59:59
Message-Id: E1N48sO-0001he-Ud@stork.gentoo.org
1 robbat2 09/10/31 07:59:56
2
3 Modified: ChangeLog
4 Added: libhugetlbfs-2.6.ebuild
5 Log:
6 Version bump so it can be used for new memcached fun. src_test needs some work still.
7 (Portage version: 2.2_rc46/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.3 sys-libs/libhugetlbfs/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog?rev=1.3&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog?rev=1.3&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog?r1=1.2&r2=1.3
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog,v
19 retrieving revision 1.2
20 retrieving revision 1.3
21 diff -p -w -b -B -u -u -r1.2 -r1.3
22 --- ChangeLog 5 Feb 2008 21:39:00 -0000 1.2
23 +++ ChangeLog 31 Oct 2009 07:59:56 -0000 1.3
24 @@ -1,6 +1,13 @@
25 # ChangeLog for sys-libs/libhugetlbfs
26 -# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog,v 1.2 2008/02/05 21:39:00 tgall Exp $
28 +# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/ChangeLog,v 1.3 2009/10/31 07:59:56 robbat2 Exp $
30 +
31 +*libhugetlbfs-2.6 (31 Oct 2009)
32 +
33 + 31 Oct 2009; Robin H. Johnson <robbat2@g.o>
34 + +libhugetlbfs-2.6.ebuild, +files/libhugetlbfs-2.6-noexec-stack.patch:
35 + Version bump so it can be used for new memcached fun. src_test needs some
36 + work still.
37
38 *libhugetlbfs-1.2 (5 Feb 2008)
39
40
41
42
43 1.1 sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild?rev=1.1&content-type=text/plain
47
48 Index: libhugetlbfs-2.6.ebuild
49 ===================================================================
50 # Copyright 1999-2009 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-libs/libhugetlbfs/libhugetlbfs-2.6.ebuild,v 1.1 2009/10/31 07:59:56 robbat2 Exp $
53
54 EAPI=2
55 inherit eutils multilib toolchain-funcs
56
57 DESCRIPTION="easy hugepage access"
58 HOMEPAGE="http://libhugetlbfs.ozlabs.org/"
59 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~amd64 ~ppc64 ~x86"
64 IUSE=""
65
66 DEPEND=""
67
68 # testsuite requires specific kernel options, and LOTS of free memory.
69 # with 16GiB of RAM available, I hit swap :-) - robbat2
70 RESTRICT=test
71
72 src_prepare() {
73 epatch "${FILESDIR}"/${PN}-2.6-noexec-stack.patch
74 sed -i \
75 -e '/^PREFIX/s:/local::' \
76 -e '1iBUILDTYPE = NATIVEONLY' \
77 -e '1iV = 1' \
78 -e "/^LIB\(32\)/s:=.*:= $(get_libdir):" \
79 -e '/^CC\(32\|64\)/s:=.*:= $(CC):' \
80 Makefile
81 if [ "$(get_libdir)" == "lib64" ]; then
82 sed -i \
83 -e "/^LIB\(32\)/s:=.*:= lib32:" \
84 Makefile
85 fi
86 }
87
88 src_configure() {
89 :
90 }
91
92 src_compile() {
93 tc-export AR CC
94 emake libs tools || die
95 }
96
97 src_install() {
98 emake install DESTDIR="${D}" || die
99 dodoc HOWTO NEWS README
100 rm "${D}"/usr/bin/oprofile*
101 }
102
103 src_test() {
104 emake tests || die "Failed to build tests"
105 hugeadm='obj/hugeadm'
106 ${hugeadm} --create-mounts
107 PAGESIZES="$(${hugeadm} --page-sizes-all)"
108 MIN_HUGEPAGE_RAM=$((64*1024*1024))
109 ALLOCATED=''
110 for p in ${PAGESIZES} ; do
111 pagecount=$((${MIN_HUGEPAGE_RAM}/${p}))
112 ${hugeadm} \
113 --pool-pages-min ${p}:+${pagecount} \
114 --pool-pages-max ${p}:+${pagecount} \
115 && ALLOCATED="${ALLOCATED} ${p}:${pagecount}" \
116 || die "Failed to set pages"
117 done
118 cd "${S}"/tests
119 TESTOPTS="-t func"
120 case $ARCH in
121 amd64|ppc64)
122 TESTOPTS="${TESTOPTS} -b 64"
123 ;;
124 x86)
125 TESTOPTS="${TESTOPTS} -b 32"
126 ;;
127 esac
128 ./run_tests.py ${TESTOPTS}
129 # TODO: undo the allocation here.
130 for p in ${ALLOCATED} ; do
131 :
132 done
133 }