/[gentoo-x86]/eclass/php-common-r1.eclass
Gentoo

Diff of /eclass/php-common-r1.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.2 Revision 1.3
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.2 2005/09/18 12:57:22 hollow Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/php-common-r1.eclass,v 1.3 2005/10/31 14:08:42 chtekk Exp $
4 4
5# ######################################################################## 5# ########################################################################
6# 6#
7# eclass/php-common-r1.eclass 7# eclass/php-common-r1.eclass
8# Contains common functions which are shared between the 8# Contains common functions which are shared between the
92 die "Kaffe JVM not supported" 92 die "Kaffe JVM not supported"
93 fi 93 fi
94 94
95 JDKVER=$(java-config --java-version 2>&1 | awk '/^java version/ { print $3 }' | xargs ) 95 JDKVER=$(java-config --java-version 2>&1 | awk '/^java version/ { print $3 }' | xargs )
96 einfo "Active JDK version: ${JDKVER}" 96 einfo "Active JDK version: ${JDKVER}"
97 case ${JDKVER} in 97 case "${JDKVER}" in
98 1.4.*) ;; 98 1.4.*) ;;
99 1.5.*) ewarn "Java 1.5 is NOT supported at this time, and might not work." ;; 99 1.5.*) ewarn "Java 1.5 is NOT supported at this time, and might not work." ;;
100 *) eerror "A Java 1.4 JDK is required for Java support in PHP." ; die ;; 100 *) eerror "A Java 1.4 JDK is required for Java support in PHP." ; die ;;
101 esac 101 esac
102} 102}
113 doins ext/java/php_java.jar 113 doins ext/java/php_java.jar
114 114
115 einfo "Installing Java test page" 115 einfo "Installing Java test page"
116 newins ext/java/except.php java-test.php 116 newins ext/java/except.php java-test.php
117 117
118 JAVA_LIBRARY="`grep -- '-DJAVALIB' Makefile | sed -e 's,.\+-DJAVALIB=\"\([^"]*\)\".*$,\1,g;'| sort | uniq `"
119 sed -e "s|;java.library .*$|java.library = ${JAVA_LIBRARY}|g" -i ${phpinisrc}
120 sed -e "s|;java.class.path .*$|java.class.path = ${PHPEXTDIR}/php_java.jar|g" -i ${phpinisrc}
121 sed -e "s|;java.library.path .*$|java.library.path = ${PHPEXTDIR}|g" -i ${phpinisrc}
122 sed -e "s|;extension=php_java.dll.*$|extension = java.so|g" -i ${phpinisrc}
123
124 einfo "Installing Java extension for PHP" 118 einfo "Installing Java extension for PHP"
125 doins modules/java.so 119 doins modules/java.so
126 120
127 dosym ${PHPEXTDIR}/java.so ${PHPEXTDIR}/libphp_java.so 121 dosym ${PHPEXTDIR}/java.so ${PHPEXTDIR}/libphp_java.so
122}
123
124php_install_java_inifile() {
125 JAVA_LIBRARY="`grep -- '-DJAVALIB' Makefile | sed -e 's,.\+-DJAVALIB=\"\([^"]*\)\".*$,\1,g;'| sort | uniq `"
126
127 echo "extension = java.so" >> "${D}/${PHP_EXT_INI_DIR}/java.ini"
128 echo "java.library = ${JAVA_LIBRARY}" >> "${D}/${PHP_EXT_INI_DIR}/java.ini"
129 echo "java.class.path = ${PHPEXTDIR}/php_java.jar" >> "${D}/${PHP_EXT_INI_DIR}/java.ini"
130 echo "java.library.path = ${PHPEXTDIR}" >> "${D}/${PHP_EXT_INI_DIR}/java.ini"
131
132 dosym "${PHP_EXT_INI_DIR}/java.ini" "${PHP_EXT_INI_DIR_ACTIVE}/java.ini"
128} 133}
129 134
130# ######################################################################## 135# ########################################################################
131# MTA SUPPORT 136# MTA SUPPORT
132# ######################################################################## 137# ########################################################################

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.20