freebsd-ports/graphics/povray37/Makefile
Matthias Andree d1cfeab07e Update ilmbase and openexr to 2.3.0, rename OpenEXR to openexr.
Release notes: <https://github.com/openexr/openexr/releases/tag/v2.3.0>

Adjust LIB_DEPENDS of all ports that require ilmbase or openexr to chase
the new lower-case spelling of the name, and to omit the version from the
library name to ease future maintenance.

Bump PORTREVISION of all ports that depend on ilmbase or openexr directly,
so that they all get rebuilt on upgrades.

Add patches to graphics/ampasCTL to keep it alive, with (a) ilmbase now
that its Iex::BaseExc class is no longer derived from std::string,
details were given upstream through https://github.com/ampas/CTL/issues/71
and (b) to unwind semicolon/;-lists in cmake that stem from openexr/
ilmbase pkg-config variables.
(Note ampasCTL is unmaintained as FreeBSD port, and upstream,
and I cannot run-time test it.)

Poudriere build tests on 11.2-RELEASE-p1 amd64 of ALL ports depending
directly or indirectly on ilmbase and/or openexr have passed without
regressions.  Thus invoking due diligence, I believe I have done the
equivalent of an -exp run, and do not require approval for the dependency
chases to third-party ports.
2018-09-22 10:15:22 +00:00

118 lines
2.8 KiB
Makefile

# $FreeBSD$
PORTNAME= povray
DISTVERSIONPREFIX= v
DISTVERSION= 3.7.0.8
PORTREVISION= 2
CATEGORIES= graphics
PKGNAMESUFFIX= 37
MAINTAINER= ports@FreeBSD.org
COMMENT= Persistence of Vision Ray Tracer
LICENSE= AGPLv3+
LICENSE_FILE= ${WRKSRC}/LICENSE
BROKEN_powerpc64= Does not build: c++: Internal error: Killed (program cc1plus)
LIB_DEPENDS= libboost_thread.so:devel/boost-libs
USES= autoreconf:build gmake
USE_GITHUB= yes
GH_ACCOUNT= POV-Ray
GNU_CONFIGURE= yes
CONFIGURE_ARGS= COMPILED_BY=${MAINTAINER} \
--program-transform-name='s/povray/${PKGBASE}/' \
--disable-optimiz
VERSION_BASE= ${PORTVERSION:C/([0-9]+\.[0-9]+).*/\1/}
DATADIR= ${PREFIX}/share/${PORTNAME}-${VERSION_BASE}
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}-${VERSION_BASE}
ETCDIR= ${PREFIX}/etc/${PORTNAME}/${VERSION_BASE}
EXAMPLESDIR= ${PREFIX}/share/examples/${PORTNAME}-${VERSION_BASE}
OPTIONS_DEFINE= X11 PNG JPEG TIFF OPENEXR STATIC IO EXAMPLES DOCS
OPTIONS_DEFAULT=PNG JPEG
OPTIONS_SUB= yes
DOCS_DESC= Install HTML documentation
EXAMPLES_DESC= Install example scenes
IO_DESC= Without I/O restrictions (security risk)
IO_CONFIGURE_ON= --disable-io-restrictions
STATIC_CONFIGURE_ON= --enable-static
X11_USE= XORG=xpm,sm,ice,x11 SDL=sdl
X11_CONFIGURE_OFF= --without-x
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPNG}
.if ${PORT_OPTIONS:MSTATIC}
BUILD_DEPENDS+= png>=1.4:graphics/png
.else
LIB_DEPENDS+= libpng.so:graphics/png
.endif
.else
CONFIGURE_ARGS+=--without-libpng
.endif
.if ${PORT_OPTIONS:MJPEG}
.if ${PORT_OPTIONS:MSTATIC}
USES+= jpeg:build
.else
USES+= jpeg
.endif
.else
CONFIGURE_ARGS+=--without-libjpeg
.endif
.if ${PORT_OPTIONS:MTIFF}
.if ${PORT_OPTIONS:MSTATIC}
BUILD_DEPENDS+= tiff>=4:graphics/tiff
.else
LIB_DEPENDS+= libtiff.so:graphics/tiff
.endif
.else
CONFIGURE_ARGS+=--without-libtiff
.endif
.if ${PORT_OPTIONS:MOPENEXR}
.if ${PORT_OPTIONS:MSTATIC}
BUILD_DEPENDS+= openexr>=1.6:graphics/openexr
.else
LIB_DEPENDS+= libIlmImf.so:graphics/openexr
CPPFLAGS+= -I${LOCALBASE}/include/OpenEXR
.endif
.else
CONFIGURE_ARGS+=--without-openexr
.endif
.if !${PORT_OPTIONS:MPNG} || !${PORT_OPTIONS:MJPEG} || !${PORT_OPTIONS:MTIFF}
CONFIGURE_ARGS+=NON_REDISTRIBUTABLE_BUILD=yes
.endif
PORTDOCS= *
PORTEXAMPLES= *
post-patch:
${REINPLACE_CMD} -e 's|@@EXAMPLESDIR@@|${EXAMPLESDIR}|' \
-e 's|@@ETCDIR@@|${ETCDIR}|' \
${WRKSRC}/unix/povray.conf
pre-configure:
cd ${WRKSRC}/unix && ./prebuild.sh
pre-build:
.if ${PORT_OPTIONS:MSTATIC} && ${PORT_OPTIONS:MTIFF}
# graphics/tiff adds dependencies on libjpeg, libjbig and liblzma
@${REINPLACE_CMD} -e 's,^\(LIBS = .*\)-ltiff\(.*\),\1-ltiff -ljpeg -ljbig -llzma\2,' ${WRKSRC}/unix/Makefile
.endif
post-install:
${MV} ${STAGEDIR}${DATADIR}/scenes ${STAGEDIR}${EXAMPLESDIR}
.for i in povray.conf povray.ini
${MV} ${STAGEDIR}${ETCDIR}/${i} ${STAGEDIR}${ETCDIR}/${i}.sample
.endfor
.include <bsd.port.mk>