View | Details | Raw Unified | Return to bug 116281
Collapse All | Expand All

(-)suphp/Makefile (-12 / +13 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	suphp
8
PORTNAME=	suphp
9
PORTVERSION=	0.5.2
9
PORTVERSION=	0.6.2
10
PORTREVISION=	2
10
PORTREVISION=	1
11
CATEGORIES=	www
11
CATEGORIES=	www
12
MASTER_SITES=	http://www.suphp.org/download/
12
MASTER_SITES=	http://www.suphp.org/download/
13
13
Lines 24-31 Link Here
24
MIN_UID?=	80
24
MIN_UID?=	80
25
MIN_GID?=	80
25
MIN_GID?=	80
26
WITH_SETID_MODE?=	owner
26
WITH_SETID_MODE?=	owner
27
MYPORTDOCS=	apache/CONFIG apache/INSTALL apache/README apache/LICENSE LICENSE INSTALL README
27
MYPORTDOCS=	apache/CONFIG apache/INSTALL apache/README  CONFIG LICENSE INSTALL README
28
LANG=		en de
28
29
29
30
CONFIGURE_ARGS+=	--with-php=${PHP_PATH} \
30
CONFIGURE_ARGS+=	--with-php=${PHP_PATH} \
31
			--with-logfile=${WITH_LOGFILE} \
31
			--with-logfile=${WITH_LOGFILE} \
Lines 42-47 Link Here
42
#
42
#
43
SUPHP_PATH?=		/bin:/usr/bin
43
SUPHP_PATH?=		/bin:/usr/bin
44
44
45
45
## Available knobs:
46
## Available knobs:
46
##   WITHOUT_CHECKPATH:    disable check if script resides in DOCUMENT_ROOT
47
##   WITHOUT_CHECKPATH:    disable check if script resides in DOCUMENT_ROOT
47
.if defined(WITHOUT_CHECKPATH)
48
.if defined(WITHOUT_CHECKPATH)
Lines 60-85 Link Here
60
61
61
.include <bsd.port.pre.mk>
62
.include <bsd.port.pre.mk>
62
63
64
.if ${APACHE_VERSION} == 20
65
CONFIGURE_ARGS+= --with-apr=${LOCALBASE}/lib/apache2
66
.endif
67
63
show-options:
68
show-options:
64
	@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
69
	@${SED} -ne 's/^##//p' ${.CURDIR}/Makefile
65
70
66
pre-everything:: show-options
71
pre-everything:: show-options
67
	@${DO_NADA}
72
	@${DO_NADA}
68
73
69
post-patch:
70
	@${REINPLACE_CMD} -e 's|%%SUPHP_PATH%%|${SUPHP_PATH}|g' \
71
		${WRKSRC}/src/suphp.c
72
74
73
post-install:
75
post-install:
74
.if !defined(NOPORTDOCS)
76
.if !defined(NOPORTDOCS)
75
	@${MKDIR} ${DOCSDIR}
77
	@${MKDIR} ${DOCSDIR}
76
.for l in ${LANG}
78
	@${MKDIR} ${DOCSDIR}/apache
77
	@${MKDIR} ${DOCSDIR}/${l}/apache
79
.for f in ${MYPORTDOCS}
78
.       for f in ${MYPORTDOCS}
80
	@${CP} -Rfp ${WRKSRC}/doc/${f} ${DOCSDIR}/${f}
79
	@${CP} -Rfp ${WRKSRC}/doc/${l}/${f} ${DOCSDIR}/${l}/${f}
80
.       endfor
81
.endfor
81
.endfor
82
.endif
82
.endif
83
	@${CP} -Rfp ${WRKSRC}/doc/suphp.conf-example ${LOCALBASE}/etc/suphp.conf
83
	@${CAT} ${PKGMESSAGE}
84
	@${CAT} ${PKGMESSAGE}
84
85
85
.include <bsd.port.post.mk>
86
.include <bsd.port.post.mk>
(-)suphp/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (suphp-0.5.2.tar.gz) = 337909e87027af124052baddddbd2994
1
MD5 (suphp-0.6.2.tar.gz) = 06ca9e592a5c6dd3dcb9360c958369c1
2
SHA256 (suphp-0.5.2.tar.gz) = 3da1eced3bdf12caa72716f4b72f47d79eec89a1810015c5bab3705469b162c7
2
SHA256 (suphp-0.6.2.tar.gz) = 1bb9c6af84bb901c8a39611354e49e5bcd79185eb37b02878dc0840facf0ccfc
3
SIZE (suphp-0.5.2.tar.gz) = 104699
3
SIZE (suphp-0.6.2.tar.gz) = 372228
(-)suphp/files/patch-Makefile.in (-9 lines)
Lines 1-9 Link Here
1
--- Makefile.in.orig	Tue Jul 13 02:43:40 2004
2
+++ Makefile.in	Wed Oct 27 23:10:27 2004
3
@@ -17,5 +17,5 @@
4
            srcdir='$(srcdir)'
5
 
6
 all install clean:
7
-	@$(MAKE) $(MAKEDEFS) -C src $@
8
+	cd src && $(MAKE) $(MAKEDEFS) $@
9
 
(-)suphp/files/patch-configure (-11 lines)
Lines 1-11 Link Here
1
--- configure.orig	Thu Mar  2 13:38:36 2006
2
+++ configure	Thu Mar  2 13:39:23 2006
3
@@ -2405,7 +2405,7 @@
4
                     | cut -f2 -d"/" \
5
                     | cut -f1 -d" "`
6
     major_version=`echo $APACHE_VERSION|cut -f1,2 -d.`
7
-    if test "$major_version" = "2.0"; then
8
+    if test "$major_version" = "2.0" -o "$major_version" = "2.2"; then
9
       APACHE_VERSION_2=true
10
       APACHE_VERSION_1_3=false
11
     else
(-)suphp/files/patch-src-suphp.c (-11 lines)
Lines 1-11 Link Here
1
--- src/suphp.c.orig	Tue Jul 13 02:43:41 2004
2
+++ src/suphp.c	Tue May  9 08:59:46 2006
3
@@ -55,7 +55,7 @@
4
  
5
  // Set secure PATH
6
  
7
- suphp_setenv("PATH", "/bin:/usr/bin", 1);
8
+ suphp_setenv("PATH", "%%SUPHP_PATH%%", 1);
9
  
10
  // Check for PHP_CONFIG environment variable
11
  
(-)suphp/files/patch-src::Makefile.in (-62 lines)
Lines 1-62 Link Here
1
--- src/Makefile.in.orig	Tue Jul 13 02:43:41 2004
2
+++ src/Makefile.in	Wed Aug 11 22:02:44 2004
3
@@ -28,37 +28,38 @@
4
 INCLUDES = -I$(top_srcdir)/src
5
 RM = rm -f
6
 
7
+SRCS=   suphp.c filesystem.c check.c error.c log.c compat.c
8
+OBJS=   ${SRCS:.c=.o}
9
+
10
 all: suphp suphp.mod
11
 
12
-suphp: suphp.o filesystem.o check.o error.o log.o compat.o
13
-	$(CC) $(LDFLAGS) $(DEFS) -o suphp \
14
-	 suphp.o filesystem.o check.o error.o log.o compat.o
15
+suphp: ${OBJS}
16
+	$(CC) $(LDFLAGS) $(DEFS) -o suphp ${OBJS}
17
 
18
 suphp.mod:
19
 	@if test "$(APXS)" != "/notfound/"; then \
20
 	  if test "$(APACHE_VERSION_2)" = "true"; then \
21
 	    echo "*** INFO: Building mod_suphp for Apache 2.0 ***"; \
22
-	    $(MAKE) $(MAKEDEFS) -C apache2; \
23
+	    cd apache2 && $(MAKE) $(MAKEDEFS); \
24
 	  fi; \
25
 	  if test "$(APACHE_VERSION_1_3)" = "true"; then \
26
 	    echo "*** INFO: Building mod_suphp for Apache 1.3 ***"; \
27
-	    $(MAKE) $(MAKEDEFS) -C apache; \
28
+	    cd apache && $(MAKE) $(MAKEDEFS); \
29
 	  fi; \
30
 	else \
31
 	  echo "*** WARNING: No 'apxs' found. Skipping mod_suphp! ***"; \
32
 	fi
33
 
34
 install: suphp suphp.mod
35
-	$(INSTALL_PROGRAM) -d $(DESTDIR)$(sbindir)
36
 	$(INSTALL_PROGRAM) -m 4755 suphp $(DESTDIR)$(sbindir)/suphp
37
 	@if test "$(APXS)" != "/notfound/"; then \
38
 	  if test "$(APACHE_VERSION_2)" = "true"; then \
39
 	    echo "*** INFO: Installing mod_suphp for Apache 2.0 ***"; \
40
-	    $(MAKE) $(MAKEDEFS) -C apache2 install; \
41
+	    cd apache2 && $(MAKE) $(MAKEDEFS) install; \
42
 	  fi; \
43
 	  if test "$(APACHE_VERSION_1_3)" = "true"; then \
44
 	    echo "*** INFO: Installing mod_suphp for Apache 1.3 ***"; \
45
-	    $(MAKE) $(MAKEDEFS) -C apache install; \
46
+	    cd apache && $(MAKE) $(MAKEDEFS) install; \
47
 	  fi; \
48
 	else \
49
 	  echo "*** WARNING: No 'apxs' found. Skipping installation of mod_suphp! ***"; \
50
@@ -66,9 +67,9 @@
51
 
52
 clean:
53
 	$(RM) suphp *.o
54
-	@$(MAKE) $(MAKEDEFS) -C apache clean
55
-	@$(MAKE) $(MAKEDEFS) -C apache2 clean
56
+	cd apache && $(MAKE) $(MAKEDEFS) clean
57
+	cd apache2 && $(MAKE) $(MAKEDEFS) clean
58
 
59
-%.o : %.c
60
+${OBJS}: ${SRCS}
61
 	$(CC) -c $(CFLAGS) $(DEFS) $(INCLUDES) -o $@ $<
62
 
(-)suphp/files/patch-src::apache2::mod_suphp.c (-58 lines)
Lines 1-58 Link Here
1
--- src/apache2/mod_suphp.c.orig	Tue Jul 13 04:43:41 2004
2
+++ src/apache2/mod_suphp.c	Thu Mar  2 20:14:04 2006
3
@@ -56,7 +56,7 @@
4
         return -1;
5
        
6
     rv = apr_bucket_read(b, &bucket_data, &bucket_data_len, APR_BLOCK_READ);
7
-    if (!APR_STATUS_IS_SUCCESS(rv) || (bucket_data_len == 0))
8
+    if (!(rv == APR_SUCCESS) || (bucket_data_len == 0))
9
     {
10
         return 0;
11
     }
12
@@ -463,7 +463,13 @@
13
     
14
     if (((rv = apr_procattr_create(&procattr, p)) != APR_SUCCESS)
15
         || ((rv = apr_procattr_io_set(procattr, APR_CHILD_BLOCK, APR_CHILD_BLOCK, APR_CHILD_BLOCK)) != APR_SUCCESS)
16
+
17
+/* XXX: Pending review by both the Apache APR folks, as well as the suPHP folks.  See thread:
18
+ * http://lists.marsching.biz/pipermail/suphp/2004-July/000756.html
19
+ */
20
+/*
21
         || ((rv = apr_procattr_dir_set(procattr, ap_make_dirstr_parent(r->pool, r->filename))) != APR_SUCCESS)
22
+*/
23
     
24
     /* set resource limits */
25
 
26
@@ -524,7 +530,9 @@
27
             return rv;
28
         }
29
         
30
-        APR_BRIGADE_FOREACH(bucket, bb)
31
+ 	for (bucket = APR_BRIGADE_FIRST(bb);
32
+ 	     bucket != APR_BRIGADE_SENTINEL(bb);
33
+ 	     bucket = APR_BUCKET_NEXT(bucket))
34
         {
35
             const char *data;
36
             apr_size_t len;
37
@@ -595,7 +603,9 @@
38
             
39
             const char *buf;
40
             apr_size_t blen;
41
-            APR_BRIGADE_FOREACH(b, bb)
42
+ 	    for (b = APR_BRIGADE_FIRST(bb);
43
+ 		 b != APR_BRIGADE_SENTINEL(bb);
44
+ 		 b = APR_BUCKET_NEXT(b))
45
             {
46
                 if (APR_BUCKET_IS_EOS(b))
47
                     break;
48
@@ -616,7 +626,9 @@
49
             /* empty brigade (script output) */
50
             const char *buf;
51
             apr_size_t blen;
52
-            APR_BRIGADE_FOREACH(b, bb)
53
+ 	    for (b = APR_BRIGADE_FIRST(bb);
54
+ 		 b != APR_BRIGADE_SENTINEL(bb);
55
+ 		 b = APR_BUCKET_NEXT(b))
56
             {
57
                 if (APR_BUCKET_IS_EOS(b))
58
                     break;
(-)suphp/files/patch-src::apache::Makefile.in (-13 lines)
Lines 1-13 Link Here
1
--- src/apache/Makefile.in.orig	Mon Aug 25 11:40:47 2003
2
+++ src/apache/Makefile.in	Mon Aug 25 11:41:02 2003
3
@@ -29,7 +29,9 @@
4
 all: suphp.mod
5
 
6
 suphp.mod: mod_suphp.c
7
-	$(APXS) -c $(DEFS) $(EXTRADEFS) $(INCLUDES) -Wc,"$(CFLAGS)" mod_suphp.c
8
+	@if [ ! -f mod_suphp.o ]; then \
9
+	$(APXS) -c $(DEFS) $(EXTRADEFS) $(INCLUDES) -Wc,"$(CFLAGS)" mod_suphp.c ;\
10
+	fi;
11
 
12
 install: suphp.mod
13
 	$(APXS) -i -a mod_suphp.so
(-)suphp/pkg-plist (-18 / +9 lines)
Lines 1-23 Link Here
1
sbin/suphp
1
sbin/suphp
2
etc/suphp.conf
2
%%APACHEMODDIR%%/mod_suphp.so
3
%%APACHEMODDIR%%/mod_suphp.so
3
@exec %D/sbin/apxs -e -a -n suphp %D/%f
4
@exec %D/sbin/apxs -e -a -n suphp %D/%f
4
@unexec %D/sbin/apxs -e -A -n suphp %D/%f
5
@unexec %D/sbin/apxs -e -A -n suphp %D/%f
5
%%PORTDOCS%%%%DOCSDIR%%/en/INSTALL
6
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
6
%%PORTDOCS%%%%DOCSDIR%%/en/LICENSE
7
%%PORTDOCS%%%%DOCSDIR%%/LICENSE
7
%%PORTDOCS%%%%DOCSDIR%%/en/README
8
%%PORTDOCS%%%%DOCSDIR%%/README
8
%%PORTDOCS%%%%DOCSDIR%%/en/apache/CONFIG
9
%%PORTDOCS%%%%DOCSDIR%%/CONFIG
9
%%PORTDOCS%%%%DOCSDIR%%/en/apache/INSTALL
10
%%PORTDOCS%%%%DOCSDIR%%/apache/CONFIG
10
%%PORTDOCS%%%%DOCSDIR%%/en/apache/LICENSE
11
%%PORTDOCS%%%%DOCSDIR%%/apache/INSTALL
11
%%PORTDOCS%%%%DOCSDIR%%/en/apache/README
12
%%PORTDOCS%%%%DOCSDIR%%/apache/README
12
%%PORTDOCS%%%%DOCSDIR%%/de/INSTALL
13
%%PORTDOCS%%@dirrm %%DOCSDIR%%/apache
13
%%PORTDOCS%%%%DOCSDIR%%/de/LICENSE
14
%%PORTDOCS%%%%DOCSDIR%%/de/README
15
%%PORTDOCS%%%%DOCSDIR%%/de/apache/CONFIG
16
%%PORTDOCS%%%%DOCSDIR%%/de/apache/INSTALL
17
%%PORTDOCS%%%%DOCSDIR%%/de/apache/LICENSE
18
%%PORTDOCS%%%%DOCSDIR%%/de/apache/README
19
%%PORTDOCS%%@dirrm %%DOCSDIR%%/de/apache
20
%%PORTDOCS%%@dirrm %%DOCSDIR%%/en/apache
21
%%PORTDOCS%%@dirrm %%DOCSDIR%%/de
22
%%PORTDOCS%%@dirrm %%DOCSDIR%%/en
23
%%PORTDOCS%%@dirrm %%DOCSDIR%%
14
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 116281