From nobody@FreeBSD.org  Fri Nov  8 09:55:09 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id 250506C5
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Nov 2013 09:55:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id 132AA2DA3
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  8 Nov 2013 09:55:09 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rA89t8d3012434
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 8 Nov 2013 09:55:08 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rA89t8Eb012406;
	Fri, 8 Nov 2013 09:55:08 GMT
	(envelope-from nobody)
Message-Id: <201311080955.rA89t8Eb012406@oldred.freebsd.org>
Date: Fri, 8 Nov 2013 09:55:08 GMT
From: "Ilya A. Arkhipov" <rum1cro@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] graphics/danpei bug fixing, STAGE supporting.
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183778
>Category:       ports
>Synopsis:       [patch] graphics/danpei bug fixing, STAGE supporting.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    wg
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Nov 08 10:00:00 UTC 2013
>Closed-Date:    Fri Nov 08 13:37:24 UTC 2013
>Last-Modified:  Fri Nov  8 13:40:00 UTC 2013
>Originator:     Ilya A. Arkhipov
>Release:        FreeBSD 11.0-CURRENT
>Organization:
Rambler Internet Holding LLC
>Environment:
FreeBSD m1cro.park 11.0-CURRENT FreeBSD 11.0-CURRENT #3 r256311M: Fri Oct 11 13:38:42 MSK 2013     root@m1cro.park:/usr/obj/usr/src/sys/MICROKERNEL  amd64
>Description:
[patch] graphics/danpei bug fixing, STAGE supporting.
Fixed building with clang
Added STAGE support
>How-To-Repeat:

>Fix:
File was attached

Patch attached with submission follows:

Index: Makefile
===================================================================
--- Makefile	(revision 332381)
+++ Makefile	(working copy)
@@ -10,6 +10,8 @@
 MAINTAINER=	rum1cro@yandex.ru
 COMMENT=	Image Viewer for X Window System with thumbnail preview feature
 
+LICENSE=	GPLv2
+
 LIB_DEPENDS=	png15:${PORTSDIR}/graphics/png
 
 .if !defined(WITHOUT_IMAGEMAGICK)
@@ -23,5 +25,8 @@
 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>
Index: files/patch-image_cache.c
===================================================================
--- files/patch-image_cache.c	(revision 332381)
+++ files/patch-image_cache.c	(working copy)
@@ -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++;
Index: files/patch-viewer.c
===================================================================
--- files/patch-viewer.c	(revision 0)
+++ files/patch-viewer.c	(working copy)
@@ -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));
Index: pkg-plist
===================================================================
--- pkg-plist	(revision 332381)
+++ pkg-plist	(working copy)
@@ -1,3 +0,0 @@
-bin/danpei
-share/locale/de/LC_MESSAGES/danpei.mo
-share/locale/ja/LC_MESSAGES/danpei.mo


>Release-Note:
>Audit-Trail:
Class-Changed-From-To: change-request->maintainer-update 
Class-Changed-By: edwin 
Class-Changed-When: Fri Nov 8 10:00:08 UTC 2013 
Class-Changed-Why:  
Fix category (submitter is maintainer) (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183778 
Responsible-Changed-From-To: freebsd-ports-bugs->wg 
Responsible-Changed-By: wg 
Responsible-Changed-When: Fri Nov 8 12:55:49 UTC 2013 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183778 
State-Changed-From-To: open->closed 
State-Changed-By: wg 
State-Changed-When: Fri Nov 8 13:37:23 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183778 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/183778: commit references a PR
Date: Fri,  8 Nov 2013 13:35:21 +0000 (UTC)

 Author: wg
 Date: Fri Nov  8 13:35:07 2013
 New Revision: 333221
 URL: http://svnweb.freebsd.org/changeset/ports/333221
 
 Log:
   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]
 
 Added:
   head/graphics/danpei/files/patch-viewer.c   (contents, props changed)
 Deleted:
   head/graphics/danpei/pkg-plist
 Modified:
   head/graphics/danpei/Makefile
   head/graphics/danpei/files/patch-image_cache.c
 
 Modified: head/graphics/danpei/Makefile
 ==============================================================================
 --- head/graphics/danpei/Makefile	Fri Nov  8 13:07:45 2013	(r333220)
 +++ head/graphics/danpei/Makefile	Fri Nov  8 13:35:07 2013	(r333221)
 @@ -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>
 
 Modified: head/graphics/danpei/files/patch-image_cache.c
 ==============================================================================
 --- head/graphics/danpei/files/patch-image_cache.c	Fri Nov  8 13:07:45 2013	(r333220)
 +++ head/graphics/danpei/files/patch-image_cache.c	Fri Nov  8 13:35:07 2013	(r333221)
 @@ -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++;
 
 Added: head/graphics/danpei/files/patch-viewer.c
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/graphics/danpei/files/patch-viewer.c	Fri Nov  8 13:35:07 2013	(r333221)
 @@ -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));
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
>Unformatted:
