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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (hide annotations) (download)
Wed Dec 28 20:12:25 2011 UTC (2 years, 6 months ago) by halcy0n
Branch: MAIN
Changes since 1.6: +2 -2 lines
Stable for ppc64; bug #378039

(Portage version: 2.1.10.11/cvs/Linux ppc64)

1 grobian 1.2 # Copyright 1999-2011 Gentoo Foundation
2 vapier 1.1 # Distributed under the terms of the GNU General Public License v2
3 halcy0n 1.7 # $Header: /var/cvsroot/gentoo-x86/sys-fs/e2fsprogs/e2fsprogs-1.41.14.ebuild,v 1.6 2011/11/06 13:28:12 ranger Exp $
4 vapier 1.1
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 halcy0n 1.7 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 vapier 1.1 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     dev-util/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}"/${PN}-1.41.12-darwin-makefile.patch
44     if [[ ${CHOST} == *-mint* ]] ; then
45     epatch "${FILESDIR}"/${PN}-1.41-mint.patch
46 grobian 1.2 epatch "${FILESDIR}"/${PN}-1.41.12-mint-blkid.patch
47 vapier 1.1 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