1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-07 06:40:06 +00:00
freebsd-ports/graphics/openexr/Makefile
Matthias Andree dce9e747da Port ilmbase build fixes including WITH_DEBUG=yes builds.
- under WITH_DEBUG=yes builds, avoid renaming the libraries with _d suffix.
  (else it breaks packaging, and we don't want separate lib names) [1]
- while here, avoid creating symlinks from cmake, this causes staging
  violations due to cmake bug #17340, (poudriere testport)
  see https://gitlab.kitware.com/cmake/cmake/issues/17340
- while here, fix "make test" target - it is a left over from 2.3's
  gmake build. Use ctest instead. Removes TEST_TARGET.

No PORTREVISION bump necessary because each and every fixed bug would
cause a broken build and no install.

PR:		243274 [1]
Reported by:	Marcin Cieslak [1] against graphics/ilmbase
2020-01-11 19:17:37 +00:00

99 lines
2.8 KiB
Makefile

# Created by: nork@FreeBSD.org
# $FreeBSD$
PORTNAME= openexr
PORTVERSION= 2.4.0
CATEGORIES= graphics devel
MASTER_SITES= LOCAL/mandree/:test
DISTFILES= ${PORTNAME}-2.2.0-comp_dwa-test-images.tar.xz:test
MAINTAINER= mandree@FreeBSD.org
COMMENT= High dynamic-range (HDR) image file format
LICENSE= BSD3CLAUSE
# exact version required to avoid hard-to-debug issues
LIB_DEPENDS= libImath-2_4.so.24:graphics/ilmbase
USES= cmake compiler:c++14-lang libtool pathfix pkgconfig
USE_LDCONFIG= yes
USE_GITHUB= yes
GH_TUPLE= AcademySoftwareFoundation:openexr:v2.4.0
CPPFLAGS+= -I. -I../IlmImf
# must be linked with -l{thr|pthread} explicitly
LDFLAGS+= -lpthread
PORTDOCS= *
PORTEXAMPLES= *
DOCSRCDIR1= ${WRKSRC}/..
DOC_FILES1= CHANGES.md CONTRIBUTING.md GOVERNANCE.md LICENSE.md SECURITY.md \
CODE_OF_CONDUCT.md CONTRIBUTORS.md README.md
DOCSRCDIR2= ${WRKSRC}/doc
DOC_FILES2= *.odt *.pdf
OPTIONS_DEFINE= DOCS EXAMPLES LARGE_STACK
LARGE_STACK_DESC= Enable sys-dependent large stack optimizations
WRKSRC_SUBDIR= OpenEXR
OPTIONS_SUB= yes
LARGE_STACK_CONFIGURE_ENABLE= large-stack
.include <bsd.port.pre.mk>
.if ${ARCH} == powerpc
USE_GCC= yes
.endif
MAJORVER= 2_4
VER= 24
PLIST_SUB+= MAJORVER=${MAJORVER}
PLIST_SUB+= VER=${VER}
# too many reports about compilation failures, so
# sanity check we are using the same C++ standard library
_ilm_libcxx=${COMPILER_FEATURES:Mlib*c++}
pre-configure:
@${READELF} -d ${LOCALBASE}/lib/libImath.so \
| ${EGREP} -q '\<NEEDED\>.*\[${_ilm_libcxx:C/\+/\\+/g}\.' \
|| { ${ECHO_CMD} "*** Your ilmbase package uses a different C++ standard library than ***" ; \
${ECHO_CMD} "*** OpenEXR would. Please recompile and reinstall ilmbase with the ***" ; \
${ECHO_CMD} "*** same C++ std. library before trying to build OpenEXR. Abort. ***" ; \
exit 1; }
post-install:
${STRIP_CMD} \
${STAGEDIR}${PREFIX}/lib/libIlmImf-${MAJORVER}.so.${VER} \
${STAGEDIR}${PREFIX}/lib/libIlmImfUtil-${MAJORVER}.so.${VER}
.for i in libIlmImf libIlmImfUtil
${LN} -s ${i}-${MAJORVER}.so.${VER} ${STAGEDIR}${PREFIX}/lib/${i}.so
.endfor
post-install-EXAMPLES-on:
${MV} \
${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/ ${STAGEDIR}${EXAMPLESDIR}
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/OpenEXR 2>/dev/null || :
post-install-EXAMPLES-off:
${RM} -R ${STAGEDIR}${PREFIX}/share/doc/OpenEXR/examples/
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${STAGEDIR}${DOCSDIR}
${MV} ${STAGEDIR}${DOCSDIR}/../OpenEXR/[a-df-zA-Z]* ${STAGEDIR}${DOCSDIR}
post-install-DOCS-off:
@${RMDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} 2>/dev/null || :
regression-test check test:
cd ${BUILD_WRKSRC} && ctest -j ${MAKE_JOBS_NUMBER}
.include <bsd.port.post.mk>