From 6d5fbde43cc01c3cdec5e91170f84ac569819aa1 Mon Sep 17 00:00:00 2001 From: meator 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 " +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 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 " +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 +}