/[gentoo-x86]/sys-fs/xfsprogs/xfsprogs-3.1.8.ebuild
Gentoo

Contents of /sys-fs/xfsprogs/xfsprogs-3.1.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat Aug 25 23:10:10 2012 UTC (22 months, 2 weeks ago) by vapier
Branch: MAIN
Changes since 1.8: +2 -1 lines
Link libxcmd against readline #432644 by David Badia.

(Portage version: 2.2.0_alpha120/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/xfsprogs/xfsprogs-3.1.8.ebuild,v 1.8 2012/08/19 17:11:32 armin76 Exp $
4
5 EAPI="4"
6
7 inherit eutils toolchain-funcs multilib
8
9 DESCRIPTION="xfs filesystem utilities"
10 HOMEPAGE="http://oss.sgi.com/projects/xfs/"
11 SRC_URI="ftp://oss.sgi.com/projects/xfs/cmd_tars/${P}.tar.gz
12 ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${P}.tar.gz"
13
14 LICENSE="LGPL-2.1"
15 SLOT="0"
16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86"
17 IUSE="libedit nls readline static static-libs"
18 REQUIRED_USE="static? ( static-libs )"
19
20 LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
21 readline? ( sys-libs/readline[static-libs(+)] )
22 !readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
23 RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
24 !<sys-fs/xfsdump-3"
25 DEPEND="${RDEPEND}
26 static? (
27 ${LIB_DEPEND}
28 readline? ( sys-libs/ncurses[static-libs] )
29 )
30 nls? ( sys-devel/gettext )"
31
32 pkg_setup() {
33 if use readline && use libedit ; then
34 ewarn "You have USE='readline libedit' but these are exclusive."
35 ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
36 fi
37 }
38
39 src_prepare() {
40 epatch "${FILESDIR}"/${PN}-3.1.1-sharedlibs.patch
41 epatch "${FILESDIR}"/${PN}-3.1.8-readline.patch
42
43 sed -i \
44 -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
45 include/builddefs.in || die
46 sed -i \
47 -e '1iLLDFLAGS = -static' \
48 {estimate,fsr}/Makefile || die
49 sed -i \
50 -e "/LLDFLAGS/s:-static:$(use static && echo -all-static):" \
51 $(find -name Makefile) || die
52
53 # libdisk has broken blkid conditional checking
54 sed -i \
55 -e '/LIB_SUBDIRS/s:libdisk::' \
56 Makefile || die
57
58 # TODO: write a patch for configure.in to use pkg-config for the uuid-part
59 if use static && use readline ; then
60 sed -i \
61 -e 's|-lreadline|\0 -lncurses|' \
62 -e 's|-lblkid|\0 -luuid|' \
63 configure || die
64 fi
65 }
66
67 src_configure() {
68 export DEBUG=-DNDEBUG
69 export OPTIMIZER=${CFLAGS}
70 unset PLATFORM # if set in user env, this breaks configure
71
72 local myconf
73
74 if use readline ; then
75 myconf="--enable-readline --disable-editline"
76 elif use libedit ; then
77 myconf="--disable-readline --enable-editline"
78 else
79 myconf="--disable-readline --disable-editline"
80 fi
81
82 if use static || use static-libs ; then
83 myconf+=" --enable-static"
84 else
85 myconf+=" --disable-static"
86 fi
87
88 econf \
89 --bindir=/usr/bin \
90 --libexecdir=/usr/$(get_libdir) \
91 $(use_enable nls gettext) \
92 ${myconf}
93
94 MAKEOPTS+=" V=1"
95 }
96
97 src_install() {
98 emake DIST_ROOT="${ED}" install install-dev
99
100 # handle is for xfsdump, the rest for xfsprogs
101 gen_usr_ldscript -a xfs xlog
102 # removing unnecessary .la files if not needed
103 use static-libs || find "${ED}" -name '*.la' -delete
104 }

  ViewVC Help
Powered by ViewVC 1.1.20