summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2012-01-27 17:34:13 +0000
committermiwi <miwi@FreeBSD.org>2012-01-27 17:34:13 +0000
commit2c571a04ae54da3c22a233e23a8f5c451de69ee5 (patch)
tree200379be6456e18771530daf160c26ec34cdc4ce
parentdfc06dfd16139a56525c1e9a8447870dcd8cbee7 (diff)
downloadFreeBSD-ports-2c571a04ae54da3c22a233e23a8f5c451de69ee5.zip
FreeBSD-ports-2c571a04ae54da3c22a233e23a8f5c451de69ee5.tar.gz
- Fix build with clang
PR: 163731 Submitted by: Douglas William Thrift <douglas@douglasthrift.net> (maintainer)
-rw-r--r--www/dtse/Makefile6
-rw-r--r--www/dtse/files/patch-HttpHandler.cpp11
-rw-r--r--www/dtse/files/patch-Indexer.cpp20
-rw-r--r--www/dtse/files/patch-Outputter.cpp13
-rw-r--r--www/dtse/files/patch-Search.hpp10
-rw-r--r--www/dtse/files/patch-autogen.sh17
-rw-r--r--www/dtse/files/patch-configure.ac57
-rw-r--r--www/dtse/files/patch-search.cgi.in8
8 files changed, 142 insertions, 0 deletions
diff --git a/www/dtse/Makefile b/www/dtse/Makefile
index 1ef9ddab..77373a9 100644
--- a/www/dtse/Makefile
+++ b/www/dtse/Makefile
@@ -17,6 +17,8 @@ COMMENT= An indexing search engine for use on small websites
LICENSE= AL2
+BUILD_DEPENDS= ${LOCALBASE}/share/aclocal/ax_check_gnu_make.m4:${PORTSDIR}/devel/autoconf-archive
+
.if defined(WITH_OPENSSL)
USE_OPENSSL= yes
CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
@@ -25,6 +27,7 @@ CONFIGURE_ARGS+= --with-openssl=${OPENSSLBASE}
USE_PERL5= yes
USE_BZIP2= yes
USE_GMAKE= yes
+USE_AUTOTOOLS= aclocal:env automake:env autoconf:env
HAS_CONFIGURE= yes
CONFIGURE_ARGS+= --prefix=${PREFIX}/${PORTNAME}
@@ -33,4 +36,7 @@ MAKEFILE= GNUmakefile
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+pre-configure:
+ cd ${WRKSRC}; ${SH} autogen.sh
+
.include <bsd.port.mk>
diff --git a/www/dtse/files/patch-HttpHandler.cpp b/www/dtse/files/patch-HttpHandler.cpp
new file mode 100644
index 0000000..66859fb
--- /dev/null
+++ b/www/dtse/files/patch-HttpHandler.cpp
@@ -0,0 +1,11 @@
+--- ./HttpHandler.cpp.orig 2008-08-23 04:00:12.000000000 -0700
++++ ./HttpHandler.cpp 2011-12-30 17:37:16.000000000 -0800
+@@ -427,7 +427,7 @@
+
+ void HttpHandler::putline(const string& line)
+ {
+- sprintf(buffer, "%s\r\n", line.c_str());
++ snprintf(buffer, BUFSIZ + 1, "%s\r\n", line.c_str());
+
+ #ifndef _OpenSSL_
+ if (send(http, buffer, strlen(buffer), 0) == SOCKET_ERROR)
diff --git a/www/dtse/files/patch-Indexer.cpp b/www/dtse/files/patch-Indexer.cpp
new file mode 100644
index 0000000..1e80f81
--- /dev/null
+++ b/www/dtse/files/patch-Indexer.cpp
@@ -0,0 +1,20 @@
+--- ./Indexer.cpp.orig 2008-08-23 04:00:12.000000000 -0700
++++ ./Indexer.cpp 2011-12-30 17:37:16.000000000 -0800
+@@ -286,6 +286,8 @@
+ case all:
+ restrictionsAll.insert(restriction.getURL());
+ break;
++ default:
++ break;
+ }
+ }
+ }
+@@ -332,6 +334,8 @@
+ restrictions.insert(*itor);
+ }
+ break;
++ default:
++ break;
+ }
+
+ cout << "done.\n";
diff --git a/www/dtse/files/patch-Outputter.cpp b/www/dtse/files/patch-Outputter.cpp
new file mode 100644
index 0000000..7328eae
--- /dev/null
+++ b/www/dtse/files/patch-Outputter.cpp
@@ -0,0 +1,13 @@
+--- ./Outputter.cpp.orig 2008-08-23 04:00:12.000000000 -0700
++++ ./Outputter.cpp 2011-12-30 17:37:16.000000000 -0800
+@@ -459,8 +459,8 @@
+
+ if (condition)
+ {
+- line.erase(start, strlen(tag));
+- line.erase(finish - strlen(tag), 9);
++ line.erase(start, std::strlen(tag));
++ line.erase(finish - std::strlen(tag), 9);
+
+ begin = finish - strlen(tag) - 9;
+ }
diff --git a/www/dtse/files/patch-Search.hpp b/www/dtse/files/patch-Search.hpp
new file mode 100644
index 0000000..7a7325e
--- /dev/null
+++ b/www/dtse/files/patch-Search.hpp
@@ -0,0 +1,10 @@
+--- ./Search.hpp.orig 2008-08-23 04:00:12.000000000 -0700
++++ ./Search.hpp 2011-12-30 17:37:16.000000000 -0800
+@@ -65,6 +65,7 @@
+ #include <queue>
+ #include <cstdlib>
+ #include <cstdio>
++#include <cstring>
+ #include <climits>
+ #include <ctime>
+ #include <cctype>
diff --git a/www/dtse/files/patch-autogen.sh b/www/dtse/files/patch-autogen.sh
new file mode 100644
index 0000000..0d88ccc
--- /dev/null
+++ b/www/dtse/files/patch-autogen.sh
@@ -0,0 +1,17 @@
+--- ./autogen.sh.orig 2011-12-30 17:37:16.000000000 -0800
++++ ./autogen.sh 2011-12-30 17:37:16.000000000 -0800
+@@ -0,0 +1,14 @@
++#!/bin/sh
++#
++# Douglas Thrift's Search Engine
++#
++# Douglas Thrift
++#
++# $Id$
++
++set -e
++cd `dirname $0`
++
++aclocal
++automake -acf || true
++autoconf
diff --git a/www/dtse/files/patch-configure.ac b/www/dtse/files/patch-configure.ac
new file mode 100644
index 0000000..dff3ffe
--- /dev/null
+++ b/www/dtse/files/patch-configure.ac
@@ -0,0 +1,57 @@
+--- ./configure.ac.orig 2008-08-23 03:29:42.000000000 -0700
++++ ./configure.ac 2011-12-30 17:37:16.000000000 -0800
+@@ -9,36 +9,22 @@
+ AC_PREFIX_DEFAULT(/usr/local/dtse)
+ AC_PROG_INSTALL
+
+-CHECK_GNU_MAKE
+-if test x$_cv_gnu_make_command = x; then
+- AC_MSG_ERROR(You need GNU Make.)
+-fi
++AX_CHECK_GNU_MAKE
++AC_SUBST([GNUMAKE], [$_cv_gnu_make_command])
++AS_IF([test "x$GNUMAKE" = x], [AC_MSG_ERROR([You need GNU make])])
++AX_WITH_PERL
++AX_PROG_PERL_MODULES([File::Temp], [], [AC_MSG_ERROR([You need File::Temp.])])
++AC_LANG([C++])
+ AC_PROG_CXX
+-if ! test x$GXX = x; then
+- AC_MSG_CHECKING(if g++ is version 3.1 or higher)
+- dt_gxx_3_x=`$CXX --version 2>&1 | grep ^$CXX`
+- if test "x$dt_gxx_3_x" = "x"; then
+- AC_MSG_RESULT(no)
+- AC_MSG_ERROR(You need g++ 3.1 or higher.)
+- else
+- AC_MSG_RESULT(yes)
+- fi
+-fi
+-AC_PROG_PERL_VERSION(5.00503, , AC_MSG_ERROR(You need a Perl 5.6 or higher.))
+-AC_MSG_CHECKING(perl path)
+-AC_SUBST(which_perl, `which $PERL`)
+-AC_MSG_RESULT($which_perl)
+-
+-AC_PROG_PERL_MODULES(File::Temp, , AC_MSG_ERROR(You need File::Temp.))
+ mingw=`$CXX --version 2>&1 | grep mingw\ special`
+ if test "x$mingw" = "x"; then
+- ETR_SOCKET_NSL
++ AX_LIB_SOCKET_NSL
+ LIBS="$LIBS $ETR_SOCKET_LIBS"
+ else
+ LIBS="$LIBS -lws2_32"
+ fi
+-AC_MSG_CHECKING(if OpenSSL is wanted)
+-AC_ARG_WITH(openssl, [[ --with-openssl[=DIR] enable OpenSSL [DIR=path]]
++AC_MSG_CHECKING([if OpenSSL is wanted])
++AC_ARG_WITH([openssl], [[ --with-openssl[=DIR] enable OpenSSL [DIR=path]]
+ ], [
+ AC_MSG_RESULT(yes)
+ AC_MSG_CHECKING(for OpenSSL)
+@@ -62,7 +48,7 @@
+ AC_SUBST(OpenSSL, -D_OpenSSL_)
+ else
+ AC_MSG_RESULT(not found);
+- AC_MSG_ERROR(couldn't find OpenSSL)
++ AC_MSG_ERROR(could not find OpenSSL)
+ fi
+ ], [ AC_MSG_RESULT(no) ])
+ if ! test x$openssl = x; then
diff --git a/www/dtse/files/patch-search.cgi.in b/www/dtse/files/patch-search.cgi.in
new file mode 100644
index 0000000..6311dd2
--- /dev/null
+++ b/www/dtse/files/patch-search.cgi.in
@@ -0,0 +1,8 @@
+--- ./search.cgi.in.orig 2004-04-05 15:50:25.000000000 -0700
++++ ./search.cgi.in 2011-12-30 17:37:16.000000000 -0800
+@@ -1,4 +1,4 @@
+-#!@which_perl@
++#!@PERL@
+ #
+ # Douglas Thrift's Search Engine CGI Script
+ #
OpenPOWER on IntegriCloud