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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Tue May 22 19:45:49 2012 UTC (22 months, 4 weeks ago) by vapier
Branch: MAIN
Version bump #416771 by Samuli Suominen.

(Portage version: 2.2.0_alpha102/cvs/Linux x86_64)

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.1.ebuild,v 1.5 2012/05/04 19:09:17 jdhore 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.40-fbsd.patch
45 epatch "${FILESDIR}"/${PN}-1.42.3-quotactl.patch
46 epatch "${FILESDIR}"/${PN}-1.42.3-quota-time.patch
47 epatch "${FILESDIR}"/${PN}-1.41.12-darwin-makefile.patch
48 if [[ ${CHOST} == *-mint* ]] ; then
49 epatch "${FILESDIR}"/${PN}-1.41-mint.patch
50 epatch "${FILESDIR}"/${PN}-1.41.12-mint-blkid.patch
51 fi
52 # blargh ... trick e2fsprogs into using e2fsprogs-libs
53 rm -rf doc
54 sed -i -r \
55 -e 's:@LIBINTL@:@LTLIBINTL@:' \
56 -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
57 -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
58 MCONFIG.in || die "muck libs" #122368
59 sed -i -r \
60 -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
61 Makefile.in || die "remove subdirs"
62
63 # Avoid rebuild
64 touch lib/ss/ss_err.h
65 }
66
67 src_configure() {
68 # Keep the package from doing silly things #261411
69 export VARTEXFONTS=${T}/fonts
70
71 # needs open64() prototypes and friends
72 append-cppflags -D_GNU_SOURCE
73
74 # We want to use the "bsd" libraries while building on Darwin, but while
75 # building on other Gentoo/*BSD we prefer elf-naming scheme.
76 local libtype
77 case ${CHOST} in
78 *-darwin*) libtype=--enable-bsd-shlibs ;;
79 *-mint*) libtype= ;;
80 *) libtype=--enable-elf-shlibs ;;
81 esac
82
83 ac_cv_path_LDCONFIG=: \
84 econf \
85 --with-root-prefix="${EPREFIX}/" \
86 --enable-symlink-install \
87 ${libtype} \
88 $(tc-has-tls || echo --disable-tls) \
89 --without-included-gettext \
90 $(use_enable nls) \
91 --disable-libblkid \
92 --disable-libuuid \
93 --disable-quota \
94 --disable-fsck \
95 --disable-uuidd
96 if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
97 eerror "INTL sanity check failed, aborting build."
98 eerror "Please post your ${S}/config.log file as an"
99 eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
100 die "Preventing included intl cruft from building"
101 fi
102 }
103
104 src_compile() {
105 emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
106
107 # Build the FreeBSD helper
108 if use elibc_FreeBSD ; then
109 cp "${FILESDIR}"/fsck_ext2fs.c .
110 emake fsck_ext2fs || die
111 fi
112 }
113
114 pkg_preinst() {
115 if [[ -r ${EROOT}/etc/mtab ]] ; then
116 if [[ $(<"${EROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
117 rm -f "${EROOT}"/etc/mtab
118 fi
119 fi
120 }
121
122 src_install() {
123 # need to set root_libdir= manually as any --libdir options in the
124 # econf above (i.e. multilib) will screw up the default #276465
125 emake \
126 STRIP=: \
127 root_libdir="${EPREFIX}/usr/$(get_libdir)" \
128 DESTDIR="${D}" \
129 install install-libs || die
130 dodoc README RELEASE-NOTES
131
132 insinto /etc
133 doins "${FILESDIR}"/e2fsck.conf || die
134
135 # Move shared libraries to /lib/, install static libraries to
136 # /usr/lib/, and install linker scripts to /usr/lib/.
137 gen_usr_ldscript -a e2p ext2fs
138 # configure doesn't have an option to disable static libs :/
139 use static-libs || find "${D}" -name '*.a' -delete
140
141 if use elibc_FreeBSD ; then
142 # Install helpers for us
143 into /
144 dosbin "${S}"/fsck_ext2fs || die
145 doman "${FILESDIR}"/fsck_ext2fs.8 || die
146
147 # filefrag is linux only
148 rm \
149 "${ED}"/usr/sbin/filefrag \
150 "${ED}"/usr/share/man/man8/filefrag.8 || die
151 fi
152 }

  ViewVC Help
Powered by ViewVC 1.1.20