]> saetta.ns0.it Git - msys2/commitdiff
gthumb: nuovo pacchetto WIP.
authorAndrea Zagli <azagli@libero.it>
Sun, 5 Apr 2015 09:35:12 +0000 (11:35 +0200)
committerAndrea Zagli <azagli@libero.it>
Sat, 21 Apr 2018 13:13:20 +0000 (15:13 +0200)
packages/mingw-w64-gthumb/001-win.patch [new file with mode: 0644]
packages/mingw-w64-gthumb/PKGBUILD [new file with mode: 0644]

diff --git a/packages/mingw-w64-gthumb/001-win.patch b/packages/mingw-w64-gthumb/001-win.patch
new file mode 100644 (file)
index 0000000..487f596
--- /dev/null
@@ -0,0 +1,139 @@
+--- ./configure.ac.orig        2015-02-09 19:39:15.000000000 +0100
++++ ./configure.ac     2015-02-15 17:36:19.244980600 +0100
+@@ -137,7 +137,6 @@
+       glib-2.0                >= $GLIB_REQUIRED
+       gthread-2.0
+       gmodule-2.0
+-      gio-unix-2.0
+       gtk+-3.0                >= $GTK_REQUIRED
+       libpng
+       zlib
+--- ./extensions/comments/main.c.orig  2015-02-09 19:39:15.000000000 +0100
++++ ./extensions/comments/main.c       2015-02-15 17:36:19.349986600 +0100
+@@ -112,7 +112,9 @@
+                        * embedded metadata. */
+                       if (g_file_info_get_attribute_boolean (file_data->info, "comment::no-comment-file")) {
+                               if (can_read_embedded_attributes) {
++#ifdef ENABLE_EXIV2
+                                       exiv2_update_general_attributes (file_data->info);
++#endif
+                                       gth_comment_update_from_general_attributes (file_data);
+                               }
+                       }
+--- ./extensions/comments/Makefile.am.orig     2015-02-09 19:39:15.000000000 +0100
++++ ./extensions/comments/Makefile.am  2015-02-15 17:36:19.356986700 +0100
+@@ -19,11 +19,12 @@
+       main.c                                  \
+       preferences.h
+-libcomments_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb 
++libcomments_la_CFLAGS = $(GTHUMB_CFLAGS) -I$(top_srcdir) -I$(top_builddir)/gthumb
+ libcomments_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
+ libcomments_la_LIBADD = $(GTHUMB_LIBS)
+ if ENABLE_EXIV2
+ libcomments_la_LIBADD += ../exiv2_tools/libexiv2_tools.la
++libcomments_la_CFLAGS += -DENABLE_EXIV2
+ endif 
+ libcomments_la_DEPENDENCIES = $(top_builddir)/gthumb/gthumb$(EXEEXT)
+--- ./extensions/image_print/Makefile.am.orig  2015-02-09 19:39:15.000000000 +0100
++++ ./extensions/image_print/Makefile.am       2015-02-15 17:47:21.106042400 +0100
+@@ -4,6 +4,10 @@
+ extension_LTLIBRARIES = libimage_print.la
+ libimage_print_la_SOURCES =           \
++      ../image_viewer/actions.c \
++      ../image_viewer/actions.h \
++      ../image_viewer/gth-image-viewer-page.c \
++      ../image_viewer/gth-image-viewer-page.h \
+       actions.c                       \
+       actions.h                       \
+       callbacks.c                     \
+--- ./gthumb/gnome-desktop-thumbnail.c.orig    2015-02-09 19:39:15.000000000 +0100
++++ ./gthumb/gnome-desktop-thumbnail.c 2015-02-15 17:36:19.380994200 +0100
+@@ -1370,7 +1370,7 @@
+     }
+   close (tmp_fd);
+-  g_snprintf (mtime_str, 21, "%ld",  original_mtime);
++  g_snprintf (mtime_str, 21, "%ld", (long int)original_mtime);
+   width = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Width");
+   height = gdk_pixbuf_get_option (thumbnail, "tEXt::Thumb::Image::Height");
+@@ -1471,7 +1471,7 @@
+     }
+   close (tmp_fd);
+-  g_snprintf (mtime_str, 21, "%ld",  mtime);
++  g_snprintf (mtime_str, 21, "%ld", (long int)mtime);
+   pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, 1, 1);
+   saved_ok  = gdk_pixbuf_save (pixbuf,
+                              tmp_path,
+--- ./gthumb/gth-thumb-loader.c.orig   2015-02-09 19:39:15.000000000 +0100
++++ ./gthumb/gth-thumb-loader.c        2015-02-15 17:36:19.392988700 +0100
+@@ -44,6 +44,10 @@
+ #include "pixbuf-utils.h"
+ #include "typedefs.h"
++#if defined(G_OS_WIN32)
++#include <windows.h>
++#endif
++
+ #define THUMBNAIL_LARGE_SIZE    256
+ #define THUMBNAIL_NORMAL_SIZE   128
+ #define THUMBNAIL_DIR_PERMISSIONS 0700
+@@ -663,7 +667,11 @@
+       }
+       if (load_data->thumbnailer_pid != 0)
++#if defined(G_OS_UNIX)
+               kill (load_data->thumbnailer_pid, SIGTERM);
++#elif defined(G_OS_WIN32)
++              TerminateProcess (load_data->thumbnailer_pid, 0);
++#endif
+       return FALSE;
+ }
+--- ./gthumb/gth-time-selector.c.orig  2015-02-09 19:39:15.000000000 +0100
++++ ./gthumb/gth-time-selector.c       2015-02-15 17:36:19.402989400 +0100
+@@ -312,7 +312,7 @@
+ static void
+ update_date_from_view (GthTimeSelector *self)
+ {
+-      struct tm tm;
++      /*struct tm tm;
+       strptime (gtk_entry_get_text (GTK_ENTRY (self->priv->date_entry)), "%x", &tm);
+       if (self->priv->use_time)
+@@ -322,7 +322,7 @@
+               tm.tm_min = 0;
+               tm.tm_sec = 0;
+       }
+-      gth_datetime_from_struct_tm (self->priv->date_time, &tm);
++      gth_datetime_from_struct_tm (self->priv->date_time, &tm);*/
+ }
+--- ./gthumb/main-migrate-catalogs.c.orig      2015-02-09 19:39:15.000000000 +0100
++++ ./gthumb/main-migrate-catalogs.c   2015-02-15 17:36:19.410990000 +0100
+@@ -300,7 +300,7 @@
+                               /* line 8: date */
+                               n_line++;
+-                              sscanf (lines[n_line], "%ld", &date);
++                              sscanf (lines[n_line], "%ld", (long int *)&date);
+                               /* line 9: date scope */
+--- ./gthumb/main.c.orig       2015-02-09 19:39:15.000000000 +0100
++++ ./gthumb/main.c    2015-02-15 17:36:19.420989600 +0100
+@@ -23,7 +23,9 @@
+ #include <glib/gi18n.h>
+ #include <glib/gprintf.h>
+ #include <gtk/gtk.h>
++#ifdef GDK_WINDOWING_X11
+ #include <gio/gdesktopappinfo.h>
++#endif
+ #ifdef HAVE_GSTREAMER
+ #  include <gst/gst.h>
+ #endif
diff --git a/packages/mingw-w64-gthumb/PKGBUILD b/packages/mingw-w64-gthumb/PKGBUILD
new file mode 100644 (file)
index 0000000..dfe568b
--- /dev/null
@@ -0,0 +1,61 @@
+# Maintainer: Andrea Zagli <andrea.zagli.free@gmail.com>
+
+_realname=gthumb
+pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
+pkgver=3.3.4
+pkgrel=1
+arch=('any')
+pkgdesc="An image viewer and browser (mingw-w64)"
+options=(strip staticlibs)
+depends=("${MINGW_PACKAGE_PREFIX}-gtk3"
+         "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme"
+         "${MINGW_PACKAGE_PREFIX}-exiv2"
+         "${MINGW_PACKAGE_PREFIX}-clutter"
+         "${MINGW_PACKAGE_PREFIX}-clutter-gtk"
+         "${MINGW_PACKAGE_PREFIX}-LibRaw"
+         "${MINGW_PACKAGE_PREFIX}-libsoup"
+         "${MINGW_PACKAGE_PREFIX}-libchamplain"
+         "${MINGW_PACKAGE_PREFIX}-gstreamer0.10"
+         "${MINGW_PACKAGE_PREFIX}-librsvg"
+         "${MINGW_PACKAGE_PREFIX}-libwebp"
+         "${MINGW_PACKAGE_PREFIX}-json-glib"
+         "${MINGW_PACKAGE_PREFIX}-lcms2")
+makedepends=("${MINGW_PACKAGE_PREFIX}-gcc"
+             "${MINGW_PACKAGE_PREFIX}-pkg-config")
+license=("GPL 2")
+url="http://www.gnome.org"
+source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz
+        001-win.patch)
+sha256sums=('657812b998d8b700ed3f6d9c8612adad22cff0e56383e5e01a61738b32dfec3b'
+            '747ae3f38beb4dfa9f3bbf8cbe0e566f2b1b6d1c76650ca71b41cff31ff3faea')
+
+prepare() {
+  cd "${srcdir}"/${_realname}-${pkgver}
+
+  patch -b -V simple -p 0 -i ${srcdir}/001-win.patch
+
+  autoreconf -if
+}
+
+build() {
+  mkdir -p build-${MINGW_CHOST}
+  cd build-${MINGW_CHOST}
+
+  ../${_realname}-${pkgver}/configure \
+    --host=${MINGW_CHOST} \
+    --target=${MINGW_CHOST} \
+    --build=${MINGW_CHOST} \
+    --prefix=${MINGW_PREFIX} \
+    --libexecdir=${MINGW_PREFIX}/lib \
+    --disable-libsecret \
+    --disable-libbrasero \
+    --disable-webkit2 \
+    --disable-exiv2 \
+    --disable-gstreamer
+  make V=1
+}
+
+package() {
+  cd "$srcdir/build-${MINGW_CHOST}"
+  make DESTDIR=$pkgdir install
+}