aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/danpei
diff options
context:
space:
mode:
authorwg <wg@FreeBSD.org>2013-11-08 21:35:07 +0800
committerwg <wg@FreeBSD.org>2013-11-08 21:35:07 +0800
commit6e05ab4c153ffde551afbf16fbaeb1c138234d08 (patch)
tree6ed6ef1b1c1a50239e0c45ca6d1850e1e122104c /graphics/danpei
parent2e3f6826cc60a5b28f4090e6c6b0dd4d9685c2a4 (diff)
downloadfreebsd-ports-gnome-6e05ab4c153ffde551afbf16fbaeb1c138234d08.tar.gz
freebsd-ports-gnome-6e05ab4c153ffde551afbf16fbaeb1c138234d08.tar.zst
freebsd-ports-gnome-6e05ab4c153ffde551afbf16fbaeb1c138234d08.zip
graphics/danpei: allow staging
- Allow staging - Add LICENSE (GPLv2) - Fix build with clang - Convert lib depends to new format [1] - Use IMAGEMAGICK as option [1] PR: ports/183778 Submitted by: Ilya A. Arkhipov <rum1cro yandex.ru> (maintainer), wg [1]
Diffstat (limited to 'graphics/danpei')
-rw-r--r--graphics/danpei/Makefile16
-rw-r--r--graphics/danpei/files/patch-image_cache.c35
-rw-r--r--graphics/danpei/files/patch-viewer.c29
-rw-r--r--graphics/danpei/pkg-plist3
4 files changed, 73 insertions, 10 deletions
diff --git a/graphics/danpei/Makefile b/graphics/danpei/Makefile
index 8f3e53f0cba6..b7b74454f254 100644
--- a/graphics/danpei/Makefile
+++ b/graphics/danpei/Makefile
@@ -10,11 +10,14 @@ MASTER_SITES= SF
MAINTAINER= rum1cro@yandex.ru
COMMENT= Image Viewer for X Window System with thumbnail preview feature
-LIB_DEPENDS= png15:${PORTSDIR}/graphics/png
+LICENSE= GPLv2
-.if !defined(WITHOUT_IMAGEMAGICK)
-RUN_DEPENDS+= convert:${PORTSDIR}/graphics/ImageMagick
-.endif
+LIB_DEPENDS= libpng15.so:${PORTSDIR}/graphics/png
+
+OPTIONS_DEFINE= IMAGEMAGICK
+OPTIONS_DEFAULT=IMAGEMAGICK
+
+IMAGEMAGICK_RUN_DEPENDS= convert:${PORTSDIR}/graphics/ImageMagick
USES= gettext
USE_GNOME= gtk12 gdkpixbuf
@@ -23,5 +26,8 @@ CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib"
CPPFLAGS+= -I${LOCALBASE}/include
CONFIGURE_ARGS+= --without-included-gettext
-NO_STAGE= yes
+PLIST_FILES= bin/danpei \
+ share/locale/de/LC_MESSAGES/danpei.mo \
+ share/locale/ja/LC_MESSAGES/danpei.mo
+
.include <bsd.port.mk>
diff --git a/graphics/danpei/files/patch-image_cache.c b/graphics/danpei/files/patch-image_cache.c
index b5c7888df007..8582f6c12fb1 100644
--- a/graphics/danpei/files/patch-image_cache.c
+++ b/graphics/danpei/files/patch-image_cache.c
@@ -1,5 +1,27 @@
---- src/image_cache.c.orig 2003-08-08 09:17:58.000000000 +0200
-+++ src/image_cache.c 2012-05-03 23:39:36.000000000 +0200
+--- src/image_cache.c.orig 2013-11-07 19:24:24.056322038 +0400
++++ src/image_cache.c 2013-11-07 19:32:26.759288924 +0400
+@@ -356,7 +356,7 @@
+ save_file = NULL;
+ cl = NULL;
+
+- if (tp->cache.cache_dir == NULL) { return; }
++ if (tp->cache.cache_dir == NULL) { return FALSE; }
+
+ save_file = (gchar*)malloc(sizeof(gchar) *
+ (strlen(tp->cache.cache_dir) +
+@@ -761,9 +761,9 @@
+ /* Initialize the local variables. */
+ png_text_filename = buffer = NULL;
+
+- if (pixbuf == NULL) { return; }
+- if (filename == NULL) { return; }
+- if (strcmp(filename, "") == 0) { return; }
++ if (pixbuf == NULL) { return FALSE; }
++ if (filename == NULL) { return FALSE; }
++ if (strcmp(filename, "") == 0) { return FALSE; }
+
+ fp = fopen (filename, "wb");
+ if (fp == NULL) { return FALSE; }
@@ -782,7 +782,7 @@
return FALSE;
}
@@ -9,3 +31,12 @@
png_destroy_write_struct(&png_ptr, &info_ptr);
fclose (fp);
return FALSE;
+@@ -839,7 +839,7 @@
+ /* expand RGB to RGBA using an opaque alpha value */
+ gint x;
+ gchar *buffer_ptr = buffer;
+- gchar *source_ptr = pixels;
++ guchar *source_ptr = pixels;
+ for (x = 0; x < width; x++) {
+ *buffer_ptr++ = *source_ptr++;
+ *buffer_ptr++ = *source_ptr++;
diff --git a/graphics/danpei/files/patch-viewer.c b/graphics/danpei/files/patch-viewer.c
new file mode 100644
index 000000000000..5a21e91ae369
--- /dev/null
+++ b/graphics/danpei/files/patch-viewer.c
@@ -0,0 +1,29 @@
+--- src/viewer.c.orig 2013-11-07 19:33:02.807286361 +0400
++++ src/viewer.c 2013-11-07 19:34:22.533326686 +0400
+@@ -293,7 +293,7 @@
+
+ if ((dv->thumb == dv->current_thumb) &&
+ ((widget->allocation.x == dv->area_x) &&
+- (widget->allocation.y == dv->area_y) )){ return; }
++ (widget->allocation.y == dv->area_y) )){ return 1; }
+
+ dv->area_x = widget->allocation.x;
+ dv->area_y = widget->allocation.y;
+@@ -314,7 +314,7 @@
+ filename = g_strconcat(dv->thumb->path, "/", dv->thumb->filename, NULL);
+ }
+ }
+- if (filename == NULL) { return; }
++ if (filename == NULL) { return 1; }
+
+ viewer_read_image(dv, filename, tp);
+
+@@ -555,7 +555,7 @@
+ while ((thumb != NULL) && (i < (tp->viewer).adj.value)) {
+ thumb = thumb->next; i++;
+ }
+- if (thumb == NULL) { return; }
++ if (thumb == NULL) { return FALSE; }
+
+ gtk_window_set_title(GTK_WINDOW((tp->viewer).window),
+ g_strconcat(thumb->path, "/", thumb->filename, NULL));
diff --git a/graphics/danpei/pkg-plist b/graphics/danpei/pkg-plist
deleted file mode 100644
index c2d641ee2931..000000000000
--- a/graphics/danpei/pkg-plist
+++ /dev/null
@@ -1,3 +0,0 @@
-bin/danpei
-share/locale/de/LC_MESSAGES/danpei.mo
-share/locale/ja/LC_MESSAGES/danpei.mo