Github messages for voidlinux
 help / color / mirror / Atom feed
From: mmnmnnmnmm <mmnmnnmnmm@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] dosbox-staging: run speexdsp test in cross-builds
Date: Mon, 10 Oct 2022 21:33:23 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39871@inbox.vuxu.org> (raw)

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

There is a new pull request by mmnmnnmnmm against master on the void-packages repository

https://github.com/mmnmnnmnmm/void-packages dosbox-speex
https://github.com/void-linux/void-packages/pull/39871

dosbox-staging: run speexdsp test in cross-builds
Run speexdsp test using qemu-user-static in cross-builds. To be picked up by the next build.

From discussion in https://github.com/dosbox-staging/dosbox-staging/pull/1992.


<!-- Uncomment relevant sections and delete options which are not applicable -->

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

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

From 13a4f69a55984a5e7aa5d83ab19e8456a74bf1c0 Mon Sep 17 00:00:00 2001
From: mmnmnnmnmm <mnnnm@disroot.org>
Date: Mon, 10 Oct 2022 20:26:49 +0100
Subject: [PATCH] dosbox-staging: run speexdsp test in cross-builds

Use qemu-user-static to test target speexdsp library for a hard to
diagnose sound issue.
---
 .../dosbox-staging/patches/fix_cross.patch    | 62 +++++++------------
 srcpkgs/dosbox-staging/template               |  1 +
 2 files changed, 25 insertions(+), 38 deletions(-)

diff --git a/srcpkgs/dosbox-staging/patches/fix_cross.patch b/srcpkgs/dosbox-staging/patches/fix_cross.patch
index 98b0b6b7884c..3cc2ca806c00 100644
--- a/srcpkgs/dosbox-staging/patches/fix_cross.patch
+++ b/srcpkgs/dosbox-staging/patches/fix_cross.patch
@@ -1,55 +1,41 @@
+diff --git a/meson.build b/meson.build
+index 1509deabca..5d517611aa 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -376,24 +376,37 @@
+@@ -377,24 +377,30 @@ speexdsp_dep = dependency(
      static: ('speexdsp' in static_libs_list or prefers_static_libs),
  )
  
 -# The system has SpeexDSP, so test its floating-point handling
 -if speexdsp_dep.found()
--    system_speexdsp_test = cxx.run(
--        files('contrib/check-speexdsp/test_speexdsp_float_api.cpp'),
--        dependencies: speexdsp_dep,
--        name: 'SpeexDSP system library has reliable floating-point API',
--    )
++# The library needs to be available and testable to be trusted
++can_trust_system_speexdsp = (
++    speexdsp_dep.found()
++    and meson.can_run_host_binaries()
++)
++
++# Test the library. Trust is dropped if the test fails.
++if can_trust_system_speexdsp
+     system_speexdsp_test = cxx.run(
+         files('contrib/check-speexdsp/test_speexdsp_float_api.cpp'),
+         dependencies: speexdsp_dep,
+         name: 'SpeexDSP system library has reliable floating-point API',
+     )
 -    is_system_speexdsp_reliable = (
--        system_speexdsp_test.compiled()
--        and system_speexdsp_test.returncode() == 0
--    )
++    can_trust_system_speexdsp = (
+         system_speexdsp_test.compiled()
+         and system_speexdsp_test.returncode() == 0
+     )
 -    if is_system_speexdsp_reliable
--        speexdsp_summary_msg = 'system library'
-+if meson.can_run_host_binaries()
-+    # The system has SpeexDSP, so test its floating-point handling
-+    if speexdsp_dep.found()
-+        system_speexdsp_test = cxx.run(
-+            files('contrib/check-speexdsp/test_speexdsp_float_api.cpp'),
-+            dependencies: speexdsp_dep,
-+            name: 'SpeexDSP system library has reliable floating-point API',
-+        )
-+        is_system_speexdsp_reliable = (
-+            system_speexdsp_test.compiled()
-+            and system_speexdsp_test.returncode() == 0
-+        )
-+        if is_system_speexdsp_reliable
-+            speexdsp_summary_msg = 'system library'
-+        endif
++    if can_trust_system_speexdsp
+         speexdsp_summary_msg = 'system library'
      endif
-+else
-+    speexdsp_summary_msg = 'system library'
  endif
  
 -# The system doesn't have SpeexDSP or it's unreiable, so use the wrap
 -if not speexdsp_dep.found() or not is_system_speexdsp_reliable
-+use_speex_wrap = false
-+# The system doesn't have SpeexDSP or it's unreliable, so use the wrap
-+if not speexdsp_dep.found()
-+    use_speex_wrap = true
-+elif meson.can_run_host_binaries()
-+    if not is_system_speexdsp_reliable
-+        use_speex_wrap = true
-+    endif
-+endif
-+
-+if use_speex_wrap
++# Use the wrap if the system doesn't have SpeexDSP, we couldn't test it, or testing failed
++if not can_trust_system_speexdsp
      speexdsp_dep = subproject(
          'speexdsp',
          default_options: default_wrap_options,
diff --git a/srcpkgs/dosbox-staging/template b/srcpkgs/dosbox-staging/template
index 7173a6fda80a..c844b3db58f6 100644
--- a/srcpkgs/dosbox-staging/template
+++ b/srcpkgs/dosbox-staging/template
@@ -3,6 +3,7 @@ pkgname=dosbox-staging
 version=0.79.1
 revision=1
 build_style=meson
+build_helper=qemu
 hostmakedepends="pkg-config"
 makedepends="SDL2-devel SDL2_net-devel alsa-lib-devel fluidsynth-devel libiir1-devel
  libmt32emu-devel libpng-devel libslirp-devel opusfile-devel speexdsp-devel"

             reply	other threads:[~2022-10-10 19:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 19:33 mmnmnnmnmm [this message]
2023-01-09  1:59 ` github-actions
2023-01-24  1:58 ` [PR PATCH] [Closed]: " github-actions

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39871@inbox.vuxu.org \
    --to=mmnmnnmnmm@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).