guile 3.0: new version of guile (#10798)

The library can be be installed separately from guile 2.2 (and guile 1).

The old version of the package is renamed to guile2.2, its devel and tools packages conflict with the new version. It can be removed as soon as all dependent packages are moved to 3.0.

Lilypond is still built with guile 2.2, as it is the recommended version for the current stable branch. The unstable version switched to guile 3.0 exclusively, so this is a preparation for that.
This commit is contained in:
Joachim Mairböck
2024-08-14 12:00:23 +02:00
committed by GitHub
parent 67fc3b21c6
commit 83601375fb
4 changed files with 224 additions and 14 deletions

View File

@@ -5,12 +5,12 @@ applications. Using Guile in an application allows programmers to write \
plug-ins, or modules (there are many names, but the concept is essentially \
the same) and users to use them to have an application fit their needs."
HOMEPAGE="https://www.gnu.org/software/guile/"
COPYRIGHT="1993-2020 Aubrey Jaffer, George Carrette, et al."
COPYRIGHT="1993-2024 Aubrey Jaffer, George Carrette, et al."
LICENSE="GNU LGPL v3"
REVISION="5"
REVISION="1"
SOURCE_URI="https://ftpmirror.gnu.org/guile/guile-$portVersion.tar.gz
https://ftp.gnu.org/gnu/guile/guile-$portVersion.tar.gz"
CHECKSUM_SHA256="44b4c5fbbe257ccdebea18420212c9b3e90c3c86a54920d8554039fc6769a007"
CHECKSUM_SHA256="2dbdbc97598b2faf31013564efb48e4fed44131d28e996c26abe8a5b23b56c2a"
PATCHES="guile-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
@@ -25,14 +25,13 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then
relativeCommandBinDir=bin
fi
libguileVersion="1.4.2"
libguileVersion="1.7.0"
libguileVersionCompat="$libguileVersion compat >= ${libguileVersion%%.*}"
portVersionCompat="$portVersion compat >= ${portVersion%%.*}"
portVers="${portVersion%.*}"
portVersionCompat="$portVersion compat >= ${portVersion%.*}"
PROVIDES="
guile$secondaryArchSuffix = $portVersionCompat
lib:libguile_$portVers$secondaryArchSuffix = $libguileVersionCompat
lib:libguile_3.0$secondaryArchSuffix = $libguileVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
@@ -69,10 +68,11 @@ REQUIRES_tools="
PROVIDES_devel="
guile${secondaryArchSuffix}_devel = $portVersionCompat
cmd:guile_config$commandSuffix = $portVersion
devel:libguile_$portVers$secondaryArchSuffix = $libguileVersionCompat
devel:libguile_3.0$secondaryArchSuffix = $libguileVersionCompat
"
REQUIRES_devel="
guile$secondaryArchSuffix == $portVersion base
guile${secondaryArchSuffix}_tools == $portVersion
"
BUILD_REQUIRES="
@@ -100,14 +100,15 @@ BUILD_PREREQUIRES="
defineDebugInfoPackage guile$secondaryArchSuffix \
$(getPackagePrefix tools)/"$relativeCommandBinDir"/guile \
"$libDir"/libguile-$portVers.so.$libguileVersion
"$libDir"/libguile-3.0.so.$libguileVersion
BUILD()
{
CPPFLAGS="-D_BSD_SOURCE" LIBS="-lbsd -lnetwork" \
runConfigure --omit-dirs binDir ./configure\
--bindir=$commandBinDir\
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--with-threads \
--with-included-regex \
--disable-static
# No MADV_DONTNEED, yet
@@ -122,10 +123,10 @@ INSTALL()
rm -f "$libDir"/charset.alias
rm -f "$libDir"/lib*.la
rm -f "$libDir"/guile/$portVers/extensions/*.la
rm -f "$libDir"/guile/$portVers/extensions/*.a
rm -f "$libDir"/guile/3.0/extensions/*.la
rm -f "$libDir"/guile/3.0/extensions/*.a
prepareInstalledDevelLib libguile-$portVers
prepareInstalledDevelLib libguile-3.0
fixPkgconfig

View File

@@ -0,0 +1,155 @@
SUMMARY="Libraries for GNU Ubiquitous Intelligent Language for Extensions"
SUMMARY_tools="Binaries for GNU Ubiquitous Intelligent Language for Extensions"
DESCRIPTION="Guile is a library designed to help programmers create flexible \
applications. Using Guile in an application allows programmers to write \
plug-ins, or modules (there are many names, but the concept is essentially \
the same) and users to use them to have an application fit their needs."
HOMEPAGE="https://www.gnu.org/software/guile/"
COPYRIGHT="1993-2020 Aubrey Jaffer, George Carrette, et al."
LICENSE="GNU LGPL v3"
REVISION="1"
SOURCE_URI="https://ftpmirror.gnu.org/guile/guile-$portVersion.tar.gz
https://ftp.gnu.org/gnu/guile/guile-$portVersion.tar.gz"
CHECKSUM_SHA256="44b4c5fbbe257ccdebea18420212c9b3e90c3c86a54920d8554039fc6769a007"
PATCHES="guile2.2-$portVersion.patchset"
SOURCE_DIR="guile-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
relativeCommandBinDir=$relativeBinDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
relativeCommandBinDir=bin
fi
libguileVersion="1.4.2"
libguileVersionCompat="$libguileVersion compat >= ${libguileVersion%%.*}"
portVersionCompat="$portVersion compat >= ${portVersion%.*}"
PROVIDES="
guile2.2$secondaryArchSuffix = $portVersionCompat
lib:libguile_2.2$secondaryArchSuffix = $libguileVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libffi$secondaryArchSuffix
lib:libgc$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libltdl$secondaryArchSuffix
lib:libncurses$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libunistring$secondaryArchSuffix
"
PROVIDES_tools="
guile2.2${secondaryArchSuffix}_tools = $portVersionCompat
cmd:guild$commandSuffix = $portVersion
cmd:guile$commandSuffix = $portVersion
cmd:guile_snarf$commandSuffix = $portVersion
cmd:guile_tools$commandSuffix = $portVersion
"
REQUIRES_tools="
haiku$secondaryArchSuffix
guile2.2$secondaryArchSuffix == $portVersion base
lib:libffi$secondaryArchSuffix
lib:libgc$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libltdl$secondaryArchSuffix
lib:libunistring$secondaryArchSuffix
"
CONFLICTS_tools="
guile${secondaryArchSuffix}_tools
"
PROVIDES_devel="
guile2.2${secondaryArchSuffix}_devel = $portVersionCompat
cmd:guile_config$commandSuffix = $portVersion
devel:libguile_2.2$secondaryArchSuffix = $libguileVersionCompat
"
REQUIRES_devel="
guile2.2$secondaryArchSuffix == $portVersion base
guile2.2${secondaryArchSuffix}_tools == $portVersion
"
CONFLICTS_devel="
guile${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libffi$secondaryArchSuffix
devel:libgc$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libintl$secondaryArchSuffix
devel:libltdl$secondaryArchSuffix
devel:libncurses$secondaryArchSuffix
devel:libreadline$secondaryArchSuffix
devel:libunistring$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:gperf
cmd:grep
cmd:make
cmd:ld
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage guile2.2$secondaryArchSuffix \
$(getPackagePrefix tools)/"$relativeCommandBinDir"/guile \
"$libDir"/libguile-2.2.so.$libguileVersion
BUILD()
{
CPPFLAGS="-D_BSD_SOURCE" LIBS="-lbsd -lnetwork" \
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--with-threads \
--disable-static
# No MADV_DONTNEED, yet
sed --in-place '/HAVE_SYS_MMAN_H/d' config.h
make $jobArgs
}
INSTALL()
{
make install
rm -f "$libDir"/charset.alias
rm -f "$libDir"/lib*.la
rm -f "$libDir"/guile/2.2/extensions/*.la
rm -f "$libDir"/guile/2.2/extensions/*.a
prepareInstalledDevelLib libguile-2.2
fixPkgconfig
packageEntries tools \
"$commandBinDir"/guild \
"$commandBinDir"/guile \
"$commandBinDir"/guile-snarf \
"$commandBinDir"/guile-tools \
"$manDir"
packageEntries devel \
"$commandBinDir"/guile-config \
"$dataDir"/aclocal \
"$developDir"
}
TEST()
{
make check
}

View File

@@ -0,0 +1,54 @@
From d060dbae88a622330afe23860001e6e4ca242200 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Thu, 22 Mar 2018 21:01:34 +0100
Subject: Build fix
diff --git a/libguile/posix.c b/libguile/posix.c
index 9a873b5..3c106cb 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -475,11 +475,13 @@ SCM_DEFINE (scm_getgrgid, "getgr", 0, 1, 0,
return SCM_BOOL_F;
}
}
- else if (scm_is_integer (name))
- SCM_SYSCALL (entry = getgrgid (scm_to_int (name)));
- else
+ else if (scm_is_integer (name)) {
+ SCM_SYSCALL (entry = getgrgid (scm_to_int (name)));
+ }
+ else {
STRING_SYSCALL (name, c_name,
- entry = getgrnam (c_name));
+ entry = getgrnam (c_name));
+ }
if (!entry)
SCM_SYSERROR;
--
2.45.2
From 4bc99ba7e22cf0501622a4ae05d6199e65c57c3f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sat, 10 Aug 2024 17:53:51 +0200
Subject: avoid a static_assert not matching our definition of WEXITSTATUS
diff --git a/libguile/posix.c b/libguile/posix.c
index 3c106cb..cfcc14e 100644
--- a/libguile/posix.c
+++ b/libguile/posix.c
@@ -100,7 +100,7 @@
#ifndef W_EXITCODE
/* Macro for constructing a status value. Found in glibc. */
-# ifdef _WIN32 /* see Gnulib's posix-w32.h */
+# if defined(_WIN32) || defined(__HAIKU__) /* see Gnulib's posix-w32.h */
# define W_EXITCODE(ret, sig) (ret)
# else
# define W_EXITCODE(ret, sig) ((ret) << 8 | (sig))
--
2.45.2