1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-19 19:59:43 +00:00

JK2 is officially deprecated due to lack of developer interest. See

http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html#20041115.1

Upgrading to last released version, 2.0.4.

ports/67839 is fixed, probably also ports/71479.

ports/74622 handles configuration problems; I will not address this PR
fully since the software is deprecated, although I did add some
helping notes, and the port now installs the sample config file.

PR: ports/67839, ports/71479, ports/74622
Approved by: seanc, ade (implicit)
This commit is contained in:
Palle Girgensohn 2005-07-27 01:59:42 +00:00
parent fa6598a416
commit 4efba361e6
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140202
11 changed files with 126 additions and 93 deletions

View File

@ -6,7 +6,7 @@
#
PORTNAME= mod_jk2
PORTVERSION= 2.0.2
PORTVERSION= 2.0.4
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_APACHE_JAKARTA}
MASTER_SITE_SUBDIR= tomcat-connectors/jk2/source
@ -15,18 +15,20 @@ DISTNAME= jakarta-tomcat-connectors-jk2-${PORTVERSION}-src
MAINTAINER?= girgen@FreeBSD.org
COMMENT?= Apache JK2 module for connecting to Tomcat using AJP1X
DEPRECATED= "JK2 is officially unsupported, no further development will take place."
USE_APACHE= yes
USE_GMAKE= YES
USE_LIBTOOL_VER= 13
USE_AUTOCONF_VER= 253
USE_AUTOMAKE_VER= 15
AUTOMAKE_ARGS= --add-missing
GNU_CONFIGURE= YES
CONFIGURE_ARGS+= --with-apxs${APACHE2}=${APXS}
CONFIGURE_ARGS= --with-apxs${APACHE2}=${APXS}
ALL_TARGET= jk2-build-apxs
INSTALL_TARGET= jk2-install-apxs
WRKSRC= ${WRKDIR}/jakarta-tomcat-connectors-jk2-${PORTVERSION}-src/jk/native2
PKGMESSAGE= ${WRKDIR}/.pkg-message
.include <bsd.port.pre.mk>
.if exists(${LOCALBASE}/include/apache2/apr.h)
@ -46,22 +48,26 @@ APACHE2= 2
PLIST_SUB= APACHE2=2
PKGNAMESUFFIX= -apache2
APACHE= apache2
AP_EXT= la
.else
APACHE2=
PLIST_SUB= APACHE2=
AP_EXT= so
APACHE= apache13
BUILD_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/devel/apr:patch
APR_DIR= `cd ${PORTSDIR}/devel/apr && make -V WRKDIR`
APR_VERSION= `cd ${PORTSDIR}/devel/apr && make -V PORTVERSION`
CONFIGURE_ARGS+=--with-apr=${APR_DIR}/apr-${APR_VERSION} \
--with-apr-util=${APR_DIR}/apr-util-${APR_VERSION}
.endif
pre-patch: build-depends
post-patch:
cd ${WRKSRC}; ${ACLOCAL}; ${LIBTOOLIZE}
@ ${SED} "s|/usr/local|${PREFIX}|g" \
< ${MASTERDIR}/pkg-message \
> ${PKGMESSAGE}
do-install:
cd ${WRKSRC}/server/${APACHE} ;\
${GMAKE} -f Makefile.apxs install ;\
${APXS} -e -A -n jk2 mod_jk2.${AP_EXT}
post-install:
${INSTALL_DATA} ${WRKSRC}/../conf/workers2.properties \
${PREFIX}/etc/apache${APACHE2}/workers2.properties.sample
- ${APXS} -e -A -n jk2 mod_jk2.so
${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,2 +1,2 @@
MD5 (jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz) = c75bd11d96324356b0ffaed2b5bf7fc4
SIZE (jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz) = 598529
MD5 (jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz) = 444bef31619f772df1f0b1c50e6ba773
SIZE (jakarta-tomcat-connectors-jk2-2.0.4-src.tar.gz) = 907088

View File

@ -0,0 +1,27 @@
--- Makefile.in~ Wed Mar 24 14:33:15 2004
+++ Makefile.in Thu Sep 9 04:06:21 2004
@@ -8,6 +8,8 @@
clean-apxs: @APR_CLEAN@ jk2-clean-apxs
+install: jk2-install
+
install-apxs: jk2-install-apxs
jk2-build:
@@ -25,6 +27,15 @@
echo "Making $$target in $$i"; \
if test "$$i" != "."; then \
(cd $$i && $(MAKE) -f Makefile.apxs) || exit 1; \
+ fi; \
+ done;
+
+jk2-install:
+ list='@WEBSERVERS@'; \
+ for i in $$list; do \
+ echo "Making $$target in $$i"; \
+ if test "$$i" != "."; then \
+ (cd $$i && $(MAKE) install) || exit 1; \
fi; \
done;

View File

@ -1,14 +0,0 @@
--- server/apache13/Makefile.apxs.in.orig Wed Mar 19 10:21:04 2003
+++ server/apache13/Makefile.apxs.in Wed Jun 18 03:10:02 2003
@@ -18,7 +18,10 @@
all: mod_jk2.so
mod_jk2.so:
- $(APXS) -c -o $@ -Wc,"${JK_INCL} ${APR_CFLAGS} ${APR_LDFLAGS}" "${JAVA_INCL}" mod_jk2.c ${COMMON_C_FILES}
+ $(APXS) -c -o $@ -Wc,"${JK_INCL} ${APR_CFLAGS} ${APR_LDFLAGS}" "${JAVA_INCL}" jk_service_apache13.c mod_jk2.c ${COMMON_C_FILES}
+
+install:
+ $(APXS) -i mod_jk2.so
clean:
rm -f *.o *.so

View File

@ -1,11 +0,0 @@
--- common/jk_mutex_thread.c~ Thu Jul 31 19:30:38 2003
+++ common/jk_mutex_thread.c Wed Sep 10 01:37:29 2003
@@ -159,7 +159,7 @@
}
-#elif defined( _REENTRANT )
+#elif defined( _THREAD_SAFE ) && defined( FREEBSD_THREAD_HACK )
/*-------------------- PThread - @deprecated, use APR if possible -------------------- */
#include <pthread.h>

View File

@ -0,0 +1,55 @@
--- configure.orig Wed Mar 24 14:46:12 2004
+++ configure Wed Jul 27 03:36:21 2005
@@ -20237,15 +20231,15 @@
echo "$as_me:$LINENO: checking for apr APR_LIBNAME" >&5
echo $ECHO_N "checking for apr APR_LIBNAME... $ECHO_C" >&6
- if ${TEST} ! -f "${APR_DIR}/apr-config" ; then
- { { echo "$as_me:$LINENO: error: cannot find apr-config file in ${APR_DIR}" >&5
-echo "$as_me: error: cannot find apr-config file in ${APR_DIR}" >&2;}
+ if ${TEST} ! -f "${APR_DIR}/apr-1-config" ; then
+ { { echo "$as_me:$LINENO: error: cannot find apr-1-config file in ${APR_DIR}" >&5
+echo "$as_me: error: cannot find apr-1-config file in ${APR_DIR}" >&2;}
{ (exit 1); exit 1; }; }
fi
- jk_apr_get_tempval=`${APR_DIR}/apr-config --link-libtool 2> /dev/null`
+ jk_apr_get_tempval=`${APR_DIR}/apr-1-config --link-libtool 2> /dev/null`
if ${TEST} -z "${jk_apr_get_tempval}" ; then
- { { echo "$as_me:$LINENO: error: ${APR_DIR}/apr-config --link-libtool failed" >&5
-echo "$as_me: error: ${APR_DIR}/apr-config --link-libtool failed" >&2;}
+ { { echo "$as_me:$LINENO: error: ${APR_DIR}/apr-1-config --link-libtool failed" >&5
+echo "$as_me: error: ${APR_DIR}/apr-1-config --link-libtool failed" >&2;}
{ (exit 1); exit 1; }; }
fi
jk_apr_get_tempval=`basename ${jk_apr_get_tempval}`
@@ -20384,15 +20378,15 @@
echo "$as_me:$LINENO: checking for apr-util APR_UTIL_LIBNAME" >&5
echo $ECHO_N "checking for apr-util APR_UTIL_LIBNAME... $ECHO_C" >&6
- if ${TEST} ! -f "${APR_UTIL_DIR}/apu-config" ; then
- { { echo "$as_me:$LINENO: error: cannot find apu-config file in ${APR_UTIL_DIR}" >&5
-echo "$as_me: error: cannot find apu-config file in ${APR_UTIL_DIR}" >&2;}
+ if ${TEST} ! -f "${APR_UTIL_DIR}/apu-1-config" ; then
+ { { echo "$as_me:$LINENO: error: cannot find apu-1-config file in ${APR_UTIL_DIR}" >&5
+echo "$as_me: error: cannot find apu-1-config file in ${APR_UTIL_DIR}" >&2;}
{ (exit 1); exit 1; }; }
fi
- jk_apu_get_tempval=`${APR_UTIL_DIR}/apu-config --link-libtool 2> /dev/null`
+ jk_apu_get_tempval=`${APR_UTIL_DIR}/apu-1-config --link-libtool 2> /dev/null`
if ${TEST} -z "${jk_apu_get_tempval}" ; then
- { { echo "$as_me:$LINENO: error: ${APR_UTIL_DIR}/apu-config --link-libtool failed" >&5
-echo "$as_me: error: ${APR_UTIL_DIR}/apu-config --link-libtool failed" >&2;}
+ { { echo "$as_me:$LINENO: error: ${APR_UTIL_DIR}/apu-1-config --link-libtool failed" >&5
+echo "$as_me: error: ${APR_UTIL_DIR}/apu-1-config --link-libtool failed" >&2;}
{ (exit 1); exit 1; }; }
fi
jk_apu_get_tempval=`basename ${jk_apu_get_tempval}`
@@ -20490,7 +20484,7 @@
APR_CLEAN=""
APR_DIR=""
APR_LIBDIR=${tempval}
- APR_LDFLAGS="`apr-config --link-ld` -L${tempval}"
+ APR_LDFLAGS="`apr-1-config --link-ld` -L${tempval}"
COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}"
use_apr=true
fi

View File

@ -1,23 +0,0 @@
The apache mod_jk modules *communicate* with Java using an internet
protocol, AJP13, but they are written in C. I can't come up with any
reason to look for a JDK here, it's plain stupid! Since apache and
tomcat can be run on separate machines, there is no dependency
whatsoever... /Palle
--- configure.in.orig Tue Oct 22 00:00:00 2002
+++ configure.in Thu Feb 26 00:19:35 2004
@@ -184,10 +184,10 @@
dnl Java settings
-JK_JDK()
-JK_JDK_OS()
-JK_JNI()
-JK_PCRE()
+dnl JK_JDK()
+dnl JK_JDK_OS()
+dnl JK_JNI()
+dnl JK_PCRE()
AC_SUBST(JAVA_HOME)
AC_SUBST(JAVA_PLATFORM)

View File

@ -1,20 +0,0 @@
--- include/jk_mutex.h~ Thu Jul 31 19:30:40 2003
+++ include/jk_mutex.h Wed Sep 10 01:33:27 2003
@@ -76,7 +76,7 @@
#include "apr_thread_mutex.h"
#elif defined( WIN32 )
#include <windows.h>
-#elif defined( _REENTRANT )
+#elif defined( _THREAD_SAFE ) && defined ( FREEBSD_THREAD_HACK )
#include <pthread.h>
#endif
@@ -122,7 +122,7 @@
apr_thread_mutex_t *threadMutex;
#elif defined( WIN32 )
CRITICAL_SECTION threadMutex;
-#elif defined( _REENTRANT )
+#elif defined( _THREAD_SAFE ) && defined ( FREEBSD_THREAD_HACK )
pthread_mutex_t threadMutex;
#else
void *threadMutex;

View File

@ -1,4 +1,5 @@
mod_jk2 handles the communication between Tomcat and Apache.
JK2 is a refactoring of JK and is much more powerful.
NOTE: mod_jk2 is deprecated, please use mod_jk instead. See
http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html#20041115.1
for more information.
WWW: http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/aphowto.html
WWW: http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/

View File

@ -1,5 +1,16 @@
*****************************************************************************
Make sure mod_jk.so is enabled in ${PREFIX}/etc/apache2/httpd.conf and
mod_jk is configured. Have a look at
${PREFIX}/etc/apache2/mod_jk.conf.sample for an example.
Make sure mod_jk2.so is enabled in ${PREFIX}/etc/apache2/httpd.conf and
mod_jk2 is configured. You will probably have to add
JkSet config.file /usr/local/etc/apache2/workers2.properties
to you config file and create the workers2.properties file according
to the docs at the web site:
http://jakarta.apache.org/tomcat/connectors-doc-archive/jk2/
Please note that this software is *deprecated*. See
http://jakarta.apache.org/tomcat/connectors-doc/news/20041100.html#20041115.1
for more information.
*****************************************************************************

View File

@ -1,3 +1,4 @@
etc/apache%%APACHE2%%/workers2.properties.sample
libexec/apache%%APACHE2%%/mod_jk2.so
@exec %D/sbin/apxs -e -A -n jk2 %f
@unexec %D/sbin/apxs -e -A -n jk2 %f
@exec %D/sbin/apxs -e -A -n jk2 %f || true
@unexec %D/sbin/apxs -e -A -n jk2 %f || true