From 6c752995b2de12149e77732e372098c5ec8d9c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Cerveau?= Date: Thu, 5 Oct 2023 22:27:52 +0200 Subject: [PATCH] macos: generate the installer building gtk Using gtk version 4.13.9 --- .gitlab-ci.yml | 2 +- installer/macos/brew_setup.sh | 17 ------- installer/macos/deploy_macos.sh | 21 +++++++-- installer/macos/package_setup.sh | 31 +++++++++++++ subprojects/gstreamer-1.0.wrap | 1 + subprojects/gtk.wrap | 2 +- ...-invalid-include-flag-in-uninstalled.patch | 45 +++++++++++++++++++ 7 files changed, 97 insertions(+), 22 deletions(-) delete mode 100755 installer/macos/brew_setup.sh create mode 100755 installer/macos/package_setup.sh create mode 100644 subprojects/packagefiles/gstreamer-1.0/0001-Revert-meson-Fix-invalid-include-flag-in-uninstalled.patch diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bce392..26706a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -258,7 +258,7 @@ macos installer stable: - curl https://sh.rustup.rs -sSf | sh -s -- -y - source $HOME/.cargo/env # brew install - - /bin/bash -c "./installer/macos/brew_setup.sh" + - /bin/bash -c "./installer/macos/package_setup.sh" - /bin/bash -c "./installer/macos/deploy_macos.sh" artifacts: name: "MacOS installer" diff --git a/installer/macos/brew_setup.sh b/installer/macos/brew_setup.sh deleted file mode 100755 index 0ce0d20..0000000 --- a/installer/macos/brew_setup.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -HOMEBREW_NO_INSTALL_CLEANUP=1 - -/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - -brew install pkg-config - -# GTK4 support -brew install gtk4 -# brew install cairo libxrandr libxi libxcursor libxdamage libxinerama - -brew install npm - -npm install -g appdmg - -exit 0 diff --git a/installer/macos/deploy_macos.sh b/installer/macos/deploy_macos.sh index cd7e59e..c664e11 100755 --- a/installer/macos/deploy_macos.sh +++ b/installer/macos/deploy_macos.sh @@ -9,6 +9,9 @@ test_ok() { } +# To have m4 in the path +source ~/.zshrc +eval "$(/opt/homebrew/bin/brew shellenv)" # dependency library: # Make a .app file: https://gist.github.com/oubiwann/453744744da1141ccc542ff75b47e0cf # Make a .dmg file: https://github.com/LinusU/node-appdmg @@ -20,20 +23,32 @@ VERSION="$(cat VERSION)" export VERSION echo "VERSION=$VERSION" +pip3 install docutils GSTREAMER_OPTS=" - -Dforce_fallback_for=gstreamer-1.0,libffi,pcre2 \ + -Dforce_fallback_for=gstreamer-1.0,gtk \ -Dgstreamer-1.0:libav=disabled \ -Dgstreamer-1.0:examples=disabled \ -Dgstreamer-1.0:introspection=disabled \ -Dgstreamer-1.0:rtsp_server=disabled \ -Dgstreamer-1.0:devtools=disabled \ + -Dgstreamer-1.0:ges=disabled \ -Dgst-plugins-base:tests=disabled \ -Dgstreamer-1.0:tests=disabled \ -Dgst-plugins-bad:openexr=disabled -Dgstreamer-1.0:gst-examples=disabled \ + -Dgst-plugins-bad:vulkan=disabled \ -Dorc:gtk_doc=disabled \ - -Dgstreamer-1.0:ges=disabled \ - -Dgstreamer-1.0:python=disabled" + -Dgstreamer-1.0:python=disabled \ + -Dgtk:introspection=disabled \ + -Dgtk:build-examples=false \ + -Dgtkl:build-tests=false \ + -Dgtk:media-gstreamer=disabled \ + -Dgtk:x11-backend=false \ + -Dgtk:macos-backend=true \ + -Dgtk:print-cups=disabled \ + -Djson-glib:introspection=disabled \ + " + # rebuild app release version rm -rf "${TARGETDIR}" diff --git a/installer/macos/package_setup.sh b/installer/macos/package_setup.sh new file mode 100755 index 0000000..32180ec --- /dev/null +++ b/installer/macos/package_setup.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +HOMEBREW_NO_INSTALL_CLEANUP=1 + +/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + +eval "$(/opt/homebrew/bin/brew shellenv)" + +brew update + +brew install pkg-config + +brew install glib + +brew install m4 + +echo 'export PATH="/opt/homebrew/opt/m4/bin:$PATH"' >> ~/.zshrc + +brew install bash + +bash -c "$(curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh)" + +source ~/.nvm/nvm.sh + +nvm install node + +nvm install-latest-npm + +npm install -g appdmg + +exit 0 diff --git a/subprojects/gstreamer-1.0.wrap b/subprojects/gstreamer-1.0.wrap index f057783..a6703f7 100644 --- a/subprojects/gstreamer-1.0.wrap +++ b/subprojects/gstreamer-1.0.wrap @@ -3,6 +3,7 @@ directory=gstreamer-1.0 url=https://gitlab.freedesktop.org/gstreamer/gstreamer.git push-url=git@gitlab.freedesktop.org:gstreamer/gstreamer.git revision=1.24 +diff_files = gstreamer-1.0/0001-Revert-meson-Fix-invalid-include-flag-in-uninstalled.patch [provide] dependency_names = gstreamer-1.0, gstreamer-base-1.0, gstreamer-sys-1.0, gstreamer-plugins-bad-1.0, gstreamer-video-1.0, gstreamer-player-1.0 gstreamer-gl-1.0 diff --git a/subprojects/gtk.wrap b/subprojects/gtk.wrap index ed99789..dc23218 100644 --- a/subprojects/gtk.wrap +++ b/subprojects/gtk.wrap @@ -2,7 +2,7 @@ directory=gtk url=https://gitlab.gnome.org/GNOME/gtk.git push-url=ssh://git@gitlab.gnome.org:GNOME/gtk.git -revision=4.8.2 +revision=4.13.9 depth=1 [provide] diff --git a/subprojects/packagefiles/gstreamer-1.0/0001-Revert-meson-Fix-invalid-include-flag-in-uninstalled.patch b/subprojects/packagefiles/gstreamer-1.0/0001-Revert-meson-Fix-invalid-include-flag-in-uninstalled.patch new file mode 100644 index 0000000..fbe11ae --- /dev/null +++ b/subprojects/packagefiles/gstreamer-1.0/0001-Revert-meson-Fix-invalid-include-flag-in-uninstalled.patch @@ -0,0 +1,45 @@ +From 6ce72488face35277643d3781d3da7c4f95d5e1e Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan +Date: Fri, 19 Jul 2024 20:14:29 +0530 +Subject: [PATCH] Revert "meson: Fix invalid include flag in uninstalled gl pc + file" + +This reverts commit 9d719b9937e2ef476cf18f800f54ccac1feea8ee. + +The old pkg-config implementation errors out if a variable specified +in the pkgconfig file is not defined, so this actually broke +uninstalled pc files. + +Part-of: +--- + subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build | 7 ++----- + 1 file changed, 2 insertions(+), 5 deletions(-) + +diff --git a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build +index 751967be83..57af08ced3 100644 +--- a/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build ++++ b/subprojects/gst-plugins-base/gst-libs/gst/gl/meson.build +@@ -1113,18 +1113,15 @@ if build_gstgl + 'gl_winsys=' + ' '.join(enabled_gl_winsys), + 'gl_apis=' + ' '.join(enabled_gl_apis), + ] +- pkgconfig_installed_variables = [ +- 'libinc=-I${libdir}/gstreamer-1.0/include', +- ] + + library_def = {'lib': gstgl} + pkg_name = 'gstreamer-gl-1.0' + pkgconfig.generate(gstgl, + libraries : [gstvideo, gst_base_dep, gst_dep], +- variables : pkgconfig_variables + pkgconfig_gl_variables + pkgconfig_installed_variables, ++ variables : pkgconfig_variables + pkgconfig_gl_variables, + uninstalled_variables : pkgconfig_gl_variables, + subdirs : pkgconfig_subdirs, +- extra_cflags : ['${libinc}'], ++ extra_cflags : ['-I${libdir}/gstreamer-1.0/include'], + name : pkg_name, + description : 'Streaming media framework, OpenGL plugins libraries', + ) +-- +2.39.5 (Apple Git-154) +