Antoine Jacoutot <ajacou...@bsdfrog.org> wrote: > On Fri, Jul 01, 2022 at 11:00:50AM +0200, Omar Polo wrote: > > Hi all, > > > > I've been keeping this into mystuff/ for too much i think. It's a port > > for guile 3, or the GNU Ubiquitous Intelligent Language for Extensions. > > It's a scheme dialect. > > > > I'm not a guile hacker, but I somewhat play with it from time to time > > and I think it's nice to have it packaged. I've mostly played with it > > inside Emacs using the geiser and geiser-guile packages. > > > > To avoid a conflict with guile2, I'm attaching a diff that drops the > > info pages from it, just like we're currently doing guile2 to avoid a > > conflict with lang/guile. > > > > I'm slightly worried that some software that is currently using guile1 > > or guile2 could switch to guile3 during configure if found. > > Yes it has been a nightmare in the past. > You definitely need to test all ports that depends on guile1 and guile2 and > see what happens if guile3 is installed during configure/build.
after building the consumers of existing version of guile I'm starting to get what kind of pain this causes. anyway, I build the consumers with all the three version of guile installed and the situation is: devel/autogen: ok! devel/swig: ok! cad/geda-gaf: ok! cad/lepton-eda breaks, switched to guile 3 net/freetalk: ok! editors/TeXmacs: ok! education/drgeo: ok! mail/mu,guile: breaks, switched to guile 3 math/graphviz: ok! print/lilypond: ok! productivity/gnucash: breaks, fixed for guile 2 x11/gnome/aisleriot: breaks, fixed for guile 2 I did a `make fake', `make port-lib-depends-check' and checked also the build log for all of these to ensure that they continued to use the version of guile they were using before. No run testing for any of them. lepton-eda end mail/mu were quite difficult to continue to build with guile2, and upstream seems to prefer guile 3 anyway for those. mail/mu in particular would require some patching in configure.ac + regen to get rid of guile3. (+cc sdk@ for mu) For gnucash i patched the cmake file to ignore guile 3, I don't know if there is a more elegant way to make it ignore pkg_check_modules. aisleriot was "fun". There is a type error in the meson file which made impossible to use -Dguile=$version, only auto. Fixed that, the build was still failing because -Dguile=2.2 was turned into "guile >= 2.2" which doesn't make sense; again, fixed in the meson script. This patch could be upstreamed almost as-is (upstream may want to remove the now unused variable `guile_req_version'.) Unfortunately we still need the ugly hack to prevent it from picking up guile1. Maybe we can switch these two (gnucash and aisleroit) to guile 3 too? (note that the patch to aisleriot' meson.build makes sense even if we switch the package to guile3) Here's a patch for all of them. ? cad/lepton-eda/build ? mail/mu/build ? productivity/gnucash/build ? x11/gnome/aisleriot/build ? x11/gnome/aisleriot/config.log Index: cad/lepton-eda/Makefile =================================================================== RCS file: /cvs/ports/cad/lepton-eda/Makefile,v retrieving revision 1.3 diff -u -p -r1.3 Makefile --- cad/lepton-eda/Makefile 27 Mar 2022 10:26:39 -0000 1.3 +++ cad/lepton-eda/Makefile 1 Jul 2022 13:47:35 -0000 @@ -2,7 +2,7 @@ COMMENT = lepton electronic design autom V = 1.9.17-20211219 DISTNAME = lepton-eda-${V:C/-.*//} -REVISION = 0 +REVISION = 1 SHARED_LIBS += lepton 0.0 # 10.0 SHARED_LIBS += leptongui 0.0 # 4.0 @@ -20,8 +20,8 @@ WANTLIB += ${COMPILER_LIBCXX} X11 Xau Xc WANTLIB += Xdmcp Xext Xfixes Xi Xinerama Xrandr Xrender atk-1.0 WANTLIB += c cairo expat ffi fontconfig freetype fribidi gc gdk-x11-2.0 WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gmodule-2.0 gmp gobject-2.0 -WANTLIB += graphite2 gtk-x11-2.0 guile-2.2 harfbuzz iconv intl -WANTLIB += jpeg ltdl m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre +WANTLIB += graphite2 gtk-x11-2.0 guile-3.0 harfbuzz iconv intl +WANTLIB += jpeg m pango-1.0 pangocairo-1.0 pangoft2-1.0 pcre WANTLIB += pixman-1 png unistring xcb xcb-render xcb-shm z MASTER_SITES = \ @@ -39,7 +39,7 @@ RUN_DEPENDS = devel/desktop-file-utils \ x11/gtk+3,-guic LIB_DEPENDS = devel/gettext,-runtime \ - lang/guile2 \ + lang/guile3 \ x11/gtk+2 CONFIGURE_STYLE = gnu @@ -47,15 +47,10 @@ CONFIGURE_ARGS += --disable-attrib \ --disable-update-xdg-database CONFIGURE_ENV = GROFF=false \ - GUILE=guile2.2 \ - GUILE_SNARF=guile-snarf2.2 \ + GUILE=guile3.0 \ + GUILE_SNARF=guile-snarf3.0 \ MAKEINFO=gmakeinfo \ M4=/usr/bin/m4 - -# XXX make sure guile2 headers are picked up first (over guile1); -# cannot use CPPFLAGS/CFLAGS since they get appended last -CONFIGURE_ENV += "CC=${CC} -I${LOCALBASE}/include/guile/2.2" -CONFIGURE_ENV += "CXX=${CXX} -I${LOCALBASE}/include/guile/2.2" post-install: # would be nice to precompile the guile files otherwise Index: mail/mu/Makefile =================================================================== RCS file: /cvs/ports/mail/mu/Makefile,v retrieving revision 1.34 diff -u -p -r1.34 Makefile --- mail/mu/Makefile 16 Jun 2022 15:39:44 -0000 1.34 +++ mail/mu/Makefile 1 Jul 2022 13:47:35 -0000 @@ -1,9 +1,10 @@ COMMENT= maildir indexer and searcher with emacs frontend V= 1.6.11 -GUILE_V= 2.2 +GUILE_V= 3.0 DISTNAME= mu-$V +REVISION= 0 FLAVORS= guile FLAVOR ?= @@ -44,7 +45,7 @@ CONFIGURE_ARGS= --disable-gtk \ .if ${FLAVOR} == "guile" WANTLIB += guile-${GUILE_V} gc ltdl gmp -LIB_DEPENDS += lang/guile2 +LIB_DEPENDS += lang/guile3 .else CONFIGURE_ARGS += --disable-guile .endif Index: productivity/gnucash/patches/patch-CMakeLists_txt =================================================================== RCS file: productivity/gnucash/patches/patch-CMakeLists_txt diff -N productivity/gnucash/patches/patch-CMakeLists_txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ productivity/gnucash/patches/patch-CMakeLists_txt 1 Jul 2022 13:47:35 -0000 @@ -0,0 +1,15 @@ +disable guile3 + +Index: CMakeLists.txt +--- CMakeLists.txt.orig ++++ CMakeLists.txt +@@ -278,7 +278,8 @@ string(REGEX MATCH "^[0-9]+[.]" SWIG_MAJOR ${SWIG_VERS + # Look for guile versions in this order: 3.0 > 2.2 > 2.0 + + # guile library and include dir +-pkg_check_modules (GUILE3 guile-3.0 QUIET) ++#pkg_check_modules (GUILE3 guile-3.0 QUIET) ++SET(GUILE3_FOUND FALSE) + pkg_check_modules (GUILE22 guile-2.2 QUIET) + pkg_check_modules (GUILE2 guile-2.0>=2.0.9 QUIET) + Index: x11/gnome/aisleriot/Makefile =================================================================== RCS file: /cvs/ports/x11/gnome/aisleriot/Makefile,v retrieving revision 1.48 diff -u -p -r1.48 Makefile --- x11/gnome/aisleriot/Makefile 18 Apr 2022 08:04:59 -0000 1.48 +++ x11/gnome/aisleriot/Makefile 1 Jul 2022 13:47:35 -0000 @@ -2,6 +2,7 @@ COMMENT = suite of solitaire card games GNOME_PROJECT = aisleriot GNOME_VERSION = 3.22.22 +REVISION = 0 # override gnome MODULE MASTER_SITES = https://gitlab.gnome.org/GNOME/${GNOME_PROJECT}/-/archive/${GNOME_VERSION}/ @@ -33,7 +34,8 @@ LIB_DEPENDS = audio/libcanberra,-gtk3 \ BUILD_DEPENDS = shells/bash -CONFIGURE_ARGS = -Dtheme_kde=false +CONFIGURE_ARGS = -Dguile=2.2 \ + -Dtheme_kde=false # XXX horrible hack: make it possible to build when both guile and guile2 are # installed (take precedence over -I${LOCALBASE}/include because meson reorders Index: x11/gnome/aisleriot/patches/patch-meson_build =================================================================== RCS file: x11/gnome/aisleriot/patches/patch-meson_build diff -N x11/gnome/aisleriot/patches/patch-meson_build --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ x11/gnome/aisleriot/patches/patch-meson_build 1 Jul 2022 13:47:35 -0000 @@ -0,0 +1,21 @@ +Index: meson.build +--- meson.build.orig ++++ meson.build +@@ -326,7 +326,7 @@ if get_option('guile') == 'auto' + assert(false, 'Guile not found') + endif + else +- guile_version = get_option('guile').to_string() ++ guile_version = get_option('guile') + endif + + guile_req = 'guile-' + guile_version +@@ -349,7 +349,7 @@ cairo_dep = dependency('cairo', version: '>=' + ca + gio_dep = dependency('gio-2.0', version: '>=' + gio_req_version,) + glib_dep = dependency('glib-2.0', version: '>=' + glib_req_version,) + gtk_dep = dependency('gtk+-3.0', version: '>=' + gtk_req_version,) +-guile_dep = dependency(guile_req, version: '>=' + guile_req_version,) ++guile_dep = dependency(guile_req,) + + if get_option('gconf') + gconf_dep = dependency('gconf-2.0', version: '>=' + gconf_req_version, required: true,)