Commit 5925d0b0 authored by Leonardo Arena's avatar Leonardo Arena

main/geeqie: upgrade to 1.15

Rebuild against exiv2-0.27.2, refresh werror patch and add non-glibc fixes

Update license, move stuff into prepare()
parent 77ad5298
# Contributor: ScrumpyJack <scrumpyjack@st.ilet.to>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=geeqie
pkgver=1.4
pkgver=1.5
pkgrel=0
pkgdesc="Geeqie is a lightweight Gtk+ based image viewer and organiser"
url="http://www.geeqie.org/"
arch="all"
license="GPL"
depends=""
license="GPL-2.0-only"
options="!check"
makedepends="gtk+2.0-dev lcms2-dev exiv2-dev libtool doxygen \
lua5.1-dev graphviz-dev automake autoconf"
install=""
makedepends="gtk+2.0-dev lcms2-dev exiv2-dev libtool doxygen
lua5.1-dev graphviz-dev automake autoconf"
subpackages="$pkgname-doc $pkgname-lang"
source="http://www.geeqie.org/${pkgname}-${pkgver}.tar.xz
geeqie-1.4-goodbye-changelog.patch
disable-werror.patch
musl-fixes.patch
use-default-cflags.patch
"
builddir=${srcdir}/${pkgname}-${pkgver}
prepare() {
default_prepare
./autogen.sh
}
build() {
cd "$builddir"
./autogen.sh
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--mandir=/usr/share/man \
--enable-lua
make
}
package() {
cd "$builddir"
make DESTDIR="${pkgdir}" install
}
sha512sums="a88b6dcf30847e38c109f5bc6436d93f6b4e1336a094c6b8a45db117830117120bf58f390afcd8a4b7aaf2934f995c3f75ac33a7faf56bfc2bcc9bd4eebfb205 geeqie-1.4.tar.xz
sha512sums="2b87d543d8d77a4fec331fd1b73ca2038912362fc1f94c9b0f163dcc7c2dd58118e175c5540aecafb0581708ea5c2a5a321dde09f644e2322bd4ca5c0284b722 geeqie-1.5.tar.xz
c18740dd388d24b56c35c481a169f58e2710a5fbee6eae4792d7fb13209033581f893cd40b5af160be8f64326e6eea6abc2bf7363a063fedd17a0a999175834d geeqie-1.4-goodbye-changelog.patch
1c975041b1d5e2a69b3c6b3bac38fe7f133229cd47985ddf9eba38712a33e36dd45bf295d40ca9268989b146fb56419e5926297ffb19f52078a5d5eb7577100b disable-werror.patch"
adfff7e13449debd7c15e6e4c9cf5c39985e0f826543ab11b1256a3e0677dd8ba755cb45938ed6158f986faf8f9ec69ec5c4398fb44efedc2f007185f6691105 musl-fixes.patch
0312d7bf895cfc7ab79b8aba98df7c42f4c6e898473b838fc1940118d02588b9ae3ebec35bd2add58542dfde72a7310e3326d6d5e7c837e3cd832123758099e6 use-default-cflags.patch"
From d09b06c05c61cc675726a440f9cc787807024bb8 Mon Sep 17 00:00:00 2001
From: Dmitry Marakasov <>
Date: Sat, 3 Aug 2019 12:34:42 +0100
Subject: [PATCH] Fix #703: Fix build on non-glibc platforms
https://github.com/BestImageViewer/geeqie/pull/703
---
src/pan-view/pan-util.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/pan-view/pan-util.c b/src/pan-view/pan-util.c
index 3fd5cc89..317660bb 100644
--- a/src/pan-view/pan-util.c
+++ b/src/pan-view/pan-util.c
@@ -82,6 +82,12 @@ gint pan_date_value(time_t d, PanDateLengthType length)
return -1;
}
+#if defined(__GLIBC_PREREQ)
+# if __GLIBC_PREREQ(2, 27)
+# define HAS_GLIBC_STRFTIME_EXTENSIONS
+# endif
+#endif
+
gchar *pan_date_value_string(time_t d, PanDateLengthType length)
{
struct tm td;
@@ -99,7 +105,7 @@ gchar *pan_date_value_string(time_t d, PanDateLengthType length)
format = "%A %e";
break;
case PAN_DATE_LENGTH_MONTH:
-#if __GLIBC_PREREQ(2, 27)
+#if defined(HAS_GLIBC_STRFTIME_EXTENSIONS) || defined(__FreeBSD__)
format = "%OB %Y";
#else
format = "%B %Y";
--
2.11.0
From 7176df818593263a57996c729f933f21b7228afc Mon Sep 17 00:00:00 2001
From: Colin Clark <colin.clark@cclark.uk>
Date: Sat, 3 Aug 2019 12:25:16 +0100
Subject: [PATCH] Fix #683: Build fails on macOS due to use of
_NL_TIME_FIRST_WEEKDAY
https://github.com/BestImageViewer/geeqie/issues/683
---
configure.ac | 15 +++++++++++++++
src/misc.c | 22 +++++++++++++++++++++-
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f376d074..65df946c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -656,6 +656,21 @@ AC_SUBST(DJVU_LIBS)
AM_CONDITIONAL(HAVE_MARKDOWN, [ "$(command -v markdown)" ])
+# _NL_TIME_FIRST_WEEKDAY support
+# note that it is an enum and not a define
+# ----------------------------------------------------------------------
+
+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
+], nl_ok=yes, nl_ok=no)
+AC_MSG_RESULT($nl_ok)
+if test "$nl_ok" = "yes"; then
+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
+fi
+
# ----------------------------------------------------------------------
AH_TOP([
diff --git a/src/misc.c b/src/misc.c
index d780795d..85c87658 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -23,6 +23,7 @@
#include "ui_fileops.h"
#include <langinfo.h>
+#include <locale.h>
gdouble get_zoom_increment(void)
{
@@ -243,13 +244,32 @@ int runcmd(gchar *cmd)
* @brief Returns integer representing first_day_of_week
* @returns Integer in range 1 to 7
*
- * Uses current locale to get first day of week
+ * Uses current locale to get first day of week.
+ * If _NL_TIME_FIRST_WEEKDAY is not available, ISO 8601
+ * states first day of week is Monday.
+ * USA, Mexico and Canada (and others) use Sunday as first day of week.
*
* Sunday == 1
*/
gint date_get_first_day_of_week()
{
+ gchar *dot;
+ gchar *current_locale;
+
+#ifdef HAVE__NL_TIME_FIRST_WEEKDAY
return nl_langinfo(_NL_TIME_FIRST_WEEKDAY)[0];
+#else
+ current_locale = setlocale(LC_ALL, NULL);
+ dot = strstr(current_locale, ".");
+ if ((strncmp(dot - 2, "US", 2) == 0) || (strncmp(dot - 2, "MX", 2) == 0) || (strncmp(dot - 2, "CA", 2) == 0))
+ {
+ return 1;
+ }
+ else
+ {
+ return 2;
+ }
+#endif
}
/**
--
2.11.0
--- ./configure.in
+++ ./configure.in
@@ -17,9 +17,6 @@
diff --git a/configure.ac b/configure.ac
index dcf56bf..e3d1e71 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,9 +17,6 @@ dnl GNU General Public License for more details.
AC_PREREQ(2.57)
AC_INIT([geeqie], 1.4, [https://github.com/BestImageViewer/geeqie/issues], [], [http://www.geeqie.org/])
AC_INIT([geeqie], 1.5, [https://github.com/BestImageViewer/geeqie/issues], [], [http://www.geeqie.org/])
-# Add -Werror to the default CFLAGS
-CFLAGS+=" -Werror -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=return-type"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment