Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] New package: hwinfo-21.77
@ 2021-10-26  9:11 meator
  2021-10-26  9:15 ` [PR REVIEW] " meator
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: meator @ 2021-10-26  9:11 UTC (permalink / raw)
  To: ml

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

There is a new 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: 6133 bytes --]

From e3ec64b81883d6bdb0bfabcf107cd6a416fcd977 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 23ad6e9c0600..6bc63212da01 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..15c28a992e88
--- /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"
+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 9ab754d686ac14ffc296b387ebf693c3a3d66dd9 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/template | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100644 srcpkgs/hwinfo/template

diff --git a/srcpkgs/hwinfo/template b/srcpkgs/hwinfo/template
new file mode 100644
index 000000000000..cda241bc8803
--- /dev/null
+++ b/srcpkgs/hwinfo/template
@@ -0,0 +1,26 @@
+# 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}"
+make_install_args="HWINFO_VERSION=${version}"
+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
+nocross="hwinfo executes several times things that is compiles for generating files"
+disable_parallel_build=yes
+
+post_install() {
+	mv ${DESTDIR}/usr/sbin ${DESTDIR}/usr/bin
+
+	for m in doc/*.[1-9]; do
+		vman ${m}
+	done
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
@ 2021-10-26  9:15 ` meator
  2021-10-26 12:15 ` meator
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-10-26  9:15 UTC (permalink / raw)
  To: ml

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

New review comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#discussion_r736325139

Comment:
Is this ok? Their default is to use `/usr/lib64` when compiled on 64bit system, but their 64bit system detection doesn't work when cross-compiling. 

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
  2021-10-26  9:15 ` [PR REVIEW] " meator
@ 2021-10-26 12:15 ` meator
  2021-10-26 12:58 ` ericonr
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-10-26 12:15 UTC (permalink / raw)
  To: ml

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

New review comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#discussion_r736472964

Comment:
Oh, I haven't noticed that `/usr/lib64` is actually forbidden by Void (https://github.com/void-linux/void-packages/blob/master/common/hooks/pre-pkg/99-pkglint.sh#L11).

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-10-26 12:58 UTC (permalink / raw)
  To: ml

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

New review comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#discussion_r736510294

Comment:
Use `/usr/lib${XBPS_TARGET_WORDSIZE}` if it needs the full path for any reason.

The final package can't have files there, but we do some symlink manipulation to allow them to be installed first.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR REVIEW] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (2 preceding siblings ...)
  2021-10-26 12:58 ` ericonr
@ 2021-10-26 14:46 ` meator
  2021-10-27 12:35 ` [PR PATCH] [Updated] " meator
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-10-26 14:46 UTC (permalink / raw)
  To: ml

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

New review comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#discussion_r736624004

Comment:
If it will end up in `/usr/lib` anyway, why change it to `/usr/lib${XBPS_TARGET_WORDSIZE}`?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (3 preceding siblings ...)
  2021-10-26 14:46 ` meator
@ 2021-10-27 12:35 ` meator
  2021-10-27 12:35 ` meator
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-10-27 12:35 UTC (permalink / raw)
  To: ml

[-- 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
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (4 preceding siblings ...)
  2021-10-27 12:35 ` [PR PATCH] [Updated] " meator
@ 2021-10-27 12:35 ` meator
  2021-11-14  7:51 ` [PR PATCH] [Updated] " meator
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-10-27 12:35 UTC (permalink / raw)
  To: ml

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

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#issuecomment-952881042

Comment:
This should make it fully cross-compilable.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (5 preceding siblings ...)
  2021-10-27 12:35 ` meator
@ 2021-11-14  7:51 ` meator
  2021-11-14  8:11 ` meator
  2021-11-23 15:15 ` [PR PATCH] [Updated] " meator
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-11-14  7:51 UTC (permalink / raw)
  To: ml

[-- 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: 7426 bytes --]

From 6d5fbde43cc01c3cdec5e91170f84ac569819aa1 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 +
 srcpkgs/libx86emu/patches/makefile.patch | 38 ++++++++++++++++++++++++
 srcpkgs/libx86emu/template               | 32 ++++++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 120000 srcpkgs/libx86emu-devel
 create mode 100644 srcpkgs/libx86emu/patches/makefile.patch
 create mode 100644 srcpkgs/libx86emu/template

diff --git a/common/shlibs b/common/shlibs
index 5f6154c610de..4cf135e3b7c4 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4062,3 +4062,4 @@ libomalloc-0.9.6.so singular-4.2.1_1
 libsingular_resources-4.2.1.so singular-4.2.1_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
+libx86emu.so.3 libx86emu-3.4_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/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..b723ae582df0
--- /dev/null
+++ b/srcpkgs/libx86emu/template
@@ -0,0 +1,32 @@
+# Template file for 'libx86emu'
+pkgname=libx86emu
+version=3.4
+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=bfc54da560931ea42db0dc1421164579e7aff1e62a91253ef20f069770e1b9a9
+
+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 5f0abf33f5a7378b21a9b2d2b11a9144aea39cde 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..7ef28f615f43
--- /dev/null
+++ b/srcpkgs/hwinfo/template
@@ -0,0 +1,44 @@
+# Template file for 'hwinfo'
+pkgname=hwinfo
+version=21.78
+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=8693d4e8bc134139fc62e659ca608e138dc089a0cb1194dc93ee278fdef10bba
+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
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (6 preceding siblings ...)
  2021-11-14  7:51 ` [PR PATCH] [Updated] " meator
@ 2021-11-14  8:11 ` meator
  2021-11-23 15:15 ` [PR PATCH] [Updated] " meator
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-11-14  8:11 UTC (permalink / raw)
  To: ml

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

New comment by meator on void-packages repository

https://github.com/void-linux/void-packages/pull/33757#issuecomment-968244375

Comment:
I have updated both packages and removed a patch that was upstreamed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PR PATCH] [Updated] New package: hwinfo-21.77
  2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 meator
                   ` (7 preceding siblings ...)
  2021-11-14  8:11 ` meator
@ 2021-11-23 15:15 ` meator
  8 siblings, 0 replies; 10+ messages in thread
From: meator @ 2021-11-23 15:15 UTC (permalink / raw)
  To: ml

[-- 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: 7410 bytes --]

From d4ab6f0294ace1c7a5050428fd916b79da1298f5 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 +
 srcpkgs/libx86emu/patches/makefile.patch | 38 ++++++++++++++++++++++++
 srcpkgs/libx86emu/template               | 32 ++++++++++++++++++++
 4 files changed, 72 insertions(+)
 create mode 120000 srcpkgs/libx86emu-devel
 create mode 100644 srcpkgs/libx86emu/patches/makefile.patch
 create mode 100644 srcpkgs/libx86emu/template

diff --git a/common/shlibs b/common/shlibs
index ab865cc085d2..85d773fc5659 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4070,3 +4070,4 @@ libbrial_groebner.so.3 brial-1.2.10_1
 libm4ri-0.0.20200125.so m4ri-20200125_1
 libm4rie-0.0.20200125.so m4rie-20200125_1
 libptytty.so.0 libptytty-2.0_1
+libx86emu.so.3 libx86emu-3.4_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/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..b723ae582df0
--- /dev/null
+++ b/srcpkgs/libx86emu/template
@@ -0,0 +1,32 @@
+# Template file for 'libx86emu'
+pkgname=libx86emu
+version=3.4
+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=bfc54da560931ea42db0dc1421164579e7aff1e62a91253ef20f069770e1b9a9
+
+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 d8d031ba249632048f498272bd33ad0c50382941 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..7ef28f615f43
--- /dev/null
+++ b/srcpkgs/hwinfo/template
@@ -0,0 +1,44 @@
+# Template file for 'hwinfo'
+pkgname=hwinfo
+version=21.78
+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=8693d4e8bc134139fc62e659ca608e138dc089a0cb1194dc93ee278fdef10bba
+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
+}

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-23 15:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26  9:11 [PR PATCH] New package: hwinfo-21.77 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 ` [PR PATCH] [Updated] " meator
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

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).