mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
gdk_pixbuf: fix loaders cache
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
SETTINGS_DIR=`finddir B_SYSTEM_SETTINGS_DIRECTORY`/gdk-pixbuf-2.0
|
||||
mkdir -p $SETTINGS_DIR
|
||||
gdk-pixbuf-query-loaders >$SETTINGS_DIR/loaders.cache
|
||||
gdk-pixbuf-query-loaders --update-cache
|
||||
|
||||
@@ -9,10 +9,11 @@ GdkRGB buffers.
|
||||
HOMEPAGE="https://wiki.gnome.org/Projects/GdkPixbuf"
|
||||
COPYRIGHT="1999-2020 Gnome Project"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
REVISION="7"
|
||||
REVISION="8"
|
||||
SOURCE_URI="https://download.gnome.org/sources/gdk-pixbuf/${portVersion%.*}/gdk-pixbuf-$portVersion.tar.xz"
|
||||
CHECKSUM_SHA256="83c66a1cfd591d7680c144d2922c5955d38b4db336d7cd3ee109f7bcf9afef15"
|
||||
SOURCE_DIR="gdk-pixbuf-$portVersion"
|
||||
PATCHES="gdk_pixbuf-$portVersion.patchset"
|
||||
ADDITIONAL_FILES="
|
||||
update_loaders_cache.sh
|
||||
"
|
||||
@@ -20,6 +21,13 @@ ADDITIONAL_FILES="
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
commandBinDir=$binDir
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="0.4200.2"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
@@ -33,9 +41,9 @@ POST_INSTALL_SCRIPTS="
|
||||
PROVIDES="
|
||||
gdk_pixbuf$secondaryArchSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_csource$secondaryArchSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_pixdata$secondaryArchSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_query_loaders$secondaryArchSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_thumbnailer$secondaryArchSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_pixdata$commandSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_query_loaders$commandSuffix = $portVersion
|
||||
cmd:gdk_pixbuf_thumbnailer$commandSuffix = $portVersion
|
||||
lib:libgdk_pixbuf_2.0$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
@@ -101,7 +109,7 @@ BUILD()
|
||||
meson build \
|
||||
--buildtype=release \
|
||||
--prefix=$prefix \
|
||||
--bindir=$binDir \
|
||||
--bindir=$commandBinDir \
|
||||
--datadir=$dataDir \
|
||||
--includedir=$includeDir \
|
||||
--libdir=$libDir \
|
||||
@@ -117,8 +125,7 @@ INSTALL()
|
||||
|
||||
# move loaders.cache to settings dir
|
||||
mkdir $settingsDir/gdk-pixbuf-2.0
|
||||
mv $libDir/gdk-pixbuf-2.0/2.10.0/loaders.cache $settingsDir/gdk-pixbuf-2.0
|
||||
ln -s $settingsDir/gdk-pixbuf-2.0/loaders.cache $libDir/gdk-pixbuf-2.0/2.10.0/loaders.cache
|
||||
mv $libDir/gdk-pixbuf-2.0/*/loaders.cache $settingsDir/gdk-pixbuf-2.0
|
||||
# postinstall script for rebuild loaders.cache
|
||||
mkdir -p $postInstallDir
|
||||
cp $portDir/additional-files/update_loaders_cache.sh $postInstallDir
|
||||
|
||||
54
x11-libs/gdk-pixbuf/patches/gdk_pixbuf-2.42.2.patchset
Normal file
54
x11-libs/gdk-pixbuf/patches/gdk_pixbuf-2.42.2.patchset
Normal file
@@ -0,0 +1,54 @@
|
||||
From cec18fd969e1e46c72b53f0b07374ed0e9d0c871 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Wed, 26 Jan 2022 15:44:44 +1000
|
||||
Subject: Move loaders.cache to settings dir
|
||||
|
||||
|
||||
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c
|
||||
index 40eb920..5e4f3fd 100644
|
||||
--- a/gdk-pixbuf/gdk-pixbuf-io.c
|
||||
+++ b/gdk-pixbuf/gdk-pixbuf-io.c
|
||||
@@ -351,6 +351,11 @@ get_libdir (void)
|
||||
|
||||
#endif /* GDK_PIXBUF_RELOCATABLE */
|
||||
|
||||
+#ifdef __HAIKU__
|
||||
+#undef GDK_PIXBUF_LIBDIR
|
||||
+#define GDK_PIXBUF_LIBDIR "/system/settings"
|
||||
+#endif
|
||||
+
|
||||
/* In case we have a relative module path in the loaders cache
|
||||
* prepend the toplevel dir */
|
||||
static gchar *
|
||||
@@ -373,8 +378,11 @@ gdk_pixbuf_get_module_file (void)
|
||||
gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
|
||||
|
||||
if (!result)
|
||||
+#ifdef __HAIKU__
|
||||
+ result = g_build_filename ("/system/settings", "gdk-pixbuf-2.0", "loaders.cache");
|
||||
+#else
|
||||
result = g_build_filename (GDK_PIXBUF_LIBDIR, "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache", NULL);
|
||||
-
|
||||
+#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
diff --git a/gdk-pixbuf/queryloaders.c b/gdk-pixbuf/queryloaders.c
|
||||
index ddcae7b..39ca339 100644
|
||||
--- a/gdk-pixbuf/queryloaders.c
|
||||
+++ b/gdk-pixbuf/queryloaders.c
|
||||
@@ -304,7 +304,11 @@ gdk_pixbuf_get_module_file (void)
|
||||
gchar *result = g_strdup (g_getenv ("GDK_PIXBUF_MODULE_FILE"));
|
||||
|
||||
if (!result)
|
||||
+#ifdef __HAIKU__
|
||||
+ result = g_build_filename ("/system/settings", "gdk-pixbuf-2.0", "loaders.cache");
|
||||
+#else
|
||||
result = g_build_filename (GDK_PIXBUF_LIBDIR, "gdk-pixbuf-2.0", GDK_PIXBUF_BINARY_VERSION, "loaders.cache", NULL);
|
||||
+#endif
|
||||
|
||||
return result;
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user