Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/hardened-dev:musl commit in: sys-fs/e2fsprogs/
Date: Wed, 26 Mar 2014 13:31:09
Message-Id: 1395840685.b89ce619615433c84c037401e95c7709121af015.blueness@gentoo
1 commit: b89ce619615433c84c037401e95c7709121af015
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 25 23:09:15 2014 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 26 13:31:25 2014 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/hardened-dev.git;a=commit;h=b89ce619
7
8 sys-fs/e2fsprogs: version bump for mips
9
10 Package-Manager: portage-2.2.9-r1
11
12 ---
13 sys-fs/e2fsprogs/e2fsprogs-1.42.9-r99.ebuild | 150 +++++++++++++++++++++++++++
14 1 file changed, 150 insertions(+)
15
16 diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.42.9-r99.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.42.9-r99.ebuild
17 new file mode 100644
18 index 0000000..c2993f0
19 --- /dev/null
20 +++ b/sys-fs/e2fsprogs/e2fsprogs-1.42.9-r99.ebuild
21 @@ -0,0 +1,150 @@
22 +# Copyright 1999-2014 Gentoo Foundation
23 +# Distributed under the terms of the GNU General Public License v2
24 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/e2fsprogs/e2fsprogs-1.42.9.ebuild,v 1.2 2014/01/18 05:15:33 vapier Exp $
25 +
26 +EAPI=3
27 +
28 +case ${PV} in
29 +*_pre*) UP_PV="${PV%_pre*}-WIP-${PV#*_pre}" ;;
30 +*) UP_PV=${PV} ;;
31 +esac
32 +
33 +inherit eutils flag-o-matic multilib toolchain-funcs
34 +
35 +DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
36 +HOMEPAGE="http://e2fsprogs.sourceforge.net/"
37 +SRC_URI="mirror://sourceforge/e2fsprogs/${PN}-${UP_PV}.tar.gz"
38 +
39 +LICENSE="GPL-2 BSD"
40 +SLOT="0"
41 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
42 +IUSE="nls static-libs elibc_FreeBSD"
43 +
44 +RDEPEND="~sys-libs/${PN}-libs-${PV}
45 + >=sys-apps/util-linux-2.16
46 + nls? ( virtual/libintl )"
47 +DEPEND="${RDEPEND}
48 + nls? ( sys-devel/gettext )
49 + virtual/pkgconfig
50 + sys-apps/texinfo"
51 +
52 +S=${WORKDIR}/${P%_pre*}
53 +
54 +pkg_setup() {
55 + if [[ ! -e ${EROOT}/etc/mtab ]] ; then
56 + # add some crap to deal with missing /etc/mtab #217719
57 + ewarn "No /etc/mtab file, creating one temporarily"
58 + echo "${PN} crap for src_test" > "${EROOT}"/etc/mtab
59 + fi
60 +}
61 +
62 +src_prepare() {
63 + epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
64 + epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
65 + epatch "${FILESDIR}"/${PN}-1.41.12-darwin-makefile.patch
66 + epatch "${FILESDIR}"/${PN}-1.42.7-use-uint64_t.patch
67 + if [[ ${CHOST} == *-mint* ]] ; then
68 + epatch "${FILESDIR}"/${PN}-1.41-mint.patch
69 + epatch "${FILESDIR}"/${PN}-1.41.12-mint-blkid.patch
70 + fi
71 + # blargh ... trick e2fsprogs into using e2fsprogs-libs
72 + rm -rf doc
73 + sed -i -r \
74 + -e 's:@LIBINTL@:@LTLIBINTL@:' \
75 + -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
76 + -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
77 + MCONFIG.in || die "muck libs" #122368
78 + sed -i -r \
79 + -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
80 + Makefile.in || die "remove subdirs"
81 +
82 + # Avoid rebuild
83 + touch lib/ss/ss_err.h
84 +}
85 +
86 +src_configure() {
87 + # Keep the package from doing silly things #261411
88 + export VARTEXFONTS=${T}/fonts
89 +
90 + # needs open64() prototypes and friends
91 + append-cppflags -D_GNU_SOURCE
92 +
93 + # We want to use the "bsd" libraries while building on Darwin, but while
94 + # building on other Gentoo/*BSD we prefer elf-naming scheme.
95 + local libtype
96 + case ${CHOST} in
97 + *-darwin*) libtype=--enable-bsd-shlibs ;;
98 + *-mint*) libtype= ;;
99 + *) libtype=--enable-elf-shlibs ;;
100 + esac
101 +
102 + ac_cv_path_LDCONFIG=: \
103 + econf \
104 + --with-root-prefix="${EPREFIX}/" \
105 + --enable-symlink-install \
106 + ${libtype} \
107 + $(tc-has-tls || echo --disable-tls) \
108 + --without-included-gettext \
109 + $(use_enable nls) \
110 + --disable-libblkid \
111 + --disable-libuuid \
112 + --disable-quota \
113 + --disable-fsck \
114 + --disable-uuidd
115 + if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
116 + eerror "INTL sanity check failed, aborting build."
117 + eerror "Please post your ${S}/config.log file as an"
118 + eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
119 + die "Preventing included intl cruft from building"
120 + fi
121 +}
122 +
123 +src_compile() {
124 + emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
125 +
126 + # Build the FreeBSD helper
127 + if use elibc_FreeBSD ; then
128 + cp "${FILESDIR}"/fsck_ext2fs.c .
129 + emake fsck_ext2fs || die
130 + fi
131 +}
132 +
133 +pkg_preinst() {
134 + if [[ -r ${EROOT}/etc/mtab ]] ; then
135 + if [[ $(<"${EROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
136 + rm -f "${EROOT}"/etc/mtab
137 + fi
138 + fi
139 +}
140 +
141 +src_install() {
142 + # need to set root_libdir= manually as any --libdir options in the
143 + # econf above (i.e. multilib) will screw up the default #276465
144 + emake \
145 + STRIP=: \
146 + root_libdir="${EPREFIX}/usr/$(get_libdir)" \
147 + DESTDIR="${D}" \
148 + install install-libs || die
149 + dodoc README RELEASE-NOTES
150 +
151 + insinto /etc
152 + doins "${FILESDIR}"/e2fsck.conf || die
153 +
154 + # Move shared libraries to /lib/, install static libraries to
155 + # /usr/lib/, and install linker scripts to /usr/lib/.
156 + gen_usr_ldscript -a e2p ext2fs
157 + # configure doesn't have an option to disable static libs :/
158 + use static-libs || find "${D}" -name '*.a' -delete
159 +
160 + if use elibc_FreeBSD ; then
161 + # Install helpers for us
162 + into /
163 + dosbin "${S}"/fsck_ext2fs || die
164 + doman "${FILESDIR}"/fsck_ext2fs.8 || die
165 +
166 + # filefrag is linux only
167 + rm \
168 + "${ED}"/usr/sbin/filefrag \
169 + "${ED}"/usr/share/man/man8/filefrag.8 || die
170 + fi
171 +}