diff options
author | Dennis Herrmann <dhn@FreeBSD.org> | 2009-07-11 10:04:20 +0000 |
---|---|---|
committer | Dennis Herrmann <dhn@FreeBSD.org> | 2009-07-11 10:04:20 +0000 |
commit | 46a1908a77e05f56038d5b15de28e03937561af0 (patch) | |
tree | cf9866988ac1d0e21d713b6f80b8eb5f3c5825c4 /graphics | |
parent | 9891055f1ffbb02ab262b6dce645033c1447038e (diff) | |
download | ports-46a1908a77e05f56038d5b15de28e03937561af0.tar.gz ports-46a1908a77e05f56038d5b15de28e03937561af0.zip |
Notes
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/exact-image/Makefile | 50 | ||||
-rw-r--r-- | graphics/exact-image/distinfo | 6 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-codecs__bmp.cc | 15 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-codecs__gif.cc | 11 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-codecs__jpeg.cc | 11 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-codecs__xpm.cc | 19 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-lib__ContourMatching.cc | 10 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-lib__ContourUtility.cc | 13 | ||||
-rw-r--r-- | graphics/exact-image/files/patch-utility__Timer.cc | 11 |
9 files changed, 123 insertions, 23 deletions
diff --git a/graphics/exact-image/Makefile b/graphics/exact-image/Makefile index acaa870c91d2..9ef08ab8599b 100644 --- a/graphics/exact-image/Makefile +++ b/graphics/exact-image/Makefile @@ -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@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 @@ LIB_DEPENDS= agg.2:${PORTSDIR}/graphics/agg \ 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 @@ post-patch: /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 --git a/graphics/exact-image/distinfo b/graphics/exact-image/distinfo index 4648737d6d09..849ca0628f5f 100644 --- a/graphics/exact-image/distinfo +++ b/graphics/exact-image/distinfo @@ -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 --git a/graphics/exact-image/files/patch-codecs__bmp.cc b/graphics/exact-image/files/patch-codecs__bmp.cc new file mode 100644 index 000000000000..0a70c4bfbfdb --- /dev/null +++ b/graphics/exact-image/files/patch-codecs__bmp.cc @@ -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 --git a/graphics/exact-image/files/patch-codecs__gif.cc b/graphics/exact-image/files/patch-codecs__gif.cc new file mode 100644 index 000000000000..6f1b3d72a396 --- /dev/null +++ b/graphics/exact-image/files/patch-codecs__gif.cc @@ -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 --git a/graphics/exact-image/files/patch-codecs__jpeg.cc b/graphics/exact-image/files/patch-codecs__jpeg.cc new file mode 100644 index 000000000000..7ab7d47d82e3 --- /dev/null +++ b/graphics/exact-image/files/patch-codecs__jpeg.cc @@ -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 --git a/graphics/exact-image/files/patch-codecs__xpm.cc b/graphics/exact-image/files/patch-codecs__xpm.cc new file mode 100644 index 000000000000..e47fe83dbc91 --- /dev/null +++ b/graphics/exact-image/files/patch-codecs__xpm.cc @@ -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 --git a/graphics/exact-image/files/patch-lib__ContourMatching.cc b/graphics/exact-image/files/patch-lib__ContourMatching.cc new file mode 100644 index 000000000000..fbff7b57241c --- /dev/null +++ b/graphics/exact-image/files/patch-lib__ContourMatching.cc @@ -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 --git a/graphics/exact-image/files/patch-lib__ContourUtility.cc b/graphics/exact-image/files/patch-lib__ContourUtility.cc new file mode 100644 index 000000000000..40bd5e3f73ef --- /dev/null +++ b/graphics/exact-image/files/patch-lib__ContourUtility.cc @@ -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 --git a/graphics/exact-image/files/patch-utility__Timer.cc b/graphics/exact-image/files/patch-utility__Timer.cc new file mode 100644 index 000000000000..4e4919b77a1c --- /dev/null +++ b/graphics/exact-image/files/patch-utility__Timer.cc @@ -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; |