aboutsummaryrefslogtreecommitdiff
path: root/graphics/ocaml-images
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2010-03-26 21:11:48 +0000
committerStanislav Sedov <stas@FreeBSD.org>2010-03-26 21:11:48 +0000
commit8d8324ce92593ff3763b7470fbd8da850dfd448b (patch)
treea2f2fe34272e738d85875e05fb277442c71ede99 /graphics/ocaml-images
parent40f9eb7e76a03f92fa54ab9a3b867bdf35c336f3 (diff)
downloadports-8d8324ce92593ff3763b7470fbd8da850dfd448b.tar.gz
ports-8d8324ce92593ff3763b7470fbd8da850dfd448b.zip
Notes
Diffstat (limited to 'graphics/ocaml-images')
-rw-r--r--graphics/ocaml-images/Makefile141
-rw-r--r--graphics/ocaml-images/distinfo9
-rw-r--r--graphics/ocaml-images/pkg-install9
3 files changed, 111 insertions, 48 deletions
diff --git a/graphics/ocaml-images/Makefile b/graphics/ocaml-images/Makefile
index 4534b8a9f19a..00909715675a 100644
--- a/graphics/ocaml-images/Makefile
+++ b/graphics/ocaml-images/Makefile
@@ -7,11 +7,12 @@
#
PORTNAME= images
-PORTVERSION= 2.2
-PORTREVISION= 1
+PORTVERSION= 3.0.2
+PORTREVISION= 0
PORTEPOCH= 2
CATEGORIES= graphics
-MASTER_SITES= ftp://ftp.inria.fr/INRIA/caml-light/bazar-ocaml/
+MASTER_SITES= ftp://ftp.inria.fr/INRIA/Projects/cristal/caml-light/bazar-ocaml/ \
+ http://caml.inria.fr/distrib/bazar-ocaml/
PKGNAMEPREFIX= ocaml-
DISTNAME= camlimages-${PORTVERSION}
EXTRACT_SUFX= .tgz
@@ -19,52 +20,120 @@ EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
COMMENT= Objective Caml image processing library
-BUILD_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \
- lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk \
- lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
-RUN_DEPENDS= ocamlc:${PORTSDIR}/lang/ocaml \
- lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk \
- lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
-LIB_DEPENDS= ungif.5:${PORTSDIR}/graphics/libungif \
- png.5:${PORTSDIR}/graphics/png \
- jpeg.11:${PORTSDIR}/graphics/jpeg \
- tiff.4:${PORTSDIR}/graphics/tiff
+BUILD_DEPENDS= ${LOCALBASE}/share/aclocal/ocaml.m4:${PORTSDIR}/lang/ocaml-autoconf
-USE_GHOSTSCRIPT= yes
+USE_AUTOTOOLS= aclocal:110 autoheader:262 automake:110 autoconf:262
+ACLOCAL_ARGS= -I . -I ${LOCALBASE}/share/aclocal
+AUTOMAKE_ARGS= --add-missing
+USE_OCAML= yes
+USE_OCAML_FINDLIB= yes
+USE_OCAML_WASH= yes
+OCAML_PKGDIRS= camlimages
+USE_OCAML_LDCONFIG= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include ${CPPFLAGS}" \
+ LDFLAGS="-L${LOCALBASE}/lib ${LDFLAGS}"
+
+OPTIONS= PNG "Enable PNG support" on \
+ JPEG "Enable JPEG support" on \
+ TIFF "Enable TIFF support" on \
+ XPM "Enable XPM support" on \
+ GIF "Enable GIF support" on \
+ FREETYPE "Enable text rendering via freetype" on \
+ GS "Enable PostScript support via Ghostscript" off \
+ GTK1 "Enable LablGTK1 support" off \
+ GTK2 "Enable LablGTK2 support (conflicts with LablGTK1)" off
+
+.include <bsd.port.options.mk>
+
+.if !defined(WITHOUT_PNG)
+LIB_DEPENDS+= png.5:${PORTSDIR}/graphics/png
+CONFIGURE_ARGS+= --with-png
+.else
+CONFIGURE_ARGS+= --without-png
+.endif
+
+.if !defined(WITHOUT_JPEG)
+LIB_DEPENDS+= jpeg.11:${PORTSDIR}/graphics/jpeg
+CONFIGURE_ARGS+= --with-jpeg
+.else
+CONFIGURE_ARGS+= --without-jpeg
+.endif
+
+.if !defined(WITHOUT_TIFF)
+LIB_DEPENDS+= tiff.4:${PORTSDIR}/graphics/tiff
+CONFIGURE_ARGS+= --with-tiff
+.else
+CONFIGURE_ARGS+= --without-tiff
+.endif
+
+.if !defined(WITHOUT_XPM)
USE_XORG= xpm
+CONFIGURE_ARGS+= --with-xpm
+.else
+CONFIGURE_ARGS+= --without-xpm
+.endif
+
+.if !defined(WITHOUT_GIF)
+LIB_DEPENDS+= ungif.5:${PORTSDIR}/graphics/libungif
+CONFIGURE_ARGS+= --with-gif
+.else
+CONFIGURE_ARGS+= --without-gif
+.endif
+
+.if !defined(WITHOUT_FREETYPE)
USE_FREETYPE= yes
-HAS_CONFIGURE= yes
-CONFIGURE_ENV= \
- CPPFLAGS="${CXXFLAGS} -I${LOCALBASE}/include" \
- CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
- LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib"
-CONFIGURE_ARGS= --includedir=${LOCALBASE}/include
-USE_GMAKE= yes
+CONFIGURE_ARGS+= --with-freetype
+.else
+CONFIGURE_ARGS+= --without-freetype
+.endif
+
+.if defined(WITH_GS)
+USE_GHOSTSCRIPT= yes
+CONFIGURE_ARGS+= --with-gs
+.else
+CONFIGURE_ARGS+= --without-gs
+.endif
+
+.if defined(WITH_GTK1) && defined(WITH_GTK2)
+IGNORE= you should select either LablGTK1 or LablGTK2, but not both
+.endif
+
+.if defined(WITH_GTK1)
+CONFIGURE_ARGS+= --with-lablgtk
+BUILD_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk
+RUN_DEPENDS+= lablgtk:${PORTSDIR}/x11-toolkits/ocaml-lablgtk
+.else
+CONFIGURE_ARGS+= --without-lablgtk
+.endif
+
+.if defined(WITH_GTK2)
+CONFIGURE_ARGS+= --with-lablgtk2
+BUILD_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
+RUN_DEPENDS+= lablgtk2:${PORTSDIR}/x11-toolkits/ocaml-lablgtk2
+.else
+CONFIGURE_ARGS+= --without-lablgtk2
+.endif
-PKGDEINSTALL= ${PKGINSTALL}
+GNU_CONFIGURE= yes
+#USE_GMAKE= yes
#the default docsdir gets expanded to ${PREFIX}/share/doc/images
#which isn't of much help when you are searching for the package docs
-DOCSDIR= ${PREFIX}/share/doc/ocaml-images
+DOCSDIR= ${PREFIX}/share/doc/${PKGNAMEPREFIX}${PORTNAME}
+DOCSFILES= CHANGES README LICENSE
.if !defined(NOPORTDOCS)
-PORTDOCS= Announce Announce-2.2 CHANGES INSTALL LICENSE doc
+PORTDOCS= ${DOCSFILES} doc
.endif
post-install:
.if !defined(NOPORTDOCS)
- @${ECHO_MSG} -n ">> Installing documentation..."
- @${MKDIR} ${DOCSDIR}
- @cd ${WRKSRC} && ${FIND} doc | ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} > /dev/null 2>&1
- @${INSTALL_DATA} ${WRKSRC}/Announce ${DOCSDIR}/
- @${INSTALL_DATA} ${WRKSRC}/Announce-2.2 ${DOCSDIR}/
- @${INSTALL_DATA} ${WRKSRC}/CHANGES ${DOCSDIR}/
- @${INSTALL_DATA} ${WRKSRC}/INSTALL ${DOCSDIR}/
- @${INSTALL_DATA} ${WRKSRC}/LICENSE ${DOCSDIR}/
- @${ECHO_MSG} " [DONE]"
+ @${MKDIR} ${DOCSDIR}/doc
+ @(cd ${WRKSRC} && ${COPYTREE_SHARE} \* ${DOCSDIR}/doc '-name "*.jpg" -o -name "*.html"')
+ @${INSTALL_DATA} ${DOCSFILES:S,^,${WRKSRC}/,g} ${DOCSDIR}/
.endif
- @${FIND} ${PREFIX}/lib/ocaml/camlimages -type f | \
- ${SED} 's,^${PREFIX}/,,' >> ${TMPPLIST}
- @${ECHO_CMD} "@dirrm lib/ocaml/camlimages" >> ${TMPPLIST}
+ @${ECHO_CMD} "lib/ocaml/stublibs/dllcamlimages.so" >> ${TMPPLIST}
+ @${ECHO_CMD} "lib/ocaml/stublibs/dllcamlimages_core.so" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec ${RMDIR} %D/lib/ocaml/stublibs >/dev/null 2>&1 || ${TRUE}" >> ${TMPPLIST}
.include <bsd.port.mk>
diff --git a/graphics/ocaml-images/distinfo b/graphics/ocaml-images/distinfo
index cdb36cc3a722..51709f430439 100644
--- a/graphics/ocaml-images/distinfo
+++ b/graphics/ocaml-images/distinfo
@@ -1,3 +1,6 @@
-MD5 (camlimages-2.2.tgz) = d933eb58c7983f70b1a000fa01893aa4
-SHA256 (camlimages-2.2.tgz) = 9b8861d7b8c6752ad33ef2af5c486efa626b19ad9ea190641a736384629f1026
-SIZE (camlimages-2.2.tgz) = 1385525
+MD5 (ocaml-autoconf-1.0.tar.gz) = 2eab5efad4364d2f0114f38e00af09ac
+SHA256 (ocaml-autoconf-1.0.tar.gz) = 67e85520f65c033c86e99e5438e51657e777579034570527c1b2c62096ecb004
+SIZE (ocaml-autoconf-1.0.tar.gz) = 11337
+MD5 (camlimages-3.0.2.tgz) = ccb2551232df255f6306941d26d07615
+SHA256 (camlimages-3.0.2.tgz) = db5aec421c89bea7b1bf55df6a674a0a6ac245f89c220c818e2e5d83f623662c
+SIZE (camlimages-3.0.2.tgz) = 1429138
diff --git a/graphics/ocaml-images/pkg-install b/graphics/ocaml-images/pkg-install
deleted file mode 100644
index c64374940d0b..000000000000
--- a/graphics/ocaml-images/pkg-install
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ "$2" = "POST-INSTALL" ]; then
- echo "${PKG_PREFIX}/lib/ocaml/camlimages" >> ${PKG_PREFIX}/lib/ocaml/ld.conf
-elif [ "$2" = "DEINSTALL" ]; then
- mv ${PKG_PREFIX}/lib/ocaml/ld.conf ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp
- grep -v camlimages ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp > ${PKG_PREFIX}/lib/ocaml/ld.conf
- rm -f ${PKG_PREFIX}/lib/ocaml/ld.conf.tmp
-fi