source: trunk/dports/www/apache20/Portfile

Last change on this file was 146517, checked in by raimue@…, 21 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.4 KB
Line 
1# $Id: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
2
3# Besides having a Port for the Apache 2.0.x line, this Port was built
4# to allow Apache 2.x.y on Mac OS X 10.3 to serve PHP Zend encoded
5# files using the Zend Optimizer.  The Zend Optimizer is distributed
6# only in binary form as an Apache module that enables the server to
7# serve optimized and obfuscated PHP code from third party vendors.
8# Since the Optimizer is a binary module, it must run in a binary
9# compatible OS and Apache environment.
10#
11# While newer versions of the Zend Optimizer do work with Apache
12# 2.2.x, it appears that these binary modules are compiled on 10.4 and
13# trying to load the module into Apache on 10.3 results in missing
14# symbol errors.  When older versions of the Zend Optimizer that work
15# on 10.3 are loaded into Apache 2.2.x, then the error_log will have
16# messages about double free memory errors.  So the only combination
17# that works on 10.3 is with Apache 2.0.x.
18
19PortSystem 1.0
20
21name             apache20
22version          2.0.65
23revision         1
24categories       www
25license          Apache-2
26maintainers      blair
27description      The extremely popular second version of the Apache http \
28                        server
29long_description Apache is an HTTP server designed as a plug-in replacement \
30                        for the NCSA server version 1.3 (or 1.4).  It fixes \
31                        numerous bugs in the NCSA server and includes many \
32                        frequently requested new features, and has an API \
33                        which allows it to be extended to meet users' needs \
34                        more easily.  This Portfile is not the latest version \
35                        of the Apache web server, see the apache2 port.  \
36                        Besides having a Port for the Apache 2.0.x line, this \
37                        Port was built to allow Apache 2.x.y on Mac OS X 10.3 \
38                        to serve PHP Zend encoded files using the Zend \
39                        Optimizer.  The Zend Optimizer is distributed only in \
40                        binary form as an Apache module that enables the \
41                        server to serve optimized and obfuscated PHP code \
42                        from third party vendors.   Since the Optimizer is a \
43                        binary module, it must run in a binary compatible OS \
44                        and Apache environment.   While newer versions of the \
45                        Zend Optimizer do work with Apache 2.2.x, it appears \
46                        that these binary modules are compiled on 10.4 and \
47                        trying to load the module into Apache on 10.3 results \
48                        in missing symbol errors.  When older versions of the \
49                        Zend Optimizer that work on 10.3 are loaded into \
50                        Apache 2.2.x, then the error_log will contain \
51                        messages about double free memory errors.  So the \
52                        only combination that works on 10.3 is with Apache \
53                        2.0.x.
54
55homepage         http://httpd.apache.org/
56platforms        darwin freebsd openbsd
57
58master_sites     apache:httpd
59distname         httpd-${version}
60use_bzip2        yes
61
62checksums        md5    e3c47076885cfb60ba08e79aba83a416 \
63                 sha1   0183866df73c7877ba9275a075a2ece7a67f6c95 \
64                 sha256 811d17169961012bf0faf10b9fe07353078eb0e0d824fc9fa0470e21c3277560
65
66depends_lib      port:apr0 \
67                 port:apr-util0 \
68                 port:expat \
69                 path:lib/libssl.dylib:openssl \
70                 port:pcre \
71                 port:perl5 \
72                 port:zlib
73
74patchfiles       patch-httpd-std.conf.in \
75                 patch-docs-cgi-examples-printenv.diff \
76                 patch-openssl-1.0.0.diff
77
78platform darwin {
79        post-patch {
80                reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/docs/cgi-examples/printenv
81                # Customize userdir naming to match darwin
82                reinplace "s|/home/|/Users/|g" ${worksrcpath}/docs/conf/httpd-std.conf.in
83                reinplace "s|public_html|Sites|g" ${worksrcpath}/docs/conf/httpd-std.conf.in
84        }
85}
86
87configure.pre_args --prefix=${prefix}/${name}
88configure.args     --with-apr=${prefix}/bin/apr-config \
89                   --with-apr-util=${prefix}/bin/apu-config \
90                   --libdir=${prefix}/lib \
91                   --with-pcre=${prefix} \
92                   --with-z=${prefix} \
93                   --mandir=${prefix}/share/man \
94                   --enable-mods-shared=all \
95                   --enable-ssl \
96                   --with-ssl=${prefix} \
97                   --enable-cache \
98                   --enable-disk_cache \
99                   --enable-file_cache \
100                   --enable-mem_cache \
101                   --enable-deflate \
102                   --enable-proxy \
103                   --enable-proxy-connect \
104                   --enable-proxy-http \
105                   --enable-proxy-ftp
106
107post-configure {
108        # Setting DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH
109        # avoids issues with library collisions (bug #3013)
110        reinplace "s|DYLD_LIBRARY_PATH|DYLD_FALLBACK_LIBRARY_PATH|g" \
111                ${worksrcpath}/support/envvars-std
112}
113
114destroot.violate_mtree yes
115
116post-destroot {
117        set confDir ${destroot}${prefix}/apache20/conf
118        file rename -force ${confDir}/httpd.conf ${confDir}/httpd.conf.sample
119
120        destroot.keepdirs ${destroot}${prefix}/apache20/logs
121
122        # fix libtool path
123        reinplace "s|/apache20/build/libtool|/share/apr-0/build/libtool|g" \
124                ${destroot}${prefix}/apache20/build/config_vars.mk
125
126        set mandir ${destroot}${prefix}/share/man/man1
127        file rename -force ${mandir}/dbmmanage.1 ${mandir}/dbmmanage20.1
128        file rename -force ${mandir}/htdbm.1 ${mandir}/htdbm20.1
129        file rename -force ${mandir}/htdigest.1 ${mandir}/htdigest20.1
130        file rename -force ${mandir}/htpasswd.1 ${mandir}/htpasswd20.1
131
132        set mandir ${destroot}${prefix}/share/man/man8
133        file rename -force ${mandir}/ab.8 ${mandir}/ab20.8
134        file rename -force ${mandir}/apachectl.8 ${mandir}/apachectl20.8
135        file rename -force ${mandir}/apxs.8 ${mandir}/apxs20.8
136        file rename -force ${mandir}/httpd.8 ${mandir}/httpd20.8
137        file rename -force ${mandir}/logresolve.8 ${mandir}/logresolve20.8
138        file rename -force ${mandir}/rotatelogs.8 ${mandir}/rotatelog20.8
139        file rename -force ${mandir}/suexec.8 ${mandir}/suexec20.8
140}
141
142platform openbsd {
143        build.env-append "LD_LIBRARY_PATH=${prefix}/lib"
144}
145
146variant openldap description {Enable LDAP support through OpenLDAP} {
147        configure.args-append --enable-ldap --enable-authnz-ldap
148        depends_lib-append port:openldap
149        pre-configure {
150                if {-1 == [string first -lldap [exec ${prefix}/bin/apu-config --libs]]} {
151                        ui_error "To install ${name} with the +openldap variant, apr-util0 must be installed"
152                        ui_error "with the +openldap variant. Rebuild apr-util0 using:"
153                        ui_error
154                        ui_error "    sudo port upgrade --enforce-variants apr-util0 +openldap"
155                        ui_error
156                        return -code error "incompatible apr-util0 installation"
157                }
158        }
159}
160
161variant preforkmpm conflicts workermpm description {Use prefork MPM} {
162        configure.args-append --with-mpm=prefork
163}
164
165variant workermpm conflicts preforkmpm description {Use worker MPM} {
166        configure.args-append --with-mpm=worker
167}
168
169if {![variant_isset workermpm] && ![variant_isset eventmpm]} {
170        default_variants +preforkmpm
171}
172
173variant no_startupitem description {Do not create a startup item} {
174        startupitem.create      no
175}
176
177startupitem.create      yes
178startupitem.start       \
179"\[ -x ${prefix}/apache20/bin/apachectl \] && ${prefix}/apache20/bin/apachectl start > /dev/null"
180startupitem.stop        \
181"\[ -r ${prefix}/apache20/logs/httpd.pid \] && ${prefix}/apache20/bin/apachectl stop > /dev/null"
182startupitem.restart     \
183"\[ -r ${prefix}/apache20/logs/httpd.pid \] && ${prefix}/apache20/bin/apachectl restart > /dev/null"
184
185notes "
186Apache 2.0 is obsolete. Please update to Apache 2.2 (the apache2 port).\
187For information on how to update your web server configuration, please see\
188http://httpd.apache.org/docs/2.2/upgrading.html
189"
190
191livecheck.type  regex
192livecheck.url   ${homepage}
193livecheck.regex {Apache (2\.0(?:\.\d+)*) Released}
Note: See TracBrowser for help on using the repository browser.