Date: Wed, 21 Nov 2001 11:04:15 +0000 From: Rasputin <rasputin@submonkey.net> To: Ernst de Haan <znerd@freebsd.org> Cc: java@freebsd.org Subject: Re: tomcat port (PATCH) Message-ID: <20011121110415.A12931@shikima.mine.nu> In-Reply-To: <200111201351.fAKDpBZ24104@zaphod.euronet.nl>; from znerd@freebsd.org on Tue, Nov 20, 2001 at 02:51:10PM %2B0100 References: <20011119161722.A56021@shikima.mine.nu> <200111200947.fAK9lLU18550@zaphod.euronet.nl> <20011120133906.A82111@shikima.mine.nu> <200111201351.fAKDpBZ24104@zaphod.euronet.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
--1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline How does this look for a patch? It needs a fair bit more work, but at present it: 1] makes a dependency on 'javac' rather than an explicit path - so long as there is a java compiler in your path, it should work. 2] makes files/patch-aa correctly set java_home in workers.properties (dependant on JAVA_HOME; I have a symlink, /usr/java, that I repoint to /usr/local/jdk1,1,8, /usr/local/linux-jdk1.3.1 or whatever other JDK I'm using that day) 3] Makes tomcat.sh rc script correctly read JAVA_HOME (overridable by 'make JAVA_HOME=/usr/local/jdk1.1.8' or whatever) It also has a couple of *really* clanky post-extract targets in the Makefile - I don't know a cleaner way of doing it. I've tried un/reinstalling it , playing around with a JAVA_HOME environment variable set to various things, along with explicitly setting it on the commnad line, and it seems ok - If this looks OK I'll send-pr it. -- "Irrationality is the square root of all evil" -- Douglas Hofstadter Rasputin :: Jack of All Trades - Master of Nuns :: --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="tomcat.patch" --- Makefile.orig Mon Oct 1 22:01:46 2001 +++ Makefile Wed Nov 21 10:30:14 2001 @@ -14,15 +14,24 @@ MAINTAINER= dirk@FreeBSD.org BUILD_DEPENDS= pinstall:${PORTSDIR}/devel/pinstall -RUN_DEPENDS= ${LOCALBASE}/jdk1.1.8/bin/javac:${PORTSDIR}/java/jdk +RUN_DEPENDS= javac:${PORTSDIR}/java/jdk NO_BUILD= yes +# should be changed/detected/whatever the group decides to do with it. +JAVA_HOME?= /usr/java + +post-extract: + @${SED} "s|%%JHOME%%|${JAVA_HOME}|g" < ${FILESDIR}/patch-aa > ${FILESDIR}/patch-tmp + @${MV} ${FILESDIR}/patch-tmp ${FILESDIR}/patch-aa + do-install: @/usr/bin/perl -i -pe "s|%%PREFIX%%|${PREFIX}|g" ${WRKSRC}/conf/workers.properties @${LN} -fs ${WRKSRC} ${WRKDIR}/tomcat @pinstall -v -d ${WRKDIR} - @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/tomcat.sh > ${WRKDIR}/tomcat.sh + @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/tomcat.sh > ${FILESDIR}/tomcat.tmp + @${SED} "s|%%JHOME%%|${JAVA_HOME}|g" < ${FILESDIR}/tomcat.tmp > ${WRKDIR}/tomcat.sh + @${RM} ${FILESDIR}/tomcat.tmp @${INSTALL_SCRIPT} ${WRKDIR}/tomcat.sh /usr/local/etc/rc.d post-install: --- files/tomcat.sh.orig Wed Nov 21 10:29:54 2001 +++ files/tomcat.sh Wed Nov 21 10:31:20 2001 @@ -1,6 +1,6 @@ #!/bin/sh -JAVA_HOME=%%PREFIX%%/jdk1.1.8 +JAVA_HOME=%%JHOME%% export JAVA_HOME TOMCAT_HOME=%%PREFIX%%/tomcat export TOMCAT_HOME --- files/patch-aa.orig Wed Nov 21 10:29:45 2001 +++ files/patch-aa Wed Nov 21 10:31:57 2001 @@ -12,7 +12,7 @@ # you should have a bin and lib directories beneath it. # -workers.java_home=c:\jdk1.2.2 -+workers.java_home=%%PREFIX%%/jdk1.1.8 ++workers.java_home=/usr/java # # You should configure your environment slash... ps=\ on NT and / on UNIX --1yeeQ81UyVL57Vl7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011121110415.A12931>