diff --git a/textproc/sphinx/Makefile b/textproc/sphinx/Makefile new file mode 100644 index 00000000000..52c0c6f4f3b --- /dev/null +++ b/textproc/sphinx/Makefile @@ -0,0 +1,45 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2008/07/21 12:42:21 bernd Exp $ + +COMMENT = free open-source SQL full-text search engine + +DISTNAME = sphinx-0.9.8 +CATEGORIES = textproc + +HOMEPAGE = http://www.sphinxsearch.com/ + +MAINTAINER = Rama McIntosh + +# GPLv2 +PERMIT_PACKAGE_CDROM= Yes +PERMIT_PACKAGE_FTP= Yes +PERMIT_DISTFILES_CDROM= Yes +PERMIT_DISTFILES_FTP= Yes + +MASTER_SITES = http://www.sphinxsearch.com/downloads/ + +MODULES = converters/libiconv + +WANTLIB = c expat m stdc++ + +CONFIGURE_STYLE = gnu +CONFIGURE_ARGS = --with-mysql +CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \ + LDFLAGS="-L${LOCALBASE}/lib" + +FLAVORS = pgsql +FLAVOR ?= + +.if ${FLAVOR:L:Mpgsql} +CONFIGURE_ARGS +=--with-pgsql \ + --without-mysql +LIB_DEPENDS += pq::databases/postgresql +.else +LIB_DEPENDS += mysqlclient::databases/mysql +WANTLIB += crypto ssl z +.endif + +post-install: + ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/sphinx + ${INSTALL_DATA} ${WRKSRC}/doc/sphinx.txt ${PREFIX}/share/doc/sphinx + +.include diff --git a/textproc/sphinx/distinfo b/textproc/sphinx/distinfo new file mode 100644 index 00000000000..dc870c7621e --- /dev/null +++ b/textproc/sphinx/distinfo @@ -0,0 +1,5 @@ +MD5 (sphinx-0.9.8.tar.gz) = NH5Ue3m3M3eNdVPt404KrA== +RMD160 (sphinx-0.9.8.tar.gz) = xXKSX3H6gBAKHETrRpVeOkMhUmI= +SHA1 (sphinx-0.9.8.tar.gz) = D4LlapGBs66u72XpuoL79vvmMtY= +SHA256 (sphinx-0.9.8.tar.gz) = ht6GFVD8exGbPL5jo0utMqx3H0TJMNIpd1rBJMg1cdk= +SIZE (sphinx-0.9.8.tar.gz) = 728864 diff --git a/textproc/sphinx/patches/patch-Makefile_in b/textproc/sphinx/patches/patch-Makefile_in new file mode 100644 index 00000000000..3a000ec6793 --- /dev/null +++ b/textproc/sphinx/patches/patch-Makefile_in @@ -0,0 +1,27 @@ +$OpenBSD: patch-Makefile_in,v 1.1.1.1 2008/07/21 12:42:21 bernd Exp $ +--- Makefile.in.orig Fri Dec 28 02:14:35 2007 ++++ Makefile.in Fri Feb 29 13:21:21 2008 +@@ -237,12 +237,12 @@ sphinx.conf.dist: $(top_builddir)/config.status $(srcd + uninstall-info-am: + install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) +- test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" ++ test -z "$(datadir)/examples/sphinx" || $(mkdir_p) "$(DESTDIR)$(datadir)/examples/sphinx" + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ +- echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ +- $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ ++ echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(datadir)/examples/sphinx/$$f'"; \ ++ $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(datadir)/examples/sphinx/$$f"; \ + done + + uninstall-sysconfDATA: +@@ -617,7 +617,6 @@ uninstall-info: uninstall-info-recursive + + + install-data-hook: +- mkdir -p $(DESTDIR)$(localstatedir)/data && mkdir -p $(DESTDIR)$(localstatedir)/log + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. + .NOEXPORT: diff --git a/textproc/sphinx/patches/patch-configure b/textproc/sphinx/patches/patch-configure new file mode 100644 index 00000000000..a6b5cfc5b93 --- /dev/null +++ b/textproc/sphinx/patches/patch-configure @@ -0,0 +1,25 @@ +--- configure.orig Mon Jan 28 00:09:03 2008 ++++ configure Fri Feb 29 13:12:06 2008 +@@ -7228,11 +7228,11 @@ extern "C" + #endif + /* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +-char iconv (); ++char libiconv (); + int + main () + { +-iconv (); ++libiconv (); + ; + return 0; + } +@@ -8205,7 +8205,7 @@ main () + { + const char * inbuf; + iconv_t cd; +- iconv ( cd, &inbuf, NULL, NULL, NULL ); ++ libiconv ( cd, &inbuf, NULL, NULL, NULL ); + + ; + return 0; diff --git a/textproc/sphinx/pkg/DESCR b/textproc/sphinx/pkg/DESCR new file mode 100644 index 00000000000..a6c19a9440b --- /dev/null +++ b/textproc/sphinx/pkg/DESCR @@ -0,0 +1,11 @@ +Sphinx is a full-text search engine. + +Generally, it's a standalone search engine, meant to provide fast, +size-efficient and relevant fulltext search functions to other +applications. Sphinx was specially designed to integrate well with SQL +databases and scripting languages. Currently built-in data sources +support fetching data either via direct connection to MySQL, or from +an XML pipe. + +As for the name, Sphinx is an acronym which is officially decoded as +SQL Phrase Index. diff --git a/textproc/sphinx/pkg/MESSAGE b/textproc/sphinx/pkg/MESSAGE new file mode 100644 index 00000000000..65cf54e3232 --- /dev/null +++ b/textproc/sphinx/pkg/MESSAGE @@ -0,0 +1,2 @@ +If you are using Ruby-On-Rails, both the Sphincter and Ultrasphinx plugins +will automatically configure sphinx. diff --git a/textproc/sphinx/pkg/PLIST b/textproc/sphinx/pkg/PLIST new file mode 100644 index 00000000000..de891a24306 --- /dev/null +++ b/textproc/sphinx/pkg/PLIST @@ -0,0 +1,12 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2008/07/21 12:42:21 bernd Exp $ +@bin bin/indexer +@bin bin/search +@bin bin/searchd +@bin bin/spelldump +share/doc/sphinx/ +share/doc/sphinx/sphinx.txt +share/examples/sphinx/ +share/examples/sphinx/example.sql +share/examples/sphinx/sphinx-min.conf.dist +share/examples/sphinx/sphinx.conf.dist +@sample ${SYSCONFDIR}/sphinx.conf