/[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.1 - (show annotations) (download)
Fri Nov 19 18:49:02 2010 UTC (3 years, 7 months ago) by jlec
Branch: MAIN
Import Prefix Changes

(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.ebuild,v 1.9 2010/10/09 17:11:34 armin76 Exp $
4
5 EAPI="3"
6
7
8 inherit eutils flag-o-matic multilib toolchain-funcs
9
10 DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
11 HOMEPAGE="http://e2fsprogs.sourceforge.net/"
12 SRC_URI="mirror://sourceforge/e2fsprogs/${P}.tar.gz"
13
14 LICENSE="GPL-2 BSD"
15 SLOT="0"
16 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"
17 IUSE="nls elibc_FreeBSD"
18
19 RDEPEND="
20 >=sys-apps/util-linux-2.16
21 ~sys-libs/${PN}-libs-${PV}
22 nls? ( virtual/libintl )"
23 DEPEND="${RDEPEND}
24 dev-util/pkgconfig
25 sys-apps/texinfo
26 nls? ( sys-devel/gettext )"
27
28 pkg_setup() {
29 if [[ ! -e ${EROOT}/etc/mtab ]] ; then
30 # add some crap to deal with missing /etc/mtab #217719
31 ewarn "No /etc/mtab file, creating one temporarily"
32 echo "${PN} crap for src_test" > "${EROOT}"/etc/mtab
33 fi
34 }
35
36 src_prepare() {
37 epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
38 epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
39 epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
40 # use symlinks rather than hardlinks
41 sed -i \
42 -e 's:$(LN) -f $(DESTDIR).*/:$(LN_S) -f :' \
43 {e2fsck,misc}/Makefile.in || die
44 epatch "${FILESDIR}"/${P}-darwin-makefile.patch
45 epatch "${FILESDIR}"/${P}-darwin-no-mntent.patch
46 if [[ ${CHOST} == *-mint* ]] ; then
47 epatch "${FILESDIR}"/${PN}-1.41-mint.patch
48 epatch "${FILESDIR}"/${PN}-1.41.7-mint-blkid.patch
49 fi
50 # blargh ... trick e2fsprogs into using e2fsprogs-libs
51 rm -rf doc || die
52 sed -i -r \
53 -e 's:@LIBINTL@:@LTLIBINTL@:' \
54 -e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
55 -e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
56 MCONFIG.in || die "muck libs" #122368
57 sed -i -r \
58 -e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
59 Makefile.in || die "remove subdirs"
60 sed -i \
61 -e '/^#define _XOPEN/i#define _GNU_SOURCE' \
62 misc/mke2fs.c || die # needs open64() prototype
63
64 # Avoid rebuild
65 touch lib/ss/ss_err.h
66 }
67
68 src_configure() {
69 # Keep the package from doing silly things #261411
70 export VARTEXFONTS=${T}/fonts
71
72 # We want to use the "bsd" libraries while building on Darwin, but while
73 # building on other Gentoo/*BSD we prefer elf-naming scheme.
74 local libtype
75 case ${CHOST} in
76 *-darwin*) libtype=--enable-bsd-shlibs ;;
77 *-mint*) libtype= ;;
78 *) libtype=--enable-elf-shlibs ;;
79 esac
80
81 # On MacOSX 10.4 using the assembly built-in bitoperation functions causes
82 # segmentation faults. Though this is likely fixable we can quickly make it
83 # at least work by using the C functions.
84 if [[ ${CHOST} == i?86-apple-darwin* ]]; then
85 append-flags -D_EXT2_USE_C_VERSIONS_
86 fi
87
88 ac_cv_path_LDCONFIG=: \
89 econf \
90 --with-root-prefix="${EPREFIX}/" \
91 ${libtype} \
92 $(tc-has-tls || echo --disable-tls) \
93 --without-included-gettext \
94 $(use_enable nls) \
95 --disable-libblkid \
96 --disable-libuuid \
97 --disable-fsck \
98 --disable-uuidd
99 if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
100 eerror "INTL sanity check failed, aborting build."
101 eerror "Please post your ${S}/config.log file as an"
102 eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
103 die "Preventing included intl cruft from building"
104 fi
105 }
106
107 src_compile() {
108 emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
109
110 # Build the FreeBSD helper
111 if use elibc_FreeBSD ; then
112 cp "${FILESDIR}"/fsck_ext2fs.c .
113 emake fsck_ext2fs || die
114 fi
115 }
116
117 pkg_preinst() {
118 if [[ -r ${EROOT}/etc/mtab ]] ; then
119 if [[ $(<"${EROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
120 rm -f "${EROOT}"/etc/mtab
121 fi
122 fi
123 }
124
125 src_install() {
126 # need to set root_libdir= manually as any --libdir options in the
127 # econf above (i.e. multilib) will screw up the default #276465
128 emake \
129 STRIP=: \
130 root_libdir="${EPREFIX}/usr/$(get_libdir)" \
131 DESTDIR="${D}" \
132 install install-libs || die
133 dodoc README RELEASE-NOTES || die
134
135 insinto /etc
136 doins "${FILESDIR}"/e2fsck.conf || die
137
138 # Move shared libraries to /lib/, install static libraries to
139 # /usr/lib/,
140 # and install linker scripts to /usr/lib/.
141 set -- "${ED}"/usr/$(get_libdir)/*.a
142 set -- ${@/*\/lib}
143 gen_usr_ldscript -a "${@/.a}"
144
145 # For correct install_names (on Darwin) we can't do this with
146 # root_libdir=/lib and the code below, instead we need root_libdir=/usr/lib
147 # and gen_usr_ldscript that fixes install_names as the libs are moved
148 ## make sure symlinks are relative, not absolute, for cross-compiling
149 #cd "${ED}"/usr/$(get_libdir)
150 #local x l
151 #for x in lib* ; do
152 # l=$(readlink "${x}")
153 # [[ ${l} == /* ]] || continue
154 # rm -f "${x}"
155 # ln -s "../..${l}" "${x}"
156 #done
157
158 if use elibc_FreeBSD ; then
159 # Install helpers for us
160 into /
161 dosbin "${S}"/fsck_ext2fs || die
162 doman "${FILESDIR}"/fsck_ext2fs.8 || die
163
164 # filefrag is linux only
165 rm \
166 "${ED}"/usr/sbin/filefrag \
167 "${ED}"/usr/share/man/man8/filefrag.8 || die
168 fi
169 }

  ViewVC Help
Powered by ViewVC 1.1.20