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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20