Commit Graph

531 Commits

Author SHA1 Message Date
Jehan 650e0fa7f3 build: sync nightly flatpak with updates from the dev flatpak.
This includes:
- "copy-icon" set
- Permission and cleanup rules updated
- Exiv2 bumped to 0.27.5
- Adding an x-checker-data for OpenEXR
- Poppler bumped to 22.01.00
- OpenBlas bumped to 0.3.19
- graphviz bumped to 2.50.0
2022-01-25 01:21:55 +01:00
Jehan 407472f091 build: fix windows-installer-langs unit test.
Also improving a bit the download script by specifying the .isl or .islu
file extension. It's nicer than trying to download randomly, and also it
allows to better compare the list of downloaded files with the list in
gimp3264.iss script.
2022-01-10 23:58:00 +01:00
Jehan 9ba44aab2a build: Improve BOM-adding on InnoSetup files.
My previous command was also adding a linefeed just after the BOM. While
I'm not sure it would really break anything for processing these, it's
anyway much more correct to only add the 3 BOM bytes. So here is the
improved command.
2022-01-10 21:27:12 +01:00
Jehan 5872d8dd45 build: factorize downloading code for InnoSetup languages.
Also some language files are supposed to be UTF-8 yet they are missing
the BOM markup (only method to recognize them for InnoSetup). This is
the case for Chinese Traditional. See issue #7676.
Make sure that this lang file has a BOM.
2022-01-10 21:09:23 +01:00
Daniel Novomeský eb42bbb6a8 build: remove gtk-doc from MSYS2 build environment 2022-01-02 17:42:50 +01:00
Daniel Novomeský 640bc9b7f1 build: update gi-docgen feature setting in flatpak 2022-01-02 11:24:18 +00:00
Jehan cd7b48819c build: removing patches added for issue #5863.
One is a patch for a GExiv2 version below the one we now require, the
second is a patch for GIMP which is now committed and pushed.
Cf. commit 7ed68556c7.
2021-12-28 03:01:18 +01:00
Daniel Novomeský 1397440bab build: add gi-docgen dependency to MSYS2 build 2021-12-27 21:52:21 +01:00
Niels De Graef 92e80d12e8 docs: Migrate from gtk-doc to gi-docgen
gtk-doc has been slowly dying for the past few years; with gi-docgen we
have a nice successor.

This also makes sure the C documentation also uses the GIR file, which
in turn means faster build times (since all the C code doesn't have to
be parsed and recompiled again), and has a clear dependency graph.

See the [gi-docgen tutorial] for more info on how the system works.

[gi-docgen tutorial]: https://gnome.pages.gitlab.gnome.org/gi-docgen/tutorial.html
2021-12-27 10:47:34 +01:00
Jehan 201cbe7e3e build: no need to chmod the test file which is already executable.
Also when working on out-of-tree builds, it would not find the file
anyway and we get this output:

> chmod: cannot access 'test-installer-langs.sh': No such file or directory

Though this was not breaking the tests, it has clearly been useless
until we see this one today.
2021-12-22 17:13:07 +01:00
Jehan bf9c488560 build: fix Windows installer lang test after recent re-encoding drop. 2021-12-22 16:30:04 +01:00
Jehan 6cf3d67e64 build: fix packaging step with MSYS2 GTK+3. 2021-12-21 00:41:39 +01:00
Jehan c59c93cd19 build: do not build GTK3 for our MSYS2 dependency job anymore.
The patch we needed to test needs completion, so it's of no use to
continue building it until this happens.

Also for some reason, the x86_64 build of GTK3 takes forever and times
out (the same build for 32-bit x86 is done quickly as expected) on
repeated occasions. Since this is unneeded right now, rather than
wasting time on this, I just delete this dep build to use the pre-built
MSYS2 package.
2021-12-20 21:25:42 +01:00
Jehan 3e1b783adb build: drop codepage conversion, use UTF-8 for Win install lang files.
Rewriting commit f8cdec1883 by Jernej Simončič for the development
code (which has a slightly different list of languages).

Also adding the meson version of this change.

Since now InnoSetup fully supports UTF-8 isl (as long as they have a
BOM), let's stop converting translations. Then we also avoid all
conversion errors and get a simpler/more robust build process.
2021-12-20 18:50:50 +01:00
Jehan 24d6140782 build: make sure InnoSetup language files are not already present.
I noticed in our build logs such output:

> Saving to: ‘Basque.isl.53’

Wget does not override same-named files and would append a number. The
thing is that we are not supposed to have other .isl files over there,
but I think current Windows runners on Gitlab are not properly wiped
out. That must be why we get remnant of old files.
Anyway this will make sure we override, hence use the last version of
translations (otherwise we are stuck to old versions as long as they are
not wiped out, since the downloaded file is not properly named).
2021-12-17 17:02:12 +01:00
Jehan 449a91b1c9 build: fix again the `xvfb-run` call to work on various distributions.
This tool seems like a mess with various implementations (maybe
distributions patch it?). I'm trying to tweak the script so that it
works at least on the Debian testing/bookworm CI and on my Fedora 33
desktop (and hopefully on more, if not all distribs).
2021-11-14 22:14:59 +01:00
Jehan 588ff7c8d3 build: xvfb-run call from meson fails.
Note that I first thought to use the full option name (`--auto-display`)
but I just got the same error again. It seems xvfb-run from Debian
bookworm just doesn't have this option, and only the older option
--auto-servernum (which is said to be deprecated in favor of
--auto-display in Fedora's xvfb-run for instance, but apparently not on
Debian). At least this works on all distributions (or so it would seem).

Fixes:

> xvfb-run: invalid option -- 'd'
2021-11-14 20:58:19 +01:00
Jehan 9bc9ef0889 build: use POSIX test syntax.
The [[ ]] is not POSIX, hence less portable.
I see our `ninja test` calls in Gitlab CI output a:

> /builds/GNOME/gimp/build/meson/run_test_env.sh: 7: [[: not found

(though it doesn't break the tests)
2021-11-14 20:58:13 +01:00
Daniel Novomesky 86b2920897 build: use libjxl 0.6.1 in flatpak package 2021-10-30 12:12:48 +00:00
Daniel Novomesky b745f00fe4 build: use libjxl 0.6.1 in MSYS2 native build 2021-10-30 12:12:48 +00:00
Jehan 8e69e9f6ac Issue #7402: update GTK build for Windows CI with GCC 11 false…
… positive handling.

Syncing with MSYS2 build rules. See in particular this commit:
51bd1869e8
2021-10-21 14:20:28 +02:00
Daniel Novomesky 0d5a4f50aa build: compile libjxl under 32bit MSYS2 too
Previously only 64bit libjxl was built
2021-10-20 18:08:29 +02:00
Daniel Novomesky 7834fc9c53 windows installer: associate avif and jxl 2021-10-20 12:28:34 +00:00
Jehan 2b3c52fe3d build: add build-id to our CI Windows installer build.
I forgot to do this so GIMP 2.99.8 official release is marked as
"unknown" instead of our official build. It's alright for this one
(especially for a dev release), just setting this straight for further
builds.
2021-10-20 13:53:38 +02:00
Jehan 12aae56ede build: add a bit more info about using the Anitya db (for flatpak deps). 2021-10-20 13:12:39 +02:00
Jehan 808b3aafd3 build: remove calls to ccache in native Windows build.
Anyway we disabled use of ccache in an earlier commit 2da70b3fb7 because
of a bug in MSYS2's CPython. So there is no need to call these commands
either. Also it seems to be breaking the 32-bit native Windows build
(from CI log, I am unsure this is because of ccache, but the break
happens just after running `ccache --zero-stats`).
2021-10-17 16:58:26 +02:00
Ondřej Míchal 87e621e3a7 flatpak: Bump openexr from v2.3.0 to v2.5.7
This required subtle changes to the manifest because the upstream
project no longer publishes separate tarballs with different parts
of the project.
2021-10-15 17:26:52 +00:00
Daniel Novomesky 9f8de1738a flatpak: use libjxl 0.6 released version 2021-10-15 16:53:14 +02:00
Ondřej Míchal e6475e9121 flatpak: Manifest minor fixes
flatpak-external-data-checker applied along updates to dependencies some
style fixes. This contains most of them.
2021-10-12 23:00:03 +00:00
Ondřej Míchal e7ca891ceb flatpak: Update dependencies
- exiv2
  > 0.27.3 -> 0.27.4
  > Allowed to drop applied patches
- gexiv2
  > 0.12 -> 0.14
  > Required adding new build options disabling vapi and python3
- poppler-data
  > 0.4.10 -> 0.4.11
- ghostscript
  > 9.54.0 -> 9.55.0
- OpenBLAS
  > 0.3.17 -> 0.3.18
- x265
  > 3.4 -> 3.5
- libheif
  > 1.9.1 -> 1.12.0
- cairo
  > 1.16.0 -> 1.17.4
- graphviz
  > 2.44.1 -> 2.49.1

Drop exif2 patches

flatpak: Disable vapi, python3 with introspection in gexiv2
2021-10-12 23:00:03 +00:00
Ondřej Míchal 47be60dbe0 flatpak: Add x-checker-data to sources
The x-checker-data field in a flatpak manifest can be used together with
flatpak-external-data-checker[0] to help maintain the dependency list.

The utility has several backends including a generic solution for
scraping and parsing of websites. Instead of using that this uses
anitya[1] as a backend. Anitya is Fedora-hosted service tracking
releases of various projects, taking away the need to match the various
version patterns across projects in the manifest.

The change required some changes to links to existing sources due to
some reasons: availability upstream, change in upstream (url, forge, tar
compression). Affected modules are:

- graphviz
  > from: https://www2.graphviz.org/Packages/stable/portable_source/graphviz-2.44.1.tar.gz
  > to  : https://gitlab.com/graphviz/graphviz/-/archive/2.44.1/graphviz-2.44.1.tar.gz

- cairo
  > from: https://www.cairographics.org/releases/cairo-1.16.0.tar.xz
  > to  : https://gitlab.freedesktop.org/cairo/cairo/-/archive/1.16.0/cairo-1.16.0.tar.gz

- libx265
  > from: 3.4 git tag
  > to  : https://bitbucket.org/multicoreware/x265_git/downloads/x265_3.4.tar.gz

-openexr
  > from: https://github.com/openexr/openexr/releases/download/v2.3.0/openexr-2.3.0.tar.gz
  > to  : https://github.com/AcademySoftwareFoundation/openexr/releases/download/v2.3.0/openexr-2.3.0.tar.gz

- lcms2
  > from: 967e8ac9a17441efda57dc12d0bf84ed9188460c52eb8542d399ce9ab43bd4191988ed22b254ef34c6c1877bbb935952ed/lcms2-2.12.tar.gz
  > to  : https://github.com/mm2/Little-CMS/releases/download/lcms2.12/lcms2-2.12.tar.gz

Some sources do not have the x-checker-data set because they are usually
not developed anymore (last release over 10 years ago) or the next
version includes a major version bumb which is not a good candidate for
automation or the currently selected version is a git tag, which was not
clear to me.

[0] https://github.com/flathub/flatpak-external-data-checker
[1] https://release-monitoring.org/
2021-10-12 23:00:03 +00:00
Jehan 52928e04a5 Issue #7327: Cannot build GIMP3 on MSYS2 using Meson.
This is untested on my side, because the bug only happens on native
builds with meson (our CI has cross-builds with meson and native builds
with autotools and I only do cross-builds locally) but I think/hope it
will work.

Basically we were using .full_path() because these rc files were also
used as input of some configure_file() calls which doesn't like custom
target objects as input (it wants strings or file objects). Yet a bug
in meson didn't like the colon used in native Windows full paths ('C:'
and such) when used in windows.compile_resources(). This has been fixed
by Luca Bacci in: https://github.com/mesonbuild/meson/pull/9368
Yet we just cannot depend on very early meson (or worse dev meson code).

On the other hand, if the input is a custom_tgt object, it uses the
object ID which we give as first parameter of custom_target() so we know
it's appropriately named without colons (such as 'gimp_plugins_rc').
Thus we should not bump into this issue again.

For the few usage in configure_file(), I just add a .full_path() only
when needed at call time.

Last but not least, I replace the bogus `meson --version` call by a
`python3 -c 'exit()'` as advised by Eli Schwartz:
2afa019c70 (note_1284951)

The reason is that it is apparently possible (or will be when some
reimplementation of meson will be done) that the `meson` executable
itself does not exist. On the other hand, `python3` should always be
there, as a mandatory dependency of the build tool.

In order to use an appropriate `python3`, I made the
pythonmod.find_installation() check required in our build (which should
not be a problem since it's a meson requirement as well), even when the
-Dpython option is false (this one depends on other requirements too
anyway, such as version and pygobject). This way I can call this meson
variable of discovered python in my bogus call, instead of calling a
(potentially different) python from PATH environment.
2021-10-12 17:06:18 +02:00
Jehan 3aa9c0b161 build: do not use os.EX_* exit code for cross-compatibility.
All the os.EX_* constants are Unix-only (and possibly not even not on
all Unix/Linux-like platforms, according to docs) so we should not use
them, especially for a script which we may use on Windows (we also run
it when cross-compiling from Linux, but natively on Windows as well).

Fixes this exception (which would only happen when there is another
critical issue anyway, so it's not making a bigger problem; yet it's
better to cleanly exit with an error code rather than by an exception):

>   File "C:\_r\_builds\k3_3muaB\0\GNOME\gimp\build\windows\gitlab-ci\dll_link.py", line 124, in copy_dlls
    sys.exit(os.EX_DATAERR)
> AttributeError: module 'os' has no attribute 'EX_DATAERR'
2021-10-10 13:56:09 +02:00
Jehan fa710178f6 build: use several source prefixes for all dll_link usage.
See commit 31e52f0756.
2021-10-10 13:19:30 +02:00
Jehan 31e52f0756 build: allow giving several source prefixes to dll_link.py.
Also use it to fix packaging of GIMP for the Windows installer (native
CI job). The CI was indeed failing to package libbrotlienc.dll,
dependency of libjxl.dll, for the simple reason that they were on
different prefixes. By calling dll_link.py on one prefix, then the
other, we were failing to grab the deeper dependency. Now with this new
ability to set several sources, the script is able to search everywhere
(with first prefix given on the CLI call as priority).
2021-10-05 02:53:38 +02:00
Jehan 6107ae17c9 build: build libjxl to sync nightly and beta flatpak manifest.
See commit e9f790e1ff8d50f63933ec0b0fbb9325447324d4 on Flathub's beta
flatpak repository.
2021-10-01 23:09:50 +02:00
Jehan 4055ac95e6 build: add more help text to the windows-installer-langs test.
I always have to search again the InnoSetup repository for the language
file. Add the link in the failed test output so that we don't waste time
searching the next time.

Also when the new lang is "Unofficial", the installer script has to be
updated as well, because these lang files must be downloaded. Add a help
text saying this as well.
2021-10-01 21:51:22 +02:00
Jehan 3ace66ecbb build: add Portuguese translation to installer.
Translation files were added in commit cec3c3a159 but not to the
installer and build files, which is why "gimp-distcheck-debian" job was
failing in the CI.
2021-10-01 21:18:43 +02:00
Jehan 9cd9c34251 build: improve gimp:build / windows-installer-langs unit test.
Also sort the po files to make sure all lists are ordered the same way.
2021-10-01 21:17:24 +02:00
Jehan 2da70b3fb7 build: CC="cache gcc" breaks gobject-introspection for native win build.
After some recent patch added to Python on MSYS2, in the same time as
they bumped from Python 3.9.6 to 3.9.7, our native Windows build started
breaking.

This patch modified `cygwinccompiler.py` to use CC environment variable
as being necessarily a single executable whereas if it were made of 2
commands (such as "ccache gcc"), the call was failing because the code
now tries to find a single command with this name (as though the space
belongs to the file name).

Therefore the line:
>   File "C:/msys64/mingw64/lib/python3.9/distutils/cygwinccompiler.py", line 451, in is_cygwincc
>     out_string = check_output([cc, '-dumpmachine'])

Resulted in the error:
> FileNotFoundError: [WinError 2] The system cannot find the file specified

For now, let's just not set ccache this way, even though this method is
normally meant to work and is one of the 2 officially proposed methods
(the other being to use symlinks named as compilers in priority in
PATH).
Also I'm not even sure ccache is useful at all right now (is cache
finally stored/reused between CI runs? I remember we tried to make it
happen, but I can't remember if we really had this properly in the end).

See: https://github.com/msys2/MINGW-packages/issues/9677
2021-10-01 02:09:16 +02:00
Niels De Graef 7ee72ee9f7 flatpak: Use fallback-x11
From Flatpak's NEWS:

> A new fallback-x11 permission grants X11 access, but only if the user
> is running in a X11 session. For applications that support both
> Wayland and X11, this can be used to ensure that the app doesn't have
> unnecessary X11 access while in Wayland, but still works in an X11
> session.
2021-09-30 16:10:09 +02:00
Stanislav Grinkov 2afa019c70
build, meson: Fix rc files build order dependency...
by adding special filler custom_target() build rules.

Basically, these build rules do nothing (a mere meson --version call),
but they ensure that `git-version.h` is built first, before the dependant
rc files are used in respective resource compiler build targets.

This still a nasty trick (not a proper solution), but it do the job.

See #6257 for additional information.
2021-09-30 01:08:33 +06:00
Daniel Novomesky e43743e0eb Build libjxl in Win64 native MSYS2 CI 2021-09-29 18:43:08 +02:00
Daniel Novomesky 0236308d69 Build libjxl in crossroad Win64 CI 2021-09-29 09:43:39 +02:00
Jehan 1b2ed2efd2 build: sync our nightly flatpak with last changes.
This is based from changes in wip/release/2-99-8 branch or the Flathub
flatpak (so not necessarily released yet):

- libheif bumped to 1.12.0
- Cairo with new patch to fix #235.
2021-09-27 12:43:36 +02:00
Michael Schumacher 37d76c8876 build: mention incomplete and outdated state of build/gimpbuilder-base/Dockerfile 2021-09-12 00:58:02 +02:00
Jehan ad83fd04ba build: improve Windows installer language test.
For the installer, we must also manually pull all used official
language, so I am adding a test checking that the list of pulled file
matches the list from the installer script.
2021-09-08 10:20:25 +02:00
Jehan e73f82dbfd build: fix installer.
We must also pull the Lithuanian base file for Inno Setup.
2021-09-08 09:57:24 +02:00
Jehan 2bc1dd1f9c build: fix flatpak manifest.
The option -Dcheck-update has been changed to a combo.
See commit f0be2256d0.
2021-09-05 17:06:05 +02:00
Jehan 3e1143595e build: fix typo s/en_GN/en_GB/ 2021-09-04 01:18:07 +02:00