Github messages for voidlinux
 help / color / mirror / Atom feed
From: ypsvlq <ypsvlq@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] mame: update to 0264.
Date: Tue, 23 Apr 2024 11:55:21 +0200	[thread overview]
Message-ID: <20240423095521.353B121803@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49055@inbox.vuxu.org>

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

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

https://github.com/ypsvlq/void-packages mame
https://github.com/void-linux/void-packages/pull/49055

mame: update to 0264.
<!-- Uncomment relevant sections and delete options which are not applicable -->

- switched to qt6
- qt build option removed, disabling it didn't work prior to changes
- extensive template cleanup

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

<!--
#### 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/49055.patch is attached

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

From 79e90d3dfbe664b8c75abffbe92090687f2137f0 Mon Sep 17 00:00:00 2001
From: Elaine Gibson <ypsvlq@gmail.com>
Date: Mon, 1 Apr 2024 10:03:54 +0100
Subject: [PATCH] mame: update to 0264.

---
 srcpkgs/mame/patches/musl-netlist.patch |  11 --
 srcpkgs/mame/patches/pulse-sound.patch  |  12 --
 srcpkgs/mame/template                   | 143 +++++++++---------------
 3 files changed, 55 insertions(+), 111 deletions(-)
 delete mode 100644 srcpkgs/mame/patches/musl-netlist.patch
 delete mode 100644 srcpkgs/mame/patches/pulse-sound.patch

diff --git a/srcpkgs/mame/patches/musl-netlist.patch b/srcpkgs/mame/patches/musl-netlist.patch
deleted file mode 100644
index d02c1bb63cd7a7..00000000000000
--- a/srcpkgs/mame/patches/musl-netlist.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/lib/netlist/plib/pexception.cpp	2017-01-24 23:44:30.000000000 +0100
-+++ b/src/lib/netlist/plib/pexception.cpp	2017-01-25 06:48:09.658604647 +0100
-@@ -8,7 +8,7 @@
- #include <cfloat>
- #include <iostream>
-
--#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__)
-+#if (defined(__x86_64__) || defined(__i386__)) && defined(__linux__) && defined(__GLIBC__)
- #define HAS_FEENABLE_EXCEPT     (1)
- #else
- #define HAS_FEENABLE_EXCEPT     (0)
diff --git a/srcpkgs/mame/patches/pulse-sound.patch b/srcpkgs/mame/patches/pulse-sound.patch
deleted file mode 100644
index f4774fefa5d366..00000000000000
--- a/srcpkgs/mame/patches/pulse-sound.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-https://git.alpinelinux.org/aports/commit/testing/mame/fix-musl.patch?id=0ca943c72056e9ce2cc8f26d9ca7797cf5d04575
-
---- a/src/osd/modules/sound/pulse_sound.cpp
-+++ b/src/osd/modules/sound/pulse_sound.cpp
-@@ -19,6 +19,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <poll.h>
-+#include <signal.h>
- 
- #include <thread>
- #include <pulse/pulseaudio.h>
diff --git a/srcpkgs/mame/template b/srcpkgs/mame/template
index c7903502c94691..fee34ad9bafeb5 100644
--- a/srcpkgs/mame/template
+++ b/srcpkgs/mame/template
@@ -1,78 +1,26 @@
 # Template file for 'mame'
 pkgname=mame
-version=0262
-revision=2
-hostmakedepends="pkg-config python3 qt5-host-tools tar xz which"
-makedepends="SDL2_ttf-devel fontconfig-devel glm libgomp-devel libjpeg-turbo-devel
- libutf8proc-devel libuv-devel portaudio-devel portmidi-devel
- pugixml-devel rapidjson libXinerama-devel $(vopt_if qt 'qt5-devel')"
+version=0264
+revision=1
+hostmakedepends="pkg-config python3 qt6-base"
+makedepends="qt6-base-devel SDL2_ttf-devel asio libutf8proc-devel libgomp-devel
+ rapidjson glm pugixml-devel portmidi-devel portaudio-devel"
 depends="liberation-fonts-ttf"
 short_desc="Multiple Arcade Machine Emulator"
 maintainer="Orphaned <orphan@voidlinux.org>"
 license="GPL-2.0-or-later"
-homepage="http://mamedev.org"
+homepage="https://mamedev.org"
 distfiles="https://github.com/mamedev/mame/archive/mame${version}.tar.gz"
-checksum=64e482f3dd13be4e91c5dfa076fb7a71f450f2879118c6ae452b0037b661aaae
+checksum=3d9f69ed3ef7c1628d5714c8ae2695ea77b1a652a93347b2703f7c862299376e
 nodebug=yes
 replaces="sdlmame>=0 sdlmess>=0"
 
-[ "$XBPS_TARGET_LIBC" = "musl" ] && CXXFLAGS+=" -DBX_CRT_MUSL=1"
-
-case "$XBPS_TARGET_MACHINE" in
-	ppc*)
-		CFLAGS+=" -mlong-double-64"
-		CXXFLAGS+=" -mlong-double-64"
-		;;
-	armv[67]*)
-		LDFLAGS+=" -Wl,--long-plt"
-		;;
-esac
-
-build_options="qt"
-build_options_default="qt"
-
-_options="REGENIE=1 TARGETOS=linux NOWERROR=1 OPENMP=1 OPTIMIZE=3
- TOOLS=1 LTO=0 USE_SYSTEM_LIB_ASIO=0 USE_SYSTEM_LIB_EXPAT=1
- USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1
- USE_SYSTEM_LIB_SQLITE3=1
- USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PORTAUDIO=1
- USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_GLM=1
- USE_SYSTEM_LIB_RAPIDJSON=1 USE_SYSTEM_LIB_PUGIXML=1"
-if [ "$XBPS_TARGET_ENDIAN" = "be" ]; then
-	_options+=" BIGENDIAN=1"
-else
-	_options+=" BIGENDIAN=0"
-fi
-if [ "${CROSS_BUILD}" ]; then
-	_options+=" NOASM=1"
-fi
-if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
-	# Overcome linker memory exhaustion
-	_options+=" SYMBOLS=0"
-	LDFLAGS+=" -Wl,--no-keep-memory"
-else
-	_options+=" PTR64=1"
-	if [ "${XBPS_TARGET_MACHINE%-musl}" = "aarch64" ]; then
-		# Help to reduce impact on our aarch64 builders
-		LDFLAGS+=" -Wl,--no-keep-memory"
-	fi
-fi
-if [ "$build_option_qt" ]; then
-	_options+=" USE_QTDEBUG=1"
-fi
-
-# To test flags with a tiny build remove hash (#) on the following line
-#_options+=" TARGET=mame SUBTARGET=tiny VERBOSE=1"
+post_patch() {
+	vsed -i scripts/toolchain.lua -i 3rdparty/genie/src/host/scripts.c -e 's/-m32//' -e 's/-m64//'
+}
 
 do_configure() {
 	if [ "${CROSS_BUILD}" ]; then
-		case "$XBPS_TARGET_MACHINE" in
-			i686*|x86_64*) ;;
-			*) # Cross compilers don't need/use -m32 or -m64
-				grep -rlw -- -m32 | xargs sed -i "s;-m32;;"
-				grep -rlw -- -m64 | xargs sed -i "s;-m64;;"
-			;;
-		esac
 		CC="$CC_host"
 		CXX="$CXX_host"
 		LD="$CXX_host"
@@ -80,37 +28,61 @@ do_configure() {
 		CXXFLAGS="$CXXFLAGS_host"
 		LDFLAGS="$LDFLAGS_host"
 	fi
-	make CC="$CC" CXX="$CXX" LD="$CXX" \
-		CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" \
-		${makejobs} ${_options} genie
+
+	make $makejobs genie
 }
 
 do_build() {
-	# The build sometimes fails due to parallelism and generated files
-	# not being ready but the 2nd try then passes.
-	make OVERRIDE_CC="$CC" OVERRIDE_CXX="$CXX" OVERRIDE_LD="$CXX" ${makejobs} ${_options} || \
-	make OVERRIDE_CC="$CC" OVERRIDE_CXX="$CXX" OVERRIDE_LD="$CXX" ${makejobs} ${_options}
+	case "$XBPS_TARGET_MACHINE" in
+		ppc*)
+			CFLAGS+=" -mlong-double-64"
+			CXXFLAGS+=" -mlong-double-64"
+			;;
+		armv*)
+			LDFLAGS+=" -Wl,--long-plt"
+			;;
+		aarch64*)
+			# Help to reduce impact on our aarch64 builders
+			LDFLAGS+=" -Wl,--no-keep-memory"
+			;;
+	esac
+
+	CXXFLAGS+=" -I$XBPS_CROSS_BASE/include/qt6"
+	[ "$XBPS_TARGET_LIBC" = "musl" ] && CXXFLAGS+=" -DBX_CRT_MUSL=1"
+
+	if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
+		ptr64=0
+		# Overcome linker memory exhaustion
+		LDFLAGS+=" -Wl,--no-keep-memory"
+	else
+		ptr64=1
+	fi
+
+	if [ "$XBPS_TARGET_ENDIAN" = be ]; then
+		bigendian=1
+	else
+		bigendian=0
+	fi
+
+	make $makejobs TOOLS=1 NOWERROR=1 OPENMP=1 SYMBOLS=0 \
+	 OVERRIDE_CC="$CC" OVERRIDE_CXX="$CXX" OVERRIDE_LD="$CXX" \
+	 PTR64=$ptr64 BIGENDIAN=$bigendian QT_HOME=/usr/lib/qt6 \
+	 USE_SYSTEM_LIB_ASIO=1 USE_SYSTEM_LIB_EXPAT=1 \
+	 USE_SYSTEM_LIB_ZLIB=1 USE_SYSTEM_LIB_ZSTD=1 \
+	 USE_SYSTEM_LIB_JPEG=1 USE_SYSTEM_LIB_FLAC=1 \
+	 USE_SYSTEM_LIB_SQLITE3=1 \
+	 USE_SYSTEM_LIB_PORTMIDI=1 USE_SYSTEM_LIB_PORTAUDIO=1 \
+	 USE_SYSTEM_LIB_UTF8PROC=1 USE_SYSTEM_LIB_GLM=1 \
+	 USE_SYSTEM_LIB_RAPIDJSON=1 USE_SYSTEM_LIB_PUGIXML=1
 }
 
 do_install() {
-	local f
-
 	# Install the mame script
 	vbin ${FILESDIR}/mame.sh mame
 
 	# Install the main application(s)
-	for f in mame mame64 mamearcade mamearcade64; do
-		if [ -r ${f} ]; then
-			vinstall ${f} 755 usr/libexec/${pkgname} mame
-			break
-		fi
-	done
-	for f in mess mess64; do
-		if [ -r ${f} ]; then
-			vinstall ${f} 755 usr/libexec/${pkgname} mess
-			break
-		fi
-	done
+	vinstall mame 755 usr/libexec/mame mame
+	vman docs/man/mame.6
 
 	# Install the tools
 	for f in chdman jedutil regrep pngcmp romcmp srcclean \
@@ -120,11 +92,6 @@ do_install() {
 			vman docs/man/${f}.1
 		fi
 	done
-	for f in mame mess; do
-		if [ -r docs/man/${f}.6 ]; then
-			vman docs/man/${f}.6
-		fi
-	done
 
 	# Install the extra bits
 	for f in artwork bgfx docs hash hlsl keymaps plugins samples; do

  parent reply	other threads:[~2024-04-23  9:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-03 18:05 [PR PATCH] mame: update to 0263 ypsvlq
2024-04-01  9:04 ` [PR PATCH] [Updated] " ypsvlq
2024-04-16 16:05 ` [PR PATCH] [Updated] mame: update to 0264 ypsvlq
2024-04-16 18:16 ` ypsvlq
2024-04-16 20:50 ` ypsvlq
2024-04-16 21:16 ` ypsvlq
2024-04-17  8:03 ` ypsvlq
2024-04-22 19:43 ` cinerea0
2024-04-23  9:55 ` ypsvlq [this message]
2024-04-23 12:43 ` [PR PATCH] [Updated] " ypsvlq
2024-04-23 12:45 ` ypsvlq
2024-04-23 21:21 ` [PR PATCH] [Merged]: " cinerea0

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=20240423095521.353B121803@inbox.vuxu.org \
    --to=ypsvlq@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).