mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-23 09:10:43 +00:00
- One more fix for IPL_NAT
- Convert to OPTIONS PR: ports/81623 Submitted by: markm (maintainer)
This commit is contained in:
parent
9fa2ebb975
commit
6cfc4afaa6
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=136465
@ -7,7 +7,7 @@
|
||||
|
||||
PORTNAME= oops
|
||||
PORTVERSION= ${OOPSVERSION}
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= www
|
||||
MASTER_SITES= http://oops-cache.org/
|
||||
DISTNAME= ${PORTNAME}-${OOPSVERSION}
|
||||
@ -36,24 +36,48 @@ MAN8= oops.8 oopsctl.8
|
||||
OOPSVAR= /var/run/oops
|
||||
OOPSLOG= /var/log/oops
|
||||
|
||||
SCRIPTS_ENV+= WRKDIRPREFIX="${WRKDIRPREFIX}" \
|
||||
TOUCH="${TOUCH}" \
|
||||
MKDIR="${MKDIR}"
|
||||
|
||||
USE_RC_SUBR= YES
|
||||
PKGMESSAGE= ${WRKDIR}/pkg-message
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
.if defined(BATCH)
|
||||
OPTIONS= GIGABASE "GigaBase storage" on \
|
||||
DB4 "Berkeley DB v4 storage" off \
|
||||
MYSQL "MySQL auth support" off \
|
||||
PGSQL "PostgreSQL auth support" off \
|
||||
PCRE "PCRE support" off
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if !defined(WITHOUT_GIGABASE)
|
||||
.if defined (WITH_DB4)
|
||||
BROKEN= "Only one DB storage can be used (First)"
|
||||
.endif
|
||||
LIB_DEPENDS+= gigabase_r.2:${PORTSDIR}/databases/gigabase
|
||||
CONFIGURE_ARGS+= --without-DB
|
||||
.endif
|
||||
|
||||
pre-fetch:
|
||||
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.oops
|
||||
.if defined(WITH_DB4)
|
||||
.if defined(WITHOUT_GIGABASE)
|
||||
LIB_DEPENDS+= db4.0:${PORTSDIR}/databases/db4
|
||||
CONFIGURE_ARGS+= --without-GB
|
||||
.else
|
||||
BROKEN= "Only one DB storage can be used"
|
||||
.endif
|
||||
.endif
|
||||
|
||||
.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc)
|
||||
.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc"
|
||||
.if defined(WITH_MYSQL)
|
||||
USE_MYSQL= YES
|
||||
CONFIGURE_ARGS+= --with-MYSQL=${PREFIX}
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PGSQL)
|
||||
USE_PGSQL= YES
|
||||
CONFIGURE_ARGS+= --with-PGSQL=${PREFIX}/pgsql
|
||||
.endif
|
||||
|
||||
.if defined(WITH_PCRE)
|
||||
LIB_DEPENDS+= pcre.0:${PORTSDIR}/devel/pcre
|
||||
CONFIGURE_ARGS+= --with-regexp=pcre
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
@ -66,8 +90,6 @@ post-build:
|
||||
pre-install:
|
||||
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
post-install:
|
||||
.if !defined(NOPORTDOCS)
|
||||
@${INSTALL_MAN} ${WRKSRC}/doc/oops.8 ${PREFIX}/man/man8
|
||||
|
@ -12,3 +12,12 @@ $FreeBSD$
|
||||
if (natfd < 0) {
|
||||
my_xlog(OOPS_LOG_HTTP|OOPS_LOG_DBG|OOPS_LOG_SEVERE, "transparent/redir(): NAT open failed: %m\n");
|
||||
goto notdone;
|
||||
@@ -270,7 +270,7 @@
|
||||
natLookup.nl_outip = rq->client_sa.sin_addr;
|
||||
natLookup.nl_flags = IPN_TCP;
|
||||
if (natfd < 0) {
|
||||
- natfd = open(IPL_NAT, O_RDONLY, 0);
|
||||
+ natfd = open(IPNAT_NAME, O_RDONLY, 0);
|
||||
if (natfd < 0) {
|
||||
my_xlog(OOPS_LOG_HTTP|OOPS_LOG_DBG|OOPS_LOG_SEVERE, "transparent/redir(): NAT open failed: %m\n");
|
||||
goto notdone;
|
||||
|
@ -1,76 +0,0 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
|
||||
exit
|
||||
fi
|
||||
|
||||
tempfile=`mktemp -t checklist`
|
||||
if [ "${BATCH}" = "yes" ]; then
|
||||
set \"GigaBase\"
|
||||
else
|
||||
/usr/bin/dialog --title "OOPS configuration options" --clear \
|
||||
--checklist "\n\
|
||||
Please select desired options:\n\
|
||||
(please select ONLY ONE DB storages)" -1 -1 16 \
|
||||
GigaBase "GigaBase storage" OFF \
|
||||
DB4 "Berkeley DB v4 storage" OFF \
|
||||
MySQL "MySQL auth support" OFF \
|
||||
PgSQL "PostgreSQL auth support" OFF \
|
||||
PCRE "PCRE support" OFF \
|
||||
2> $tempfile
|
||||
|
||||
retval=$?
|
||||
|
||||
if [ -s $tempfile ]; then
|
||||
set `cat $tempfile`
|
||||
fi
|
||||
rm -f $tempfile
|
||||
|
||||
case $retval in
|
||||
0) if [ -z "$*" ]; then
|
||||
echo "Nothing selected"
|
||||
fi
|
||||
;;
|
||||
1) echo "Cancel pressed."
|
||||
exit 1;
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
||||
${MKDIR} ${WRKDIRPREFIX}${CURDIR}
|
||||
exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||||
|
||||
echo "PREFIX= ${PREFIX}"
|
||||
|
||||
while [ "$1" ]; do
|
||||
case $1 in
|
||||
\"GigaBase\")
|
||||
echo "LIB_DEPENDS+= gigabase_r.2:\${PORTSDIR}/databases/gigabase"
|
||||
echo "CONFIGURE_ARGS+= --without-DB"
|
||||
;;
|
||||
\"DB4\")
|
||||
echo "LIB_DEPENDS+= db4.0:\${PORTSDIR}/databases/db4"
|
||||
echo "CONFIGURE_ARGS+= --without-GB"
|
||||
;;
|
||||
\"MySQL\")
|
||||
echo "LIB_DEPENDS+= mysqlclient.10:\${PORTSDIR}/databases/mysql323-client"
|
||||
echo "CONFIGURE_ARGS+= --with-MYSQL=\${PREFIX}"
|
||||
;;
|
||||
\"PgSQL\")
|
||||
echo "POSTGRESQL_PORT?= databases/postgresql7"
|
||||
echo "LIB_DEPENDS+= pq.3:\${PORTSDIR}/\${POSTGRESQL_PORT}"
|
||||
echo "CONFIGURE_ARGS+= --with-PGSQL=\${PREFIX}/pgsql"
|
||||
;;
|
||||
\"PCRE\")
|
||||
echo "LIB_DEPENDS+= pcre.0:\${PORTSDIR}/devel/pcre"
|
||||
echo "CONFIGURE_ARGS+= --with-regexp=pcre"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option(s): $*" > /dev/stderr
|
||||
rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
Loading…
Reference in New Issue
Block a user