2004-10-12 22:42:04 +02:00
|
|
|
# New ports collection makefile for: CImg
|
|
|
|
# Date created: 11 September 2004
|
|
|
|
# Whom: thierry@pompo.net
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= cimg
|
2007-07-06 07:06:25 +02:00
|
|
|
PORTVERSION= 1.2.2
|
2007-04-19 07:16:49 +02:00
|
|
|
PORTEPOCH= 1
|
2004-10-12 22:42:04 +02:00
|
|
|
CATEGORIES= graphics devel
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
2005-03-15 22:53:57 +01:00
|
|
|
DISTNAME= CImg-${DISTVERSION}
|
2007-01-19 23:43:42 +01:00
|
|
|
DIST_SUBDIR= ${PKGNAME}
|
2004-10-12 22:42:04 +02:00
|
|
|
|
|
|
|
MAINTAINER= thierry@FreeBSD.org
|
|
|
|
COMMENT= The C++ Template Image Processing Library
|
|
|
|
|
|
|
|
USE_ZIP= yes
|
2004-10-20 22:54:08 +02:00
|
|
|
BUILD_WRKSRC= ${WRKSRC}/examples
|
2004-10-12 22:42:04 +02:00
|
|
|
MAKE_ENV= CPPFLAGS="${CFLAGS} ${LAPACK_DEF} ${PTHREAD_CFLAGS}" \
|
|
|
|
LDFLAGS="${LDFLAGS} ${LAPACK_LIB} ${PTHREAD_LIBS}" \
|
|
|
|
X11PATH=${X11BASE}
|
|
|
|
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
BUILD_DEPENDS+= doxygen:${PORTSDIR}/devel/doxygen
|
2007-01-27 18:46:02 +01:00
|
|
|
USE_GCC= 3.4+
|
2004-10-20 22:54:08 +02:00
|
|
|
REINPLACE_ARGS= -i ""
|
2007-01-27 18:46:02 +01:00
|
|
|
. if !defined(WITHOUT_LAPACK)
|
|
|
|
LIB_DEPENDS+= atlas.2:${PORTSDIR}/math/atlas
|
|
|
|
LAPACK_LIB= -L${LOCALBASE}/lib -lalapack -lcblas -lf77blas -L`${CAT} ${WRKSRC}/LIBDIR`/../../.. -lgfortran -latlas
|
|
|
|
LAPACK_DEF= -Dcimg_lapack
|
|
|
|
. endif
|
|
|
|
|
|
|
|
WANT_FORTRAN= yes #dummy but future use
|
|
|
|
BUILD_DEPENDS+= gfortran42:${PORTSDIR}/lang/gcc42
|
|
|
|
FC= gfortran42
|
|
|
|
F77= gfortran42
|
|
|
|
|
|
|
|
. if !defined(WITHOUT_OPTIMIZATIONS)
|
|
|
|
USE_XLIB= yes
|
|
|
|
LIB_DEPENDS+= png:${PORTSDIR}/graphics/png \
|
|
|
|
jpeg:${PORTSDIR}/graphics/jpeg \
|
|
|
|
tiff:${PORTSDIR}/graphics/tiff \
|
|
|
|
Magick:${PORTSDIR}/graphics/ImageMagick \
|
|
|
|
fftw3:${PORTSDIR}/math/fftw3
|
2007-04-19 07:16:49 +02:00
|
|
|
ALL_TARGET= oFreeBSD
|
|
|
|
.else
|
|
|
|
ALL_TARGET= dFreeBSD
|
2007-01-27 18:46:02 +01:00
|
|
|
. endif
|
|
|
|
|
2004-10-20 22:54:08 +02:00
|
|
|
DOCBASE= CHANGES.txt README.txt
|
2005-11-18 23:36:13 +01:00
|
|
|
DOCREFS= download.shtml favicon.ico favicon.png foot_reference.html \
|
2006-11-07 00:13:07 +01:00
|
|
|
head.html head_reference.html img index.shtml links.shtml \
|
|
|
|
news.shtml reference screenshots.shtml
|
2004-10-12 22:42:04 +02:00
|
|
|
.else
|
|
|
|
NOBUILD= yes
|
|
|
|
.endif
|
2004-10-20 22:54:08 +02:00
|
|
|
|
2004-10-12 22:42:04 +02:00
|
|
|
.if !defined(WITHOUT_IM)
|
2006-05-24 16:21:45 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/lib/libMagick.so.10:${PORTSDIR}/graphics/ImageMagick
|
2004-10-12 22:42:04 +02:00
|
|
|
.endif
|
2007-01-19 07:24:11 +01:00
|
|
|
|
2007-01-27 18:46:02 +01:00
|
|
|
pre-configure:
|
2007-06-25 20:52:29 +02:00
|
|
|
${DIRNAME} `${LOCALBASE}/bin/${F77} -print-libgcc-file-name` > ${WRKSRC}/LIBDIR
|
2004-10-12 22:42:04 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2007-01-27 18:46:02 +01:00
|
|
|
${GREP} -lR 'img/' ${BUILD_WRKSRC} | \
|
2004-10-20 22:54:08 +02:00
|
|
|
${XARGS} ${REINPLACE_CMD} -e 's|img/|${EXAMPLESDIR}/img/|g'
|
2007-01-27 18:46:02 +01:00
|
|
|
.else
|
|
|
|
${REINPLACE_CMD} -e 's|^OPTFLAGS|#OPTFLAGS|' ${BUILD_WRKSRC}/Makefile
|
2004-10-12 22:42:04 +02:00
|
|
|
.endif
|
|
|
|
|
2005-11-18 23:36:13 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
post-build:
|
|
|
|
cd ${WRKSRC}/documentation && doxygen CImg.doxygen
|
|
|
|
.endif
|
|
|
|
|
2004-10-12 22:42:04 +02:00
|
|
|
do-install:
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/CImg.h ${PREFIX}/include
|
|
|
|
.if !defined(NOPORTDOCS)
|
2006-05-18 22:13:20 +02:00
|
|
|
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/CImg_demo ${PREFIX}/bin
|
2004-10-12 22:42:04 +02:00
|
|
|
${MKDIR} ${DOCSDIR} ${EXAMPLESDIR}
|
2004-10-20 22:54:08 +02:00
|
|
|
${INSTALL_DATA} ${DOCBASE:S|^|${WRKSRC}/|} ${DOCSDIR}
|
2005-11-18 23:36:13 +01:00
|
|
|
. for doc in ${DOCREFS}
|
|
|
|
${CP} -R ${WRKSRC}/documentation/${doc} ${DOCSDIR}
|
|
|
|
. endfor
|
2004-10-12 22:42:04 +02:00
|
|
|
${CP} -R ${WRKSRC}/examples/* ${EXAMPLESDIR}
|
|
|
|
@(cd ${EXAMPLESDIR} && ${MAKE} clean)
|
|
|
|
${CHOWN} -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR} ${EXAMPLESDIR}
|
2006-07-19 16:35:07 +02:00
|
|
|
${FIND} ${DOCSDIR} ${EXAMPLESDIR} -type f -exec ${CHMOD} ${SHAREMODE} {} \;
|
2004-10-12 22:42:04 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|