Github messages for voidlinux
 help / color / mirror / Atom feed
From: meator <meator@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: hwinfo-21.77
Date: Wed, 27 Oct 2021 14:35:05 +0200	[thread overview]
Message-ID: <20211027123505.CLecLIlWIr_uPpxVHwY8a_34Xvs6ZQ1acyPjSwIk-eI@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-33757@inbox.vuxu.org>

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

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

https://github.com/meator/void-packages hwinfo
https://github.com/void-linux/void-packages/pull/33757

New package: hwinfo-21.77
<!-- Mark items with [x] where applicable -->
The current templates are working, but I'd like to make hwinfo cross-compilable.

#### General
- [x] This is a new package and it conforms to the [quality requirements](https://github.com/void-linux/void-packages/blob/master/Manual.md#quality-requirements)

#### Have the results of the proposed changes been tested?
- [ ] I use the packages affected by the proposed changes on a regular basis and confirm this PR works for me
- [x] I generally don't use the affected packages but briefly tested this PR

Closes #32402

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

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

From a05b110ff7f3f81fee4125547dff7824b54f09de Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Tue, 26 Oct 2021 10:26:44 +0200
Subject: [PATCH 1/2] New package: libx86emu-3.3

---
 common/shlibs                                 |  1 +
 srcpkgs/libx86emu-devel                       |  1 +
 ...-test-suite-for-32-bit-architectures.patch | 27 +++++++++++++
 srcpkgs/libx86emu/patches/makefile.patch      | 38 +++++++++++++++++++
 srcpkgs/libx86emu/template                    | 32 ++++++++++++++++
 5 files changed, 99 insertions(+)
 create mode 120000 srcpkgs/libx86emu-devel
 create mode 100644 srcpkgs/libx86emu/patches/fix-test-suite-for-32-bit-architectures.patch
 create mode 100644 srcpkgs/libx86emu/patches/makefile.patch
 create mode 100644 srcpkgs/libx86emu/template

diff --git a/common/shlibs b/common/shlibs
index 8e5cf6f4a2f0..0f0b68bb107b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4032,3 +4032,4 @@ libstemmer.so.2 libstemmer-2.1.0_1
 libdecor-0.so.0 libdecor-0.1.0_1
 libavif.so.13 libavif-0.9.3_1
 libkdumpfile.so.8 libkdumpfile-0.4.0_1
+libx86emu.so.3 libx86emu-3.3_1
diff --git a/srcpkgs/libx86emu-devel b/srcpkgs/libx86emu-devel
new file mode 120000
index 000000000000..2a7a94ee3c36
--- /dev/null
+++ b/srcpkgs/libx86emu-devel
@@ -0,0 +1 @@
+libx86emu
\ No newline at end of file
diff --git a/srcpkgs/libx86emu/patches/fix-test-suite-for-32-bit-architectures.patch b/srcpkgs/libx86emu/patches/fix-test-suite-for-32-bit-architectures.patch
new file mode 100644
index 000000000000..600e8a7c026a
--- /dev/null
+++ b/srcpkgs/libx86emu/patches/fix-test-suite-for-32-bit-architectures.patch
@@ -0,0 +1,27 @@
+From 7da622e834bf7e8e2a6eec51fae53084b3f190ac Mon Sep 17 00:00:00 2001
+From: Steffen Winterfeldt <wfeldt@opensuse.org>
+Date: Wed, 20 Oct 2021 12:25:03 +0200
+Subject: fix test suite for 32-bit architectures
+
+---
+ test/prepare_test | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/test/prepare_test b/test/prepare_test
+index 17203a3..389b7aa 100755
+--- a/test/prepare_test
++++ b/test/prepare_test
+@@ -414,7 +414,9 @@ sub nr
+   $n = ((int rand 0x1000000) & 0xffff00) << 8;
+   $n += int((rand 0x1000000) / 11);
+ 
+-  return $n;
++  # Limit the result to a 32 bit number but avoid '&' to ensure it works
++  # with 32 bit perl.
++  return $n % 2 ** 32;
+ }
+ 
+ 
+-- 
+2.33.1
+
diff --git a/srcpkgs/libx86emu/patches/makefile.patch b/srcpkgs/libx86emu/patches/makefile.patch
new file mode 100644
index 000000000000..5c5465c54f3e
--- /dev/null
+++ b/srcpkgs/libx86emu/patches/makefile.patch
@@ -0,0 +1,38 @@
+--- a/Makefile	2021-08-18 18:30:18.000000000 +0200
++++ b/Makefile	2021-10-12 20:08:12.973944586 +0200
+@@ -12,7 +12,7 @@
+ MAJOR_VERSION := $(shell $(GIT2LOG) --version VERSION ; cut -d . -f 1 VERSION)
+ 
+ CC	= gcc
+-CFLAGS	= -g -O2 -fPIC -fvisibility=hidden -fomit-frame-pointer -Wall
++CFLAGS	= -g -O2 -fomit-frame-pointer -Wall
+ LDFLAGS =
+ 
+ LIBDIR = /usr/lib$(shell ldd /bin/sh | grep -q /lib64/ && echo 64)
+@@ -27,7 +27,7 @@
+ .PHONY: all shared install test demo clean
+ 
+ %.o: %.c
+-	$(CC) -c $(CFLAGS) $<
++	$(CC) -c -fPIC -fvisibility=hidden $(CFLAGS) $<
+ 
+ all: changelog shared
+ 
+@@ -43,7 +43,7 @@
+ 	install -m 644 -D include/x86emu.h $(DESTDIR)/usr/include/x86emu.h
+ 
+ $(LIB_NAME): .depend $(OBJS)
+-	$(CC) -shared -Wl,-soname,$(LIB_SONAME) $(OBJS) -o $(LIB_NAME) $(LDFLAGS)
++	$(CC) -fvisibility=hidden -shared -Wl,-soname,$(LIB_SONAME) $(OBJS) -o $(LIB_NAME) $(LDFLAGS)
+ 	@ln -snf $(LIB_NAME) $(LIB_SONAME)
+ 	@ln -snf $(LIB_SONAME) $(LIBX86).so
+ 
+@@ -68,7 +68,7 @@
+ 
+ ifneq "$(MAKECMDGOALS)" "clean"
+ .depend: $(CFILES)
+-	@$(CC) -MG -MM $(CFLAGS) $(CFILES) >$@
++	@$(CC) -MG -MM -fPIC -fvisibility=hidden $(CFLAGS) $(CFILES) >$@
+ -include .depend
+ endif
+ 
diff --git a/srcpkgs/libx86emu/template b/srcpkgs/libx86emu/template
new file mode 100644
index 000000000000..03dcfc6c6120
--- /dev/null
+++ b/srcpkgs/libx86emu/template
@@ -0,0 +1,32 @@
+# Template file for 'libx86emu'
+pkgname=libx86emu
+version=3.3
+revision=1
+build_style=gnu-makefile
+make_check_target=test
+make_install_args="LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}"
+checkdepends="perl nasm"
+short_desc="X86 emulation library"
+maintainer="meator <meator.dev@gmail.com>"
+license="MIT" # Old Style with legal disclaimer
+homepage="https://github.com/wfeldt/libx86emu"
+distfiles="https://github.com/wfeldt/libx86emu/archive/refs/tags/${version}.tar.gz"
+checksum=fc043d1229b2fc8215e7fce972640baba86b42a0560069a737a10d013f2d8f02
+
+do_configure() {
+	rm git2log
+	echo ${version} > VERSION
+}
+
+post_install() {
+	vlicense LICENSE
+}
+
+libx86emu-devel_package() {
+	depends="${sourcepkg}>=${version}_${revision}"
+	short_desc+=" - development files"
+	pkg_install() {
+		vmove usr/include
+		vmove "usr/lib/*.so"
+	}
+}

From ecdcacfa3dab891ae834aeafb580df1953faec7e Mon Sep 17 00:00:00 2001
From: meator <meator.dev@gmail.com>
Date: Sun, 17 Oct 2021 10:52:31 +0200
Subject: [PATCH 2/2] New package: hwinfo-21.77

---
 srcpkgs/hwinfo/files/ids.patch  | 13 ++++++++++
 srcpkgs/hwinfo/files/isdn.patch | 24 ++++++++++++++++++
 srcpkgs/hwinfo/template         | 44 +++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 srcpkgs/hwinfo/files/ids.patch
 create mode 100644 srcpkgs/hwinfo/files/isdn.patch
 create mode 100644 srcpkgs/hwinfo/template

diff --git a/srcpkgs/hwinfo/files/ids.patch b/srcpkgs/hwinfo/files/ids.patch
new file mode 100644
index 000000000000..e6d016cf1c8c
--- /dev/null
+++ b/srcpkgs/hwinfo/files/ids.patch
@@ -0,0 +1,13 @@
+--- a/src/ids/Makefile	2021-10-01 13:55:16.000000000 +0200
++++ b/src/ids/Makefile	2021-10-26 13:05:51.241897833 +0200
+@@ -56,8 +56,8 @@
+ hd_ids.c: hd_ids.h hd_ids_tiny.h
+ 
+ hd_ids.h hd.ids: check_hd $(IDFILES)
+-	./check_hd --check --sort --cfile hd_ids.h $(IDFILES)
++	check_hd --check --sort --cfile hd_ids.h $(IDFILES)
+ 
+ hd_ids_tiny.h: check_hd hd.ids
+-	./check_hd --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids
++	check_hd --mini --cfile hd_ids_tiny.h --log=hd_tiny.log --out=hd_tiny.ids hd.ids
+ 
diff --git a/srcpkgs/hwinfo/files/isdn.patch b/srcpkgs/hwinfo/files/isdn.patch
new file mode 100644
index 000000000000..47fa78240395
--- /dev/null
+++ b/srcpkgs/hwinfo/files/isdn.patch
@@ -0,0 +1,24 @@
+Remove isdn_cdb.h from TARGETS, so it won't be recompiled again. This is unnecessary
+because it is already being made explicitly.
+Remove isdn_cdb.h from CLEANFILES. The template uses make clean to clean junk from
+isdn_cdb.h, but it needs isdn_cdb.h, so this will not delete it.
+--- a/src/isdn/cdb/Makefile	2021-10-01 13:55:16.000000000 +0200
++++ b/src/isdn/cdb/Makefile	2021-10-26 12:59:56.810695582 +0200
+@@ -1,6 +1,6 @@
+ TOPDIR		= ../../..
+-TARGETS		= mk_isdnhwdb isdn_cdb.h ISDN.CDB.hwdb
+-CLEANFILES	= isdn_cdb isdn_cdb.h lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb
++TARGETS		= mk_isdnhwdb ISDN.CDB.hwdb
++CLEANFILES	= isdn_cdb lex.yy.c ISDN.CDB.txt mk_isdnhwdb ISDN.CDB.hwdb
+ 
+ include $(TOPDIR)/Makefile.common
+ 
+@@ -28,6 +28,6 @@
+ 
+ mk_isdnhwdb.o: mk_isdnhwdb.c cdb_read.h lex.yy.c
+ 
+-ISDN.CDB.hwdb: mk_isdnhwdb ISDN.CDB.txt
++ISDN.CDB.hwdb: ISDN.CDB.txt
+ 	rm -f  ISDN.CDB.hwdb
+-	./mk_isdnhwdb ISDN.CDB.txt ISDN.CDB.hwdb
++	mk_isdnhwdb ISDN.CDB.txt ISDN.CDB.hwdb
diff --git a/srcpkgs/hwinfo/template b/srcpkgs/hwinfo/template
new file mode 100644
index 000000000000..223a1f3ef997
--- /dev/null
+++ b/srcpkgs/hwinfo/template
@@ -0,0 +1,44 @@
+# Template file for 'hwinfo'
+pkgname=hwinfo
+version=21.77
+revision=1
+build_style=gnu-makefile
+make_use_env=yes
+make_build_args="HWINFO_VERSION=${version} LIBDIR=/usr/lib${XBPS_TARGET_WORDSIZE}"
+make_install_args="${make_build_args}"
+hostmakedepends="perl flex"
+makedepends="libx86emu-devel libuuid-devel"
+short_desc="Hardware information tool"
+maintainer="meator <meator.dev@gmail.com>"
+license="GPL-2.0-or-later"
+homepage="https://github.com/openSUSE/hwinfo"
+distfiles="https://github.com/openSUSE/hwinfo/archive/refs/tags/${version}.tar.gz"
+checksum=4636e776303e2ba5bed47d42a4d03164914649f866334a663ae72d36180a5ae1
+disable_parallel_build=yes
+
+if [ "$CROSS_BUILD" ]; then
+	hostmakedepends+=" hwinfo"
+fi
+
+post_patch() {
+	if [ "$CROSS_BUILD" ]; then
+		for p in ${FILESDIR}/*; do
+			patch -p1 < $p
+		done
+	fi
+}
+
+pre_build() {
+	if [ "$CROSS_BUILD" ]; then
+		CC=gcc CFLAGS= LDFLAGS= make ${make_build_args} -C src/isdn/cdb isdn_cdb.h
+		make -C src/isdn/cdb clean
+	fi
+}
+
+post_install() {
+	mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin
+
+	for m in doc/*.[1-9]; do
+		vman ${m}
+	done
+}

  parent reply	other threads:[~2021-10-27 12:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  9:11 [PR PATCH] " meator
2021-10-26  9:15 ` [PR REVIEW] " meator
2021-10-26 12:15 ` meator
2021-10-26 12:58 ` ericonr
2021-10-26 14:46 ` meator
2021-10-27 12:35 ` meator [this message]
2021-10-27 12:35 ` meator
2021-11-14  7:51 ` [PR PATCH] [Updated] " meator
2021-11-14  8:11 ` meator
2021-11-23 15:15 ` [PR PATCH] [Updated] " meator
2021-12-08 17:51 ` meator
2021-12-25  9:22 ` meator
2021-12-30 14:25 ` leahneukirchen
2021-12-30 16:28 ` [PR PATCH] [Updated] " meator
2021-12-30 16:30 ` meator
2021-12-30 19:22 ` meator
2021-12-30 19:30 ` [PR PATCH] [Merged]: " leahneukirchen
2021-12-30 19:30 ` 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=20211027123505.CLecLIlWIr_uPpxVHwY8a_34Xvs6ZQ1acyPjSwIk-eI@z \
    --to=meator@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).