aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/kvazaar/Makefile
blob: 451a3dcf6d5fb80c4c93c3ea0e70671eed99f3c4 (plain) (blame)
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
# $FreeBSD$

PORTNAME=   kvazaar
DISTVERSIONPREFIX=  v
DISTVERSION?=   0.8.3
PORTREVISION?=  0
CATEGORIES= multimedia

MAINTAINER= jbeich@FreeBSD.org
COMMENT=    H.265/HEVC encoder implemented in C

LICENSE=    LGPL21+

USE_GITHUB= yes
GH_ACCOUNT= ultravideo
GH_PROJECT= greatest:greatest
GH_TAGNAME= v0.9.2-78-g60e25ce:greatest # 1.0.0 release actually
GH_SUBDIR=  greatest:greatest

CONFLICTS_INSTALL?= ${PORTNAME}-devel

USES=       autoreconf compiler:c11 libtool pathfix
PATHFIX_MAKEFILEIN= Makefile.am
GNU_CONFIGURE=  yes
TEST_TARGET=    check
INSTALL_TARGET= install-strip
USE_LDCONFIG=   yes

OPTIONS_DEFINE= ASM CRYPTOPP
OPTIONS_DEFAULT=ASM
OPTIONS_EXCLUDE?=CRYPTOPP

ASM_BUILD_DEPENDS=  ${ASM_BUILD_DEPENDS_${ARCH}}
ASM_BUILD_DEPENDS_amd64=yasm:devel/yasm
ASM_BUILD_DEPENDS_i386= yasm:devel/yasm
ASM_CONFIGURE_ENABLE=   asm

CRYPTOPP_DESC=      Selective encryption via Crypto++ library
CRYPTOPP_LIB_DEPENDS=   libcryptopp.so:security/cryptopp
CRYPTOPP_USES=      localbase pkgconfig
CRYPTOPP_CONFIGURE_ENV= cryptopp_CFLAGS=" " cryptopp_LIBS="-lcryptopp"
CRYPTOPP_CONFIGURE_WITH=cryptopp

post-patch:
    @${REINPLACE_CMD} 's/x86_64/&|amd64/' ${WRKSRC}/configure.ac

post-patch-CRYPTOPP-on:
# XXX Force C++ linking to avoid error with Clang
    @${ECHO_CMD} nodist_EXTRA_kvazaar_tests_SOURCES \
        = dummy.cpp >>${WRKSRC}/tests/Makefile.am

post-patch-CRYPTOPP-off:
# XXX autoconf cannot ignore unexpanded but unused m4 macros
    @${REINPLACE_CMD} -i .cryptopp.bak \
        -e '/PKG_CHECK_MODULES/,/^[[:space:]]*)/d' \
        ${WRKSRC}/configure.ac

pre-install:    do-test

.include <bsd.port.mk>