View | Details | Raw Unified | Return to bug 136648
Collapse All | Expand All

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

Return to bug 136648