aboutsummaryrefslogtreecommitdiff
path: root/graphics/ilmbase/Makefile
blob: d5b5f41d31f8bb3b5ec704aaa9ba616498fff9a3 (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
62
63
64
65
66
67
68
69
70
71
# Created by: nork@FreeBSD.org
# $FreeBSD$

PORTNAME=	ilmbase
PORTVERSION=	2.3.0
PORTREVISION=	4
CATEGORIES=	graphics devel
MASTER_SITES=	https://github.com/openexr/openexr/releases/download/v${PORTVERSION}/

MAINTAINER=	mandree@FreeBSD.org
COMMENT=	ILM Base libraries a.k.a. Half, IlmThread, Imath, and Iex

LICENSE=	BSD3CLAUSE

# there are some systems that have a static /bin/bash, so
# in order to make BUILD_DEPENDS effective, use the same absolute
# path we will pass down through CONFIGURE_SHELL below.
BUILD_DEPENDS=	${BASH_CMD}:shells/bash

USES=		compiler:c++14-lang pkgconfig libtool
USE_LDCONFIG=	yes

GNU_CONFIGURE=	yes
# The configure script uses bash arrays
CONFIGURE_SHELL=${BASH_CMD}
CONFIGURE_ARGS=	--disable-static
# libtool links C++ libraries with -nostdlib, which prevents -pthread from
# having an effect (at least with clang). Make sure we also pass -lpthread so
# we do link against libthr.so.
CONFIGURE_ENV+=	PTHREAD_LIBS="-pthread -lpthread"
TEST_TARGET=	check

PORTDOCS=	AUTHORS ChangeLog README.md
OPTIONS_DEFINE=		DOCS LARGE_STACK
LARGE_STACK_DESC=	Enable sys-dependent large stack optimizations
LARGE_STACK_CONFIGURE_ENABLE=	large-stack

BASH_CMD=	${LOCALBASE}/bin/bash

OPTIONS_SUB=	yes

MAJORVER=	2_3
VER=		24

PLIST_SUB=	MAJORVER=${MAJORVER}
PLIST_SUB+=	VER=${VER}

HALF_BIN=	eLut toFloat

regression-test regression check::	test

post-configure:
	${REINPLACE_CMD} -e 's/#define HAVE_UCONTEXT_H 1/#undef HAVE_UCONTEXT_H/' ${WRKSRC}/config/IlmBaseConfig.h

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libHalf.so.${VER}
	${RM} ${STAGEDIR}${PREFIX}/lib/*.la
.for l in libIex libIexMath libImath libIlmThread
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${l}-${MAJORVER}.so.${VER}
	@#${LN} -s ${l}-${MAJORVER}.so.${VER} ${STAGEDIR}${PREFIX}/lib/${l}.so || :
	${LN} -s ${l}.so ${STAGEDIR}${PREFIX}/lib/${l}-${MAJORVER}.so
.endfor

.for e in ${HALF_BIN}
	${INSTALL_PROGRAM} ${WRKSRC}/Half/${e} ${STAGEDIR}${PREFIX}/bin/${e}
.endfor

	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>