summaryrefslogtreecommitdiff
path: root/devel/RE-flex/options.mk
blob: 7c6b0e0bfc845e402f9a9a5bc421a4b7f02d295f (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
# $NetBSD: options.mk,v 1.3 2020/06/16 16:18:02 scole Exp $

PKG_OPTIONS_VAR=	PKG_OPTIONS.RE_flex
PKG_SUPPORTED_OPTIONS=	cpu-optimization doxygen examples
PKG_SUGGESTED_OPTIONS=	cpu-optimization examples

.include "../../mk/bsd.options.mk"

# XXX don't build with cpu optimizations detected during configure
.if empty(PKG_OPTIONS:Mcpu-optimization)
CONFIGURE_ARGS+=	--disable-avx
CONFIGURE_ARGS+=	--disable-sse2
CONFIGURE_ARGS+=	--disable-neon
.endif

# build and install html docs
PLIST_VARS+=		doxygen
.if !empty(PKG_OPTIONS:Mdoxygen)
PLIST.doxygen=		yes
INSTALLATION_DIRS+=	share/RE-flex/html
TOOL_DEPENDS+=		doxygen-[0-9]*:../../devel/doxygen

post-configure:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} doc/html

post-install-doxygen:
	${INSTALL_DATA} ${WRKSRC}/doc/html/* \
		${DESTDIR}${PREFIX}/share/RE-flex/html

.else
post-install-doxygen:
	# do nothing
.endif

# copy example sources to .../share directory
PLIST_VARS+=		examples
.if !empty(PKG_OPTIONS:Mexamples)
PLIST.examples=		yes
INSTALLATION_DIRS+=	share/RE-flex/examples
DEPENDS+=		bison-[0-9]*:../../devel/bison

post-install-examples:
.for f in Make Makefile.am Makefile.in README.md
	${INSTALL_DATA} ${WRKSRC}/examples/${f}	\
		${DESTDIR}${PREFIX}/share/RE-flex/examples
.endfor
.for f in cpp json l lxx test y yaml yxx
	${INSTALL_DATA} ${WRKSRC}/examples/*\.${f} \
		${DESTDIR}${PREFIX}/share/RE-flex/examples
.endfor

.else
post-install-examples:
	# do nothing
.endif