/[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.2 - (show annotations) (download)
Fri Nov 19 18:51:40 2010 UTC (3 years, 7 months ago) by jlec
Branch: MAIN
Changes since 1.1: +1 -2 lines
QA empty line

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

1 # Copyright 1999-2010 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-r1.ebuild,v 1.1 2010/11/19 18:49:02 jlec Exp $
4
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 RDEPEND="
19 >=sys-apps/util-linux-2.16
20 ~sys-libs/${PN}-libs-${PV}
21 nls? ( virtual/libintl )"
22 DEPEND="${RDEPEND}
23 dev-util/pkgconfig
24 sys-apps/texinfo
25 nls? ( sys-devel/gettext )"
26
27 pkg_setup() {
28 if [[ ! -e ${EROOT}/etc/mtab ]] ; then
29 # add some crap to deal with missing /etc/mtab #217719
30 ewarn "No /etc/mtab file, creating one temporarily"
31 echo "${PN} crap for src_test" > "${EROOT}"/etc/mtab
32 fi
33 }
34
35 src_prepare() {
36 epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
37 epatch "${FILESDIR}"/${PN}-1.41.8-makefile.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}"/${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 rm -rf doc || die
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 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 dodoc README RELEASE-NOTES || die
133
134 insinto /etc
135 doins "${FILESDIR}"/e2fsck.conf || die
136
137 # Move shared libraries to /lib/, install static libraries to
138 # /usr/lib/,
139 # and install linker scripts to /usr/lib/.
140 set -- "${ED}"/usr/$(get_libdir)/*.a
141 set -- ${@/*\/lib}
142 gen_usr_ldscript -a "${@/.a}"
143
144 # For correct install_names (on Darwin) we can't do this with
145 # root_libdir=/lib and the code below, instead we need root_libdir=/usr/lib
146 # and gen_usr_ldscript that fixes install_names as the libs are moved
147 ## make sure symlinks are relative, not absolute, for cross-compiling
148 #cd "${ED}"/usr/$(get_libdir)
149 #local x l
150 #for x in lib* ; do
151 # l=$(readlink "${x}")
152 # [[ ${l} == /* ]] || continue
153 # rm -f "${x}"
154 # ln -s "../..${l}" "${x}"
155 #done
156
157 if use elibc_FreeBSD ; then
158 # Install helpers for us
159 into /
160 dosbin "${S}"/fsck_ext2fs || die
161 doman "${FILESDIR}"/fsck_ext2fs.8 || die
162
163 # filefrag is linux only
164 rm \
165 "${ED}"/usr/sbin/filefrag \
166 "${ED}"/usr/share/man/man8/filefrag.8 || die
167 fi
168 }

  ViewVC Help
Powered by ViewVC 1.1.20