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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Sat Jan 4 18:23:38 2014 UTC (6 months ago) by polynomial-c
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Removed old versions and files

(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)

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

  ViewVC Help
Powered by ViewVC 1.1.20