summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--databases/Makefile1
-rw-r--r--databases/py-xapian/Makefile55
-rw-r--r--databases/py-xapian/distinfo3
-rw-r--r--databases/py-xapian/files/patch-configure24
-rw-r--r--databases/py-xapian/pkg-descr3
-rw-r--r--databases/py-xapian/pkg-plist7
6 files changed, 93 insertions, 0 deletions
diff --git a/databases/Makefile b/databases/Makefile
index 6a2cfcd45b03..e3d0adc1300a 100644
--- a/databases/Makefile
+++ b/databases/Makefile
@@ -806,6 +806,7 @@
SUBDIR += py-umemcache
SUBDIR += py-unqlite
SUBDIR += py-whisper
+ SUBDIR += py-xapian
SUBDIR += py3-bsddb3
SUBDIR += py3-mysqlclient
SUBDIR += py3-psycopg2
diff --git a/databases/py-xapian/Makefile b/databases/py-xapian/Makefile
new file mode 100644
index 000000000000..107a319eda54
--- /dev/null
+++ b/databases/py-xapian/Makefile
@@ -0,0 +1,55 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= xapian
+PORTVERSION= 1.4.3
+DISTVERSIONPREFIX= bindings-
+CATEGORIES= databases
+MASTER_SITES= http://oligarchy.co.uk/xapian/${PORTVERSION}/ \
+ LOCAL/sunpoet
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Python binding for Xapian
+
+LICENSE= GPLv2
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+BUILD_DEPENDS= xapian-core>=${PORTVERSION}:databases/xapian-core
+LIB_DEPENDS= libxapian.so:databases/xapian-core
+
+CONFLICTS_INSTALL= xapian-bindings12-
+
+OPTIONS_DEFINE= DOCS
+
+PORTSCOUT= limitw:1,even
+
+CONFIGURE_ARGS= --datarootdir=${DATADIR} --docdir=${DOCSDIR} \
+ --enable-static \
+ --without-csharp --without-java --without-lua --without-perl \
+ --without-php --without-ruby --without-tcl
+GNU_CONFIGURE= yes
+INSTALL_TARGET= install-strip
+USES= libtool python tar:xz
+
+PORTDOCS= *
+
+DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.4.8:textproc/py-sphinx
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|-lstdc++||g' ${WRKSRC}/configure
+
+post-patch-DOCS-off:
+ @${REINPLACE_CMD} -e 's| all-local||; s| install-data-local install-dist_exampledataDATA||' ${WRKSRC}/python/Makefile.in ${WRKSRC}/python3/Makefile.in
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} > 3000
+CONFIGURE_ARGS+=--with-python3 --without-python
+CONFIGURE_ENV+= PYTHON3=${PYTHON_CMD}
+.else
+CONFIGURE_ARGS+=--with-python --without-python3
+CONFIGURE_ENV+= PYTHON2=${PYTHON_CMD}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/databases/py-xapian/distinfo b/databases/py-xapian/distinfo
new file mode 100644
index 000000000000..09c72f562dee
--- /dev/null
+++ b/databases/py-xapian/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1485562319
+SHA256 (xapian-bindings-1.4.3.tar.xz) = 65b5455bf81e4f39fda49a6ad99353b05889d11d7c4c2cae001a0a1e0dac0d87
+SIZE (xapian-bindings-1.4.3.tar.xz) = 1114408
diff --git a/databases/py-xapian/files/patch-configure b/databases/py-xapian/files/patch-configure
new file mode 100644
index 000000000000..3ca6b16549b6
--- /dev/null
+++ b/databases/py-xapian/files/patch-configure
@@ -0,0 +1,24 @@
+--- configure.orig 2017-01-25 00:42:31 UTC
++++ configure
+@@ -17105,10 +17105,6 @@ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- if test yes = "$with_python2" ; then
+- as_fn_error $? "Couldn't import sphinx module and call sphinx.main() for Python2 - try package python-sphinx" "$LINENO" 5
+- fi
+- PYTHON2=
+ fi
+ if test -n "$PYTHON2" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON2_INC/Python.h" >&5
+@@ -17292,10 +17288,6 @@ $as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+ $as_echo "no" >&6; }
+- if test yes = "$with_python3" ; then
+- as_fn_error $? "Couldn't import sphinx module and call sphinx.main() for Python3 - try package python3-sphinx" "$LINENO" 5
+- fi
+- PYTHON3=
+ fi
+ if test -n "$PYTHON3" ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON3_INC/Python.h" >&5
diff --git a/databases/py-xapian/pkg-descr b/databases/py-xapian/pkg-descr
new file mode 100644
index 000000000000..666a9ba2b6cd
--- /dev/null
+++ b/databases/py-xapian/pkg-descr
@@ -0,0 +1,3 @@
+Python binding for Xapian
+
+WWW: https://xapian.org/
diff --git a/databases/py-xapian/pkg-plist b/databases/py-xapian/pkg-plist
new file mode 100644
index 000000000000..78217e805b30
--- /dev/null
+++ b/databases/py-xapian/pkg-plist
@@ -0,0 +1,7 @@
+%%PYTHON3%%%%PYTHON_SITELIBDIR%%/xapian/__init__.cpython-%%PYTHON_SUFFIX%%.%%PYTHON_PYOEXTENSION%%
+%%PYTHON3%%%%PYTHON_SITELIBDIR%%/xapian/__init__.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON_SITELIBDIR%%/xapian/__init__.py
+%%PYTHON2%%%%PYTHON_SITELIBDIR%%/xapian/__init__.pyc
+%%PYTHON2%%%%PYTHON_SITELIBDIR%%/xapian/__init__.pyo
+%%PYTHON_SITELIBDIR%%/xapian/_xapian.a
+%%PYTHON_SITELIBDIR%%/xapian/_xapian.so