1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-21 00:25:50 +00:00

textproc/groonga: Upgrade version 3.0.0 => 4.0.4 and stage

Note that gcc is required for i386 - clang/i386 will coredump on
FreeBSD 10 and 11.

PR:		191829
Submitted by:	Ports Fury
This commit is contained in:
John Marino 2014-08-01 13:38:30 +00:00
parent efa0c8d9bf
commit 97719006c5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=363708
6 changed files with 234 additions and 903 deletions

View File

@ -1,8 +1,7 @@
# $FreeBSD$
PORTNAME= groonga
PORTVERSION= 3.0.0
PORTREVISION= 2
PORTVERSION= 4.0.4
CATEGORIES= textproc
MASTER_SITES= http://packages.groonga.org/source/groonga/
@ -11,59 +10,63 @@ COMMENT= Open-source fulltext search engine and column store
LICENSE= LGPL21
USES= gmake pkgconfig
LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
USES= gmake libtool pathfix pkgconfig
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
CONFIGURE_ARGS= --with-munin-plugins --localstatedir=/var \
CONFIGURE_ARGS= --disable-silent-rules \
--disable-benchmark \
--disable-document \
--with-munin-plugins \
--localstatedir=/var \
--with-log-path=/var/log/groonga.log
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
.if defined(BATCH) || defined(PACKAGE_BUILDING)
CONFIGURE_ARGS+= --disable-silent-rules
.endif
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
OPTIONS_DEFINE= MECAB SUGGEST DOCS
MECAB_DESC= Enable morphological analysis
SUGGEST_DESC= Enable suggestions
OPTIONS_DEFAULT=MECAB SUGGEST
PKGDEINSTALL= ${PKGINSTALL}
NO_STAGE= yes
.include <bsd.port.pre.mk>
BROKEN_ia64= does not compile on ia64
BROKEN_powerpc= does not compile on powerpc
BROKEN_sparc64= does not compile on sparc64
.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
BROKEN= does not compile on ${ARCH}
.endif
OPTIONS_DEFINE= MECAB SUGGEST
OPTIONS_DEFAULT= MECAB SUGGEST
OPTIONS_SUB= yes
# We cannot enable this option until textproc/py-sphinx be upgraded to 1.2
# XXX: but it is enabled now as DOCS are on by default, so what's going on?
.if ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= sphinx-build:${PORTSDIR}/textproc/py-sphinx
MAN1= groonga.1
.else
CONFIGURE_ARGS+= --disable-document
.endif
.if ${PORT_OPTIONS:MMECAB} || exists(${LOCALBASE}/lib/libmecab.so)
CONFIGURE_ARGS+= --with-mecab
LIB_DEPENDS+= libmecab.so:${PORTSDIR}/japanese/mecab
PLIST_SUB+= MECAB=""
.else
CONFIGURE_ARGS+= --without-mecab
PLIST_SUB+= MECAB="@comment "
.endif
.if ${PORT_OPTIONS:MSUGGEST}
CONFIGURE_ARGS+= --with-libevent=${LOCALBASE} \
MECAB_DESC= Morphological analysis support via MeCab
MECAB_LIB_DEPENDS= libmecab.so:${PORTSDIR}/japanese/mecab
MECAB_CONFIGURE_OFF= --without-mecab
SUGGEST_DESC= Suggestions support
SUGGEST_LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 \
libmsgpack.so:${PORTSDIR}/devel/msgpack \
libzmq.so:${PORTSDIR}/net/libzmq2
SUGGEST_CONFIGURE_ON= --with-libevent=${LOCALBASE} \
--with-message-pack=${LOCALBASE} \
--enable-zeromq
LIB_DEPENDS+= libevent.so:${PORTSDIR}/devel/libevent2 \
libmsgpack.so:${PORTSDIR}/devel/msgpack \
libzmq.so:${PORTSDIR}/net/libzmq2
PLIST_SUB+= SUGGEST=""
.else
CONFIGURE_ARGS+= --without-libevent \
SUGGEST_CONFIGURE_OFF= --without-libevent \
--without-message-pack \
--disable-zeromq
PLIST_SUB+= SUGGEST="@comment "
.include <bsd.port.options.mk>
.if ${ARCH} == i386
USE_GCC= any
.endif
.include <bsd.port.post.mk>
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.7.3/auto/install
post-install:
@${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/groonga-httpd
.include <bsd.port.mk>

View File

@ -1,2 +1,2 @@
SHA256 (groonga-3.0.0.tar.gz) = 65db063808cac1034a2e2a15bdda26b698423957a72ff4fc9e7219ce028a7066
SIZE (groonga-3.0.0.tar.gz) = 14257656
SHA256 (groonga-4.0.4.tar.gz) = 8000e4e080cc03205dbd1c0debf646bb378f450c7e3dc0c2d5dbe406f345264b
SIZE (groonga-4.0.4.tar.gz) = 10029443

View File

@ -1,11 +0,0 @@
--- Makefile.in.orig 2012-12-29 20:49:48.573619000 +0900
+++ Makefile.in 2013-01-29 11:19:56.000000000 +0900
@@ -401,7 +401,7 @@
CMakeLists.txt \
config.h.cmake
-pkgconfigdir = $(libdir)/pkgconfig
+pkgconfigdir = $(prefix)/libdata/pkgconfig
pkgconfig_DATA = groonga.pc
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

View File

@ -1,11 +0,0 @@
--- configure.orig 2013-02-04 11:25:20.592931000 +0900
+++ configure 2013-02-13 14:23:43.000000000 +0900
@@ -24947,7 +24947,7 @@
GROONGA_HTTPD_DEFAULT_DATABASE_PATH="`
test \"$prefix\" = NONE && prefix=/usr/local
- eval eval eval echo ${localstatedir}/lib/${PACKAGE}/db/db
+ eval eval eval echo ${localstatedir}/db/${PACKAGE}/db
`"

View File

@ -0,0 +1,19 @@
#!/bin/sh
if [ "$2" = "INSTALL" ]; then
if [ ! -d /var/log/groonga ]; then
mkdir -p /var/log/groonga
fi
if [ ! -d /var/log/groonga/httpd ]; then
mkdir -p /var/log/groonga/httpd
fi
if [ ! -d /var/run/groonga ]; then
mkdir -p /var/run/groonga
fi
fi
if [ "$2" = "POST-DEINSTALL" ]; then
rmdir /var/run/groonga 2>/dev/null || true
rmdir /var/log/groonga/httpd 2>/dev/null || true
rmdir /var/log/groonga 2>/dev/null || true
fi

File diff suppressed because it is too large Load Diff