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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Sun Oct 7 16:22:17 2012 UTC (18 months, 1 week ago) by vapier
Branch: MAIN
Version bump #437434 by Bernhard Hartleb.

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

  ViewVC Help
Powered by ViewVC 1.1.20