summaryrefslogtreecommitdiff
path: root/multimedia/vapoursynth/Makefile
blob: 1c98c1d2bc84d5e5ce0084ae43ec32a8f477c440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
PORTNAME=	vapoursynth
DISTVERSION=	R66
CATEGORIES=	multimedia

PATCH_SITES=	https://github.com/${PORTNAME}/${PORTNAME}/commit/

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Video processing framework with simplicity in mind
WWW=		https://www.vapoursynth.com/

LICENSE=	LGPL21+
LICENSE_FILE=	${WRKSRC}/COPYING.LESSER

BUILD_DEPENDS=	${BUILD_DEPENDS_${ARCH}}
BUILD_DEPENDS_amd64=	nasm:devel/nasm
LIB_DEPENDS=	libzimg.so:graphics/sekrit-twc-zimg

USES=		autoreconf compiler:c++17-lang gmake libtool localbase pathfix python pkgconfig
USE_PYTHON=	cython
USE_GITHUB=	yes
USE_LDCONFIG=	yes

BINARY_ALIAS=	cython=cython-${PYTHON_VER}
INSTALL_TARGET=	install-strip

GNU_CONFIGURE=	yes

DATADIR=	${PREFIX}/lib/vapoursynth

CONFIGURE_ARGS=	--disable-static

OPTIONS_DEFINE=	DEBUG DOCS FRAME_GUARD
OPTIONS_SUB=	yes

DEBUG_CONFIGURE_ENABLE=		debug

DOCS_BUILD_DEPENDS=		sphinx-build:textproc/py-sphinx \
				${PYTHON_PKGNAMEPREFIX}sphinx_rtd_theme>0:textproc/py-sphinx_rtd_theme@${PY_FLAVOR}
DOCS_PORTDOCS=			*

FRAME_GUARD_DESC=		Check integrity after each filter
FRAME_GUARD_CONFIGURE_ENABLE=	guard-pattern

.include <bsd.port.pre.mk>

.if ${ARCH} == amd64 && defined(MACHINE_CPU) && ${MACHINE_CPU:Mavx2}
CONFIGURE_ARGS+= --enable-x86-asm
.else
CONFIGURE_ARGS+= --disable-x86-asm
.endif

post-patch:
	@${REINPLACE_CMD} -e 's/x86_64/&|amd64/' \
		-e '/AC_SEARCH.*libiconv/d' \
		-e '/test/s/[^ ]*libiconv.*-a //' \
		${WRKSRC}/configure.ac

post-build-DOCS-on:
	@${LOCALBASE}/bin/sphinx-build-${PYTHON_VER} -d ${WRKDIR} ${WRKSRC}/doc ${WRKSRC}/doc/_build/html	

post-install-DOCS-on:
	(cd ${WRKSRC}/doc/_build/html && ${COPYTREE_SHARE} \
		"${PORTDOCS}" ${STAGEDIR}${DOCSDIR})

.include <bsd.port.post.mk>