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

Contents of /sys-fs/e2fsprogs/e2fsprogs-1.42.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Fri May 4 19:09:17 2012 UTC (2 years, 7 months ago) by jdhore
Branch: MAIN
Changes since 1.11: +2 -2 lines
dev-util/pkgconfig -> virtual/pkgconfig

(Portage version: 2.2.0_alpha101/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20