/[gentoo-x86]/sys-fs/e2fsprogs/e2fsprogs-1.41.12-r1.ebuild
Gentoo

Contents of /sys-fs/e2fsprogs/e2fsprogs-1.41.12-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sat Jan 4 18:23:38 2014 UTC (3 months, 1 week ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +1 -1 lines
FILE REMOVED
Removed old versions and files

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/e2fsprogs/e2fsprogs-1.41.12-r1.ebuild,v 1.6 2012/05/04 19:09:17 jdhore Exp $
4
5 EAPI="3"
6
7 inherit eutils flag-o-matic multilib toolchain-funcs
8
9 DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
10 HOMEPAGE="http://e2fsprogs.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/e2fsprogs/${P}.tar.gz"
12
13 LICENSE="GPL-2 BSD"
14 SLOT="0"
15 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 -x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
16 IUSE="nls elibc_FreeBSD"
17
18 RDEPEND="~sys-libs/${PN}-libs-${PV}
19 >=sys-apps/util-linux-2.16
20 nls? ( virtual/libintl )"
21 DEPEND="${RDEPEND}
22 nls? ( sys-devel/gettext )
23 virtual/pkgconfig
24 sys-apps/texinfo"
25
26 pkg_setup() {
27 if [[ ! -e ${EROOT}/etc/mtab ]] ; then
28 # add some crap to deal with missing /etc/mtab #217719
29 ewarn "No /etc/mtab file, creating one temporarily"
30 echo "${PN} crap for src_test" > "${EROOT}"/etc/mtab
31 fi
32 }
33
34 src_prepare() {
35 epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
36 epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
37 epatch "${FILESDIR}"/${PN}-1.41.12-getpagesize.patch
38 epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
39 # use symlinks rather than hardlinks
40 sed -i \
41 -e 's:$(LN) -f $(DESTDIR).*/:$(LN_S) -f :' \
42 {e2fsck,misc}/Makefile.in || die
43 epatch "${FILESDIR}"/${P}-darwin-makefile.patch
44 if [[ ${CHOST} == *-mint* ]] ; then
45 epatch "${FILESDIR}"/${PN}-1.41-mint.patch
46 epatch "${FILESDIR}"/${PN}-1.41.12-mint-blkid.patch
47 fi
48 # blargh ... trick e2fsprogs into using e2fsprogs-libs
49 rm -rf doc
50 sed -i -r \
51 -e 's:@LIBINTL@:@LTLIBINTL@:' \
52 -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
53 -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
54 MCONFIG.in || die "muck libs" #122368
55 sed -i -r \
56 -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
57 Makefile.in || die "remove subdirs"
58 sed -i \
59 -e '/^#define _XOPEN/i#define _GNU_SOURCE' \
60 misc/mke2fs.c || die # needs open64() prototype
61
62 # Avoid rebuild
63 touch lib/ss/ss_err.h
64 }
65
66 src_configure() {
67 # Keep the package from doing silly things #261411
68 export VARTEXFONTS=${T}/fonts
69
70 # We want to use the "bsd" libraries while building on Darwin, but while
71 # building on other Gentoo/*BSD we prefer elf-naming scheme.
72 local libtype
73 case ${CHOST} in
74 *-darwin*) libtype=--enable-bsd-shlibs ;;
75 *-mint*) libtype= ;;
76 *) libtype=--enable-elf-shlibs ;;
77 esac
78
79 ac_cv_path_LDCONFIG=: \
80 econf \
81 --with-root-prefix="${EPREFIX}/" \
82 ${libtype} \
83 $(tc-has-tls || echo --disable-tls) \
84 --without-included-gettext \
85 $(use_enable nls) \
86 --disable-libblkid \
87 --disable-libuuid \
88 --disable-fsck \
89 --disable-uuidd
90 if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
91 eerror "INTL sanity check failed, aborting build."
92 eerror "Please post your ${S}/config.log file as an"
93 eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
94 die "Preventing included intl cruft from building"
95 fi
96 }
97
98 src_compile() {
99 emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
100
101 # Build the FreeBSD helper
102 if use elibc_FreeBSD ; then
103 cp "${FILESDIR}"/fsck_ext2fs.c .
104 emake fsck_ext2fs || die
105 fi
106 }
107
108 pkg_preinst() {
109 if [[ -r ${EROOT}/etc/mtab ]] ; then
110 if [[ $(<"${EROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
111 rm -f "${EROOT}"/etc/mtab
112 fi
113 fi
114 }
115
116 src_install() {
117 # need to set root_libdir= manually as any --libdir options in the
118 # econf above (i.e. multilib) will screw up the default #276465
119 emake \
120 STRIP=: \
121 root_libdir="${EPREFIX}/usr/$(get_libdir)" \
122 DESTDIR="${D}" \
123 install install-libs || die
124 dodoc README RELEASE-NOTES
125
126 insinto /etc
127 doins "${FILESDIR}"/e2fsck.conf || die
128
129 # Move shared libraries to /lib/, install static libraries to
130 # /usr/lib/, and install linker scripts to /usr/lib/.
131 set -- "${ED}"/usr/$(get_libdir)/*.a
132 set -- ${@/*\/lib}
133 gen_usr_ldscript -a "${@/.a}"
134
135 if use elibc_FreeBSD ; then
136 # Install helpers for us
137 into /
138 dosbin "${S}"/fsck_ext2fs || die
139 doman "${FILESDIR}"/fsck_ext2fs.8 || die
140
141 # filefrag is linux only
142 rm \
143 "${ED}"/usr/sbin/filefrag \
144 "${ED}"/usr/share/man/man8/filefrag.8 || die
145 fi
146 }

  ViewVC Help
Powered by ViewVC 1.1.20