From f189b347611b926585aca2f8da64123b259908b4 Mon Sep 17 00:00:00 2001 From: Daniel Martinez Date: Mon, 14 Oct 2024 15:54:23 -0400 Subject: [PATCH] lsp-plugins: update to 1.2.19, enable cross build. --- srcpkgs/lsp-plugins-gst | 1 + srcpkgs/lsp-plugins-vst3 | 1 + srcpkgs/lsp-plugins/patches/musl-locale.patch | 42 +++++++++++++ srcpkgs/lsp-plugins/template | 60 ++++++++++++++++--- 4 files changed, 97 insertions(+), 7 deletions(-) create mode 120000 srcpkgs/lsp-plugins-gst create mode 120000 srcpkgs/lsp-plugins-vst3 create mode 100644 srcpkgs/lsp-plugins/patches/musl-locale.patch diff --git a/srcpkgs/lsp-plugins-gst b/srcpkgs/lsp-plugins-gst new file mode 120000 index 00000000000000..f59057b0c7f794 --- /dev/null +++ b/srcpkgs/lsp-plugins-gst @@ -0,0 +1 @@ +lsp-plugins \ No newline at end of file diff --git a/srcpkgs/lsp-plugins-vst3 b/srcpkgs/lsp-plugins-vst3 new file mode 120000 index 00000000000000..f59057b0c7f794 --- /dev/null +++ b/srcpkgs/lsp-plugins-vst3 @@ -0,0 +1 @@ +lsp-plugins \ No newline at end of file diff --git a/srcpkgs/lsp-plugins/patches/musl-locale.patch b/srcpkgs/lsp-plugins/patches/musl-locale.patch new file mode 100644 index 00000000000000..55f37a8deb4c33 --- /dev/null +++ b/srcpkgs/lsp-plugins/patches/musl-locale.patch @@ -0,0 +1,42 @@ +commit b670813cf0757f01ce0d863aad429b7342f29a3e +Author: Daniel Martinez +Date: Mon Oct 14 15:25:09 2024 -0400 + + Add checks around locales + + With musl libc, many of the locale macros are not defined, causing build + errors + + Check that the macros are defined before using them + +diff --git a/src/main/locale.cpp b/src/main/locale.cpp +index 69ea619..ed84f5d 100644 +--- a/modules/lsp-common-lib/src/main/locale.cpp ++++ b/modules/lsp-common-lib/src/main/locale.cpp +@@ -40,14 +40,24 @@ namespace lsp + case LC_MONETARY: flags = LC_MONETARY_MASK; break; + case LC_MESSAGES: flags = LC_MESSAGES_MASK; break; + case LC_ALL: flags = LC_ALL_MASK; break; +- #if defined(PLATFORM_LINUX) ++ #if defined(LC_PAPER) + case LC_PAPER: flags = LC_PAPER_MASK; break; ++ #endif ++ #if defined(LC_NAME) + case LC_NAME: flags = LC_NAME_MASK; break; ++ #endif ++ #if defined(LC_ADDRESS) + case LC_ADDRESS: flags = LC_ADDRESS_MASK; break; ++ #endif ++ #if defined(LC_TELEPHONE) + case LC_TELEPHONE: flags = LC_TELEPHONE_MASK; break; ++ #endif ++ #if defined(LC_MEASUREMENT) + case LC_MEASUREMENT: flags = LC_MEASUREMENT_MASK; break; ++ #endif ++ #if defined(LC_IDENTIFICATION) + case LC_IDENTIFICATION: flags = LC_IDENTIFICATION_MASK; break; +- #endif /* PLATFORM_LINUX */ ++ #endif + + default: + return INVALID_LOCALE; diff --git a/srcpkgs/lsp-plugins/template b/srcpkgs/lsp-plugins/template index 40dce0617d9dfb..59b147091d2248 100644 --- a/srcpkgs/lsp-plugins/template +++ b/srcpkgs/lsp-plugins/template @@ -1,26 +1,55 @@ # Template file for 'lsp-plugins' pkgname=lsp-plugins -version=1.2.14 -revision=2 +version=1.2.19 +revision=1 build_style=gnu-makefile make_use_env=yes make_build_args="VERBOSE=0" hostmakedepends="pkg-config php lv2" makedepends="lv2 libglvnd-devel jack-devel libsndfile-devel - libXrandr-devel cairo-devel freetype-devel" + libXrandr-devel cairo-devel freetype-devel gst-plugins-base1-devel" depends="lsp-plugins-libs lsp-plugins-xdg - lsp-plugins-clap lsp-plugins-ladspa lsp-plugins-lv2 lsp-plugins-vst2" + lsp-plugins-clap lsp-plugins-ladspa lsp-plugins-lv2 lsp-plugins-vst2 + lsp-plugins-gst lsp-plugins-vst3" short_desc="Collection of open-source audio plugins for studios" maintainer="Orphaned " license="GPL-3.0-or-later" homepage="https://lsp-plug.in/" changelog="https://raw.githubusercontent.com/sadko4u/lsp-plugins/master/CHANGELOG" distfiles="https://github.com/sadko4u/lsp-plugins/releases/download/$version/lsp-plugins-src-${version}.tar.gz" -checksum=1a3359ee8b8a82971bd7e9eeabe43f58ce6b4a4793d85fb16f97b100e4edee9a -nocross="Build system doesn't support cross-compilation properly" +checksum=f0536d790fada3d896670683b71a2916a7bef55a2395f314370015535ec8d959 + +if [ "$CROSS_BUILD" ]; then + hostmakedepends+=" ${makedepends}" +fi do_configure() { - make LD="$CXX" PREFIX=/usr config + _configure_args=( + PREFIX=/usr + LD="$CXX" + ARCHITECTURE="$XBPS_TARGET_MACHINE" + ARCHITECTURE_CFLAGS="$CFLAGS" + ARCHITECTURE_CXXFLAGS="$CXXFLAGS" + ARCHITECTURE_LDFLAGS="$LDFLAGS" + HOST_CC=cc + HOST_CXX=c++ + HOST_LD=c++ + ) + if [ "$CROSS_BUILD" ]; then + _configure_args+=( + CROSS_COMPILE=1 + HOST_ARCHITECTURE_CFLAGS="$XBPS_CFLAGS" + HOST_ARCHITECTURE_CXXFLAGS="$XBPS_CXXFLAGS" + HOST_ARCHITECTURE_LDFLAGS="$XBPS_LDFLAGS" + ) + else + _configure_args+=( + HOST_ARCHITECTURE_CFLAGS="$CFLAGS" + HOST_ARCHITECTURE_CXXFLAGS="$CXXFLAGS" + HOST_ARCHITECTURE_LDFLAGS="$LDFLAGS" + ) + fi + make config "${_configure_args[@]}" } lsp-plugins-libs_package() { @@ -73,6 +102,23 @@ lsp-plugins-vst2_package() { } } +lsp-plugins-gst_package() { + short_desc+=" - gst plugins" + depends="${sourcepkg}-libs>=${version}_${revision}" + pkg_install() { + vmove usr/lib/gstreamer-1.0 + vmove usr/lib/lsp-plugins/liblsp-plugins-gstreamer*.so + } +} + +lsp-plugins-vst3_package() { + short_desc+=" - vst3 plugins" + depends="${sourcepkg}-libs>=${version}_${revision}" + pkg_install() { + vmove usr/lib/vst3 + } +} + lsp-plugins-doc_package() { short_desc+=" - documentation" pkg_install() {