From 9fe2eda37e4c0a15e68dd3ad316a438018c4fd03 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 19 May 2019 08:57:26 +0100 Subject: sys-fs/btrfs-progs: apply LDFLAGS to libbtrfsutil.so, bug #686284 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libbtrfs.so already has user's LDFLAGS applied. The change also applies those to libbtrfsutil.so. Reported-by: Michał Górny Bug: https://bugs.gentoo.org/686284 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Sergei Trofimovich --- sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild | 123 +++++++++++++++++++++ sys-fs/btrfs-progs/btrfs-progs-5.1.ebuild | 119 -------------------- .../files/btrfs-progs-5.1-LDFLAGS.patch | 37 +++++++ 3 files changed, 160 insertions(+), 119 deletions(-) create mode 100644 sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild delete mode 100644 sys-fs/btrfs-progs/btrfs-progs-5.1.ebuild create mode 100644 sys-fs/btrfs-progs/files/btrfs-progs-5.1-LDFLAGS.patch (limited to 'sys-fs/btrfs-progs') diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild new file mode 100644 index 000000000000..d8977bdf6b94 --- /dev/null +++ b/sys-fs/btrfs-progs/btrfs-progs-5.1-r1.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6,7} ) + +inherit bash-completion-r1 python-single-r1 + +libbtrfs_soname=0 + +if [[ ${PV} != 9999 ]]; then + MY_PV="v${PV/_/-}" + [[ "${PV}" = *_rc* ]] || \ + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" + SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz" + S="${WORKDIR}/${PN}-${MY_PV}" +else + WANT_LIBTOOL=none + inherit autotools git-r3 + EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" + EGIT_BRANCH="devel" +fi + +DESCRIPTION="Btrfs filesystem utilities" +HOMEPAGE="https://btrfs.wiki.kernel.org" + +LICENSE="GPL-2" +SLOT="0/${libbtrfs_soname}" +IUSE="+convert python reiserfs static static-libs +zstd" + +RESTRICT=test # tries to mount repared filesystems + +RDEPEND=" + dev-libs/lzo:2= + sys-apps/util-linux:0=[static-libs(+)?] + sys-libs/zlib:0= + convert? ( + sys-fs/e2fsprogs:0= + sys-libs/e2fsprogs-libs:0= + reiserfs? ( + >=sys-fs/reiserfsprogs-3.6.27 + ) + ) + python? ( ${PYTHON_DEPS} ) + zstd? ( app-arch/zstd:0= ) +" +DEPEND="${RDEPEND} + convert? ( sys-apps/acl ) + python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) + static? ( + dev-libs/lzo:2[static-libs(+)] + sys-apps/util-linux:0[static-libs(+)] + sys-libs/zlib:0[static-libs(+)] + convert? ( + sys-fs/e2fsprogs:0[static-libs(+)] + sys-libs/e2fsprogs-libs:0[static-libs(+)] + reiserfs? ( + >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] + ) + ) + zstd? ( app-arch/zstd:0[static-libs(+)] ) + ) +" +BDEPEND=" + >=app-text/asciidoc-8.6.0 + app-text/docbook-xml-dtd:4.5 + app-text/xmlto +" + +if [[ ${PV} == 9999 ]]; then + DEPEND+=" sys-devel/gnuconfig" +fi + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +PATCHES=( + "${FILESDIR}"/${PN}-5.1-LDFLAGS.patch +) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + if [[ ${PV} == 9999 ]]; then + AT_M4DIR=m4 eautoreconf + mkdir config || die + local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" + [[ -e ${automakedir} ]] || die "Could not locate automake directory" + ln -s "${automakedir}"/install-sh config/install-sh || die + ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die + ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die + fi +} + +src_configure() { + local myeconfargs=( + --bindir="${EPREFIX}"/sbin + $(use_enable convert) + $(use_enable elibc_glibc backtrace) + $(use_enable python) + $(use_enable static-libs static) + $(use_enable zstd) + --with-convert=ext2$(usex reiserfs ',reiserfs' '') + ) + econf "${myeconfargs[@]}" +} + +src_compile() { + emake V=1 all $(usev static) +} + +src_install() { + local makeargs=( + $(usex python install_python '') + $(usex static install-static '') + ) + emake V=1 DESTDIR="${D}" install "${makeargs[@]}" + newbashcomp btrfs-completion btrfs + use python && python_optimize +} diff --git a/sys-fs/btrfs-progs/btrfs-progs-5.1.ebuild b/sys-fs/btrfs-progs/btrfs-progs-5.1.ebuild deleted file mode 100644 index 4076d30d2382..000000000000 --- a/sys-fs/btrfs-progs/btrfs-progs-5.1.ebuild +++ /dev/null @@ -1,119 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{5,6,7} ) - -inherit bash-completion-r1 python-single-r1 - -libbtrfs_soname=0 - -if [[ ${PV} != 9999 ]]; then - MY_PV="v${PV/_/-}" - [[ "${PV}" = *_rc* ]] || \ - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" - SRC_URI="https://www.kernel.org/pub/linux/kernel/people/kdave/${PN}/${PN}-${MY_PV}.tar.xz" - S="${WORKDIR}/${PN}-${MY_PV}" -else - WANT_LIBTOOL=none - inherit autotools git-r3 - EGIT_REPO_URI="https://github.com/kdave/btrfs-progs.git" - EGIT_BRANCH="devel" -fi - -DESCRIPTION="Btrfs filesystem utilities" -HOMEPAGE="https://btrfs.wiki.kernel.org" - -LICENSE="GPL-2" -SLOT="0/${libbtrfs_soname}" -IUSE="+convert python reiserfs static static-libs +zstd" - -RESTRICT=test # tries to mount repared filesystems - -RDEPEND=" - dev-libs/lzo:2= - sys-apps/util-linux:0=[static-libs(+)?] - sys-libs/zlib:0= - convert? ( - sys-fs/e2fsprogs:0= - sys-libs/e2fsprogs-libs:0= - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27 - ) - ) - python? ( ${PYTHON_DEPS} ) - zstd? ( app-arch/zstd:0= ) -" -DEPEND="${RDEPEND} - convert? ( sys-apps/acl ) - python? ( dev-python/setuptools[${PYTHON_USEDEP}] ) - static? ( - dev-libs/lzo:2[static-libs(+)] - sys-apps/util-linux:0[static-libs(+)] - sys-libs/zlib:0[static-libs(+)] - convert? ( - sys-fs/e2fsprogs:0[static-libs(+)] - sys-libs/e2fsprogs-libs:0[static-libs(+)] - reiserfs? ( - >=sys-fs/reiserfsprogs-3.6.27[static-libs(+)] - ) - ) - zstd? ( app-arch/zstd:0[static-libs(+)] ) - ) -" -BDEPEND=" - >=app-text/asciidoc-8.6.0 - app-text/docbook-xml-dtd:4.5 - app-text/xmlto -" - -if [[ ${PV} == 9999 ]]; then - DEPEND+=" sys-devel/gnuconfig" -fi - -REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" - -pkg_setup() { - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - if [[ ${PV} == 9999 ]]; then - AT_M4DIR=m4 eautoreconf - mkdir config || die - local automakedir="$(autotools_run_tool --at-output automake --print-libdir)" - [[ -e ${automakedir} ]] || die "Could not locate automake directory" - ln -s "${automakedir}"/install-sh config/install-sh || die - ln -s "${EPREFIX}"/usr/share/gnuconfig/config.guess config/config.guess || die - ln -s "${EPREFIX}"/usr/share/gnuconfig/config.sub config/config.sub || die - fi -} - -src_configure() { - local myeconfargs=( - --bindir="${EPREFIX}"/sbin - $(use_enable convert) - $(use_enable elibc_glibc backtrace) - $(use_enable python) - $(use_enable static-libs static) - $(use_enable zstd) - --with-convert=ext2$(usex reiserfs ',reiserfs' '') - ) - econf "${myeconfargs[@]}" -} - -src_compile() { - emake V=1 all $(usev static) -} - -src_install() { - local makeargs=( - $(usex python install_python '') - $(usex static install-static '') - ) - emake V=1 DESTDIR="${D}" install "${makeargs[@]}" - newbashcomp btrfs-completion btrfs - use python && python_optimize -} diff --git a/sys-fs/btrfs-progs/files/btrfs-progs-5.1-LDFLAGS.patch b/sys-fs/btrfs-progs/files/btrfs-progs-5.1-LDFLAGS.patch new file mode 100644 index 000000000000..fa1fe7a5ede3 --- /dev/null +++ b/sys-fs/btrfs-progs/files/btrfs-progs-5.1-LDFLAGS.patch @@ -0,0 +1,37 @@ +https://github.com/kdave/btrfs-progs/pull/172 +https://bugs.gentoo.org/686284 + +From 7cdb5de31e954416e740886d46809e4883c31ddc Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich +Date: Sun, 19 May 2019 08:51:28 +0100 +Subject: [PATCH] Makefile: apply LDFLAGS to libbtrfsutil.so +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libbtrfs.so already has user's LDFLAGS applied. +The change also applies those to libbtrfsutil.so. + +Reported-by: Michał Górny +Bug: https://bugs.gentoo.org/686284 +Signed-off-by: Sergei Trofimovich +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index e25e256f..4c67d187 100644 +--- a/Makefile ++++ b/Makefile +@@ -424,7 +424,7 @@ libbtrfsutil/%.o: libbtrfsutil/%.c + + libbtrfsutil.so.$(libbtrfsutil_version): $(libbtrfsutil_objects) + @echo " [LD] $@" +- $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) \ ++ $(Q)$(CC) $(LIBBTRFSUTIL_CFLAGS) $(libbtrfsutil_objects) $(LDFLAGS) \ + -shared -Wl,-soname,libbtrfsutil.so.$(libbtrfsutil_major) -o $@ + + libbtrfsutil.a: $(libbtrfsutil_objects) +-- +2.21.0 + -- cgit v1.2.3-65-gdbad