public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Lars Wendler" <polynomial-c@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/xfsprogs/, sys-fs/xfsprogs/files/
Date: Sun,  8 Jan 2017 20:22:06 +0000 (UTC)	[thread overview]
Message-ID: <1483906919.d81ef91b89702ac906c332565b3e6682e28a9b5f.polynomial-c@gentoo> (raw)

commit:     d81ef91b89702ac906c332565b3e6682e28a9b5f
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Sun Jan  8 20:20:54 2017 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Sun Jan  8 20:21:59 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d81ef91b

sys-fs/xfsprogs: Bump to version 4.9.0

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-fs/xfsprogs/Manifest                           |   1 +
 .../files/xfsprogs-4.9.0-cross-compile.patch       | 143 +++++++++++++++++++++
 sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild              |  95 ++++++++++++++
 3 files changed, 239 insertions(+)

diff --git a/sys-fs/xfsprogs/Manifest b/sys-fs/xfsprogs/Manifest
index 318a5f4..4ef4635 100644
--- a/sys-fs/xfsprogs/Manifest
+++ b/sys-fs/xfsprogs/Manifest
@@ -2,3 +2,4 @@ DIST xfsprogs-3.2.4.tar.gz 1482424 SHA256 dde65ead82d3cbfa9b4ded9796b6d22095d7d7
 DIST xfsprogs-4.5.0.tar.gz 1524382 SHA256 e49beb314984efbd0d758abb5c6137db3bb60a88e59e1e94c00defb536cf89f8 SHA512 19c95551dc91ec46916f9a7e3d7976907664d32dd5fdc26af0ca62ca74c4b3c10f9e843aac8214ea9d1c0bf140c9f4e321d059808af01a623abedd5067011314 WHIRLPOOL 54d742635df024a63181da76c3220671610068363af85be2677521f20342595a5cebb2fd169945572351901ee2c9384f79f54a381ab3620dde22d863aa66d469
 DIST xfsprogs-4.7.0.tar.gz 1534909 SHA256 88580bb3e6847c3edef436703a4fae403fc19b20739db4c31166ee4b256178d7 SHA512 5184f1dbc3989f3c1f1b103d5cbd70462db107cfe113424166581ebcfaad4041c9c78f5d038f4bd4728ff99a2f9705219582ba9bfd10745354a1cab0b7dfe613 WHIRLPOOL 8157b2e8df5946acacc22ed761e38b382ef464f4984971148069b2f215418f4e23ac142721394439c041c236cbd460e0b56ff071d1c10e343070147709f42af3
 DIST xfsprogs-4.8.0.tar.xz 1088376 SHA256 82ce9cb3a55f4e208e8fe3471ff0aff0602b8300f3e50bdf05cc7e11549686f9 SHA512 9c83763ae4925980969e66827edef41774e4dc09ae42637630167b5e0329675517ea7b50de751fcb9485fbcf8e470d24dd20b51475bcb56723dae6ee9fb140c7 WHIRLPOOL dc9f9b5c0b4e9b61f023fb972137126f22909c77908990e1beb391689fe6512a7810d9bd1ccfc0cfe4cd5379d99c123ddc9d0b6194e0a81e946e2304f964f180
+DIST xfsprogs-4.9.0.tar.xz 1087940 SHA256 f1e60a9a54583dba82fa506dd9b59bdec110a968f80f507bf5f93b263af7a4df SHA512 990946f0a34381f57afb39bcda0ff539e18af4de2ecc19c833ffd4fb7c22c25b501091c1f0953db103a62204d952c9eecba21f22f3c5910286456da65fb09fa7 WHIRLPOOL a9b582a42967ce1e314cd0ac3518792c2e10f7bb1370151a68a09a8e21e40cc6818b9778dfdd248961c3a1a08a70424f0150219488a18bc5d60e5669702c472f

diff --git a/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch
new file mode 100644
index 00000000..f4232b3
--- /dev/null
+++ b/sys-fs/xfsprogs/files/xfsprogs-4.9.0-cross-compile.patch
@@ -0,0 +1,143 @@
+--- xfsprogs-4.9.0/configure
++++ xfsprogs-4.9.0/configure
+@@ -861,6 +861,7 @@
+ enable_blkid
+ enable_gettext
+ enable_shared
++BUILD_CFLAGS
+ BUILD_CC
+ CPP
+ OTOOL64
+@@ -960,7 +961,9 @@
+ LDFLAGS
+ LIBS
+ CPPFLAGS
+-CPP'
++CPP
++BUILD_CC
++BUILD_CFLAGS'
+ 
+ 
+ # Initialize some variables set by options.
+@@ -1616,6 +1619,9 @@
+   CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+               you have headers in a nonstandard directory <include dir>
+   CPP         C preprocessor
++  BUILD_CC    C compiler for build tools
++  BUILD_CFLAGS
++              C compiler flags for build tools
+ 
+ Use these variables to override the choices made by `configure' or to help
+ it to find libraries and programs with nonstandard names/locations.
+@@ -11116,11 +11122,12 @@
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+-if test $cross_compiling = no; then
+-  BUILD_CC="$CC"
+ 
+-else
+-  for ac_prog in gcc cc
++if test "${BUILD_CC+set}" != "set"; then
++  if test $cross_compiling = no; then
++    BUILD_CC="$CC"
++  else
++    for ac_prog in gcc cc
+ do
+   # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
+@@ -11162,6 +11169,15 @@
+   test -n "$BUILD_CC" && break
+ done
+ 
++  fi
++fi
++
++if test "${BUILD_CFLAGS+set}" != "set"; then
++  if test $cross_compiling = no; then
++    BUILD_CFLAGS="$CFLAGS"
++  else
++    BUILD_CFLAGS="-g -O2"
++  fi
+ fi
+ 
+ # Check whether --enable-shared was given.
+--- xfsprogs-4.9.0/configure.ac
++++ xfsprogs-4.9.0/configure.ac
+@@ -9,11 +9,21 @@
+ AC_PROG_LIBTOOL
+ 
+ AC_PROG_CC
+-if test $cross_compiling = no; then
+-  BUILD_CC="$CC"
+-  AC_SUBST(BUILD_CC)
+-else
+-  AC_CHECK_PROGS(BUILD_CC, gcc cc)
++AC_ARG_VAR(BUILD_CC, [C compiler for build tools])
++if test "${BUILD_CC+set}" != "set"; then
++  if test $cross_compiling = no; then
++    BUILD_CC="$CC"
++  else
++    AC_CHECK_PROGS(BUILD_CC, gcc cc)
++  fi
++fi
++AC_ARG_VAR(BUILD_CFLAGS, [C compiler flags for build tools])
++if test "${BUILD_CFLAGS+set}" != "set"; then
++  if test $cross_compiling = no; then
++    BUILD_CFLAGS="$CFLAGS"
++  else
++    BUILD_CFLAGS="-g -O2"
++  fi
+ fi
+ 
+ AC_ARG_ENABLE(shared,
+--- xfsprogs-4.9.0/include/builddefs.in
++++ xfsprogs-4.9.0/include/builddefs.in
+@@ -26,6 +26,7 @@
+ LOADERFLAGS = @LDFLAGS@
+ LTLDFLAGS = @LDFLAGS@
+ CFLAGS = @CFLAGS@ -D_FILE_OFFSET_BITS=64
++BUILD_CFLAGS = @BUILD_CFLAGS@
+ 
+ LIBRT = @librt@
+ LIBUUID = @libuuid@
+@@ -154,7 +155,7 @@
+ endif
+ 
+ 
+-GCFLAGS = $(OPTIMIZER) $(DEBUG) \
++GCFLAGS = $(DEBUG) \
+ 	  -DVERSION=\"$(PKG_VERSION)\" -DLOCALEDIR=\"$(PKG_LOCALE_DIR)\"  \
+ 	  -DPACKAGE=\"$(PKG_NAME)\" -I$(TOPDIR)/include -I$(TOPDIR)/libxfs
+ 
+@@ -162,8 +163,9 @@
+ GCFLAGS += -DENABLE_GETTEXT
+ endif
+ 
++BUILD_CFLAGS += $(GCFLAGS) $(PCFLAGS)
+ # First, Global, Platform, Local CFLAGS
+-CFLAGS += $(FCFLAGS) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
++CFLAGS += $(FCFLAGS) $(OPTIMIZER) $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
+ 
+ include $(TOPDIR)/include/buildmacros
+ 
+--- xfsprogs-4.9.0/libxfs/Makefile
++++ xfsprogs-4.9.0/libxfs/Makefile
+@@ -124,7 +124,7 @@
+ 
+ crc32table.h: gen_crc32table.c
+ 	@echo "    [CC]     gen_crc32table"
+-	$(Q) $(BUILD_CC) $(CFLAGS) -o gen_crc32table $<
++	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
+ 	@echo "    [GENERATE] $@"
+ 	$(Q) ./gen_crc32table > crc32table.h
+ 
+@@ -135,7 +135,7 @@
+ # disk.
+ crc32selftest: gen_crc32table.c crc32table.h crc32.c
+ 	@echo "    [TEST]    CRC32"
+-	$(Q) $(BUILD_CC) $(CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
++	$(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
+ 	$(Q) ./$@
+ 
+ # set up include/xfs header directory

diff --git a/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild b/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild
new file mode 100644
index 00000000..7227b27
--- /dev/null
+++ b/sys-fs/xfsprogs/xfsprogs-4.9.0.ebuild
@@ -0,0 +1,95 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs multilib
+
+DESCRIPTION="xfs filesystem utilities"
+HOMEPAGE="http://oss.sgi.com/projects/xfs/"
+SRC_URI="ftp://ftp.kernel.org/pub/linux/utils/fs/xfs/${PN}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="libedit nls readline static static-libs"
+REQUIRED_USE="static? ( static-libs )"
+
+LIB_DEPEND=">=sys-apps/util-linux-2.17.2[static-libs(+)]
+	readline? ( sys-libs/readline:0=[static-libs(+)] )
+	!readline? ( libedit? ( dev-libs/libedit[static-libs(+)] ) )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs(+)]} )
+	!<sys-fs/xfsdump-3"
+DEPEND="${RDEPEND}
+	static? (
+		${LIB_DEPEND}
+		readline? ( sys-libs/ncurses:0=[static-libs] )
+	)
+	nls? ( sys-devel/gettext )"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-4.7.0-sharedlibs.patch
+	"${FILESDIR}"/${PN}-4.7.0-libxcmd-link.patch
+	"${FILESDIR}"/${PN}-4.9.0-cross-compile.patch
+)
+
+pkg_setup() {
+	if use readline && use libedit ; then
+		ewarn "You have USE='readline libedit' but these are exclusive."
+		ewarn "Defaulting to readline; please disable this USE flag if you want libedit."
+	fi
+}
+
+src_prepare() {
+	epatch "${PATCHES[@]}"
+
+	# LLDFLAGS is used for programs, so apply -all-static when USE=static is enabled.
+	# Clear out -static from all flags since we want to link against dynamic xfs libs.
+	sed -i \
+		-e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+		-e "1iLLDFLAGS += $(usex static '-all-static' '')" \
+		include/builddefs.in || die
+	find -name Makefile -exec \
+		sed -i -r -e '/^LLDFLAGS [+]?= -static(-libtool-libs)?$/d' {} +
+
+	# TODO: Write a patch for configure.ac to use pkg-config for the uuid-part.
+	if use static && use readline ; then
+		sed -i \
+			-e 's|-lreadline|& -lncurses|' \
+			-e 's|-lblkid|& -luuid|' \
+			configure || die
+	fi
+}
+
+src_configure() {
+	export DEBUG=-DNDEBUG
+	export OPTIMIZER=${CFLAGS}
+	unset PLATFORM # if set in user env, this breaks configure
+
+	local myconf
+	if use static || use static-libs ; then
+		myconf+=" --enable-static"
+	else
+		myconf+=" --disable-static"
+	fi
+
+	econf \
+		$(use_enable nls gettext) \
+		$(use_enable readline) \
+		$(usex readline --disable-editline $(use_enable libedit editline)) \
+		${myconf}
+
+	MAKEOPTS+=" V=1"
+}
+
+src_install() {
+	emake DIST_ROOT="${ED}" install
+	# parallel install fails on this target for >=xfsprogs-3.2.0
+	emake -j1 DIST_ROOT="${ED}" install-dev
+
+	# handle is for xfsdump, the rest for xfsprogs
+	gen_usr_ldscript -a handle xcmd xfs xlog
+	# removing unnecessary .la files if not needed
+	use static-libs || find "${ED}" -name '*.la' -delete
+}


             reply	other threads:[~2017-01-08 20:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-08 20:22 Lars Wendler [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-02-20  1:15 [gentoo-commits] repo/gentoo:master commit in: sys-fs/xfsprogs/, sys-fs/xfsprogs/files/ Sam James
2024-09-02  2:50 Sam James
2024-08-27 23:44 Sam James
2024-04-17 23:04 Sam James
2024-02-05 23:28 Sam James
2023-06-26  9:12 David Seifert
2022-06-04 21:13 Sam James
2019-11-18 19:12 Thomas Deutschmann
2018-12-30  9:19 Andreas K. Hüttel
2018-05-14  8:23 Lars Wendler
2017-07-21  7:35 Lars Wendler
2017-01-12 20:33 Justin Lecher
2017-01-08 20:22 Lars Wendler
2016-08-09 15:15 Mike Frysinger
2016-06-03 19:22 Mike Frysinger
2015-11-23 21:24 Lars Wendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1483906919.d81ef91b89702ac906c332565b3e6682e28a9b5f.polynomial-c@gentoo \
    --to=polynomial-c@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox