aboutsummaryrefslogtreecommitdiff
path: root/textproc/groonga/Makefile
blob: 7ef248bfd03372771fd2c79114728252b4dd6b46 (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
72
PORTNAME=	groonga
PORTVERSION=	13.0.1
CATEGORIES=	textproc
MASTER_SITES=	http://packages.groonga.org/source/groonga/

MAINTAINER=	bofh@FreeBSD.org
COMMENT=	Open-source fulltext search engine and column store
WWW=		https://groonga.org/

LICENSE=	LGPL21
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libpcre.so:devel/pcre

USES=		gmake libedit libtool localbase:ldflags pathfix pkgconfig ssl
USE_LDCONFIG=	yes

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-benchmark \
		--disable-document \
		--localstatedir=/var \
		--with-log-path=/var/log/groonga.log \
		--with-munin-plugins \
		--without-cutter \
		--without-inkscape \
		--without-kytea \
		--without-lemon

INSTALL_TARGET=	install-strip

OPTIONS_DEFINE=		MECAB RUBY SUGGEST
OPTIONS_DEFAULT=	MECAB RUBY SUGGEST
OPTIONS_SUB=		yes

MECAB_DESC=	Morphological analysis support via MeCab
SUGGEST_DESC=	Suggestions support

MECAB_LIB_DEPENDS=	libmecab.so:japanese/mecab
MECAB_CONFIGURE_OFF=	--without-mecab
RUBY_RUN_DEPENDS=	rubygem-bundler>=0:sysutils/rubygem-bundler
RUBY_USES=		ruby
RUBY_CONFIGURE_ON=	--enable-mruby
SUGGEST_LIB_DEPENDS=	libevent.so:devel/libevent \
			libmsgpackc.so:devel/msgpack-c \
			libzmq.so:net/libzmq2
SUGGEST_CONFIGURE_ON=	--enable-zeromq \
			--with-libevent=${LOCALBASE} \
			--with-message-pack=${LOCALBASE}
SUGGEST_CONFIGURE_OFF=	--disable-zeromq \
			--without-libevent \
			--without-message-pack

post-patch:
	@${REINPLACE_CMD} -e \
		's|lib/$${PACKAGE}/db/db|db/$${PACKAGE}/db| ; \
		 s|-lpthread|-pthread|' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e \
		'/NGX_PID_PATH/s|mkdir|${TRUE}| ; \
		 /NGX_HTTP_LOG_PATH/s|mkdir|${TRUE}| ; \
		 /NGX_ERROR_LOG_PATH/s|mkdir|${TRUE}|' \
		${WRKSRC}/vendor/nginx-1.23.3/auto/install
# Avoid conflict with C++20 <version> by adding .txt suffix
	@${MV} ${WRKSRC}/version ${WRKSRC}/version.txt
	@${REINPLACE_CMD} -Ei .c++20 '/test|cat/s/[[:<:]]version/&.txt/' \
		${WRKSRC}/version-gen.sh

post-install:
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/groonga-httpd
	@${MKDIR} ${STAGEDIR}/var/log/groonga/httpd
	@${MKDIR} ${STAGEDIR}/var/run/groonga

.include <bsd.port.mk>