aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey A. Osokin <osa@FreeBSD.org>2012-02-04 07:51:50 +0000
committerSergey A. Osokin <osa@FreeBSD.org>2012-02-04 07:51:50 +0000
commit009c4d7c5bd96131300da5a358c82d9281426240 (patch)
tree6acf5a30ad9107c7a05bb9f19c20bcbbec8f599b
parentd1bcd54990431bc5f7dc016032a6d93090864100 (diff)
downloadports-009c4d7c5bd96131300da5a358c82d9281426240.tar.gz
ports-009c4d7c5bd96131300da5a358c82d9281426240.zip
Notes
-rw-r--r--www/oops/Makefile3
-rw-r--r--www/oops/files/patch-configure.in26
-rw-r--r--www/oops/files/patch-src_modules_Makefile.in14
-rw-r--r--www/oops/files/patch-src_modules_netflow.c38
-rw-r--r--www/oops/pkg-install55
-rw-r--r--www/oops/pkg-plist64
6 files changed, 107 insertions, 93 deletions
diff --git a/www/oops/Makefile b/www/oops/Makefile
index 9a4d4dc5c942..55bfcd041ae1 100644
--- a/www/oops/Makefile
+++ b/www/oops/Makefile
@@ -7,11 +7,10 @@
PORTNAME= oops
PORTVERSION= ${OOPSVERSION}
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= www
MASTER_SITES= http://oops-cache.org/ \
ftp://kucha.ru/pub/misc/oops/
-DISTNAME= ${PORTNAME}-${OOPSVERSION}
MAINTAINER= marck@FreeBSD.org
COMMENT= A caching web proxy server
diff --git a/www/oops/files/patch-configure.in b/www/oops/files/patch-configure.in
index dc9b884f3031..324c9f5174ec 100644
--- a/www/oops/files/patch-configure.in
+++ b/www/oops/files/patch-configure.in
@@ -1,6 +1,14 @@
---- configure.in.orig 2004-11-23 00:20:04.000000000 -0500
-+++ configure.in 2007-12-20 15:36:18.000000000 -0500
-@@ -328,14 +328,17 @@
+--- configure.in.orig 2004-11-23 08:20:04.000000000 +0300
++++ configure.in 2012-02-02 20:33:20.000000000 +0400
+@@ -316,7 +316,6 @@
+
+ ;;
+ freebsd*) CFLAGS="$CFLAGS -D_REENTRANT -DFREEBSD -D_THREAD_SAFE -DFD_SETSIZE=2048 -I."
+- CXXSOFLAGS="-shared"
+ LIBS="$LEXLIB $LIBS"
+ if test "$large_files" = "yes" ; then
+ ## FreeBSD need no any special flags for 64bit files
+@@ -328,14 +327,17 @@
rel=`uname -r`
case "$rel" in
4*)
@@ -25,7 +33,7 @@
;;
esac
RPATH_OPTION="-rpath"
-@@ -430,10 +433,10 @@
+@@ -430,10 +432,10 @@
esac
if test "X$MYSQL_PATH" != "X" ; then
@@ -39,3 +47,13 @@
fi
if test "X$PGSQL_PATH" != "X" ; then
+@@ -696,8 +698,7 @@
+ res=`./confmain`
+ fi
+ if test "$res" = "yes"; then
+- CFLAGS="$CFLAGS -export-dynamic"
+- AC_MSG_RESULT(yes)
++ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(no)
+ fi
diff --git a/www/oops/files/patch-src_modules_Makefile.in b/www/oops/files/patch-src_modules_Makefile.in
new file mode 100644
index 000000000000..b165558a5f05
--- /dev/null
+++ b/www/oops/files/patch-src_modules_Makefile.in
@@ -0,0 +1,14 @@
+--- src/modules/Makefile.in.orig 2004-11-23 08:20:06.000000000 +0300
++++ src/modules/Makefile.in 2012-02-03 05:25:52.000000000 +0400
+@@ -2,9 +2,9 @@
+ CXX = @CXX@
+ LIBS = @LIBS@
+ CFLAGS = @CFLAGS@ @DEFS@
+-LDFLAGS = @LDFLAGS@
++LDFLAGS = @SOFLAGS@ --export-dynamic
+ LD = @LD@
+-SOFLAGS = @SOFLAGS@
++SOFLAGS =
+ OPT_MODS = @OPT_MODS@
+ CXXCOMPFLAGS = @LIBGB_INCL@ @CXXCOMPFLAGS@
+ CXXSOFLAGS = @LIBGB_INCL@ @CXXSOFLAGS@
diff --git a/www/oops/files/patch-src_modules_netflow.c b/www/oops/files/patch-src_modules_netflow.c
new file mode 100644
index 000000000000..8ccfec31e4dc
--- /dev/null
+++ b/www/oops/files/patch-src_modules_netflow.c
@@ -0,0 +1,38 @@
+-- src/modules/netflow.c.orig 2012-02-02 19:12:00.000000000 +0400
++++ src/modules/netflow.c 2012-02-02 19:13:28.000000000 +0400
+@@ -165,22 +165,22 @@
+ char buf[1024];
+ route_entry_t *rt, *rt_ptr;
+
+- if ( 0 == file_name[0] ) return;
++ if ( 0 == file_name[0] ) return(0);
+ rc = stat(file_name, &sb);
+ if ( rc < 0 ) {
+ my_xlog(OOPS_LOG_NOTICE|OOPS_LOG_DBG|OOPS_LOG_INFORM, "netflow: can't stat(`%s'): %s\n", file_name, strerror(errno));
+- return;
++ return(0);
+ }
+ if ( sb.st_mtime <= file_mtime ) {
+ my_xlog(OOPS_LOG_DBG, "netflow: %s already seen\n", file_name);
+- return;
++ return(0);
+ }
+ /* reload */
+ my_xlog(OOPS_LOG_NOTICE|OOPS_LOG_DBG, "netflow: reload from `%s'\n", file_name);
+ file = fopen(file_name, "r");
+ if ( file == NULL ) {
+ my_xlog(OOPS_LOG_SEVERE, "netflow: can't fopen(`%s'): %s\n", file_name, strerror(errno));
+- return;
++ return(0);
+ }
+ NF_WRLOCK_CL;
+ /* allocate tables once and forever to avoid memory fragmentation */
+@@ -191,7 +191,7 @@
+ if ( NULL == rt_ptr ) {
+ fclose(file);
+ NF_UNLOCK_CL;
+- return;
++ return(0);
+ }
+ while(fgets(buf, sizeof(buf) - 1, file) && (new_rt_entries < MAXRTTABLESZ)) {
+ char *p = buf, *d;
diff --git a/www/oops/pkg-install b/www/oops/pkg-install
deleted file mode 100644
index 462046a395e2..000000000000
--- a/www/oops/pkg-install
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/bin/sh
-
-user=oops
-group=nogroup
-
-ask() {
- local question default answer
-
- question=$1
- default=$2
- if [ -z "${PACKAGE_BUILDING}" ]; then
- read -p "${question} [${default}]? " answer
- fi
- if [ x${answer} = x ]; then
- answer=${default}
- fi
- echo ${answer}
-}
-
-yesno() {
- local dflt question answer
-
- question=$1
- dflt=$2
- while :; do
- answer=$(ask "${question}" "${dflt}")
- case "${answer}" in
- [Yy]*) return 0;;
- [Nn]*) return 1;;
- esac
- echo "Please answer yes or no."
- done
-}
-
-if [ x"$2" = xPRE-INSTALL ]; then
- if /usr/sbin/pw user show "${user}" 2>/dev/null; then
- echo "You already have a user \"${user}\", so I will use it."
- else
- echo "You need a user \"${user}\"."
- doadduser=1
- if [ "X${BATCH}" != "X" ]; then
- doadduser=0
- else
- yesno "Would you like me to create it" y && doadduser=0
- fi
- if [ $doadduser = 0 ]; then
- /usr/sbin/pw useradd ${user} -g ${group} -h - -d /nonexistent \
- -s /nonexistent -c "Oops Cache System" || exit
- echo "Done."
- else
- echo "Please create it, and try again."
- exit 1
- fi
- fi
-fi
diff --git a/www/oops/pkg-plist b/www/oops/pkg-plist
index 81b5527615df..a4b06add9fb3 100644
--- a/www/oops/pkg-plist
+++ b/www/oops/pkg-plist
@@ -1,33 +1,33 @@
-@unexec if cmp -s %D/etc/oops/accel_maps %D/etc/oops/accel_maps.sample; then rm -f %D/etc/oops/accel_maps; fi
-etc/oops/accel_maps.sample
-@exec [ -f %B/accel_maps ] || cp %B/%f %B/accel_maps
-@unexec if cmp -s %D/etc/oops/acl_local_networks %D/etc/oops/acl_local_networks.sample; then rm -f %D/etc/oops/acl_local_networks; fi
-etc/oops/acl_local_networks.sample
-@exec [ -f %B/etc/oops/acl_local_networks ] || cp %B/%f %B/acl_local_networks
-@unexec if cmp -s %D/etc/oops/auth_template.html %D/etc/oops/auth_template.html.sample; then rm -f %D/etc/oops/auth_template.html; fi
-etc/oops/auth_template.html.sample
-@exec [ -f %B/etc/oops/auth_template.html ] || cp %B/%f %B/auth_template.html
-@unexec if cmp -s %D/etc/oops/err_template.html %D/etc/oops/err_template.html.sample; then rm -f %D/etc/oops/err_template.html; fi
-etc/oops/err_template.html.sample
-@exec [ -f %B/etc/oops/err_template.html ] || cp %B/%f %B/err_template.html
-@unexec if cmp -s %D/etc/oops/oops.cfg %D/etc/oops/oops.cfg.sample; then rm -f %D/etc/oops/oops.cfg; fi
-etc/oops/oops.cfg.sample
-@exec [ -f %B/etc/oops/oops.cfg ] || cp %B/%f %B/oops.cfg
-@unexec if cmp -s %D/etc/oops/passwd %D/etc/oops/passwd.sample; then rm -f %D/etc/oops/passwd; fi
-etc/oops/passwd.sample
-@exec [ -f %B/etc/oops/passwd ] || cp %B/%f %B/passwd
-@unexec if cmp -s %D/etc/oops/redir_rules %D/etc/oops/redir_rules.sample; then rm -f %D/etc/oops/redir_rules; fi
-etc/oops/redir_rules.sample
-@exec [ -f %B/etc/oops/redir_rules ] || cp %B/%f %B/redir_rules
-@unexec if cmp -s %D/etc/oops/redir_template.html %D/etc/oops/redir_template.html.sample; then rm -f %D/etc/oops/redir_template.html; fi
-etc/oops/redir_template.html.sample
-@exec [ -f %B/etc/oops/redir_template.html ] || cp %B/%f %B/redir_template.html
-@unexec if cmp -s %D/etc/oops/select.sql %D/etc/oops/select.sql.sample; then rm -f %D/etc/oops/select.sql; fi
-etc/oops/select.sql.sample
-@exec [ -f %B/etc/oops/select.sql ] || cp %B/%f %B/select.sql
-etc/oops/tables/koi-alt.tab
-etc/oops/tables/koi-iso.tab
-etc/oops/tables/koi-win.tab
+@unexec if cmp -s %D/%%ETCDIR%%/accel_maps %D/%%ETCDIR%%/accel_maps.sample; then rm -f %D/%%ETCDIR%%/accel_maps; fi
+%%ETCDIR%%/accel_maps.sample
+@exec if [ ! -f %D/%%ETCDIR%%/accel_maps ] ; then cp -p %D/%F %B/accel_maps; fi
+@unexec if cmp -s %D/%%ETCDIR%%/acl_local_networks %D/%%ETCDIR%%/acl_local_networks.sample; then rm -f %D/%%ETCDIR%%/acl_local_networks; fi
+%%ETCDIR%%/acl_local_networks.sample
+@exec if [ ! -f %D/%%ETCDIR%%/acl_local_networks ] ; then cp -p %D/%F %B/acl_local_networks; fi
+@unexec if cmp -s %D/%%ETCDIR%%/auth_template.html %D/%%ETCDIR%%/auth_template.html.sample; then rm -f %D/%%ETCDIR%%/auth_template.html; fi
+%%ETCDIR%%/auth_template.html.sample
+@exec if [ ! -f %D/%%ETCDIR%%/auth_template.html ] ; then cp -p %D/%F %B/auth_template.html; fi
+@unexec if cmp -s %D/%%ETCDIR%%/err_template.html %D/%%ETCDIR%%/err_template.html.sample; then rm -f %D/%%ETCDIR%%/err_template.html; fi
+%%ETCDIR%%/err_template.html.sample
+@exec if [ ! -f %D/%%ETCDIR%%/err_template.html ] ; then cp -p %D/%F %B/err_template.html; fi
+@unexec if cmp -s %D/%%ETCDIR%%/oops.cfg %D/%%ETCDIR%%/oops.cfg.sample; then rm -f %D/%%ETCDIR%%/oops.cfg; fi
+%%ETCDIR%%/oops.cfg.sample
+@exec if [ ! -f %D/%%ETCDIR%%/oops.cfg ] ; then cp -p %D/%F %B/oops.cfg; fi
+@unexec if cmp -s %D/%%ETCDIR%%/passwd %D/%%ETCDIR%%/passwd.sample; then rm -f %D/%%ETCDIR%%/passwd; fi
+%%ETCDIR%%/passwd.sample
+@exec if [ ! -f %D/%%ETCDIR%%/passwd ] ; then cp -p %D/%F %B/passwd; fi
+@unexec if cmp -s %D/%%ETCDIR%%/redir_rules %D/%%ETCDIR%%/redir_rules.sample; then rm -f %D/%%ETCDIR%%/redir_rules; fi
+%%ETCDIR%%/redir_rules.sample
+@exec if [ ! -f %D/%%ETCDIR%%/redir_rules ] ; then cp -p %D/%F %B/redir_rules; fi
+@unexec if cmp -s %D/%%ETCDIR%%/redir_template.html %D/%%ETCDIR%%/redir_template.html.sample; then rm -f %D/%%ETCDIR%%/redir_template.html; fi
+%%ETCDIR%%/redir_template.html.sample
+@exec if [ ! -f %D/%%ETCDIR%%/redir_template.html ] ; then cp -p %D/%F %B/redir_template.html; fi
+@unexec if cmp -s %D/%%ETCDIR%%/select.sql %D/%%ETCDIR%%/select.sql.sample; then rm -f %D/%%ETCDIR%%/select.sql; fi
+%%ETCDIR%%/select.sql.sample
+@exec if [ ! -f %D/%%ETCDIR%%/select.sql ] ; then cp -p %D/%F %B/select.sql; fi
+%%ETCDIR%%/tables/koi-alt.tab
+%%ETCDIR%%/tables/koi-iso.tab
+%%ETCDIR%%/tables/koi-win.tab
libexec/oops/accel.so
libexec/oops/berkeley_db_api.so
libexec/oops/custom_log.so
@@ -51,8 +51,8 @@ libexec/oops/win_http.so
sbin/oops
sbin/oopsctl
@dirrm libexec/oops
-@dirrm etc/oops/tables
-@dirrmtry etc/oops
+@dirrm %%ETCDIR%%/tables
+@dirrmtry %%ETCDIR%%
@dirrmtry oops/DB
@dirrmtry oops/logs
@dirrmtry oops/storages