Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Dec 2017 18:55:45 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r457192 - in head/graphics/gimmage: . files
Message-ID:  <201712241855.vBOItjdN030906@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Sun Dec 24 18:55:45 2017
New Revision: 457192
URL: https://svnweb.freebsd.org/changeset/ports/457192

Log:
  graphics/gimmage: fix, and update to c++11
  
  PR:		224475
  Submitted by:	Chris Hutchinson <portmaster@bsdforge.com> (maintainer)

Added:
  head/graphics/gimmage/files/patch-src__ImageEventBox.cpp   (contents, props changed)
Modified:
  head/graphics/gimmage/Makefile
  head/graphics/gimmage/files/patch-src__FileManager.cpp

Modified: head/graphics/gimmage/Makefile
==============================================================================
--- head/graphics/gimmage/Makefile	Sun Dec 24 18:50:24 2017	(r457191)
+++ head/graphics/gimmage/Makefile	Sun Dec 24 18:55:45 2017	(r457192)
@@ -3,7 +3,7 @@
 
 PORTNAME=	gimmage
 PORTVERSION=	0.2.3
-PORTREVISION=	12
+PORTREVISION=	13
 CATEGORIES=	graphics
 MASTER_SITES=	BERLIOS
 
@@ -13,13 +13,22 @@ COMMENT=	Simple image viewer
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	libcurl.so:ftp/curl
+LIB_DEPENDS=	libcurl.so:ftp/curl \
+		libfontconfig.so:x11-fonts/fontconfig \
+		libfreetype.so:print/freetype2
 
-BROKEN=		fails to compile: ustring.h: expected ';' at end of declaration list
-
-USES=		desktop-file-utils gettext pkgconfig
-USE_GNOME=	gtkmm24
+USES=		compiler:c++11-lang desktop-file-utils gettext pkgconfig
+USE_GNOME=	gtkmm24 gdkpixbuf2
 GNU_CONFIGURE=	yes
+USE_CXXSTD=	c++11
+
+OPTIONS_DEFINE=		NLS
+NLS_USES=		gettext
+NLS_CONFIGURE_ENABLE=	gettext
+
+CXXFLAGS+=	-stdlib=libc++ -Wc++11-extensions -Wc++11-long-long \
+		-Wunused-command-line-argument -Wreturn-type \
+		-Wwritable-strings -Wlogical-op-parentheses
 CONFIGURE_ARGS=	--with-libintl-prefix=${LOCALBASE}
 
 .include <bsd.port.mk>

Modified: head/graphics/gimmage/files/patch-src__FileManager.cpp
==============================================================================
--- head/graphics/gimmage/files/patch-src__FileManager.cpp	Sun Dec 24 18:50:24 2017	(r457191)
+++ head/graphics/gimmage/files/patch-src__FileManager.cpp	Sun Dec 24 18:55:45 2017	(r457192)
@@ -1,6 +1,6 @@
---- ./src/FileManager.cpp.orig	2007-07-20 23:42:55.000000000 +0400
-+++ ./src/FileManager.cpp	2007-07-20 23:43:03.000000000 +0400
-@@ -23,12 +23,13 @@
+--- src/FileManager.cpp.orig	2007-06-26 13:51:15 UTC
++++ src/FileManager.cpp
+@@ -23,12 +23,13 @@ Copyright 2006 Bartek Kostrzewa
  
  #include "FileManager.h"
  #include "defines.h"
@@ -14,3 +14,22 @@
 +#include <unistd.h>
  #include <sys/stat.h>
  }
+ 
+@@ -378,7 +379,7 @@ Glib::ustring FileManager::get_previous_file()
+ 	// OR
+ 	// we've hit the first picture going forwards and now want to go backwards
+ 	// we display the last picture
+-	if( last_op_previous && file_iterator == begin || last_op_next && file_iterator == begin )
++	if( (last_op_previous && file_iterator == begin) || (last_op_next && file_iterator == begin) )
+ 		{
+ 		last_op_previous = true;
+ 		last_op_next = false;
+@@ -466,7 +467,7 @@ bool FileManager::filter_filename(Glib::ustring filena
+ 		result.find("PCX") != Glib::ustring::npos ||
+ 		result.find("PGM") != Glib::ustring::npos	||
+ 		result.find("PPM") != Glib::ustring::npos	||
+-		result.find("TIFF") != Glib::ustring::npos && result.find("EPS") == Glib::ustring::npos	||
++		result.find("TIFF") != Glib::ustring::npos & result.find("EPS") == Glib::ustring::npos	||
+ 		result.find("X pixmap image text") != Glib::ustring::npos	||
+ 		result.find("Targa") != Glib::ustring::npos	||
+ 		result.find("PBM") != Glib::ustring::npos	||

Added: head/graphics/gimmage/files/patch-src__ImageEventBox.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/gimmage/files/patch-src__ImageEventBox.cpp	Sun Dec 24 18:55:45 2017	(r457192)
@@ -0,0 +1,38 @@
+--- src/ImageEventBox.cpp.orig	2007-06-26 13:51:16 UTC
++++ src/ImageEventBox.cpp
+@@ -149,7 +149,7 @@ void ImageEventBox::LoadImage(	const Glib::ustring & f
+ void ImageEventBox::ScaleImage( double scalefactor,
+ 								Gdk::InterpType interp_type)
+ 	{
+-	if(ImagePixbuf_Original != 0 && loaded == true)
++	if(ImagePixbuf_Original && loaded == true)
+ 		{
+ 		int new_width   = (int)(scalefactor * (double)ImagePixbuf_Original->get_width());
+ 		int new_height  = (int)(scalefactor * (double)ImagePixbuf_Original->get_height());
+@@ -176,7 +176,7 @@ void ImageEventBox::ScaleImage(	int width,
+ 								double * scalefactor,
+ 								Gdk::InterpType interp_type)
+ 	{
+-	if(ImagePixbuf_Original != 0 && loaded == true)
++	if(ImagePixbuf_Original && loaded == true)
+ 		{
+ 		double ratioh = (double)height/(double)ImagePixbuf_Original->get_height();
+ 		double ratiow = (double)width/(double)ImagePixbuf_Original->get_width();
+@@ -206,7 +206,7 @@ void ImageEventBox::ScaleImage2(	int width,
+ 								double * scalefactor,
+ 								Gdk::InterpType interp_type)
+ 	{
+-	if(ImagePixbuf_Original != 0 && loaded == true)
++	if(ImagePixbuf_Original && loaded == true)
+ 		{
+ 		if( width <= ImagePixbuf_Original->get_width() || height <= ImagePixbuf_Original->get_height() )
+ 		    {
+@@ -242,7 +242,7 @@ void ImageEventBox::ScaleImage2(	int width,
+ // the rotation of the image
+ void ImageEventBox::RotateImage(Gdk::PixbufRotation rotateby)
+ 	{
+-	if(ImagePixbuf_Original != 0 && loaded == true)
++	if(ImagePixbuf_Original && loaded == true)
+ 		{
+ 		try
+ 			{



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712241855.vBOItjdN030906>