From 7d6bf6cb18848ad49a4d74d1edeb8aff10816b49 Mon Sep 17 00:00:00 2001 From: siort4 Date: Wed, 2 Aug 2023 05:13:36 -0600 Subject: [PATCH 1/4] New package: ucon64-2.2.2 --- srcpkgs/ucon64/patches/libdiscmage.patch | 31 +++++++++++++++++ .../ucon64/patches/no-hardcoded-optim.patch | 33 +++++++++++++++++++ srcpkgs/ucon64/template | 30 +++++++++++++++++ 3 files changed, 94 insertions(+) create mode 100644 srcpkgs/ucon64/patches/libdiscmage.patch create mode 100644 srcpkgs/ucon64/patches/no-hardcoded-optim.patch create mode 100644 srcpkgs/ucon64/template diff --git a/srcpkgs/ucon64/patches/libdiscmage.patch b/srcpkgs/ucon64/patches/libdiscmage.patch new file mode 100644 index 000000000000..5032d36609e1 --- /dev/null +++ b/srcpkgs/ucon64/patches/libdiscmage.patch @@ -0,0 +1,31 @@ +--- a/src/ucon64.c ++++ b/src/ucon64.c +@@ -2123,7 +2123,7 @@ + #elif defined __APPLE__ // Mac OS X actually + "libdiscmage.dylib"; + #elif defined __unix__ || defined __BEOS__ +- "libdiscmage.so"; ++ "/usr/lib/libdiscmage.so"; + #else + "library"; + #endif +--- a/src/ucon64_misc.c ++++ b/src/ucon64_misc.c +@@ -580,7 +580,7 @@ + { + uint32_t version; + #ifdef DLOPEN +- const char *p = get_property (ucon64.configfile, "discmage_path", PROPERTY_MODE_FILENAME); ++ const char *p = "/usr/lib/libdiscmage.so"; + if (p) + strcpy (ucon64.discmage_path, p); + else +@@ -1229,7 +1229,7 @@ + #elif defined __APPLE__ // Mac OS X actually + PROPERTY_MODE_DIR ("ucon64") "discmage.dylib", + #elif defined __unix__ || defined __BEOS__ +- PROPERTY_MODE_DIR ("ucon64") "discmage.so", ++ "/usr/lib/libdiscmage.so", + #else + "", + #endif diff --git a/srcpkgs/ucon64/patches/no-hardcoded-optim.patch b/srcpkgs/ucon64/patches/no-hardcoded-optim.patch new file mode 100644 index 000000000000..48d8d5640cc9 --- /dev/null +++ b/srcpkgs/ucon64/patches/no-hardcoded-optim.patch @@ -0,0 +1,33 @@ +--- a/src/Makefile ++++ b/src/Makefile +@@ -11,7 +11,7 @@ + CFLAGS0:=$(CFLAGS) + include config.mak + +-CFLAGS+=-I. -Wall -W -Wno-implicit-fallthrough -O3 -fsigned-char ++CFLAGS+=-I. -Wall -W -Wno-implicit-fallthrough -fsigned-char + ifneq ($(findstring clang,$(CC)),clang) + CFLAGS+=-Wno-format-truncation -Wno-stringop-overflow + endif +--- a/src/backup/libcd64/Makefile ++++ b/src/backup/libcd64/Makefile +@@ -10,7 +10,7 @@ + ifdef DEBUG + CFLAGS+=-pg -g -pedantic -ansi -DDEBUG + else +-CFLAGS+=-O3 -funroll-loops ++CFLAGS+=-funroll-loops + ifneq ($(findstring clang,$(CC)),clang) + CFLAGS+=-fexpensive-optimizations + endif +--- a/src/libdiscmage/Makefile.in ++++ b/src/libdiscmage/Makefile.in +@@ -23,7 +23,7 @@ + ifeq ($(CC),cc) + CC=@CC@ + endif +-CFLAGS0:=$(CFLAGS) -I. -Wall -W -Wno-implicit-fallthrough -O3 @DEFS@ ++CFLAGS0:=$(CFLAGS) -I. -Wall -W -Wno-implicit-fallthrough @DEFS@ + ifneq ($(findstring clang,$(CC)),clang) + CFLAGS0+=-Wno-format-truncation -Wno-stringop-overflow + endif diff --git a/srcpkgs/ucon64/template b/srcpkgs/ucon64/template new file mode 100644 index 000000000000..54e4c87a0150 --- /dev/null +++ b/srcpkgs/ucon64/template @@ -0,0 +1,30 @@ +# Template file for 'ucon64' +pkgname=ucon64 +version=2.2.2 +revision=1 +build_wrksrc=src +build_style=gnu-configure +configure_args="--with-libcd64 --enable-ansi-color --with-libdiscmage --with-libusb --with-zlib " +case "${ARCH}" in +(i686|x86_64|x86_64-musl) configure_args+="--enable-parallel" ;; +(*) configure_args+="--disable-parallel" ;; +esac +hostmakedepends="tar" +makedepends="libusb-compat-devel zlib-devel" +short_desc="Multipurpose video game ROM image and backup utility" +maintainer="siort4 Date: Wed, 2 Aug 2023 05:26:22 -0600 Subject: [PATCH 2/4] Change to correct variable --- srcpkgs/ucon64/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ucon64/template b/srcpkgs/ucon64/template index 54e4c87a0150..1ed3ff605d29 100644 --- a/srcpkgs/ucon64/template +++ b/srcpkgs/ucon64/template @@ -5,7 +5,7 @@ revision=1 build_wrksrc=src build_style=gnu-configure configure_args="--with-libcd64 --enable-ansi-color --with-libdiscmage --with-libusb --with-zlib " -case "${ARCH}" in +case "${XBPS_TARGET_MACHINE}" in (i686|x86_64|x86_64-musl) configure_args+="--enable-parallel" ;; (*) configure_args+="--disable-parallel" ;; esac From d44c4a0b39e707e3b45faa0aa59e67907fb327ea Mon Sep 17 00:00:00 2001 From: siort4 Date: Wed, 2 Aug 2023 05:36:35 -0600 Subject: [PATCH 3/4] Add missing ending bracket --- srcpkgs/ucon64/template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srcpkgs/ucon64/template b/srcpkgs/ucon64/template index 1ed3ff605d29..18a4a59efa11 100644 --- a/srcpkgs/ucon64/template +++ b/srcpkgs/ucon64/template @@ -12,7 +12,7 @@ esac hostmakedepends="tar" makedepends="libusb-compat-devel zlib-devel" short_desc="Multipurpose video game ROM image and backup utility" -maintainer="siort4 Date: Wed, 2 Aug 2023 11:02:30 -0600 Subject: [PATCH 4/4] Clean ucon64 template to conform with lint --- srcpkgs/ucon64/template | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/srcpkgs/ucon64/template b/srcpkgs/ucon64/template index 18a4a59efa11..c02935c8b734 100644 --- a/srcpkgs/ucon64/template +++ b/srcpkgs/ucon64/template @@ -5,10 +5,6 @@ revision=1 build_wrksrc=src build_style=gnu-configure configure_args="--with-libcd64 --enable-ansi-color --with-libdiscmage --with-libusb --with-zlib " -case "${XBPS_TARGET_MACHINE}" in -(i686|x86_64|x86_64-musl) configure_args+="--enable-parallel" ;; -(*) configure_args+="--disable-parallel" ;; -esac hostmakedepends="tar" makedepends="libusb-compat-devel zlib-devel" short_desc="Multipurpose video game ROM image and backup utility" @@ -18,13 +14,13 @@ homepage="https://ucon64.sourceforge.io" distfiles="$SOURCEFORGE_SITE/${pkgname}/${pkgname}-${version}-src.tar.gz" checksum=e100ad4a30f6c19abde98e361c6a0ecac4e40477f54cfb75498c5ccd21fb3a18 +case "${XBPS_TARGET_MACHINE}" in +(i686|x86_64|x86_64-musl) configure_args+="--enable-parallel" ;; +(*) configure_args+="--disable-parallel" ;; +esac + do_install() { vcopy libdiscmage/discmage.so /usr/lib/libdiscmage.so vbin ucon64 } - -post_install() { - # license is in html only - vlicense ../license.html -}