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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sat Dec 4 22:29:24 2010 UTC (3 years, 11 months ago) by vapier
Branch: MAIN
Changes since 1.2: +8 -22 lines
Undo some useless changes from the prefix merge, and fix implicit getpagesize() warnings.

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

1 jlec 1.1 # Copyright 1999-2010 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 vapier 1.3 # $Header: /var/cvsroot/gentoo-x86/sys-fs/e2fsprogs/e2fsprogs-1.41.12-r1.ebuild,v 1.2 2010/11/19 18:51:40 jlec Exp $
4 jlec 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     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     IUSE="nls elibc_FreeBSD"
17    
18 vapier 1.3 RDEPEND="~sys-libs/${PN}-libs-${PV}
19 jlec 1.1 >=sys-apps/util-linux-2.16
20     nls? ( virtual/libintl )"
21     DEPEND="${RDEPEND}
22 vapier 1.3 nls? ( sys-devel/gettext )
23 jlec 1.1 dev-util/pkgconfig
24 vapier 1.3 sys-apps/texinfo"
25 jlec 1.1
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 vapier 1.3 epatch "${FILESDIR}"/${PN}-1.41.12-getpagesize.patch
38 jlec 1.1 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}"/${P}-darwin-makefile.patch
44     epatch "${FILESDIR}"/${P}-darwin-no-mntent.patch
45     if [[ ${CHOST} == *-mint* ]] ; then
46     epatch "${FILESDIR}"/${PN}-1.41-mint.patch
47     epatch "${FILESDIR}"/${PN}-1.41.7-mint-blkid.patch
48     fi
49     # blargh ... trick e2fsprogs into using e2fsprogs-libs
50 vapier 1.3 rm -rf doc
51 jlec 1.1 sed -i -r \
52     -e 's:@LIBINTL@:@LTLIBINTL@:' \
53     -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
54     -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
55     MCONFIG.in || die "muck libs" #122368
56     sed -i -r \
57     -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
58     Makefile.in || die "remove subdirs"
59     sed -i \
60     -e '/^#define _XOPEN/i#define _GNU_SOURCE' \
61     misc/mke2fs.c || die # needs open64() prototype
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     # We want to use the "bsd" libraries while building on Darwin, but while
72     # building on other Gentoo/*BSD we prefer elf-naming scheme.
73     local libtype
74     case ${CHOST} in
75     *-darwin*) libtype=--enable-bsd-shlibs ;;
76     *-mint*) libtype= ;;
77     *) libtype=--enable-elf-shlibs ;;
78     esac
79    
80     # On MacOSX 10.4 using the assembly built-in bitoperation functions causes
81     # segmentation faults. Though this is likely fixable we can quickly make it
82     # at least work by using the C functions.
83     if [[ ${CHOST} == i?86-apple-darwin* ]]; then
84     append-flags -D_EXT2_USE_C_VERSIONS_
85     fi
86    
87     ac_cv_path_LDCONFIG=: \
88     econf \
89     --with-root-prefix="${EPREFIX}/" \
90     ${libtype} \
91     $(tc-has-tls || echo --disable-tls) \
92     --without-included-gettext \
93     $(use_enable nls) \
94     --disable-libblkid \
95     --disable-libuuid \
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 vapier 1.3 dodoc README RELEASE-NOTES
133 jlec 1.1
134     insinto /etc
135     doins "${FILESDIR}"/e2fsck.conf || die
136    
137     # Move shared libraries to /lib/, install static libraries to
138 vapier 1.3 # /usr/lib/, and install linker scripts to /usr/lib/.
139 jlec 1.1 set -- "${ED}"/usr/$(get_libdir)/*.a
140     set -- ${@/*\/lib}
141     gen_usr_ldscript -a "${@/.a}"
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