ports/136648: [PATCH]graphics/exact-image: update to 0.7.4

bf bf1783 at gmail.com
Fri Jul 10 22:30:01 UTC 2009


>Number:         136648
>Category:       ports
>Synopsis:       [PATCH]graphics/exact-image: update to 0.7.4
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 10 22:30:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     bf
>Release:        8-CURRENT amd64
>Organization:
-
>Environment:
>Description:
It's been a while since the last update.  I placed priority on medium because of a user request for the new version, which has added features like a bar code reader, etc.  I re-enabled evas opengl support, although it remains buggy.  (Hopefully we'll fix this at some point.)  The new version has a python interface via swig (which also has it's problems ...), which I added.  There is not much of a cost to this, as x11 now requires python by default, anyway.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN exact-image.orig/Makefile exact-image/Makefile
--- exact-image.orig/Makefile	2009-07-10 17:11:38.000000000 -0400
+++ exact-image/Makefile	2009-07-10 17:50:43.000000000 -0400
@@ -6,15 +6,14 @@
 #
 
 PORTNAME=	exact-image
-PORTVERSION=	0.4.0
-PORTREVISION=	2
+PORTVERSION=	0.7.4
 CATEGORIES=	graphics
-MASTER_SITES=	http://dl.exactcode.de/oss/${PORTNAME}/ CENKES
+MASTER_SITES=	http://dl.exactcode.de/oss/${PORTNAME}/
 
 MAINTAINER=	bf1783 at gmail.com
 COMMENT=	Fast image processing library
 
-BUILD_DEPENDS=	swig>=1.3.31:${PORTSDIR}/devel/swig13
+BUILD_DEPENDS=	swig>=1.3.32:${PORTSDIR}/devel/swig13
 LIB_DEPENDS=	agg.2:${PORTSDIR}/graphics/agg \
 		jpeg.9:${PORTSDIR}/graphics/jpeg \
 		tiff.4:${PORTSDIR}/graphics/tiff \
@@ -22,28 +21,39 @@
 		ungif.5:${PORTSDIR}/graphics/libungif \
 		jasper.4:${PORTSDIR}/graphics/jasper \
 		IlmImf.6:${PORTSDIR}/graphics/OpenEXR \
-		lcms.1:${PORTSDIR}/graphics/lcms
+		lcms.1:${PORTSDIR}/graphics/lcms \
+		freetype.9:${PORTSDIR}/print/freetype2 \
+		expat.6:${PORTSDIR}/textproc/expat2
 
 CFLAGS+=	-fPIC
+#hack to get custom exactcode configure script to enable tiff support with
+#broken headers on c++ in base system:
+CPPFLAGS+=	-fpermissive
 USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_PERL5=	yes
+USE_PYTHON=	2.5+
 USE_XORG=	x11
 USE_EFL=	evas
 USE_EFL_EVAS_ENGINES=	x11 opengl
 HAS_CONFIGURE=	yes
 INSTALL_WRKSRC=	${WRKSRC}/objdir
-BINS=	econvert edisplay edentify optimize2bw empty-page
-PLIST_FILES=	${BINS:S|^|bin/|} %%SITE_PERL%%/ExactImage.so \
-		%%SITE_PERL%%/ExactImage.pm
-PORT_VERBS=	ExactImage ${BINS}
+BINS=	bardecode econvert edentify edisplay empty-page hocr2pdf optimize2bw
+PLIST_FILES=	${BINS:S|^|bin/|} \
+		%%SITE_PERL%%/ExactImage.so \
+		%%SITE_PERL%%/ExactImage.pm \
+		%%PYTHON_SITELIBDIR%%/ExactImage.py \
+		%%PYTHON_SITELIBDIR%%/_ExactImage.so
 
 post-extract:
 	@${RM} -rf ${WRKSRC}/agg-2.4/
 
 post-patch:
-	@${REINPLACE_CMD} -e '1s|/.*|/bin/sh|;s|libpng|libpng12|;\
-		/parse_options/d' ${WRKSRC}/configure
+	@${REINPLACE_CMD} -e '1s|/.*|/bin/sh|;s|/usr/local|${LOCALBASE}|;\
+		/parse_options/d;s| cc | ${CC} |;s| c++ | ${CXX} |;\
+		s|python -V|${PYTHON_CMD} -V|;\
+		/PYTHONINCS/s|=.*$$|=-I${PYTHON_INCLUDEDIR}|' \
+		${WRKSRC}/configure
 	@${REINPLACE_CMD} -e '/^Q =/d;s|$$[(]COMPILE.cc[)]|${CXX} $${CPPFLAGS} -c|;\
 		s|$$[(]CXX[)]|${CXX}|;s|$$[(]COMPILE.c[)]|${CC} $${CPPFLAGS} -c|'\
 			${WRKSRC}/build/bottom.make
@@ -51,20 +61,20 @@
 		/mtune=/d;/call cc-option/d;' ${WRKSRC}/Makefile
 	@${REINPLACE_CMD} -e '/CFLAGS=/s|".*"|"${CFLAGS} -I${LOCALBASE}/include"|;\
 		/LIBS=/s|".*"|"-L${LOCALBASE}/lib -lX11"|' ${WRKSRC}/config/pkgcheck-x11.c
-	@${REINPLACE_CMD} -e 's|$$prg|$$prg -I${LOCALBASE}/include|;\
-		/^var_remove/,/^}/d;/^parse_options/,/^}/d' ${WRKSRC}/config/functions
-
-post-configure:
-	@${REINPLACE_CMD} -e '/EVASGL/s|1|0|' ${WRKSRC}/config.h
-	@${ECHO_CMD} '#define WITHLIBPNG 1' >> ${WRKSRC}/config.h
-	@${ECHO_CMD} 'WITHLIBPNG = 1' >> ${WRKSRC}/config.make
-	@${ECHO_CMD} 'EVASGL = 0' >> ${WRKSRC}/config.make
+	@${REINPLACE_CMD} -e 's|$$prg|$$prg ${CPPFLAGS} -I${LOCALBASE}/include|;\
+		s|/usr/local|${PREFIX}|;/^var_remove/,/^}/d;/^parse_options/,/^}/d' \
+		 ${WRKSRC}/config/functions
+	@${REINPLACE_CMD} -e 's|/usr/X11|${LOCALBASE}|' ${WRKSRC}/lib/vectorial.cc \
+		${WRKSRC}/edisplay/edisplay.cc
 
 do-install:
 	@cd ${INSTALL_WRKSRC}/&&for i in ${BINS};do\
 		${INSTALL_PROGRAM} */$$i ${PREFIX}/bin/;done
-	@cd ${INSTALL_WRKSRC}/api/&&\
+	@cd ${INSTALL_WRKSRC}/api/perl&&\
 		${INSTALL_PROGRAM} ExactImage.so ${SITE_PERL}/;\
 		${INSTALL_DATA} ExactImage.pm ${SITE_PERL}/
+	@cd ${INSTALL_WRKSRC}/api/python&&\
+		${INSTALL_SCRIPT} ExactImage.py ${PYTHONPREFIX_SITELIBDIR}/;\
+		${INSTALL_PROGRAM} _ExactImage.so ${PYTHONPREFIX_SITELIBDIR}/
 
 .include <bsd.port.mk>
diff -ruN exact-image.orig/distinfo exact-image/distinfo
--- exact-image.orig/distinfo	2009-07-10 17:11:38.000000000 -0400
+++ exact-image/distinfo	2009-07-02 16:59:38.000000000 -0400
@@ -1,3 +1,3 @@
-MD5 (exact-image-0.4.0.tar.bz2) = 2e51094bbda00b7f483c6201e606ad80
-SHA256 (exact-image-0.4.0.tar.bz2) = 4bb3eb0cd10b875564935bbb749275146b0a4c8f90427c816f18a2692aff3966
-SIZE (exact-image-0.4.0.tar.bz2) = 461877
+MD5 (exact-image-0.7.4.tar.bz2) = ecf43d9878a759ec056942c533c63ddc
+SHA256 (exact-image-0.7.4.tar.bz2) = e091a0b13eccd97a97c9233d939e70a154ffc586e5e509f0b4639e5cdc14db40
+SIZE (exact-image-0.7.4.tar.bz2) = 531051
diff -ruN exact-image.orig/files/patch-codecs__bmp.cc exact-image/files/patch-codecs__bmp.cc
--- exact-image.orig/files/patch-codecs__bmp.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-codecs__bmp.cc	2009-07-02 18:59:20.000000000 -0400
@@ -0,0 +1,15 @@
+--- codecs/bmp.cc.orig	2009-07-02 17:37:58.000000000 -0400
++++ codecs/bmp.cc	2009-07-02 18:38:49.000000000 -0400
+@@ -628,9 +628,9 @@
+       
+       colorspace_de_palette (image, clr_tbl_size, rmap, gmap, bmap);
+       
+-      delete (rmap);
+-      delete (gmap);
+-      delete (bmap);
++      delete[] rmap;
++      delete[] gmap;
++      delete[] bmap;
+       
+       free(clr_tbl);
+       clr_tbl = NULL;
diff -ruN exact-image.orig/files/patch-codecs__gif.cc exact-image/files/patch-codecs__gif.cc
--- exact-image.orig/files/patch-codecs__gif.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-codecs__gif.cc	2009-07-02 18:59:56.000000000 -0400
@@ -0,0 +1,11 @@
+--- codecs/gif.cc.orig	2009-07-02 18:34:16.000000000 -0400
++++ codecs/gif.cc	2009-07-02 18:38:40.000000000 -0400
+@@ -232,7 +232,7 @@
+   }
+   free (OutputBuffer);
+ 
+-  delete (RedBuffer); delete (GreenBuffer); delete (BlueBuffer);
++  delete[] RedBuffer; delete[] GreenBuffer; delete[] BlueBuffer;
+ 
+   EGifCloseFile(GifFile);
+   return true;
diff -ruN exact-image.orig/files/patch-codecs__jpeg.cc exact-image/files/patch-codecs__jpeg.cc
--- exact-image.orig/files/patch-codecs__jpeg.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-codecs__jpeg.cc	2009-07-02 19:00:21.000000000 -0400
@@ -0,0 +1,11 @@
+--- codecs/jpeg.cc.orig	2009-07-02 18:34:41.000000000 -0400
++++ codecs/jpeg.cc	2009-07-02 18:43:42.000000000 -0400
+@@ -683,7 +683,7 @@
+      * We need to clean up the JPEG object, close the input file, and return.
+      */
+     jpeg_destroy_decompress (cinfo);
+-    free (cinfo);
++    delete[] cinfo;
+     return false;
+   }
+   
diff -ruN exact-image.orig/files/patch-codecs__xpm.cc exact-image/files/patch-codecs__xpm.cc
--- exact-image.orig/files/patch-codecs__xpm.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-codecs__xpm.cc	2009-07-02 19:00:36.000000000 -0400
@@ -0,0 +1,19 @@
+--- codecs/xpm.cc.orig	2009-07-02 18:34:51.000000000 -0400
++++ codecs/xpm.cc	2009-07-02 18:48:45.000000000 -0400
+@@ -131,6 +131,7 @@
+       // Type: c -> colour, m -> monochrome, g -> grayscale, and s -> symbolic
+       if (type != "c") {
+ 	std::cerr << "XPM color type: " << type << " not yet implemented." << std::endl;
++	delete[] rmap; delete[] gmap; delete[] bmap;
+ 	return false;
+       }
+       
+@@ -197,7 +198,7 @@
+     }
+   
+   colorspace_de_palette (image, colors, rmap, gmap, bmap);
+-  delete (rmap); delete (gmap); delete (bmap);
++  delete[] rmap; delete[] gmap; delete[] bmap;
+   rmap = gmap = bmap = 0;
+ 
+   return true;
diff -ruN exact-image.orig/files/patch-lib__ContourMatching.cc exact-image/files/patch-lib__ContourMatching.cc
--- exact-image.orig/files/patch-lib__ContourMatching.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-lib__ContourMatching.cc	2009-07-10 11:25:12.000000000 -0400
@@ -0,0 +1,10 @@
+--- lib/ContourMatching.cc.orig	2009-07-10 11:19:11.000000000 -0400
++++ lib/ContourMatching.cc	2009-07-10 11:20:05.000000000 -0400
+@@ -1,6 +1,7 @@
+ #include <cmath>
+ #include <algorithm>
+ #include <iostream>
++#include <stdio.h>
+ 
+ #include "ContourMatching.hh"
+ 
diff -ruN exact-image.orig/files/patch-lib__ContourUtility.cc exact-image/files/patch-lib__ContourUtility.cc
--- exact-image.orig/files/patch-lib__ContourUtility.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-lib__ContourUtility.cc	2009-07-10 10:27:29.000000000 -0400
@@ -0,0 +1,13 @@
+--- lib/ContourUtility.cc.orig	2009-07-10 10:25:43.000000000 -0400
++++ lib/ContourUtility.cc	2009-07-10 10:26:31.000000000 -0400
+@@ -1,9 +1,9 @@
+-#include "ContourUtility.hh"
+ #include <cmath>
+ #include <cstdlib>
+ //#include <iostream>
+ #include <assert.h>
+ #include <stdio.h>
++#include "ContourUtility.hh"
+ 
+ void CenterAndReduce(const Contours::Contour& source,
+ 		     Contours::Contour& dest,
diff -ruN exact-image.orig/files/patch-utility__Timer.cc exact-image/files/patch-utility__Timer.cc
--- exact-image.orig/files/patch-utility__Timer.cc	1969-12-31 19:00:00.000000000 -0500
+++ exact-image/files/patch-utility__Timer.cc	2009-07-10 11:32:03.000000000 -0400
@@ -0,0 +1,11 @@
+--- utility/Timer.cc.orig	2009-07-10 11:30:14.000000000 -0400
++++ utility/Timer.cc	2009-07-10 11:30:30.000000000 -0400
+@@ -145,7 +145,7 @@
+ 		   );
+   return ((uint64_t)hi << 32) | lo;
+ #endif
+-#elif define(__mips__)
++#elif defined(__mips__)
+   unsigned int ticks;
+   __asm__ __volatile__ ("dmfc0 %0,$9" : "=r" (ticks));
+   return ticks;


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list