media-sound/linuxsampler: fix modern C issue in configure, other small bits

* Filter LTO (bison ODR)
* Drop obsolete --disable-static w/ EAPI 8
* Sync live ebuild (and drop workaround which was only in 9999 for bug #952945)

Closes: https://bugs.gentoo.org/952945
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James 2025-05-16 08:02:23 +01:00
parent 91fdd48dbd
commit 8cedc08777
No known key found for this signature in database
GPG Key ID: 738409F520DF9190
3 changed files with 84 additions and 10 deletions

View File

@ -0,0 +1,63 @@
https://bugs.gentoo.org/952945
--- a/configure.ac
+++ b/configure.ac
@@ -121,11 +121,11 @@ AC_RUN_IFELSE([AC_LANG_SOURCE([[
#define _GNU_SOURCE 1
#endif
#include <features.h>
-void main(void) {
+int main(void) {
#if _XOPEN_SOURCE >= 500
-exit(0); /* UNIX98 compatible */
+return 0; /* UNIX98 compatible */
#else
-exit(-1); /* not UNIX98 compatible */
+return 1; /* not UNIX98 compatible */
#endif
}
]])],
@@ -339,12 +339,12 @@ if test "$config_alsa_driver" = "yes"; then
AC_LANG_PUSH([C])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <alsa/asoundlib.h>
- void main(void) {
+ int main(void) {
/* ensure backward compatibility */
#if !defined(SND_LIB_MAJOR) && defined(SOUNDLIB_VERSION_MAJOR)
#define SND_LIB_MAJOR SOUNDLIB_VERSION_MAJOR
#endif
- exit(SND_LIB_MAJOR);
+ return(SND_LIB_MAJOR);
}
]])],
alsa_major=0,
@@ -353,12 +353,12 @@ if test "$config_alsa_driver" = "yes"; then
)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <alsa/asoundlib.h>
- void main(void) {
+ int main(void) {
/* ensure backward compatibility */
#if !defined(SND_LIB_MINOR) && defined(SOUNDLIB_VERSION_MINOR)
#define SND_LIB_MINOR SOUNDLIB_VERSION_MINOR
#endif
- exit(SND_LIB_MINOR);
+ return(SND_LIB_MINOR);
}
]])],
alsa_minor=0,
@@ -367,12 +367,12 @@ if test "$config_alsa_driver" = "yes"; then
)
AC_RUN_IFELSE([AC_LANG_SOURCE([[
#include <alsa/asoundlib.h>
- void main(void) {
+ int main(void) {
/* ensure backward compatibility */
#if !defined(SND_LIB_SUBMINOR) && defined(SOUNDLIB_VERSION_SUBMINOR)
#define SND_LIB_SUBMINOR SOUNDLIB_VERSION_SUBMINOR
#endif
- exit(SND_LIB_SUBMINOR);
+ return(SND_LIB_SUBMINOR);
}
]])],
alsa_subminor=0,

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools
inherit autotools flag-o-matic
DESCRIPTION="Software audio sampler engine with professional grade features"
HOMEPAGE="https://www.linuxsampler.org/"
@ -23,7 +23,8 @@ RDEPEND="
lv2? ( media-libs/lv2 )
sqlite? ( dev-db/sqlite )
"
DEPEND="${RDEPEND}
DEPEND="
${RDEPEND}
media-libs/dssi
media-libs/ladspa-sdk
"
@ -36,22 +37,27 @@ PATCHES=(
"${FILESDIR}/${PN}-2.0.0-nptl-hardened.patch"
"${FILESDIR}/${PN}-2.0.0-lv2-automagic.patch"
"${FILESDIR}/${PN}-2.1.1-fix-yyterror-not-declared.patch"
"${FILESDIR}/${PN}-2.3.1-c99-configure.patch"
)
DOCS=( AUTHORS ChangeLog NEWS README )
src_prepare() {
default
# Force regeneration of the file to let it build with all bison
# versions, bug #556204
rm src/network/lscpparser.cpp || die
eautoreconf
}
src_configure() {
# bison ODR issues
filter-lto
local myeconfargs=(
--disable-arts-driver
--disable-static
$(use_enable alsa alsa-driver)
$(use_enable jack jack-driver)
$(use_enable lv2)

View File

@ -1,9 +1,9 @@
# Copyright 1999-2024 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit autotools subversion
inherit autotools flag-o-matic subversion
DESCRIPTION="Software audio sampler engine with professional grade features"
HOMEPAGE="https://www.linuxsampler.org/"
@ -15,14 +15,15 @@ IUSE="alsa doc jack lv2 sf2 sqlite"
REQUIRED_USE="|| ( alsa jack )"
RDEPEND="
media-libs/libgig
>=media-libs/libgig-4.4.0
media-libs/libsndfile[-minimal]
alsa? ( media-libs/alsa-lib )
jack? ( virtual/jack )
lv2? ( media-libs/lv2 )
sqlite? ( dev-db/sqlite )
"
DEPEND="${RDEPEND}
DEPEND="
${RDEPEND}
media-libs/dssi
media-libs/ladspa-sdk
"
@ -34,6 +35,8 @@ BDEPEND="
PATCHES=(
"${FILESDIR}/${PN}-2.0.0-nptl-hardened.patch"
"${FILESDIR}/${PN}-2.0.0-lv2-automagic.patch"
"${FILESDIR}/${PN}-2.1.1-fix-yyterror-not-declared.patch"
"${FILESDIR}/${PN}-2.3.1-c99-configure.patch"
)
DOCS=( AUTHORS ChangeLog NEWS README )
@ -47,16 +50,18 @@ src_prepare() {
}
src_configure() {
# bison ODR issues
filter-lto
local myeconfargs=(
--disable-arts-driver
--disable-static
$(use_enable alsa alsa-driver)
$(use_enable jack jack-driver)
$(use_enable lv2)
$(use_enable sqlite instruments-db)
$(use_enable sf2 sf2-engine)
)
HAVE_UNIX98=1 econf "${myeconfargs[@]}"
econf "${myeconfargs[@]}"
}
src_compile() {