From e366c6c2be7a8a2f1ca07831d168a7b50a4e8726 Mon Sep 17 00:00:00 2001 From: Colin Booth Date: Mon, 28 Jun 2021 11:13:28 -0700 Subject: [PATCH] wineasio: update to 1.0.0 Note that this moves the package out of nonfree since the vendored realtime library changed. It's still vendored, but it's no longer vendoring something with a restrictive license. I wasn't sure about the suitability for cross compilation so I'm leaving it as targetting x86 only, but it's now buildable for 64 bit as well. --- srcpkgs/wineasio/patches/wine-unicode_h.patch | 59 ------------------- srcpkgs/wineasio/template | 38 ++++++------ 2 files changed, 20 insertions(+), 77 deletions(-) delete mode 100644 srcpkgs/wineasio/patches/wine-unicode_h.patch diff --git a/srcpkgs/wineasio/patches/wine-unicode_h.patch b/srcpkgs/wineasio/patches/wine-unicode_h.patch deleted file mode 100644 index 3f66a150f38e..000000000000 --- a/srcpkgs/wineasio/patches/wine-unicode_h.patch +++ /dev/null @@ -1,59 +0,0 @@ -Source: @pullmoll -Upstream: no -Reason: wine/unicode.h does not exist anymore and also strrchrW() - is not available. Replace the code with a simple linear - scan over the application_path array to find the rightmost - backslash (\) and period (.) for creating the application_name. - ---- a/wineasio/asio.c 2013-10-28 15:22:00.000000000 +0100 -+++ b/wineasio/asio.c 2021-02-07 21:18:46.741180398 +0100 -@@ -24,6 +24,7 @@ - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA - */ - -+#define _UNICODE - #include - #include - #include -@@ -34,7 +35,6 @@ - #include "objbase.h" - #include "mmsystem.h" - #include "winreg.h" --#include "wine/unicode.h" - - #include - #include -@@ -1449,7 +1449,7 @@ - { - HKEY hkey; - LONG result, value; -- DWORD type, size; -+ DWORD type, size, pos, backslash, period; - WCHAR application_path [MAX_PATH]; - WCHAR *application_name; - char environment_variable[MAX_ENVIRONMENT_SIZE]; -@@ -1601,10 +1601,20 @@ - - /* get client name by stripping path and extension */ - GetModuleFileNameW(0, application_path, MAX_PATH); -- application_name = strrchrW(application_path, L'.'); -- *application_name = 0; -- application_name = strrchrW(application_path, L'\\'); -- application_name++; -+ backslash = 0; -+ period = 0; -+ for (pos = 0; pos < MAX_PATH; pos++) { -+ if (L'\\' == application_path[pos]) -+ backslash = pos; -+ if (L'.' == application_path[pos]) -+ period = pos; -+ if (0 == application_path[pos]) -+ break; -+ } -+ if (period > 0) { -+ application_path[period] = 0; -+ } -+ application_name = backslash ? &application_path[backslash + 1] : application_path; - WideCharToMultiByte(CP_ACP, WC_SEPCHARS, application_name, -1, This->jack_client_name, ASIO_MAX_NAME_LENGTH, NULL, NULL); - - RegCloseKey(hkey); diff --git a/srcpkgs/wineasio/template b/srcpkgs/wineasio/template index bc529e72b3cc..6fa9f98ccd0a 100644 --- a/srcpkgs/wineasio/template +++ b/srcpkgs/wineasio/template @@ -1,30 +1,32 @@ # Template file for 'wineasio' pkgname=wineasio -version=0.9.2 -revision=7 -archs="i686" -repository="nonfree" +version=1.0.0 +revision=1 +archs="i686 x86_64" build_style=gnu-makefile -create_wrksrc=yes -build_wrksrc=${pkgname} -homepage="https://sourceforge.net/projects/wineasio" -hostmakedepends="unzip wine-tools" +_rtaudio_ver=5.1.0 +hostmakedepends="unzip wine-tools pkg-config" makedepends="wine wine-devel jack-devel" depends="jack" short_desc="JACK driver for WINE to provide Windows Apps with ASIO support" maintainer="Orphaned " -license="LGPL-2.1, Steinberg" -distfiles="${SOURCEFORGE_SITE}/wineasio/${pkgname}-${version}.tar.gz - https://www.steinberg.net/sdk_downloads/asiosdk2.3.zip" -checksum="9fbc2d10a4cec307dc0558bed82b887c864424d16da40a80f1d80f907d92af0b - 69225020e9144af568784c6076b55939a55369edaf0ffcdf4d5e5b5898f31b9b" +license="GPL-2.0-or-later, LGPL-2.1-or-later" +homepage="https://sourceforge.net/projects/wineasio" +distfiles="https://github.com/wineasio/wineasio/archive/refs/tags/v${version}.tar.gz + https://github.com/falkTX/rtaudio/archive/refs/tags/${_rtaudio_ver}.tar.gz" +checksum="6938457947373c3c3411c69a9cd3a6835191a04ec694d477b0ecf59161a98d28 + 42242eb0db5902166a38530c242567294510f57be22754cfafe31ed1f35b76bf" + +case "$XBPS_TARGET_MACHINE" in + i686) make_build_target=32 ;; + x86_64) make_build_target=64 ;; +esac -pre_configure() { - cp -v ../ASIOSDK2.3/common/asio.h asio.h +post_extract() { + cp -ar "${XBPS_BUILDDIR}/rtaudio-${_rtaudio_ver}"/* "${wrksrc}/rtaudio" } do_install() { - vinstall wineasio.dll.so 755 usr/lib/wine - vinstall README 644 usr/share/wineasio - vlicense "../ASIOSDK2.3/Steinberg ASIO Licensing Agreement.pdf" + vinstall build${make_build_target}/wineasio.dll.so 755 usr/lib/wine + vinstall README.md 644 usr/share/wineasio }