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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sun Apr 1 16:41:44 2012 UTC (2 years, 5 months ago) by armin76
Branch: MAIN
Changes since 1.7: +2 -2 lines
alpha/ia64/sh/sparc stable wrt #408021

(Portage version: 2.1.10.53/cvs/Linux ia64)

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.7.ebuild,v 1.7 2012/03/30 17:06:50 flameeyes Exp $
4
5 EAPI="3"
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
19 RDEPEND="!static? ( >=sys-apps/util-linux-2.17.2 )
20 !<sys-fs/xfsdump-3
21 readline? (
22 sys-libs/readline
23 static? ( sys-libs/ncurses )
24 )
25 !readline? ( libedit? ( dev-libs/libedit ) )"
26 DEPEND="${RDEPEND}
27 static? ( || ( sys-apps/util-linux[static-libs] <sys-apps/util-linux-2.20 ) )
28 nls? ( sys-devel/gettext )"
29
30 pkg_setup() {
31 if use readline && use libedit ; then
32 ewarn "You have USE='readline libedit' but these are exclusive."
33 ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
34 fi
35
36 if use static && use !static-libs ; then
37 ewarn "Can't build a static variant of the executables without static-libs."
38 ewarn "Static libs will also be built."
39 fi
40 }
41
42 src_prepare() {
43 epatch "${FILESDIR}"/${PN}-3.1.1-sharedlibs.patch
44
45 sed -i \
46 -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
47 include/builddefs.in || die
48 sed -i \
49 -e '1iLLDFLAGS = -static' \
50 {estimate,fsr}/Makefile || die
51 sed -i \
52 -e "/LLDFLAGS/s:-static:$(use static && echo -all-static):" \
53 $(find -name Makefile) || die
54
55 # libdisk has broken blkid conditional checking
56 sed -i \
57 -e '/LIB_SUBDIRS/s:libdisk::' \
58 Makefile || die
59
60 # TODO: write a patch for configure.in to use pkg-config for the uuid-part
61 if use static && use readline ; then
62 sed -i \
63 -e 's|-lreadline|\0 -lncurses|' \
64 -e 's|-lblkid|\0 -luuid|' \
65 configure || die
66 fi
67 }
68
69 src_configure() {
70 export DEBUG=-DNDEBUG
71 export OPTIMIZER=${CFLAGS}
72 unset PLATFORM # if set in user env, this breaks configure
73
74 local myconf
75
76 if use readline ; then
77 myconf="--enable-readline --disable-editline"
78 elif use libedit ; then
79 myconf="--disable-readline --enable-editline"
80 else
81 myconf="--disable-readline --disable-editline"
82 fi
83
84 if use static || use static-libs ; then
85 myconf="${myconf} --enable-static"
86 else
87 myconf="${myconf} --disable-static"
88 fi
89
90 econf \
91 --bindir=/usr/bin \
92 --libexecdir=/usr/$(get_libdir) \
93 $(use_enable nls gettext) \
94 ${myconf}
95
96 MAKEOPTS+=" V=1"
97 }
98
99 src_install() {
100 emake DIST_ROOT="${D}" install install-dev || die
101 prepalldocs
102
103 # handle is for xfsdump, the rest for xfsprogs
104 gen_usr_ldscript -a xfs xlog
105 # removing unnecessary .la files if not needed
106 use static-libs || rm -f "${D}"/usr/lib*/*.la
107 }

  ViewVC Help
Powered by ViewVC 1.1.20