aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/sekrit-twc-zimg/Makefile
blob: f35e072659756cd4efe0ec46e2b665828a4be170 (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
61
# $FreeBSD$

PORTNAME=   zimg
PORTVERSION=    2.2
DISTVERSIONPREFIX=  release-
CATEGORIES= graphics
PKGNAMEPREFIX=  ${GH_ACCOUNT}-

MAINTAINER= jbeich@FreeBSD.org
COMMENT=    Scaling, colorspace conversion, and dithering library

LICENSE=    WTFPL2
LICENSE_NAME=   Do What The Fuck You Want To Public License version 2
LICENSE_FILE=   ${WRKSRC}/COPYING
LICENSE_PERMS=  ${_LICENSE_PERMS_DEFAULT}

USE_GITHUB= yes
GH_ACCOUNT= sekrit-twc

CONFLICTS_INSTALL=  zimg-[0-9]* # include/zimg.h

USES=       autoreconf compiler:c++11-lib gmake libtool pathfix
EXTRACT_AFTER_ARGS= --exclude test/extra
PATHFIX_MAKEFILEIN= Makefile.am
GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --disable-silent-rules
CPPFLAGS+=  -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 \
        -D_DECLARE_C99_LDBL_MATH # XXX ports/193528
CPPFLAGS+=  ${CPPFLAGS_${CHOSEN_COMPILER_TYPE}_${COMPILER_VERSION}}
CPPFLAGS_clang_34=  -include x86intrin.h # revert 575bd93
INSTALL_TARGET= install-strip
USE_LDCONFIG=   yes
PORTEXAMPLES=   *

OPTIONS_DEFINE= EXAMPLES TEST

OPTIONS_DEFINE_amd64=   SIMD
OPTIONS_DEFINE_i386=    SIMD
OPTIONS_DEFAULT_amd64=  SIMD
OPTIONS_DEFAULT_i386=   SIMD # runtime detection

EXAMPLES_CONFIGURE_ENABLE=  example
EXAMPLES_MAKE_ARGS= exampledir="${EXAMPLESDIR}"

SIMD_CONFIGURE_ENABLE=  x86simd

TEST_BUILD_DEPENDS= googletest>=1.6.0:devel/googletest
TEST_USES=      localbase
TEST_CONFIGURE_ENABLE=  unit-test
TEST_TEST_TARGET=   check VERBOSE=1

post-patch:
    @${REINPLACE_CMD} -e 's/x86_64/&|amd64/g' \
        ${WRKSRC}/configure.ac
    @${REINPLACE_CMD} -e 's/-O2 //' \
        -e '/dist_doc_DATA/d' \
        ${WRKSRC}/Makefile.am

pre-install-TEST-on: do-test

.include <bsd.port.mk>