Github messages for voidlinux
 help / color / mirror / Atom feed
From: oreo639 <oreo639@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] binutils: make libiberty-devel into subpkg
Date: Sat, 25 Feb 2023 12:35:11 +0100	[thread overview]
Message-ID: <20230225113511.ZEYtXsZKBQIImzLQgcSopcjn7Vj1S1cMfdlYExy0864@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-41878@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]

There is an updated pull request by oreo639 against master on the void-packages repository

https://github.com/oreo639/void-packages libiberty
https://github.com/void-linux/void-packages/pull/41878

binutils: make libiberty-devel into subpkg
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

Currently libiberty-devel fails to build due to the distfile being deleted.

The previous debian source we used was taken from binutils 2.39 source anyway.

Also require packages that use it to explicitly depend on it.

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/41878.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libiberty-41878.patch --]
[-- Type: text/x-diff, Size: 6976 bytes --]

From b59448523a584c2da594ec0d4ea7309c583a666e Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 25 Jan 2023 21:05:01 -0800
Subject: [PATCH 1/4] binutils: make libiberty-devel into subpkg

libiberty used to be provided by the binutils package.
It was changed to a seperate package because that's what debian does.
This makes it a subpackage as the debian source is copied from binutils anyway.

This also removes libiberty-devel from the depends of binutils-devel as it
isn't required by binutils-devel and packages depending on it should do so
explicitly.
---
 srcpkgs/binutils/template        | 24 +++++++++++++++++++-----
 srcpkgs/libiberty-devel          |  1 +
 srcpkgs/libiberty-devel/template | 16 ----------------
 3 files changed, 20 insertions(+), 21 deletions(-)
 create mode 120000 srcpkgs/libiberty-devel
 delete mode 100644 srcpkgs/libiberty-devel/template

diff --git a/srcpkgs/binutils/template b/srcpkgs/binutils/template
index c355a5fc8016..78287be63ebe 100644
--- a/srcpkgs/binutils/template
+++ b/srcpkgs/binutils/template
@@ -1,7 +1,7 @@
 # Template file for 'binutils'
 pkgname=binutils
 version=2.39
-revision=1
+revision=2
 bootstrap=yes
 hostmakedepends="pkgconf"
 makedepends="zlib-devel"
@@ -9,7 +9,7 @@ short_desc="GNU binary utilities"
 maintainer="Enno Boland <gottox@voidlinux.org>"
 license="GPL-3.0-or-later"
 homepage="http://www.gnu.org/software/binutils/"
-distfiles="${GNU_SITE}/$pkgname/$pkgname-$version.tar.xz"
+distfiles="${GNU_SITE}/binutils/binutils-${version}.tar.xz"
 checksum=645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00
 
 subpackages="binutils-doc"
@@ -18,7 +18,7 @@ if [ "$CHROOT_READY" ]; then
 	makedepends+=" elfutils-devel"
 	checkdepends="bc"
 	depends="binutils-doc"
-	subpackages+=" binutils-devel"
+	subpackages+=" libiberty-devel binutils-devel"
 fi
 
 _get_triplet() {
@@ -36,7 +36,7 @@ do_configure() {
 	local conf
 
 	if [ "$CHROOT_READY" ]; then
-		conf+=" --with-debuginfod --enable-shared"
+		conf+=" --with-debuginfod --enable-shared --enable-install-libiberty"
 	else
 		conf+=" --without-debuginfod --disable-shared --disable-install-libbfd"
 	fi
@@ -102,6 +102,10 @@ do_configure() {
 
 do_build() {
 	cd ${wrksrc}/build && make ${makejobs}
+
+	# Rebuild libiberty.a with -fPIC.
+	make ${makejobs} -C libiberty clean
+	make ${makejobs} CFLAGS="-fPIC $CFLAGS" -C libiberty
 }
 
 # there is a testsuite now, but e.g. ifunc tests all fail on musl and
@@ -145,7 +149,7 @@ do_install() {
 }
 
 binutils-devel_package() {
-	depends="zlib-devel libiberty-devel"
+	depends="zlib-devel"
 	short_desc+=" - development files"
 	pkg_install() {
 		vmove usr/include
@@ -163,3 +167,13 @@ binutils-doc_package() {
 		rm -f ${PKGDESTDIR}/usr/share/info/standards.info
 	}
 }
+
+libiberty-devel_package() {
+	reverts="20220713_1 20210106_1"
+	short_desc="Library of utility functions used by GNU programs"
+	conflicts="binutils-devel<=2.35.1_3"
+	pkg_install() {
+		vmove usr/include/libiberty
+		vmove usr/lib/libiberty.a
+	}
+}
diff --git a/srcpkgs/libiberty-devel b/srcpkgs/libiberty-devel
new file mode 120000
index 000000000000..695eb82eae64
--- /dev/null
+++ b/srcpkgs/libiberty-devel
@@ -0,0 +1 @@
+binutils
\ No newline at end of file
diff --git a/srcpkgs/libiberty-devel/template b/srcpkgs/libiberty-devel/template
deleted file mode 100644
index d9618e3806ba..000000000000
--- a/srcpkgs/libiberty-devel/template
+++ /dev/null
@@ -1,16 +0,0 @@
-# Template file for 'libiberty-devel'
-pkgname=libiberty-devel
-version=20220713
-revision=1
-build_wrksrc=libiberty
-build_style=gnu-configure
-configure_args="--disable-multilib --enable-install-libiberty"
-short_desc="Library of utility functions used by GNU programs"
-maintainer="Orphaned <orphan@voidlinux.org>"
-license="GPL-3.0-or-later"
-homepage="http://gcc.gnu.org/"
-distfiles="http://deb.debian.org/debian/pool/main/libi/libiberty/libiberty_${version}.orig.tar.xz"
-checksum=b59050f48c8a0f9c9e6fba5d17c7a4f11d1329de0c0dca7331b767a6d2bbe8d9
-conflicts="binutils-devel<=2.35.1_3"
-
-CFLAGS="-fPIC"

From faa12db8cb0b36443c356f74dd4c660f13b41104 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 25 Jan 2023 22:30:13 -0800
Subject: [PATCH 2/4] prelink-cross: explicitly depend on libiberty-devel

---
 srcpkgs/prelink-cross/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/prelink-cross/template b/srcpkgs/prelink-cross/template
index 90722262128c..e89603955472 100644
--- a/srcpkgs/prelink-cross/template
+++ b/srcpkgs/prelink-cross/template
@@ -5,7 +5,7 @@ revision=2
 _githash=ca213abd9ebfd77a04e3a967bf9f7bc1ef832087
 build_style=gnu-configure
 hostmakedepends="automake libtool"
-makedepends="elfutils-devel binutils-devel"
+makedepends="elfutils-devel binutils-devel libiberty-devel"
 case $XBPS_TARGET_MACHINE in
 	*-musl) makedepends+=" argp-standalone"; LDFLAGS+=" -largp" ;;
 esac

From 6a09be5521e5d195222cdf4f8b650c7ed461d587 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 25 Jan 2023 22:35:23 -0800
Subject: [PATCH 3/4] distcc: explicitly depend on libiberty-devel

---
 srcpkgs/distcc/template | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/srcpkgs/distcc/template b/srcpkgs/distcc/template
index de16773fc33b..9a7d29c5c7d7 100644
--- a/srcpkgs/distcc/template
+++ b/srcpkgs/distcc/template
@@ -8,7 +8,7 @@ conf_files="
 	/etc/distcc/hosts
 	/etc/distcc/clients.allow"
 hostmakedepends="automake libtool pkg-config which"
-makedepends="binutils-devel popt-devel avahi-libs-devel"
+makedepends="binutils-devel libiberty-devel popt-devel avahi-libs-devel"
 short_desc="Distributed compilation for faster C/C++ builds"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"

From 0a11c4d74e3ade203d7f9c01087704fbf28695f2 Mon Sep 17 00:00:00 2001
From: oreo639 <oreo6391@gmail.com>
Date: Wed, 25 Jan 2023 22:43:48 -0800
Subject: [PATCH 4/4] linux-tools: explicitly depend on libiberty-devel

---
 srcpkgs/linux-tools/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/linux-tools/template b/srcpkgs/linux-tools/template
index baf111b170ec..74e5930beb18 100644
--- a/srcpkgs/linux-tools/template
+++ b/srcpkgs/linux-tools/template
@@ -5,10 +5,10 @@ revision=11
 build_style=meta
 hostmakedepends="asciidoc automake flex gettext libtool perl python3
  python3-docutils xmlto"
-makedepends="babeltrace-devel binutils-devel elfutils-devel eudev-libudev-devel
+makedepends="babeltrace-devel binutils-devel libiberty-devel elfutils-devel
  libcap-devel liblzma-devel openssl-devel libsysfs-devel libunwind-devel
  libzstd-devel ncurses-devel pciutils-devel python3-devel readline-devel
- slang-devel libaudit-devel"
+ slang-devel libaudit-devel eudev-libudev-devel"
 depends="cpupower-${version}_${revision} perf-${version}_${revision} usbip-${version}_${revision}"
 short_desc="Linux kernel tools meta-pkg"
 maintainer="Enno Boland <gottox@voidlinux.org>"

  parent reply	other threads:[~2023-02-25 11:35 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-26  6:58 [PR PATCH] " oreo639
2023-01-26  7:03 ` [PR PATCH] [Updated] " oreo639
2023-01-26  7:05 ` oreo639
2023-01-26  7:07 ` oreo639
2023-01-26  7:45 ` oreo639
2023-01-26  7:50 ` oreo639
2023-01-26  8:56 ` [PR PATCH] [Updated] " oreo639
2023-02-25 11:35 ` oreo639 [this message]
2023-04-12  6:13 ` oreo639
2023-04-12  6:17 ` oreo639
2023-04-12 11:20 ` [PR PATCH] [Merged]: " leahneukirchen

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=20230225113511.ZEYtXsZKBQIImzLQgcSopcjn7Vj1S1cMfdlYExy0864@z \
    --to=oreo639@users.noreply.github.com \
    --cc=ml@inbox.vuxu.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;
as well as URLs for NNTP newsgroup(s).