1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-28 01:06:17 +00:00

graphics/gimmage: fix, and update to c++11

PR:		224475
Submitted by:	Chris Hutchinson <portmaster@bsdforge.com> (maintainer)
This commit is contained in:
Steve Wills 2017-12-24 18:55:45 +00:00
parent 278f3bd054
commit 1a39006bcd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=457192
3 changed files with 75 additions and 9 deletions

View File

@ -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>

View File

@ -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 ||

View File

@ -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
{