ports/69662: suphp -- Better work-around for the make -C problem
Jeremy Chadwick
freebsd at jdc.freebsd.org
Tue Jul 27 13:00:39 UTC 2004
>Number: 69662
>Category: ports
>Synopsis: suphp -- Better work-around for the make -C problem
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: maintainer-update
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 27 13:00:37 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator: Jeremy Chadwick
>Release: FreeBSD 4.10-PRERELEASE i386
>Organization:
Parodius Networking
>Environment:
System: FreeBSD pentarou.parodius.com 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #0: Wed May 5 03:33:17 PDT 2004 root at pentarou.parodius.com:/usr/obj/usr/src/sys/PENTAROU i386
>Description:
This is a follow-up to the previous commit I had requested. This is a
more suiting workaround, which removes use of the -C flag altogether
in the Makefiles (instead doing cd <dir> && ...). I believe this should
make all previous FreeBSD releases happy, and future releases too.
>How-To-Repeat:
Not applicable.
>Fix:
Included here are replacement/new files, which should make everything
easy. If diffs/patches are needed, let me know and I'll submit those
instead in a follow-up:
ports/www/suphp/Makefile
ports/www/suphp/files/patch-Makefile.in
ports/www/suphp/files/patch-src::Makefile.in
=== SNIP ports/www/suphp/Makefile ===
# New ports collection makefile for: suphp
# Date created: 15 September 2002
# Whom: Clement Laforet <sheepkiller at cultdeadsheep.org>
#
# $FreeBSD: ports/www/suphp/Makefile,v 1.15 2004/07/15 22:13:36 clement Exp $
#
PORTNAME= suphp
PORTVERSION= 0.5.2
CATEGORIES= www
MASTER_SITES= http://www.suphp.org/download/
MAINTAINER= freebsd at jdc.parodius.com
COMMENT= A combination which provides a wrapper for PHP
GNU_CONFIGURE= yes
USE_PHP= yes
WANT_PHP_CGI= yes
USE_APACHE= yes
CONFLICTS= mod_php4-4* php-4.*
LOG_PATH?= ${WITH_LOGPATH}
WITH_LOGNAME?= suphp.log
PHP_PATH?= ${LOCALBASE}/bin/php
APACHE_USER?= ${WWWOWN}
MIN_UID?= 80
MIN_GID?= 80
WITH_SETID_MODE?= owner
MYPORTDOCS= apache/CONFIG apache/INSTALL apache/README apache/LICENSE \
LICENSE INSTALL README
LANG= en de
CONFIGURE_ARGS+= --with-php=${PHP_PATH} \
--with-logfile=${LOG_PATH}/${WITH_LOGNAME} \
--with-apache-user=${APACHE_USER} \
--with-min-gid=${MIN_UID} \
--with-min-uid=${MIN_GID} \
--with-apxs=${APXS}
## Available knobs:
## WITHOUT_CHECKPATH: disable check if script resides in DOCUMENT_ROOT
.if defined(WITHOUT_CHECKPATH)
CONFIGURE_ARGS+= --disable-checkpath
.endif
## WITHOUT_CHECKUID: accept UIDs that are not listed in /etc/passwd
.if defined(WITHOUT_CHECKUID)
CONFIGURE_ARGS+= --disable-checkuid
.endif
## WITHOUT_CHECKGID: accept GIDs that are not listed in /etc/group
.if defined(WITHOUT_CHECKGID)
CONFIGURE_ARGS+= --disable-checkgid
.endif
## WITH_SETID_MODE: Mode to use for setting UID/GID.
CONFIGURE_ARGS+= --with-setid-mode=${WITH_SETID_MODE}
## WITH_LOGPATH (formerly known as LOG_PATH): logging directory
## (default: /var/log)
## WITH_LOGNAME: log file name (default suphp.log)
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/include/apache2/apr.h) || defined(WITH_APACHE2)
APACHE_PORT= www/apache2
PLIST_SUB+= MODULEDIR="libexec/apache2/"
.else
PLIST_SUB+= MODULEDIR="libexec/apache/"
.endif
show-options:
@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
pre-everything::
@${MAKE} show-options
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for l in ${LANG}
@${MKDIR} ${DOCSDIR}/${l}/apache
. for f in ${MYPORTDOCS}
@${CP} -Rfp ${WRKSRC}/doc/${l}/${f} ${DOCSDIR}/${l}/${f}
. endfor
.endfor
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
=== END ===
=== SNIP ports/www/suphp/files/patch-Makefile.in ===
--- Makefile.in.orig Tue Jul 13 02:43:40 2004
+++ Makefile.in Tue Jul 27 05:04:18 2004
@@ -17,5 +17,5 @@
srcdir='$(srcdir)'
all install clean:
- @$(MAKE) $(MAKEDEFS) -C src $@
+ cd src && $(MAKE) $(MAKEDEFS) $@
=== END ===
=== SNIP ports/www/suphp/files/patch-src::Makefile.in ===
--- src/Makefile.in.orig Tue Jul 13 02:43:41 2004
+++ src/Makefile.in Tue Jul 27 05:06:45 2004
@@ -28,37 +28,38 @@
INCLUDES = -I$(top_srcdir)/src
RM = rm -f
+SRCS= suphp.c filesystem.c check.c error.c log.c compat.c
+OBJS= ${SRCS:.c=.o}
+
all: suphp suphp.mod
-suphp: suphp.o filesystem.o check.o error.o log.o compat.o
- $(CC) $(LDFLAGS) $(DEFS) -o suphp \
- suphp.o filesystem.o check.o error.o log.o compat.o
+suphp: ${OBJS}
+ $(CC) $(LDFLAGS) $(DEFS) -o suphp ${OBJS}
suphp.mod:
@if test "$(APXS)" != "/notfound/"; then \
if test "$(APACHE_VERSION_2)" = "true"; then \
echo "*** INFO: Building mod_suphp for Apache 2.0 ***"; \
- $(MAKE) $(MAKEDEFS) -C apache2; \
+ cd apache2 && $(MAKE) $(MAKEDEFS); \
fi; \
if test "$(APACHE_VERSION_1_3)" = "true"; then \
echo "*** INFO: Building mod_suphp for Apache 1.3 ***"; \
- $(MAKE) $(MAKEDEFS) -C apache; \
+ cd apache && $(MAKE) $(MAKEDEFS); \
fi; \
else \
echo "*** WARNING: No 'apxs' found. Skipping mod_suphp! ***"; \
fi
install: suphp suphp.mod
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(sbindir)
$(INSTALL_PROGRAM) -m 4755 suphp $(DESTDIR)$(sbindir)/suphp
@if test "$(APXS)" != "/notfound/"; then \
if test "$(APACHE_VERSION_2)" = "true"; then \
echo "*** INFO: Installing mod_suphp for Apache 2.0 ***"; \
- $(MAKE) $(MAKEDEFS) -C apache2 install; \
+ cd apache2 && $(MAKE) $(MAKEDEFS) install; \
fi; \
if test "$(APACHE_VERSION_1_3)" = "true"; then \
echo "*** INFO: Installing mod_suphp for Apache 1.3 ***"; \
- $(MAKE) $(MAKEDEFS) -C apache install; \
+ cd apache && $(MAKE) $(MAKEDEFS) install; \
fi; \
else \
echo "*** WARNING: No 'apxs' found. Skipping installation of mod_suphp! ***"; \
@@ -66,9 +67,9 @@
clean:
$(RM) suphp *.o
- @$(MAKE) $(MAKEDEFS) -C apache clean
- @$(MAKE) $(MAKEDEFS) -C apache2 clean
+ cd apache && $(MAKE) $(MAKEDEFS) clean
+ cd apache2 && $(MAKE) $(MAKEDEFS) clean
-%.o : %.c
+${OBJS}: ${SRCS}
$(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ $<
=== END ===
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list