From 6aa6889958232aee9e6413604c2bb049c8653f07 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Mon, 25 Nov 2013 18:49:51 +0100 Subject: [PATCH] Require glib 2.28 and GTK+3 Signed-off-by: Sebastian Ramacher --- Makefile | 3 ++- README | 1 + config.mk | 6 +++++- datastructures.c | 5 ----- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 7dcda4d..41f758b 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,8 @@ version.h: version.h.in config.mk $(ECHO) CC $< $(QUIET)${CC} -c ${CPPFLAGS} ${CFLAGS} ${DFLAGS} -o $@ $< -MMD -MF .depend/$@.dep -${OBJECTS} ${DOBJECTS}: config.mk version.h .version-checks/GTK +${OBJECTS} ${DOBJECTS}: config.mk version.h \ + .version-checks/GTK .version-checks/GLIB ${PROJECT}: static shared static: lib${PROJECT}.a diff --git a/README b/README index 049397e..9ce9a07 100644 --- a/README +++ b/README @@ -9,6 +9,7 @@ enhance the user interface that is used by zathura and jumanji. Requirements ------------ +glib (>= 2.28) gtk3 (>= 3.2) intltool diff --git a/config.mk b/config.mk index 258716b..b9db32c 100644 --- a/config.mk +++ b/config.mk @@ -25,7 +25,7 @@ INCLUDEDIR ?= ${PREFIX}/include LOCALEDIR ?= ${PREFIX}/share/locale # the GTK+ version to use -GIRARA_GTK_VERSION ?= 3 +GIRARA_GTK_VERSION = 3 # version checks # If you want to disable any of the checks, set *_VERSION_CHECK to 0. @@ -34,6 +34,10 @@ GIRARA_GTK_VERSION ?= 3 GTK_VERSION_CHECK ?= 1 GTK_MIN_VERSION = 3.2 GTK_PKG_CONFIG_NAME = gtk+-$(GIRARA_GTK_VERSION).0 +# glib +GLIB_VERSION_CHECK ?= 1 +GLIB_MIN_VERSION = 2.28 +GLIB_PKG_CONFIG_NAME = glib-2.0 # libs GTK_INC ?= $(shell pkg-config --cflags gtk+-${GIRARA_GTK_VERSION}.0) diff --git a/datastructures.c b/datastructures.c index 4736522..81b09f6 100644 --- a/datastructures.c +++ b/datastructures.c @@ -90,12 +90,7 @@ girara_list_clear(girara_list_t* list) } if (list->free) { -#if (GLIB_MAJOR_VERSION >= 2) && (GLIB_MINOR_VERSION >= 28) g_list_free_full(list->start, list->free); -#else - g_list_foreach(list->start, (GFunc)list->free, NULL); - g_list_free(list->start); -#endif } else { g_list_free(list->start); } -- 2.26.2