1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 112800 2013-11-01 19:14:17Z ryandesign@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name tomcat-native |
---|
7 | version 1.1.30 |
---|
8 | categories java www |
---|
9 | maintainers nomaintainer |
---|
10 | license Apache-2 |
---|
11 | platforms darwin |
---|
12 | |
---|
13 | description Tomcat 5 HTTP Server native library support. |
---|
14 | long_description This port provides access to native apr and other \ |
---|
15 | functions utilized by tomcat. |
---|
16 | |
---|
17 | homepage http://tomcat.apache.org/ |
---|
18 | master_sites apache:tomcat/tomcat-connectors/native/${version}/source/ |
---|
19 | |
---|
20 | checksums rmd160 eb550cd88a4cda09f7043ecd949e56f5a4b958a7 \ |
---|
21 | sha256 0842c2a14163e2c16b8140d1855701bc3d7daba493d0193ec1bba0aa49aa8c11 |
---|
22 | |
---|
23 | distname ${name}-${version}-src |
---|
24 | worksrcdir ${distname}/jni/native |
---|
25 | |
---|
26 | depends_lib port:apr \ |
---|
27 | port:openssl |
---|
28 | |
---|
29 | configure.args --with-apr=${prefix} \ |
---|
30 | --with-ssl=${prefix} \ |
---|
31 | --with-java-platform=2 |
---|
32 | |
---|
33 | if {[info exists env(JAVA_HOME)]} { |
---|
34 | configure.args-append --with-java-home="$env(JAVA_HOME)" |
---|
35 | } else { |
---|
36 | configure.args-append --with-java-home="/System/Library/Frameworks/JavaVM.framework" |
---|
37 | } |
---|
38 | |
---|
39 | build.args EXTRA_LDFLAGS="-shrext .jnilib" |
---|
40 | |
---|
41 | notes " |
---|
42 | To integrate this into tomcat, add something like |
---|
43 | -Djava.library.path=${prefix} to the tomcat options. |
---|
44 | |
---|
45 | You then need to configure a Connector in server.xml |
---|
46 | with the appropriate apr protocol class for your use, |
---|
47 | for instance: |
---|
48 | protocol=\"org.apache.coyote.http11.Http11AprProtocol\", |
---|
49 | protocol=\"org.apache.coyote.ajp.AjpAprProtocol\" |
---|
50 | |
---|
51 | As in: |
---|
52 | <!-- Define a non-SSL HTTP/1.1 Connector on port 8081 using apr --> |
---|
53 | <Connector port=\"8081\" maxHttpHeaderSize=\"8192\" |
---|
54 | maxThreads=\"150\" minSpareThreads=\"25\" maxSpareThreads=\"75\" |
---|
55 | enableLookups=\"false\" redirectPort=\"8443\" acceptCount=\"100\" |
---|
56 | connectionTimeout=\"20000\" disableUploadTimeout=\"true\" protocol=\"org.apache.coyote.http11.Http11AprProtocol\" /> |
---|
57 | " |
---|
58 | |
---|
59 | livecheck.type regex |
---|
60 | livecheck.url http://archive.apache.org/dist/tomcat/tomcat-connectors/native/ |
---|
61 | livecheck.regex {(\d+\.\d+\.\d+)/} |
---|