aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/devil
diff options
context:
space:
mode:
authoramdmi3 <amdmi3@FreeBSD.org>2013-10-18 07:52:09 +0800
committeramdmi3 <amdmi3@FreeBSD.org>2013-10-18 07:52:09 +0800
commit44cdf0046fb53ecd3de0e3b80255da38d8c2c5ec (patch)
tree9be79e2f76abbff5f7a68fd45540bc837b81ed2f /graphics/devil
parent627cd4d8883bc2a7f00cb9f666083313cad02896 (diff)
downloadfreebsd-ports-gnome-44cdf0046fb53ecd3de0e3b80255da38d8c2c5ec.tar.gz
freebsd-ports-gnome-44cdf0046fb53ecd3de0e3b80255da38d8c2c5ec.tar.zst
freebsd-ports-gnome-44cdf0046fb53ecd3de0e3b80255da38d8c2c5ec.zip
- Support staging
- Use new OPTIONS features - Use new LIB_DEPENDS syntax - Fix NVTT option - Add missing SQUISH option - Enable all options by default as upstream does
Diffstat (limited to 'graphics/devil')
-rw-r--r--graphics/devil/Makefile108
-rw-r--r--graphics/devil/pkg-plist7
2 files changed, 42 insertions, 73 deletions
diff --git a/graphics/devil/Makefile b/graphics/devil/Makefile
index c6d7568f74e6..8781a94512e7 100644
--- a/graphics/devil/Makefile
+++ b/graphics/devil/Makefile
@@ -12,23 +12,6 @@ DISTNAME= DevIL-${PORTVERSION}
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= A full featured cross-platform image library
-OPTIONS_DEFINE= JPEG JASPER LCMS MNG PNG TIFF X11 SDL NVTT SIMD DOCS
-OPTIONS_DEFAULT=JPEG JASPER LCMS MNG PNG TIFF X11 DOCS
-
-JPEG_DESC= Enable JPEG support
-JASPER_DESC= Enable JPEG2000 support
-LCMS_DESC= Enable LCMS support
-MNG_DESC= Enable MNG support
-PNG_DESC= Enable PNG support
-TIFF_DESC= Enable TIFF support
-X11_DESC= Enable X11 support
-SDL_DESC= Enable SDL support
-NVTT_DESC= Enable NVidia texture tools support
-SIMD_DESC= Enable SIMD autodetection (AltiVec, SSE3,...)
-
-WRKSRC= ${WRKDIR}/${DISTNAME:L}
-
-USE_GCC= any
USES= pkgconfig
USE_AUTOTOOLS= aclocal autoheader automake autoconf libtool
ACLOCAL_ARGS= -I m4 -I ${LOCALBASE}/share/aclocal
@@ -36,53 +19,55 @@ AUTOMAKE_ARGS= --add-missing --copy --force-missing
CONFIGURE_ARGS= --enable-ILU \
--disable-allegro --disable-directx8 --disable-directx9
USE_LDCONFIG= yes
+USE_GCC= any
+
+WRKSRC= ${WRKDIR}/${DISTNAME:L}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
-NO_STAGE= yes
-.include <bsd.port.options.mk>
+PORTDOCS= *
-.if ${PORT_OPTIONS:MJPEG}
-LIB_DEPENDS+= jpeg:${PORTSDIR}/graphics/jpeg
-CONFIGURE_ARGS+=--enable-jpeg
-.else
-CONFIGURE_ARGS+=--disable-jpeg
-.endif
+OPTIONS_DEFINE= JPEG JASPER LCMS MNG PNG TIFF EXR X11 SDL SQUISH NVTT SIMD DOCS
+OPTIONS_DEFAULT=JPEG JASPER LCMS MNG PNG TIFF EXR X11 SDL SQUISH NVTT DOCS
+OPTIONS_DEFAULT_amd64=SIMD
-.if ${PORT_OPTIONS:MJASPER}
-LIB_DEPENDS+= jasper:${PORTSDIR}/graphics/jasper
-CONFIGURE_ARGS+=--enable-jp2
-.else
-CONFIGURE_ARGS+=--disable-jp2
-.endif
+JPEG_DESC= Enable JPEG support
+JASPER_DESC= Enable JPEG2000 support
+LCMS_DESC= Enable LCMS support
+MNG_DESC= Enable MNG support
+PNG_DESC= Enable PNG support
+TIFF_DESC= Enable TIFF support
+EXR_DESC= Enable EXR support
+X11_DESC= Enable X11 support
+SDL_DESC= Enable SDL support
+SQUISH_DESC= Enable DXT compression via libsquish
+NVTT_DESC= Enable NVidia texture tools support
+SIMD_DESC= Enable SIMD autodetection (AltiVec, SSE3,...)
-.if ${PORT_OPTIONS:MLCMS}
-LIB_DEPENDS+= lcms:${PORTSDIR}/graphics/lcms
-CONFIGURE_ARGS+=--enable-lcms
-.else
-CONFIGURE_ARGS+=--disable-lcms
-.endif
+JPEG_LIB_DEPENDS= libjpeg.so:${PORTSDIR}/graphics/jpeg
+JPEG_CONFIGURE_ENABLE= jpeg
+JASPER_LIB_DEPENDS= libjasper.so:${PORTSDIR}/graphics/jasper
+JASPER_CONFIGURE_ENABLE=jp2
+LCMS_LIB_DEPENDS= liblcms.so:${PORTSDIR}/graphics/lcms
+LCMS_CONFIGURE_ENABLE= lcms
+MNG_LIB_DEPENDS= libmng.so:${PORTSDIR}/graphics/libmng
+MNG_CONFIGURE_ENABLE= mng
+PNG_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png
+PNG_CONFIGURE_ENABLE= png
+TIFF_LIB_DEPENDS= libtiff.so:${PORTSDIR}/graphics/tiff
+TIFF_CONFIGURE_ENABLE= tiff
+EXR_LIB_DEPENDS= libIlmImf.so:${PORTSDIR}/graphics/OpenEXR
+EXR_CONFIGURE_ENABLE= exr
+SQUISH_BUILD_DEPENDS= ${LOCALBASE}/lib/libsquish.a:${PORTSDIR}/graphics/squish
+SQUISH_CONFIGURE_WITH= libsquish
+NVTT_LIB_DEPENDS= libnvtt.so:${PORTSDIR}/graphics/nvidia-texture-tools
+NVTT_CONFIGURE_WITH= nvtt
-.if ${PORT_OPTIONS:MMNG}
-LIB_DEPENDS+= mng:${PORTSDIR}/graphics/libmng
-CONFIGURE_ARGS+=--enable-mng
-.else
-CONFIGURE_ARGS+=--disable-mng
-.endif
+.include <bsd.port.options.mk>
-.if ${PORT_OPTIONS:MPNG}
-LIB_DEPENDS+= png15:${PORTSDIR}/graphics/png
-.else
+.if ! ${PORT_OPTIONS:MPNG}
CONFIGURE_ENV+= libpng_app=no
-CONFIGURE_ARGS+=--disable-png
-.endif
-
-.if ${PORT_OPTIONS:MTIFF}
-LIB_DEPENDS+= tiff:${PORTSDIR}/graphics/tiff
-CONFIGURE_ARGS+=--enable-tiff
-.else
-CONFIGURE_ARGS+=--disable-tiff
.endif
.if ${PORT_OPTIONS:MX11}
@@ -100,13 +85,6 @@ USE_SDL= sdl
CONFIGURE_ARGS+=--disable-sdl
.endif
-.if ${PORT_OPTIONS:MNVTT}
-BUILD_DEPENDS+= ${LOCALBASE}/lib/libnvtt.so:${PORTSDIR}/graphics/nvidia-texture-tools
-RUN_DEPENDS+= ${LOCALBASE}/lib/libnvtt.so:${PORTSDIR}/graphics/nvidia-texture-tools
-.else
-CONFIGURE_ARGS+=--without-nvtt
-.endif
-
.if ! ${PORT_OPTIONS:MSIMD}
CONFIGURE_ARGS+=--disable-altivec --disable-sse --disable-sse2 --disable-sse3
.endif
@@ -119,12 +97,10 @@ post-patch:
${WRKSRC}/src-ILU/ilur/ilur.c
post-install:
- @${RMDIR} ${DATADIR}/examples
-.if ${PORT_OPTIONS:MDOCS}
- @${MKDIR} ${DOCSDIR}
+ @${RMDIR} ${STAGEDIR}${DATADIR}/examples
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in AUTHORS CREDITS ChangeLog Libraries.txt README TODO
- ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
.endfor
-.endif
.include <bsd.port.mk>
diff --git a/graphics/devil/pkg-plist b/graphics/devil/pkg-plist
index 060b68e68dc0..31cd7ae52cd0 100644
--- a/graphics/devil/pkg-plist
+++ b/graphics/devil/pkg-plist
@@ -19,12 +19,5 @@ lib/libILU.so.2
libdata/pkgconfig/IL.pc
libdata/pkgconfig/ILU.pc
%%X11%%libdata/pkgconfig/ILUT.pc
-%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
-%%PORTDOCS%%%%DOCSDIR%%/CREDITS
-%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
-%%PORTDOCS%%%%DOCSDIR%%/Libraries.txt
-%%PORTDOCS%%%%DOCSDIR%%/README
-%%PORTDOCS%%%%DOCSDIR%%/TODO
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
@dirrm %%DATADIR%%
@dirrm include/IL