-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Portfile
90 lines (75 loc) · 2.77 KB
/
Portfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# $Id: Portfile,v 1.28 2005/10/06 03:00:20 jberry Exp $
PortSystem 1.0
name apache2
version 2.0.54
revision 3
categories www
maintainers james@imajes.info
description The extremely popular second version of the Apache http server
long_description \
Apache is an HTTP server designed as a plug-in replacement for \
the NCSA server version 1.3 (or 1.4). It fixes numerous bugs in \
the NCSA server and includes many frequently requested new \
features, and has an API which allows it to be extended to meet \
users' needs more easily.
homepage http://httpd.apache.org/
platforms darwin freebsd openbsd
master_sites apache:httpd
distname httpd-${version}
checksums md5 4ae8a38c6b5db9046616ce10a0d551a2
use_bzip2 yes
depends_lib lib:libapr.0:apr \
lib:libaprutil.0:apr-util \
lib:libexpat.0:expat \
port:openssl
patchfiles patch-httpd-std.conf.in \
patch-modules-ssl-ssl_engine_vars.c \
patch-modules-ssl-ssl_toolkit_compat.h
platform darwin 7 {
pre-configure {
system "cd ${worksrcpath} && glibtoolize --force"
}
}
configure.pre_args --prefix=${prefix}/${name}
configure.args --with-apr=${prefix}/bin/apr-config \
--with-apr-util=${prefix}/bin/apu-config \
--libdir=${prefix}/lib \
--with-expat=${prefix} \
--mandir=${prefix}/share/man \
--enable-mods-shared=all \
--enable-ssl \
--with-ssl=${prefix} \
--enable-deflate \
--enable-proxy \
--enable-proxy-connect \
--enable-proxy-http \
--enable-proxy-ftp
post-configure {
# Setting DYLD_FALLBACK_LIBRARY_PATH instead of DYLD_LIBRARY_PATH
# avoids issues with library collisions (bug #3013)
reinplace "s|DYLD_LIBRARY_PATH|DYLD_FALLBACK_LIBRARY_PATH|g" \
${worksrcpath}/support/envvars-std
}
post-destroot {
set confDir ${destroot}${prefix}/apache2/conf
file rename -force ${confDir}/httpd.conf ${confDir}/httpd.conf.sample
destroot.keepdirs ${destroot}${prefix}/apache2/logs
# Install startup script.
set rcDir ${destroot}${prefix}/etc/rc.d
set rcFile ${name}.sh
xinstall -m 755 -d ${rcDir}
xinstall -m 755 ${filespath}/${rcFile} ${rcDir}
reinplace "s|@@PREFIX@@|${prefix}|g" ${rcDir}/${rcFile}
# fix libtool path
reinplace "s|/apache2/build/libtool|/share/apr-0/build/libtool|g" \
${destroot}${prefix}/apache2/build/config_vars.mk
}
post-install {
ui_msg ""
ui_msg "In order for apache2 to start on system boot,"
ui_msg "make sure DarwinPortsStartup is installed."
ui_msg ""
}
variant openbsd {
build.env-append "LD_LIBRARY_PATH=${prefix}/lib"
}