As discussed in #2602, make GTK+3 the default of the build system, leading up to the eventual removal of GTK+2 support.
The `--enable-gtk3` configuration option is replaced with `--enable-gtk2`. If `--enable-gtk2` is specified, the GTK+2 development libraries/headers must be available via `pkg-config` or else configuration will fail. If `--enable-gtk2` is _not_ specified, the GTK+3 development libraries/headers must be available or else configuration will fail. It intentionally does not fall back to GTK+2 automatically. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2610
-- Commit Summary --
* Make GTK3 build default, and GTK2 build optional
-- File Changes --
M configure.ac (28)
-- Patch Links --
https://github.com/geany/geany/pull/2610.patch https://github.com/geany/geany/pull/2610.diff
@codebrainz pushed 1 commit.
df925192c4235201bd4cb934ebd60d93a172b4f1 Update Travis CI for new build system changes
@codebrainz pushed 1 commit.
468574e63c6563ee78f4f5aeecdcfa156cffc28e Change default to GTK3 in cross-build-mingw.sh
I don't know why the Mingw CI build is not getting the [`gmodule-no-export-2.0` flags](https://github.com/geany/geany/pull/2610/files#diff-67e997bcfdac55191033d57a...) which should make it link to `-lgmodule-2.0`.
@codebrainz its configured GTK 3.8.2 which is pretty olde, is that the problem?
@eht16 requested changes on this pull request.
GTK 3.8.2 is not the problem as we use it on all other Travis builds as well and they work fine.
I was able to reproduce this error with a `ubuntu:trusty` Docker container after replicating the steps the Travis build does. Though I don't see the cause for the error. My best guess is that any of the changes in `configure.ac` breaks the linking.
@@ -87,8 +87,8 @@ mkdir "$BUILDDIR"
cd "$BUILDDIR"
mkdir _deps -fetch_and_unzip "$GTK3_BUNDLE_ZIP" _deps -[ "$GTK3" = yes ] || fetch_and_unzip "$BUNDLE_ZIP" _deps
We should keep this as is. Even it looks weird but we need the GTK3 bundle also for GTK2 builds. IIRC because of a newer GLib in the GTK3 bundle. This is why the Mingw GTK2 build failed.
@eht16 requested changes on this pull request.
gtk2_package=gtk+-2.0 gtk2_min_version=2.24 gtk3_package=gtk+-3.0 gtk3_min_version=3.0
-PKG_CHECK_EXISTS([$gtk2_package >= $gtk2_min_version], [have_gtk2=yes], [have_gtk2=no]) -PKG_CHECK_EXISTS([$gtk3_package >= $gtk3_min_version], [have_gtk3=yes], [have_gtk3=no]) -AS_IF([test "x$enable_gtk3" = xyes || (test "x$enable_gtk3" != xno && - test "x$have_gtk3" = xyes && - test "x$have_gtk2" = xno)], - [gtk_package=$gtk3_package - gtk_min_version=$gtk3_min_version], - [gtk_package=$gtk2_package - gtk_min_version=$gtk2_min_version]) +AS_IF([test "x$enable_gtk2" = "xyes"], + [PKG_CHECK_MODULES([GTK],
Why the new check with `PKG_CHECK_MODULES`? This seems to cause the linking errors (though no idea why it happens only with Mingw builds).
Without `PKG_CHECK_MODULES`, it works fine for the Mingw build and is closer to the original code: ``` AS_IF([test "x$enable_gtk2" = "xyes"], [gtk_package=$gtk2_package gtk_min_version=$gtk2_min_version], [gtk_package=$gtk3_package gtk_min_version=$gtk3_min_version]) ``` We actually just set the variables for the `PKG_CHECK_MODULES` check further below.
@codebrainz commented on this pull request.
gtk2_package=gtk+-2.0 gtk2_min_version=2.24 gtk3_package=gtk+-3.0 gtk3_min_version=3.0
-PKG_CHECK_EXISTS([$gtk2_package >= $gtk2_min_version], [have_gtk2=yes], [have_gtk2=no]) -PKG_CHECK_EXISTS([$gtk3_package >= $gtk3_min_version], [have_gtk3=yes], [have_gtk3=no]) -AS_IF([test "x$enable_gtk3" = xyes || (test "x$enable_gtk3" != xno && - test "x$have_gtk3" = xyes && - test "x$have_gtk2" = xno)], - [gtk_package=$gtk3_package - gtk_min_version=$gtk3_min_version], - [gtk_package=$gtk2_package - gtk_min_version=$gtk2_min_version]) +AS_IF([test "x$enable_gtk2" = "xyes"], + [PKG_CHECK_MODULES([GTK],
I didn't notice the duplicated `PKG_CHECK_MODULES` checks, will fix it.
@codebrainz commented on this pull request.
@@ -87,8 +87,8 @@ mkdir "$BUILDDIR"
cd "$BUILDDIR"
mkdir _deps -fetch_and_unzip "$GTK3_BUNDLE_ZIP" _deps -[ "$GTK3" = yes ] || fetch_and_unzip "$BUNDLE_ZIP" _deps
Ok, will put it back with a comment explaining why it was like that. It looked like a mistake and would cause redundant slow downloading.
@codebrainz pushed 2 commits.
f6eef2a8f4bbdb830bfe49c46e5fcbccd2e04e80 Remove duplicate pkg-config checks in configure.ac 937001cecdb2d5d1c1a68659943334a192f4e4c7 Put back unconditional downloading of the GTK+3 bundle
Should be all good now. Let me know if/when I should merge it or if there's anything else.
LGBCI (Cursory)
@eht16 approved this pull request.
Looks fine now and even works :). :100: for the rewritten GTK2 bundle download which is way easier to understand now.
Fine to me to merge.
Rebased on `master`, squashed commits, updated commit message, and force-pushed.
Will merge once CI completes.
Merged #2610 into master.
github-comments@lists.geany.org