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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Jun 14 00:58:29 2012 UTC (2 years, 4 months ago) by vapier
Branch: MAIN
Version bump #420925 by Sergei Trofimovich.

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

  ViewVC Help
Powered by ViewVC 1.1.20