summaryrefslogtreecommitdiffstats
path: root/graphics/eog
diff options
context:
space:
mode:
author Nathaniel Russell <naterussell83@gmail.com>2023-04-13 21:49:48 +0100
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2023-04-15 07:15:25 +0700
commit4d450c30e1dbd6b12e0dad5eb1ca2ef617c3ef5a (patch)
tree9cc46f54f3770391e6eddf0e0cb52569d734178d /graphics/eog
parentfdf7c1f2fed86a63827b1a8635def14fab6c4e5c (diff)
downloadslackbuilds-4d450c30e1dbd6b12e0dad5eb1ca2ef617c3ef5a.tar.gz
slackbuilds-4d450c30e1dbd6b12e0dad5eb1ca2ef617c3ef5a.tar.xz
graphics/eog: Add patch for newer libportal.
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'graphics/eog')
-rw-r--r--graphics/eog/a06e6325907e136678b0bbe7058c25d688034afd.patch77
-rw-r--r--graphics/eog/eog.SlackBuild15
2 files changed, 91 insertions, 1 deletions
diff --git a/graphics/eog/a06e6325907e136678b0bbe7058c25d688034afd.patch b/graphics/eog/a06e6325907e136678b0bbe7058c25d688034afd.patch
new file mode 100644
index 0000000000..09fa4ee5cd
--- /dev/null
+++ b/graphics/eog/a06e6325907e136678b0bbe7058c25d688034afd.patch
@@ -0,0 +1,77 @@
+From a06e6325907e136678b0bbe7058c25d688034afd Mon Sep 17 00:00:00 2001
+From: Patrick Griffis <pgriffis@igalia.com>
+Date: Tue, 21 Dec 2021 16:35:36 -0600
+Subject: [PATCH] Update libportal usage
+
+libportal 0.5 is the first release with a stable API so some changes
+were made.
+---
+ meson.build | 8 ++++++--
+ org.gnome.Eog.json | 9 +++++----
+ src/eog-util.c | 2 +-
+ 3 files changed, 12 insertions(+), 7 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 9a32e4bb..9d49aa45 100644
+--- a/meson.build
++++ b/meson.build
+@@ -165,11 +165,15 @@ config_h.set('HAVE_EXEMPI', enable_xmp)
+ # xdg-desktop-portal support with libportal (optional)
+ enable_libportal = get_option('libportal')
+ if enable_libportal
+- libportal_dep = dependency('libportal', version: '>= 0.3', required: false)
++ libportal_dep = dependency('libportal', version: '>= 0.5', required: false)
+ assert(libportal_dep.found() and cc.has_header('libportal/portal.h', dependencies: libportal_dep),
+ 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
+
+- common_deps += libportal_dep
++ libportal_gtk3_dep = dependency('libportal-gtk3', version: '>= 0.5', required: false)
++ assert(libportal_gtk3_dep.found() and cc.has_header('libportal-gtk3/portal-gtk3.h', dependencies: libportal_gtk3_dep),
++ 'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
++
++ common_deps += [libportal_dep, libportal_gtk3_dep]
+ endif
+ config_h.set('HAVE_LIBPORTAL', enable_libportal)
+
+diff --git a/org.gnome.Eog.json b/org.gnome.Eog.json
+index 94f09234..b7def6af 100644
+--- a/org.gnome.Eog.json
++++ b/org.gnome.Eog.json
+@@ -48,16 +48,17 @@
+ {
+ "name" : "libportal",
+ "config-opts" : [
+- "--libdir=/app/lib",
+- "--buildtype=debugoptimized"
++ "--buildtype=debugoptimized",
++ "-Dbackends=gtk3",
++ "-Dintrospection=false",
++ "-Ddocs=false"
+ ],
+ "buildsystem" : "meson",
+- "builddir" : true,
+ "sources" : [
+ {
+ "type" : "git",
+ "url" : "https://github.com/flatpak/libportal.git",
+- "tag" : "0.4"
++ "tag" : "0.5"
+ }
+ ]
+ },
+diff --git a/src/eog-util.c b/src/eog-util.c
+index 90b9768e..56d23472 100644
+--- a/src/eog-util.c
++++ b/src/eog-util.c
+@@ -45,7 +45,7 @@
+ #include <glib/gi18n.h>
+ #ifdef HAVE_LIBPORTAL
+ #include <libportal/portal.h>
+-#include <libportal/portal-gtk3.h>
++#include <libportal-gtk3/portal-gtk3.h>
+ #endif
+
+ void
+--
+GitLab
+
diff --git a/graphics/eog/eog.SlackBuild b/graphics/eog/eog.SlackBuild
index 6e65784f7e..d546a6e3aa 100644
--- a/graphics/eog/eog.SlackBuild
+++ b/graphics/eog/eog.SlackBuild
@@ -21,12 +21,16 @@
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+# 2023 Apr 10 - Added libportal patch to allow building this older eog version
+# to build against newer libportal versions. The patch can be removed once a newer
+# slackware version is released and eog can be upgraded.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=eog
VERSION=${VERSION:-41.2}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -76,6 +80,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# Conditionally apply patch to allow building with newer versions of
+# libportal, if detected:
+if (pkg-config --atleast-version 0.5 libportal) ; then
+ echo "Patching build to allow building with libportal >= 0.5"
+ patch -Np1 -i $CWD/a06e6325907e136678b0bbe7058c25d688034afd.patch
+else
+ echo "Skipping libportal patch"
+fi
+
mkdir build
cd build
CFLAGS="$SLKCFLAGS" \