Bug 258730

Summary: audio/soundtouch: Update to 2.3.1
Product: Ports & Packages Reporter: Daniel Engberg <diizzy>
Component: Individual Port(s)Assignee: Daniel Engberg <diizzy>
Status: Closed FIXED    
Severity: Affects Only Me CC: diizzy, pkubaj
Priority: --- Flags: crees: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
Patch for soundtouch
Patch for soundtouch v2
Patch for soundtouch v3 none

Description Daniel Engberg freebsd_committer 2021-09-26 08:21:41 UTC
Created attachment 228187 [details]
Patch for soundtouch

Simplify and move build to CMake
I'll try to upstream as many build fixes as possible (INTEGER_SAMPLES is already in)
We don't guarantee NEON availaility on ARMv7 so disable it for now

Compile tested on FreeBSD 13.0-STABLE #0 stable/13-n246086-a20c597c6d7 (amd64) (make, make check-plist, make test)
Compile tested on FreeBSD 13.0-STABLE #0 stable/13-n246453-06887e06864-dirty (arm64) (make, make check-plist, make test)

Poudriere testport OK 12.2-RELEASE
Comment 1 Daniel Engberg freebsd_committer 2021-09-26 08:23:27 UTC
Upstream doesn't host changelog in a "readable" format but here goes:
Comment 2 Daniel Engberg freebsd_committer 2021-09-26 08:34:49 UTC
Created attachment 228188 [details]
Patch for soundtouch v2

Attached wrong patch, sorry
Comment 3 Daniel Engberg freebsd_committer 2021-09-26 08:37:43 UTC
...and no make test, copy n paste error
This just isn't my day ;)
Comment 4 Daniel Engberg freebsd_committer 2021-10-04 09:18:39 UTC
Created attachment 228422 [details]
Patch for soundtouch v3

Add options for OpenMP and OPTIMIZED_CFLAGS
Slightly rearrage Makefile
Comment 5 Daniel Engberg freebsd_committer 2021-10-04 09:20:27 UTC
As for the CFLAGS option it's what upstream sets and there is a quite a difference in performance on my aarch64 SBC (RockPro64).

        15.48s real             15.29s user             0.18s sys
        12.77s real             12.48s user             0.28s sys
        6.57s real              6.37s user              0.19s sys
-O2 + OpenMP
        6.64s real              37.11s user             1.37s sys
-O3 + OpenMP
        6.38s real              36.96s user             1.17s sys
-Ofast + OpenMP
        2.40s real              13.62s user             0.76s sys
Comment 6 Chris Rees freebsd_committer 2021-10-04 09:35:23 UTC
Thanks!  Please feel free to take this one on if you like too.
Comment 7 Daniel Engberg freebsd_committer 2021-10-04 10:34:31 UTC
Hi Chris,
Do you see any downside/issues with enabling OpenMP on amd64 and aarch64 by default?
Comment 8 Chris Rees freebsd_committer 2021-10-04 10:36:08 UTC
Absolutely none at all.  We can always make a FLAVOUR out of it if anyone complains.
Comment 9 Daniel Engberg freebsd_committer 2021-10-04 10:53:26 UTC
Sure, thanks!
I've also submitted the changes upstream
Comment 10 commit-hook freebsd_committer 2021-10-04 21:44:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0aa2d3e9ead7804062491e26ed97c2e82ac22605

commit 0aa2d3e9ead7804062491e26ed97c2e82ac22605
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2021-10-04 21:38:42 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2021-10-04 21:43:54 +0000

    audio/soundtouch: Update to 2.3.1

    Switch to CMake
    Enable OpenMP on aarch64 and amd64 by default
    Enable OPTIMIZED_CFLAGS by default

    PR:             258730
    Approved by:    port maintainer, arrowd (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32288

 audio/soundtouch/Makefile                         | 46 +++++++++--------------
 audio/soundtouch/distinfo                         |  6 +--
 audio/soundtouch/files/patch-CMakeLists.txt (new) | 46 +++++++++++++++++++++++
 audio/soundtouch/pkg-plist                        | 10 +++--
 4 files changed, 72 insertions(+), 36 deletions(-)
Comment 11 Piotr Kubaj freebsd_committer 2021-10-06 21:52:21 UTC
Is there any reason why OPENMP is enabled only for aarch64 and amd64?
Comment 12 Daniel Engberg freebsd_committer 2021-10-06 21:56:58 UTC
(In reply to Piotr Kubaj from comment #11)
They're the only platforms I have available for testing
Comment 13 Piotr Kubaj freebsd_committer 2021-10-06 22:10:10 UTC
(In reply to Daniel Engberg from comment #12)
Do you mind if I test on powerpc64 and powerpc64le and enable it there if it works?
Comment 14 Piotr Kubaj freebsd_committer 2021-10-06 22:10:56 UTC
I could also test on riscv64, but since the board is quite slow, it will take some time.
Comment 15 Daniel Engberg freebsd_committer 2021-10-07 06:03:08 UTC

Not at all, go ahead! :)