summaryrefslogtreecommitdiffstats
path: root/ports-mgmt/portmk
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2007-02-28 22:47:05 +0000
committerlinimon <linimon@FreeBSD.org>2007-02-28 22:47:05 +0000
commit0750e7d8658c35d64997648920712b6a2a893aad (patch)
treed5372ebbbc344aa8a9d65e860305c16986280919 /ports-mgmt/portmk
parentaf3a5bf84153279adc749323d98dd7c92816e7ed (diff)
downloadFreeBSD-ports-0750e7d8658c35d64997648920712b6a2a893aad.zip
FreeBSD-ports-0750e7d8658c35d64997648920712b6a2a893aad.tar.gz
Bring these up to the versions currently being tested on i386-5-exp.
Diffstat (limited to 'ports-mgmt/portmk')
-rw-r--r--ports-mgmt/portmk/Mk/bsd.java.mk538
-rw-r--r--ports-mgmt/portmk/Mk/bsd.php.mk347
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.mk122
-rw-r--r--ports-mgmt/portmk/Mk/bsd.port.subdir.mk2
4 files changed, 894 insertions, 115 deletions
diff --git a/ports-mgmt/portmk/Mk/bsd.java.mk b/ports-mgmt/portmk/Mk/bsd.java.mk
new file mode 100644
index 0000000..0bd2a16
--- /dev/null
+++ b/ports-mgmt/portmk/Mk/bsd.java.mk
@@ -0,0 +1,538 @@
+#-*- mode: Fundamental; tab-width: 4; -*-
+# ex:ts=4
+#
+# bsd.java.mk - Support for Java-based ports.
+#
+# Created by: Ernst de Haan <znerd@FreeBSD.org>
+#
+# For FreeBSD committers:
+# Please send all suggested changes to the maintainer instead of committing
+# them to CVS yourself.
+#
+# $FreeBSD$
+#
+
+.if !defined(Java_Include)
+
+Java_Include= bsd.java.mk
+Java_Include_MAINTAINER= glewis@FreeBSD.org hq@FreeBSD.org
+
+#-------------------------------------------------------------------------------
+# Variables that each port can define:
+#
+# USE_JAVA Should be defined to the remaining variables to have any
+# effect
+#
+# JAVA_VERSION List of space-separated suitable java versions for the
+# port. An optional "+" allows you to specify a range of
+# versions. (allowed values: 1.1[+] 1.2[+] 1.3[+] 1.4[+])
+#
+# JAVA_OS List of space-separated suitable JDK port operating systems
+# for the port. (allowed values: native linux)
+#
+# JAVA_VENDOR List of space-separated suitable JDK port vendors for the
+# port. (allowed values: freebsd bsdjava sun blackdown)
+#
+# JAVA_BUILD When set, it means that the selected JDK port should be
+# added to build dependencies for the port.
+#
+# JAVA_RUN This variable works exactly the same as JAVA_BUILD but
+# regarding run dependencies.
+#
+# USE_JIKES Whether the port should or should not use jikes(1) to build.
+# See Stage 6 header for further detail.
+#
+# USE_ANT Should be defined when the port uses Apache Ant. Ant is thus
+# considered to be the sub-make command. When no 'do-build'
+# target is defined by the port, a default one will be set
+# that simply runs Ant according to MAKE_ENV, MAKE_ARGS and
+# ALL_TARGET. Read the documentation in bsd.port.mk for more
+# information.
+#
+#-------------------------------------------------------------------------------
+# Variables defined for the port:
+#
+# JAVA_PORT The name of the JDK port. (e.g. 'java/jdk14')
+#
+# JAVA_PORT_VERSION The version of the JDK port. (e.g. '1.4')
+#
+# JAVA_PORT_OS The operating system used by the JDK port. (e.g. 'linux')
+#
+# JAVA_PORT_VENDOR The vendor of the JDK port. (e.g. 'sun')
+#
+# JAVA_PORT_OS_DESCRIPTION Description of the operating system used by the
+# JDK port. (e.g. 'Linux')
+#
+# JAVA_PORT_VENDOR_DESCRIPTION Description of the vendor of the JDK port.
+# (e.g. 'FreeBSD Foundation')
+#
+# JAVA_HOME Path to the installation directory of the JDK. (e.g.
+# '/usr/local/jdk1.3.1')
+#
+# JAVAC Path to the Java compiler to use. (e.g.
+# '/usr/local/jdk1.1.8/bin/javac' or '/usr/local/bin/jikes')
+#
+# JAR Path to the JAR tool to use. (e.g.
+# '/usr/local/jdk1.2.2/bin/jar' or '/usr/local/bin/fastjar')
+#
+# APPLETVIEWER Path to the appletviewer utility. (e.g.
+# '/usr/local/linux-jdk1.2.2/bin/appletviewer')
+#
+# JAVA Path to the java executable. Use this for executing Java
+# programs. (e.g. '/usr/local/jdk1.3.1/bin/java')
+#
+# JAVADOC Path to the javadoc utility program.
+#
+# JAVAH Path to the javah program.
+#
+# JAVAP Path to the javap program.
+#
+# JAVA_KEYTOOL Path to the keytool utility program. This settings is
+# availble only if the JDK is Java 1.2 or higher.
+#
+# JAVA_N2A Path to the native2ascii tool.
+#
+# JAVA_POLICYTOOL Path to the policytool program. This variable is available
+# only if the JDK is Java 1.2 or higher.
+#
+# JAVA_SERIALVER Path to the serialver utility program.
+#
+# RMIC Path to the RMI stub/skeleton generator, rmic.
+#
+# RMIREGISTRY Path to the RMI registry program, rmiregistry.
+#
+# RMID Path to the RMI daemon program. This settings is only
+# available if the JDK is Java 1.2 or higher.
+#
+# JAVA_CLASSES Path to the archive that contains the JDK class files. On
+# JDK 1.2 or later, this is ${JAVA_HOME}/jre/lib/rt.jar.
+# Earlier JDK's use ${JAVA_HOME}/lib/classes.zip.
+#
+# JAVASHAREDIR The base directory for all shared Java resources.
+#
+# JAVAJARDIR The directory where a port should install JAR files.
+#
+# JAVALIBDIR The directory where JAR files installed by other ports
+# are located.
+#
+# HAVE_JIKES Defined and set to "yes" whenever the port will effectively
+# use Jikes. See stage 6 header for further detail.
+#
+#-------------------------------------------------------------------------------
+# Porter's hints
+#
+# To retrieve the Major version number from JAVA_PORT_VERSION (e.g. "1.3"):
+# -> ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}
+#
+#-------------------------------------------------------------------------------
+# There are the following stages:
+#
+# Stage 1: Define constants
+# Stage 2: Determine which JDK ports are installed and which JDK ports are
+# suitable
+# Stage 3: Decide the exact JDK to use (or install)
+# Stage 4: Add any dependencies if necessary
+# Stage 5: Define all settings for the port to use
+#
+
+. if defined(USE_JAVA)
+
+
+#-------------------------------------------------------------------------------
+# Stage 1: Define constants
+#
+
+# System-global directories
+# NB: If the value of JAVALIBDIR is altered here it must also be altered
+# in java/javavmwrapper/Makefile.
+JAVASHAREDIR?= ${PREFIX}/share/java
+JAVAJARDIR?= ${JAVASHAREDIR}/classes
+JAVALIBDIR?= ${LOCALBASE}/share/java/classes
+
+# Add appropriate substitutions to PLIST_SUB and LIST_SUB
+PLIST_SUB+= JAVASHAREDIR="${JAVASHAREDIR:S,^${PREFIX}/,,}" \
+ JAVAJARDIR="${JAVAJARDIR:S,^${PREFIX}/,,}"
+SUB_LIST+= JAVASHAREDIR="${JAVASHAREDIR}" \
+ JAVAJARDIR="${JAVAJARDIR}" \
+ JAVALIBDIR="${JAVALIBDIR}"
+. if defined(JAVA_VERSION)
+SUB_LIST+= JAVA_VERSION="${JAVA_VERSION}"
+. endif
+. if defined(JAVA_VENDOR)
+SUB_LIST+= JAVA_VENDOR="${JAVA_VENDOR}"
+. endif
+. if defined(JAVA_OS)
+SUB_LIST+= JAVA_OS="${JAVA_OS}"
+. endif
+
+# The complete list of Java versions, os and vendors supported.
+__JAVA_VERSION_LIST= 1.1 1.2 1.3 1.4 1.5
+_JAVA_VERSION_LIST= ${__JAVA_VERSION_LIST} ${__JAVA_VERSION_LIST:S/$/+/}
+_JAVA_OS_LIST= native linux
+_JAVA_VENDOR_LIST= freebsd bsdjava sun blackdown
+
+# Set all meta-information about JDK ports:
+# port location, corresponding JAVA_HOME, JDK version, OS, vendor
+_JAVA_PORT_NATIVE_FREEBSD_JDK_1_5_INFO= PORT=java/diablo-jdk15 HOME=${LOCALBASE}/diablo-jdk1.5.0 \
+ VERSION=1.5.0 OS=native VENDOR=freebsd
+_JAVA_PORT_NATIVE_BSDJAVA_JDK_1_1_INFO= PORT=java/jdk11 HOME=${LOCALBASE}/jdk1.1.8 \
+ VERSION=1.1.8 OS=native VENDOR=bsdjava
+_JAVA_PORT_NATIVE_BSDJAVA_JDK_1_2_INFO= PORT=java/jdk12 HOME=${LOCALBASE}/jdk1.2.2 \
+ VERSION=1.2.2 OS=native VENDOR=bsdjava
+_JAVA_PORT_NATIVE_BSDJAVA_JDK_1_3_INFO= PORT=java/jdk13 HOME=${LOCALBASE}/jdk1.3.1 \
+ VERSION=1.3.1 OS=native VENDOR=bsdjava
+_JAVA_PORT_NATIVE_BSDJAVA_JDK_1_4_INFO= PORT=java/jdk14 HOME=${LOCALBASE}/jdk1.4.2 \
+ VERSION=1.4.2 OS=native VENDOR=bsdjava
+_JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5_INFO= PORT=java/jdk15 HOME=${LOCALBASE}/jdk1.5.0 \
+ VERSION=1.5.0 OS=native VENDOR=bsdjava
+_JAVA_PORT_LINUX_BLACKDOWN_JDK_1_2_INFO= PORT=java/linux-blackdown-jdk12 HOME=${LOCALBASE}/linux-blackdown-jdk1.2.2 \
+ VERSION=1.2.2 OS=linux VENDOR=blackdown
+_JAVA_PORT_LINUX_BLACKDOWN_JDK_1_3_INFO= PORT=java/linux-blackdown-jdk13 HOME=${LOCALBASE}/linux-blackdown-jdk1.3.1 \
+ VERSION=1.3.1 OS=linux VENDOR=blackdown
+_JAVA_PORT_LINUX_BLACKDOWN_JDK_1_4_INFO= PORT=java/linux-blackdown-jdk14 HOME=${LOCALBASE}/linux-blackdown-jdk1.4.2 \
+ VERSION=1.4.2 OS=linux VENDOR=blackdown
+_JAVA_PORT_LINUX_SUN_JDK_1_2_INFO= PORT=java/linux-sun-jdk12 HOME=${LOCALBASE}/linux-sun-jdk1.2.2 \
+ VERSION=1.2.2 OS=linux VENDOR=sun
+_JAVA_PORT_LINUX_SUN_JDK_1_3_INFO= PORT=java/linux-sun-jdk13 HOME=${LOCALBASE}/linux-sun-jdk1.3.1 \
+ VERSION=1.3.1 OS=linux VENDOR=sun
+_JAVA_PORT_LINUX_SUN_JDK_1_4_INFO= PORT=java/linux-sun-jdk14 HOME=${LOCALBASE}/linux-sun-jdk1.4.2 \
+ VERSION=1.4.2 OS=linux VENDOR=sun
+_JAVA_PORT_LINUX_SUN_JDK_1_5_INFO= PORT=java/linux-sun-jdk15 HOME=${LOCALBASE}/linux-sun-jdk1.5.0 \
+ VERSION=1.5.0 OS=linux VENDOR=sun
+
+# Verbose description for each VENDOR
+_JAVA_VENDOR_freebsd= "FreeBSD Foundation"
+_JAVA_VENDOR_bsdjava= "BSD Java Porting Team"
+_JAVA_VENDOR_blackdown= Blackdown
+_JAVA_VENDOR_sun= Sun
+
+# Verbose description for each OS
+_JAVA_OS_native= Native
+_JAVA_OS_linux= Linux
+
+# Enforce preferred Java ports according to OS
+. if (${ARCH} == "amd64" && ${OSVERSION} >= 600000 && ${OSVERSION} < 700000) || \
+ (${ARCH} == "i386" && ${OSVERSION} >= 500000 && ${OSVERSION} < 700000)
+_JAVA_PREFERRED_PORTS+= JAVA_PORT_NATIVE_FREEBSD_JDK_1_5
+. else
+_JAVA_PREFERRED_PORTS+= JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5
+. endif
+
+# List all JDK ports
+__JAVA_PORTS_ALL= JAVA_PORT_NATIVE_FREEBSD_JDK_1_5 \
+ JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5 \
+ JAVA_PORT_NATIVE_BSDJAVA_JDK_1_4 \
+ JAVA_PORT_NATIVE_BSDJAVA_JDK_1_3 \
+ JAVA_PORT_NATIVE_BSDJAVA_JDK_1_2 \
+ JAVA_PORT_NATIVE_BSDJAVA_JDK_1_1 \
+ JAVA_PORT_LINUX_SUN_JDK_1_5 \
+ JAVA_PORT_LINUX_SUN_JDK_1_4 \
+ JAVA_PORT_LINUX_SUN_JDK_1_3 \
+ JAVA_PORT_LINUX_SUN_JDK_1_2 \
+ JAVA_PORT_LINUX_BLACKDOWN_JDK_1_4 \
+ JAVA_PORT_LINUX_BLACKDOWN_JDK_1_3 \
+ JAVA_PORT_LINUX_BLACKDOWN_JDK_1_2
+_JAVA_PORTS_ALL= ${JAVA_PREFERRED_PORTS} \
+ ${_JAVA_PREFERRED_PORTS} \
+ ${__JAVA_PORTS_ALL}
+
+# Set the name of the file that indicates that a JDK is indeed installed, as a
+# relative path within the JAVA_HOME directory.
+_JDK_FILE=bin/javac
+
+# Set the path to Jikes and define the Jikes dependency
+_JIKES_PATH= ${LOCALBASE}/bin/jikes
+DEPEND_JIKES= ${_JIKES_PATH}:${PORTSDIR}/java/jikes
+
+
+#-------------------------------------------------------------------------------
+# Stage 2: Determine which JDK ports are suitable and which JDK ports are
+# suitable
+#
+
+# From here, the port is using bsd.java.mk v2.0
+
+# Error checking: defined JAVA_{HOME,PORT,PORT_VERSION,PORT_VENDOR,PORT_OS}
+. for variable in JAVA_HOME JAVA_PORT JAVA_PORT_VERSION JAVA_PORT_VENDOR JAVA_PORT_OS
+. if defined(${variable})
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Environment error: \"${variable}\" should not be defined."
+ @${FALSE}
+. endif
+. endfor
+
+# Error checking: JAVA_VERSION
+_JAVA_VERSION_LIST_REGEXP!= ${ECHO_CMD} "${_JAVA_VERSION_LIST}" | ${SED} "s/ /\\\|/g"
+_ERROR_CHECKING_JAVA_VERSION!= ${ECHO_CMD} "${JAVA_VERSION}" | ${TR} " " "\n" \
+ | ${GREP} -v "${_JAVA_VERSION_LIST_REGEXP}" || true
+. if (${_ERROR_CHECKING_JAVA_VERSION} != "")
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VERSION}\" is not a valid value for JAVA_VERSION. It should be one or more of: ${__JAVA_VERSION_LIST} (with an optional \"+\" suffix.)";
+ @${FALSE}
+. endif
+
+# Error checking: JAVA_VENDOR
+_JAVA_VENDOR_LIST_REGEXP!= ${ECHO_CMD} "${_JAVA_VENDOR_LIST}" | ${SED} "s/ /\\\|/g"
+_ERROR_CHECKING_JAVA_VENDOR!= ${ECHO_CMD} "${JAVA_VENDOR}" | ${TR} " " "\n" \
+ | ${GREP} -v "${_JAVA_VENDOR_LIST_REGEXP}" || true
+. if (${_ERROR_CHECKING_JAVA_VENDOR} != "")
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_VENDOR}\" is not a valid value for JAVA_VENDOR. It should be one or more of: ${_JAVA_VENDOR_LIST}";
+ @${FALSE}
+. endif
+
+# Error checking: JAVA_OS
+_JAVA_OS_LIST_REGEXP!= ${ECHO_CMD} "${_JAVA_OS_LIST}" | ${SED} "s/ /\\\|/g"
+_ERROR_CHECKING_JAVA_OS!= ${ECHO_CMD} "${JAVA_OS}" | ${TR} " " "\n" \
+ | ${GREP} -v "${_JAVA_OS_LIST_REGEXP}" || true
+. if (${_ERROR_CHECKING_JAVA_OS} != "")
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Makefile error: \"${JAVA_OS}\" is not a valid value for JAVA_OS. It should be one or more of: ${_JAVA_OS_LIST}";
+ @${FALSE}
+. endif
+
+# Set default values for JAVA_BUILD and JAVA_RUN
+# When nothing is set, assume JAVA_BUILD=jdk and JAVA_RUN=jre
+# (unless NO_BUILD is set)
+. if !defined(JAVA_EXTRACT) && !defined(JAVA_BUILD) && !defined(JAVA_RUN)
+. if !defined(NO_BUILD)
+JAVA_BUILD= jdk
+. endif
+JAVA_RUN= jre
+. endif
+
+# JDK dependency setting
+. undef _JAVA_PORTS_INSTALLED
+. undef _JAVA_PORTS_POSSIBLE
+. if defined(JAVA_VERSION)
+_JAVA_VERSION= ${JAVA_VERSION:S/1.1+/1.1 1.2 1.3 1.4 1.5/:S/1.2+/1.2 1.3 1.4 1.5/:S/1.3+/1.3 1.4 1.5/:S/1.4+/1.4 1.5/:S/1.5+/1.5/}
+. else
+_JAVA_VERSION= ${__JAVA_VERSION_LIST}
+. endif
+. if defined(JAVA_OS)
+_JAVA_OS= ${JAVA_OS}
+. else
+_JAVA_OS= ${_JAVA_OS_LIST}
+. endif
+. if defined(JAVA_VENDOR)
+_JAVA_VENDOR= ${JAVA_VENDOR}
+. else
+_JAVA_VENDOR= ${_JAVA_VENDOR_LIST}
+. endif
+
+. for A_JAVA_PORT in ${_JAVA_PORTS_ALL}
+A_JAVA_PORT_INFO:= ${A_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
+A_JAVA_PORT_HOME= ${A_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
+A_JAVA_PORT_VERSION= ${A_JAVA_PORT_INFO:MVERSION=*:C/VERSION=([0-9])\.([0-9])(.*)/\1.\2/}
+A_JAVA_PORT_OS= ${A_JAVA_PORT_INFO:MOS=*:S,OS=,,}
+A_JAVA_PORT_VENDOR= ${A_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
+A_JAVA_PORT_INSTALLED!= ${TEST} -x "${A_JAVA_PORT_HOME}/${_JDK_FILE}" \
+ && ${ECHO_CMD} "${A_JAVA_PORT}" \
+ || ${TRUE}
+__JAVA_PORTS_INSTALLED!= ${ECHO_CMD} "${__JAVA_PORTS_INSTALLED} ${A_JAVA_PORT_INSTALLED}"
+A_JAVA_PORT_POSSIBLE!= ${ECHO_CMD} "${_JAVA_VERSION}" | ${GREP} -q "${A_JAVA_PORT_VERSION}" \
+ && ${ECHO_CMD} "${_JAVA_OS}" | ${GREP} -q "${A_JAVA_PORT_OS}" \
+ && ${ECHO_CMD} "${_JAVA_VENDOR}" | ${GREP} -q "${A_JAVA_PORT_VENDOR}" \
+ && ${ECHO_CMD} "${A_JAVA_PORT}" \
+ || ${TRUE}
+__JAVA_PORTS_POSSIBLE!= ${ECHO_CMD} "${__JAVA_PORTS_POSSIBLE} ${A_JAVA_PORT_POSSIBLE}"
+. endfor
+_JAVA_PORTS_INSTALLED= ${__JAVA_PORTS_INSTALLED:C/ [ ]+/ /g}
+_JAVA_PORTS_POSSIBLE= ${__JAVA_PORTS_POSSIBLE:C/ [ ]+/ /g}
+
+
+#-------------------------------------------------------------------------------
+# Stage 3: Decide the exact JDK to use (or install)
+#
+
+# Find an installed JDK port that matches the requirements of the port
+
+. undef _JAVA_PORTS_INSTALLED_POSSIBLE
+
+. for A_JAVA_PORT in ${_JAVA_PORTS_POSSIBLE}
+A_JAVA_PORT_INSTALLED_POSSIBLE!= ${ECHO_CMD} "${_JAVA_PORTS_INSTALLED}" | ${GREP} -q "${A_JAVA_PORT}" \
+ && ${ECHO_CMD} "${A_JAVA_PORT}" || ${TRUE}
+__JAVA_PORTS_INSTALLED_POSSIBLE!= ${ECHO_CMD} "${__JAVA_PORTS_INSTALLED_POSSIBLE} ${A_JAVA_PORT_INSTALLED_POSSIBLE}"
+. endfor
+_JAVA_PORTS_INSTALLED_POSSIBLE= ${__JAVA_PORTS_INSTALLED_POSSIBLE:C/ [ ]+/ /g}
+
+. if ${_JAVA_PORTS_INSTALLED_POSSIBLE} != ""
+_JAVA_PORT!= ${ECHO_CMD} "${_JAVA_PORTS_INSTALLED_POSSIBLE}" \
+ | ${AWK} '{ print $$1 }'
+
+# If no installed JDK port fits, then pick one from the list of possible ones
+. else
+_JAVA_PORT!= ${ECHO_CMD} "${_JAVA_PORTS_POSSIBLE}" \
+ | ${AWK} '{ print $$1 }'
+. endif
+
+_JAVA_PORT_INFO:= ${_JAVA_PORT:S/^/\${_/:S/$/_INFO}/}
+JAVA_PORT= ${_JAVA_PORT_INFO:MPORT=*:S,PORT=,,}
+JAVA_HOME= ${_JAVA_PORT_INFO:MHOME=*:S,HOME=,,}
+JAVA_PORT_VERSION= ${_JAVA_PORT_INFO:MVERSION=*:S,VERSION=,,}
+JAVA_PORT_OS= ${_JAVA_PORT_INFO:MOS=*:S,OS=,,}
+JAVA_PORT_VENDOR= ${_JAVA_PORT_INFO:MVENDOR=*:S,VENDOR=,,}
+
+JAVA_PORT_VENDOR_DESCRIPTION:= ${JAVA_PORT_VENDOR:S/^/\${_JAVA_VENDOR_/:S/$/}/}
+JAVA_PORT_OS_DESCRIPTION:= ${JAVA_PORT_OS:S/^/\${_JAVA_OS_/:S/$/}/}
+
+#-------------------------------------------------------------------------------
+# Stage 4: Add any dependencies if necessary
+#
+
+# Jikes support: If USE_JIKES is set to YES, then use Jikes. If USE_JIKES is
+# set to NO, then don't use it. If it is set to a different value, then fail
+# with an error message. Otherwise USE_JIKES is not set, in which case it is
+# checked if Jikes is already installed. If it is, then it will be used,
+# otherwise it will not be used.
+#
+# As a result, HAVE_JIKES is defined and set to "yes" when Jikes is used by the
+# port according to the above policy.
+
+. undef HAVE_JIKES
+
+# Enforce USE_JIKES=NO if not defined and using Java 1.5
+# XXX: This is a temporary fix to be removed when Jikes supports Java 1.5
+. if ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/} == "1.5"
+USE_JIKES?= NO
+. endif
+# First test if USE_JIKES has a valid value
+. if defined(USE_JIKES) && !(${USE_JIKES:U} == "YES") && !(${USE_JIKES:U} == "NO")
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Makefile error: \"${USE_JIKES}\" is not a valid value for USE_JIKES. It should be YES or NO, or it should be undefined.";
+ @${FALSE}
+. endif
+# Then test if jikes is needed or available: -> HAVE_JIKES=yes
+. if (exists(${_JIKES_PATH}) && (!defined(USE_JIKES) || (${USE_JIKES:U} == "YES"))) \
+ || (defined(USE_JIKES) && (${USE_JIKES:U} == "YES"))
+HAVE_JIKES= yes
+. endif
+
+# Add jikes port to the dependencies if needed
+. if !defined(NO_BUILD) && defined(HAVE_JIKES)
+BUILD_DEPENDS+= ${DEPEND_JIKES}
+. endif
+
+# Ant Support: USE_ANT --> JAVA_BUILD=jdk
+. if defined(USE_ANT)
+JAVA_BUILD= jdk
+. endif
+
+# Add the JDK port to the dependencies
+DEPEND_JAVA= ${JAVA}:${PORTSDIR}/${JAVA_PORT}
+. if defined(JAVA_EXTRACT)
+EXTRACT_DEPENDS+= ${DEPEND_JAVA}
+. endif
+. if defined(JAVA_BUILD)
+. if defined(NO_BUILD)
+check-makevars::
+ @${ECHO_CMD} "${PKGNAME}: Makefile error: JAVA_BUILD and NO_BUILD cannot be set at the same time.";
+ @${FALSE}
+. endif
+BUILD_DEPENDS+= ${DEPEND_JAVA}
+. endif
+. if defined(JAVA_RUN)
+RUN_DEPENDS+= ${DEPEND_JAVA}
+. endif
+
+# Ant support: default do-build target
+. if defined(USE_ANT)
+ANT?= ${LOCALBASE}/bin/ant
+MAKE_ENV+= JAVA_HOME=${JAVA_HOME}
+. if defined(HAVE_JIKES)
+MAKE_ARGS+= -Dbuild.compiler=jikes
+. endif
+BUILD_DEPENDS+= ${ANT}:${PORTSDIR}/devel/apache-ant
+ALL_TARGET?=
+. if !target(do-build)
+do-build:
+ @(cd ${BUILD_WRKSRC}; \
+ ${SETENV} ${MAKE_ENV} ${ANT} ${MAKE_ARGS} ${ALL_TARGET})
+. endif
+. endif
+
+#-----------------------------------------------------------------------------
+# Stage 5: Define all settings for the port to use
+#
+# At this stage both JAVA_HOME and JAVA_PORT are definitely given a value.
+#
+# Define the location of the Java compiler. If HAVE_JIKES is defined, then
+# use Jikes.
+
+# Only define JAVAC if a JDK is needed or USE_JIKES=yes
+. undef JAVAC
+
+# Then test if a JAVAC has to be set (JAVA_BUILD==jdk)
+. if defined(JAVA_BUILD)
+. if (${JAVA_BUILD:U} == "JDK") && !defined(JAVAC)
+# Use jikes if available and not explicitly forbidden (see Stage 6)
+. if defined(HAVE_JIKES)
+JAVAC?= ${_JIKES_PATH} -bootclasspath ${JAVA_CLASSES}
+# Otherwise use 'javac'
+. else
+JAVAC?= ${JAVA_HOME}/bin/javac
+. endif
+. endif
+. endif
+
+# Define the location of some more executables.
+APPLETVIEWER?= ${JAVA_HOME}/bin/appletviewer
+JAR?= ${JAVA_HOME}/bin/jar
+JAVA?= ${JAVA_HOME}/bin/java
+JAVADOC?= ${JAVA_HOME}/bin/javadoc
+JAVAH?= ${JAVA_HOME}/bin/javah
+JAVAP?= ${JAVA_HOME}/bin/javap
+JAVA_N2A?= ${JAVA_HOME}/bin/native2ascii
+JAVA_SERIALVER?=${JAVA_HOME}/bin/serialver
+RMIC?= ${JAVA_HOME}/bin/rmic
+RMIREGISTRY?= ${JAVA_HOME}/bin/rmiregistry
+
+# Some executables only exists in JDK 1.2 and up
+. if ${_JAVA_PORT} != "JAVA_PORT_NATIVE_BSDJAVA_JDK_1_1"
+JAVA_KEYTOOL?= ${JAVA_HOME}/bin/keytool
+JAVA_POLICYTOOL?= ${JAVA_HOME}/bin/policytool
+RMID?= ${JAVA_HOME}/bin/rmid
+. endif
+
+# Set the location of the ZIP or JAR file with all standard Java classes.
+. if ${_JAVA_PORT} == "JAVA_PORT_NATIVE_BSDJAVA_JDK_1_1"
+JAVA_CLASSES= ${JAVA_HOME}/lib/classes.zip
+. else
+JAVA_CLASSES= ${JAVA_HOME}/jre/lib/rt.jar
+. endif
+
+
+#-------------------------------------------------------------------------------
+# Additional Java support
+
+# Debug target
+# Use it to check Java dependency while porting
+java-debug:
+ @${ECHO_CMD} "# User specified parameters:"
+ @${ECHO_CMD} "JAVA_VERSION= ${JAVA_VERSION} (${_JAVA_VERSION})"
+ @${ECHO_CMD} "JAVA_OS= ${JAVA_OS} (${_JAVA_OS})"
+ @${ECHO_CMD} "JAVA_VENDOR= ${JAVA_VENDOR} (${_JAVA_VENDOR})"
+ @${ECHO_CMD} "JAVA_BUILD= ${JAVA_BUILD}"
+ @${ECHO_CMD} "JAVA_RUN= ${JAVA_RUN}"
+ @${ECHO_CMD} "JAVA_EXTRACT= ${JAVA_EXTRACT}"
+ @${ECHO_CMD}
+ @${ECHO_CMD} "# JDK port dependency selection process:"
+ @${ECHO_CMD} "_JAVA_PORTS_POSSIBLE= ${_JAVA_PORTS_POSSIBLE}"
+ @${ECHO_CMD} "_JAVA_PORTS_INSTALLED= ${_JAVA_PORTS_INSTALLED}"
+ @${ECHO_CMD} "_JAVA_PORTS_INSTALLED_POSSIBLE= ${_JAVA_PORTS_INSTALLED_POSSIBLE}"
+ @${ECHO_CMD} "_JAVA_PORT= ${_JAVA_PORT}"
+ @${ECHO_CMD} "_JAVA_PORT_INFO= ${_JAVA_PORT_INFO:S/\t/ /}"
+ @${ECHO_CMD}
+ @${ECHO_CMD} "# Selected JDK port:"
+ @${ECHO_CMD} "JAVA_PORT= ${JAVA_PORT}"
+ @${ECHO_CMD} "JAVA_HOME= ${JAVA_HOME}"
+ @${ECHO_CMD} "JAVA_PORT_VERSION= ${JAVA_PORT_VERSION}"
+ @${ECHO_CMD} "JAVA_PORT_OS= ${JAVA_PORT_OS} (${JAVA_PORT_OS_DESCRIPTION})"
+ @${ECHO_CMD} "JAVA_PORT_VENDOR= ${JAVA_PORT_VENDOR} (${JAVA_PORT_VENDOR_DESCRIPTION})"
+ @${ECHO_CMD}
+ @${ECHO_CMD} "# Additional variables:"
+ @${ECHO_CMD} "JAVAC= ${JAVAC}"
+ @${ECHO_CMD} "JAVA_CLASSES= ${JAVA_CLASSES}"
+
+. endif
+.endif
diff --git a/ports-mgmt/portmk/Mk/bsd.php.mk b/ports-mgmt/portmk/Mk/bsd.php.mk
new file mode 100644
index 0000000..400dbd8
--- /dev/null
+++ b/ports-mgmt/portmk/Mk/bsd.php.mk
@@ -0,0 +1,347 @@
+#
+# bsd.php.mk - Support for PHP-based ports.
+#
+# Created by: Alex Dupre <ale@FreeBSD.org>
+#
+# For FreeBSD committers:
+# Please send all suggested changes to the maintainer instead of committing
+# them to CVS yourself.
+#
+# $FreeBSD: /tmp/pcvs/ports/ports-mgmt/portmk/Mk/Attic/bsd.php.mk,v 1.9 2007-02-28 22:47:05 linimon Exp $
+#
+# Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk.
+# If the port requires a predefined set of PHP extensions, they can be
+# listed in this way:
+#
+# USE_PHP= ext1 ext2 ext3
+#
+# The port can set these options in its Makefile before bsd.ports.pre.mk:
+#
+# DEFAULT_PHP_VER=N - Use PHP version N if PHP is not yet installed.
+# IGNORE_WITH_PHP=N - The port doesn't work with PHP version N.
+# USE_PHPIZE=yes - Use to build a PHP extension.
+# USE_PHPEXT=yes - Use to build, install and register a PHP extension.
+# USE_PHP_BUILD=yes - Set PHP also as a build dependency.
+# WANT_PHP_CLI=yes - Want the CLI version of PHP.
+# WANT_PHP_CGI=yes - Want the CGI version of PHP.
+# WANT_PHP_MOD=yes - Want the Apache Module for PHP.
+# WANT_PHP_WEB=yes - Want the Apache Module or the CGI version of PHP.
+#
+# You may combine multiple WANT_PHP_* knobs.
+# Don't specify any WANT_PHP_* knob if your port will work with every PHP SAPI.
+#
+
+.if !defined(_PHPMKINCLUDED)
+
+PHP_Include_MAINTAINER= ale@FreeBSD.org
+
+_PHPMKINCLUDED= yes
+
+.if exists(${LOCALBASE}/etc/php.conf)
+.include "${LOCALBASE}/etc/php.conf"
+PHP_EXT_DIR!= ${LOCALBASE}/bin/php-config --extension-dir | ${SED} -ne 's,^${LOCALBASE}/lib/php/\(.*\),\1,p'
+.else
+DEFAULT_PHP_VER?= 5
+
+PHP_VER?= ${DEFAULT_PHP_VER}
+.if ${PHP_VER} == 4
+PHP_EXT_DIR= 20020429
+.else
+PHP_EXT_DIR= 20060613
+.endif
+
+HTTPD?= ${LOCALBASE}/sbin/httpd
+.if exists(${HTTPD})
+APACHE_VERSION!= ${HTTPD} -V | ${SED} -ne 's/^Server version: Apache\/\([0-9]\)\.\([0-9]*\).*/\1\2/p'
+. if ${APACHE_VERSION} > 13
+APXS?= ${LOCALBASE}/sbin/apxs
+APACHE_MPM!= ${APXS} -q MPM_NAME
+. if ${APACHE_MPM} == "worker"
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
+. endif
+. endif
+.elif defined(APACHE_PORT)
+APACHE_VERSION!= ${ECHO_CMD} ${APACHE_PORT} | ${SED} -ne 's,.*/apache\([0-9]*\).*,\1,p'
+. if ${APACHE_VERSION} > 13 && defined(WITH_MPM) && ${WITH_MPM} == "worker"
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-zts
+. endif
+.endif
+
+.if defined(WITH_DEBUG)
+PHP_EXT_DIR:= ${PHP_EXT_DIR}-debug
+.endif
+PHP_SAPI?= ""
+.endif
+PHP_EXT_INC?= ""
+
+# compatability shim
+.if defined(BROKEN_WITH_PHP)
+IGNORE_WITH_PHP=${BROKEN_WITH_PHP}
+.endif
+.if defined(IGNORE_WITH_PHP)
+. for VER in ${IGNORE_WITH_PHP}
+. if ${PHP_VER} == "${VER}"
+IGNORE= cannot install: doesn't work with PHP version : ${PHP_VER} (Doesn't support PHP ${IGNORE_WITH_PHP})
+. endif
+. endfor
+.endif
+
+.if defined(WANT_PHP_WEB)
+. if defined(WANT_PHP_CGI) || defined(WANT_PHP_MOD)
+check-makevars::
+ @${ECHO_CMD} "If you define WANT_PHP_WEB you cannot set also WANT_PHP_CGI"
+ @${ECHO_CMD} "or WANT_PHP_MOD. Use only one of them."
+ @${FALSE}
+. else
+. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == "" && ${PHP_SAPI:Mmod} == ""
+check-makevars::
+ @${ECHO_CMD} "This port requires the Apache Module or the CGI version of PHP, but you have"
+ @${ECHO_CMD} "already installed a PHP port without them."
+ @${FALSE}
+. endif
+. endif
+.else
+
+.if defined(WANT_PHP_CGI)
+. if defined(PHP_VERSION) && ${PHP_SAPI:Mcgi} == ""
+check-makevars::
+ @${ECHO_CMD} "This port requires the CGI version of PHP, but you have already"
+ @${ECHO_CMD} "installed a PHP port without CGI."
+ @${FALSE}
+. endif
+.else
+
+.if defined(WANT_PHP_CLI)
+. if defined(PHP_VERSION) && ${PHP_SAPI:Mcli} == ""
+check-makevars::
+ @${ECHO_CMD} "This port requires the CLI version of PHP, but you have already"
+ @${ECHO_CMD} "installed a PHP port without CLI."
+ @${FALSE}
+. endif
+.else
+
+.if defined(WANT_PHP_MOD)
+. if defined(PHP_VERSION) && ${PHP_SAPI:Mmod} == ""
+check-makevars::
+ @${ECHO_CMD} "This port requires the Apache Module for PHP, but you have already"
+ @${ECHO_CMD} "installed a PHP port without the Apache Module."
+ @${FALSE}
+. endif
+.endif
+
+.endif
+
+.endif
+
+.endif
+
+PHP_PORT= ${PORTSDIR}/lang/php${PHP_VER}
+
+.if defined(USE_PHP_BUILD)
+BUILD_DEPENDS+= ${LOCALBASE}/include/php/main/php.h:${PHP_PORT}
+.endif
+RUN_DEPENDS+= ${LOCALBASE}/include/php/main/php.h:${PHP_PORT}
+
+PLIST_SUB+= PHP_EXT_DIR=${PHP_EXT_DIR}
+SUB_LIST+= PHP_EXT_DIR=${PHP_EXT_DIR}
+
+.if defined(USE_PHPIZE) || defined(USE_PHPEXT)
+BUILD_DEPENDS+= phpize:${PHP_PORT}
+GNU_CONFIGURE= YES
+USE_AUTOTOOLS+= autoconf:259:env
+CONFIGURE_ARGS+=--with-php-config=${LOCALBASE}/bin/php-config
+
+configure-message: phpize-message do-phpize
+
+phpize-message:
+ @${ECHO_MSG} "===> PHPizing for ${PKGNAME}"
+
+do-phpize:
+ @(cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ${LOCALBASE}/bin/phpize)
+.endif
+
+.if defined(USE_PHPEXT)
+PHP_MODNAME?= ${PORTNAME}
+PHP_HEADER_DIRS?= ""
+
+do-install:
+ @${MKDIR} ${PREFIX}/lib/php/${PHP_EXT_DIR}
+ @${INSTALL_DATA} ${WRKSRC}/modules/${PHP_MODNAME}.so \
+ ${PREFIX}/lib/php/${PHP_EXT_DIR}
+. for header in . ${PHP_HEADER_DIRS}
+ @${MKDIR} ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
+ @${INSTALL_DATA} ${WRKSRC}/${header}/*.h \
+ ${PREFIX}/include/php/ext/${PHP_MODNAME}/${header}
+. endfor
+ @${RM} -f ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
+ @${GREP} "#define \(COMPILE\|HAVE\|USE\)_" ${WRKSRC}/config.h \
+ > ${PREFIX}/include/php/ext/${PHP_MODNAME}/config.h
+ @${ECHO_CMD} \#include \"ext/${PHP_MODNAME}/config.h\" \
+ >> ${PREFIX}/include/php/ext/php_config.h
+ @${MKDIR} ${PREFIX}/etc/php
+ @${ECHO_CMD} extension=${PHP_MODNAME}.so \
+ >> ${PREFIX}/etc/php/extensions.ini
+
+add-plist-info: add-plist-phpext
+add-plist-phpext:
+ @${ECHO_CMD} "lib/php/${PHP_EXT_DIR}/${PHP_MODNAME}.so" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/lib/php/${PHP_EXT_DIR} 2> /dev/null || true" \
+ >> ${TMPPLIST}
+ @${FIND} -P ${PREFIX}/include/php/ext/${PHP_MODNAME} ! -type d 2>/dev/null | \
+ ${SED} -ne 's,^${PREFIX}/,,p' >> ${TMPPLIST}
+ @${FIND} -P -d ${PREFIX}/include/php/ext/${PHP_MODNAME} -type d 2>/dev/null | \
+ ${SED} -ne 's,^${PREFIX}/,@dirrm ,p' >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec echo \#include \\\"ext/${PHP_MODNAME}/config.h\\\" >> %D/include/php/ext/php_config.h" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec cp %D/include/php/ext/php_config.h %D/include/php/ext/php_config.h.orig" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec grep -v ext/${PHP_MODNAME}/config.h %D/include/php/ext/php_config.h.orig > %D/include/php/ext/php_config.h || true" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rm %D/include/php/ext/php_config.h.orig" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec mkdir -p %D/etc/php" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@exec echo extension=${PHP_MODNAME}.so >> %D/etc/php/extensions.ini" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec cp %D/etc/php/extensions.ini %D/etc/php/extensions.ini.orig" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec grep -v extension=${PHP_MODNAME}\\\.so %D/etc/php/extensions.ini.orig > %D/etc/php/extensions.ini || true" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rm %D/etc/php/extensions.ini.orig" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec [ -s %D/etc/php/extensions.ini ] || rm %D/etc/php/extensions.ini" \
+ >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/etc/php 2> /dev/null || true" \
+ >> ${TMPPLIST}
+
+security-check: php-ini
+
+php-ini:
+ @${ECHO_CMD} "****************************************************************************"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "The following line has been added to your ${PREFIX}/etc/php/extensions.ini"
+ @${ECHO_CMD} "configuration file to automatically load the installed extension:"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "extension=${PHP_MODNAME}.so"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "****************************************************************************"
+.endif
+
+.endif
+
+# Extensions
+.if defined(_POSTMKINCLUDED) && ${USE_PHP:L} != "yes"
+# non-version specific components
+_USE_PHP_ALL= bcmath bz2 calendar ctype curl dba dbase \
+ exif fileinfo fribidi ftp gd gettext gmp \
+ hash iconv imap interbase json ldap mbstring mcrypt \
+ mhash mssql mysql ncurses odbc \
+ openssl pcntl pcre pdf pgsql posix \
+ pspell radius readline recode session shmop snmp \
+ sockets sybase_ct sysvmsg sysvsem sysvshm \
+ tokenizer wddx xml xmlrpc yaz zip zlib
+# version specific components
+_USE_PHP_VER4= ${_USE_PHP_ALL} crack dbx dio domxml filepro mcal mcve \
+ mnogosearch oracle overload pfpro xslt yp
+_USE_PHP_VER5= ${_USE_PHP_ALL} dom filter ming mysqli pdo pdo_sqlite \
+ simplexml soap spl sqlite tidy xmlreader xmlwriter xsl
+
+bcmath_DEPENDS= math/php${PHP_VER}-bcmath
+bz2_DEPENDS= archivers/php${PHP_VER}-bz2
+calendar_DEPENDS= misc/php${PHP_VER}-calendar
+crack_DEPENDS= security/php${PHP_VER}-crack
+ctype_DEPENDS= textproc/php${PHP_VER}-ctype
+curl_DEPENDS= ftp/php${PHP_VER}-curl
+dba_DEPENDS= databases/php${PHP_VER}-dba
+dbase_DEPENDS= databases/php${PHP_VER}-dbase
+dbx_DEPENDS= databases/php${PHP_VER}-dbx
+dio_DEPENDS= devel/php${PHP_VER}-dio
+dom_DEPENDS= textproc/php${PHP_VER}-dom
+domxml_DEPENDS= textproc/php${PHP_VER}-domxml
+exif_DEPENDS= graphics/php${PHP_VER}-exif
+fileinfo_DEPENDS= sysutils/pecl-fileinfo
+filepro_DEPENDS=databases/php${PHP_VER}-filepro
+filter_DEPENDS= security/pecl-filter
+fribidi_DEPENDS=converters/pecl-fribidi
+ftp_DEPENDS= ftp/php${PHP_VER}-ftp
+gd_DEPENDS= graphics/php${PHP_VER}-gd
+gettext_DEPENDS=devel/php${PHP_VER}-gettext
+gmp_DEPENDS= math/php${PHP_VER}-gmp
+hash_DEPENDS= security/pecl-hash
+iconv_DEPENDS= converters/php${PHP_VER}-iconv
+imap_DEPENDS= mail/php${PHP_VER}-imap
+interbase_DEPENDS= databases/php${PHP_VER}-interbase
+json_DEPENDS= devel/pecl-json
+ldap_DEPENDS= net/php${PHP_VER}-ldap
+mbstring_DEPENDS= converters/php${PHP_VER}-mbstring
+mcal_DEPENDS= misc/php${PHP_VER}-mcal
+mcrypt_DEPENDS= security/php${PHP_VER}-mcrypt
+mcve_DEPENDS= devel/php${PHP_VER}-mcve
+mhash_DEPENDS= security/php${PHP_VER}-mhash
+ming_DEPENDS= graphics/php${PHP_VER}-ming
+mnogosearch_DEPENDS= www/php${PHP_VER}-mnogosearch
+mssql_DEPENDS= databases/php${PHP_VER}-mssql
+mysql_DEPENDS= databases/php${PHP_VER}-mysql
+mysqli_DEPENDS= databases/php${PHP_VER}-mysqli
+ncurses_DEPENDS=devel/php${PHP_VER}-ncurses
+odbc_DEPENDS= databases/php${PHP_VER}-odbc
+openssl_DEPENDS=security/php${PHP_VER}-openssl
+oracle_DEPENDS= databases/php${PHP_VER}-oracle
+overload_DEPENDS=lang/php${PHP_VER}-overload
+pcntl_DEPENDS= devel/php${PHP_VER}-pcntl
+pcre_DEPENDS= devel/php${PHP_VER}-pcre
+pdf_DEPENDS= print/pecl-pdflib
+pdo_DEPENDS= databases/php${PHP_VER}-pdo
+pdo_sqlite_DEPENDS= databases/php${PHP_VER}-pdo_sqlite
+pfpro_DEPENDS= finance/php${PHP_VER}-pfpro
+pgsql_DEPENDS= databases/php${PHP_VER}-pgsql
+posix_DEPENDS= sysutils/php${PHP_VER}-posix
+pspell_DEPENDS= textproc/php${PHP_VER}-pspell
+radius_DEPENDS= net/pecl-radius
+readline_DEPENDS= devel/php${PHP_VER}-readline
+recode_DEPENDS= converters/php${PHP_VER}-recode
+session_DEPENDS=www/php${PHP_VER}-session
+shmop_DEPENDS= devel/php${PHP_VER}-shmop
+simplexml_DEPENDS= textproc/php${PHP_VER}-simplexml
+snmp_DEPENDS= net-mgmt/php${PHP_VER}-snmp
+soap_DEPENDS= net/php${PHP_VER}-soap
+sockets_DEPENDS=net/php${PHP_VER}-sockets
+spl_DEPENDS= devel/php${PHP_VER}-spl
+sqlite_DEPENDS= databases/php${PHP_VER}-sqlite
+sybase_ct_DEPENDS= databases/php${PHP_VER}-sybase_ct
+sysvmsg_DEPENDS=devel/php${PHP_VER}-sysvmsg
+sysvsem_DEPENDS=devel/php${PHP_VER}-sysvsem
+sysvshm_DEPENDS=devel/php${PHP_VER}-sysvshm
+tidy_DEPENDS= www/php${PHP_VER}-tidy
+tokenizer_DEPENDS= devel/php${PHP_VER}-tokenizer
+wddx_DEPENDS= textproc/php${PHP_VER}-wddx
+xml_DEPENDS= textproc/php${PHP_VER}-xml
+xmlreader_DEPENDS= textproc/php${PHP_VER}-xmlreader
+xmlrpc_DEPENDS= net/php${PHP_VER}-xmlrpc
+xmlwriter_DEPENDS= textproc/php${PHP_VER}-xmlwriter
+xsl_DEPENDS= textproc/php${PHP_VER}-xsl
+xslt_DEPENDS= textproc/php${PHP_VER}-xslt
+yaz_DEPENDS= net/pecl-yaz
+yp_DEPENDS= net/php${PHP_VER}-yp
+zip_DEPENDS= archivers/pecl-zip
+zlib_DEPENDS= archivers/php${PHP_VER}-zlib
+
+. for extension in ${USE_PHP}
+. if ${_USE_PHP_VER${PHP_VER}:M${extension}} != ""
+. if ${PHP_EXT_INC:M${extension}} == ""
+. if defined(USE_PHP_BUILD)
+BUILD_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
+. endif
+RUN_DEPENDS+= ${LOCALBASE}/lib/php/${PHP_EXT_DIR}/${extension}.so:${PORTSDIR}/${${extension}_DEPENDS}
+. endif
+. else
+isyes= ${extension}
+. if ${isyes:L} != "yes"
+check-makevars::
+ @${ECHO_CMD} "Unknown extension ${extension} for PHP ${PHP_VER}."
+ @${FALSE}
+. endif
+. endif
+. endfor
+.endif
diff --git a/ports-mgmt/portmk/Mk/bsd.port.mk b/ports-mgmt/portmk/Mk/bsd.port.mk
index a3460fd..185e70b 100644
--- a/ports-mgmt/portmk/Mk/bsd.port.mk
+++ b/ports-mgmt/portmk/Mk/bsd.port.mk
@@ -310,10 +310,7 @@ FreeBSD_MAINTAINER= portmgr@FreeBSD.org
# Default: gmake
##
# USE_GETOPT_LONG
-# - If set, this port uses getopt_long. If OSVERSION
-# less than 500041, automatically adds devel/libgnugeopt
-# to LIB_DEPENDS, and pass adjusted values of
-# CPPFLAGS and LDFLAGS in CONFIGURE_ENV.
+# - If set, this port uses getopt_long. May be obsolete.
##
# USE_ICONV - If set, this port uses libiconv.
# USE_GETTEXT - If set, this port uses GNU gettext (libintl).
@@ -1298,15 +1295,6 @@ check-makefile::
_PREMKINCLUDED= yes
-# check for old, crufty, makefile types, part 1:
-.if !defined(PORTNAME) || !( defined(PORTVERSION) || defined (DISTVERSION) ) || defined(PKGNAME)
-check-makefile::
- @${ECHO_CMD} "Makefile error: you need to define PORTNAME and PORTVERSION instead of PKGNAME."
- @${ECHO_CMD} "(This port is too old for your bsd.port.mk, please update it to match"
- @${ECHO_CMD} " your bsd.port.mk.)"
- @${FALSE}
-.endif
-
.if defined(PORTVERSION)
.if ${PORTVERSION:M*[-_,]*}x != x
IGNORE= PORTVERSION ${PORTVERSION} may not contain '-' '_' or ','
@@ -1326,14 +1314,8 @@ PORTEPOCH?= 0
_SUF2= ,${PORTEPOCH}
.endif
-# check for old, crufty, makefile types, part 2. The "else" case
-# should have been handled in part 1, above.
-.if !defined(PKGVERSION)
PKGVERSION= ${PORTVERSION:C/[-_,]/./g}${_SUF1}${_SUF2}
-.endif
-.if !defined(PKGNAME)
PKGNAME= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}-${PKGVERSION}
-.endif
DISTNAME?= ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION:C/:(.)/\1/g}${DISTVERSIONSUFFIX}
# These need to be absolute since we don't know how deep in the ports
@@ -1353,11 +1335,7 @@ LINUXBASE:= ${DESTDIR}${LINUXBASE_REL}
DISTDIR?= ${PORTSDIR}/distfiles
_DISTDIR?= ${DISTDIR}/${DIST_SUBDIR}
INDEXDIR?= ${PORTSDIR}
-.if ${OSVERSION} >= 500036
INDEXFILE?= INDEX-${OSVERSION:C/([0-9]).*/\1/}
-.else
-INDEXFILE?= INDEX
-.endif
TARGETDIR:= ${DESTDIR}${PREFIX}
@@ -1379,12 +1357,6 @@ EXTRACT_SUFX?= .tar.gz
PACKAGES?= ${PORTSDIR}/packages
TEMPLATES?= ${PORTSDIR}/Templates
-.if (!defined(PKGDIR) && exists(${MASTERDIR}/pkg/DESCR)) || \
- (!defined(MD5_FILE) && exists(${MASTERDIR}/files/md5))
-check-makefile::
- @${ECHO_CMD} "Makefile error: your port uses an old layout. Please update it to match this bsd.port.mk. If you have updated your ports collection via cvsup and are still getting this error, see Q12 and Q13 in the cvsup FAQ on http://www.polstra.com for further information."
- @${FALSE}
-.endif
PATCHDIR?= ${MASTERDIR}/files
FILESDIR?= ${MASTERDIR}/files
SCRIPTDIR?= ${MASTERDIR}/scripts
@@ -1431,23 +1403,8 @@ LDCONFIG_PLIST_UNEXEC_CMD?= ${LDCONFIG} -R
PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
-.if ${OSVERSION} >= 500036
PERL_VERSION?= 5.8.8
PERL_VER?= 5.8.8
-.else
-.if ${OSVERSION} >= 500032
-PERL_VERSION?= 5.6.1
-PERL_VER?= 5.6.1
-.else
-.if ${OSVERSION} >= 500007
-PERL_VERSION?= 5.6.0
-PERL_VER?= 5.6.0
-.else
-PERL_VERSION?= 5.00503
-PERL_VER?= 5.005
-.endif
-.endif
-.endif
.if !defined(PERL_LEVEL) && defined(PERL_VERSION)
perl_major= ${PERL_VERSION:C|^([1-9]+).*|\1|}
@@ -1465,11 +1422,7 @@ PERL_LEVEL= ${perl_major}${perl_minor}${perl_patch}
PERL_LEVEL=0
.endif # !defined(PERL_LEVEL) && defined(PERL_VERSION)
-.if ${PERL_LEVEL} >= 500600
PERL_ARCH?= mach
-.else
-PERL_ARCH?= ${ARCH}-freebsd
-.endif
.if ${PERL_LEVEL} >= 500800
PERL_PORT?= perl5.8
@@ -1480,13 +1433,8 @@ PERL_PORT?= perl5
SITE_PERL_REL?= lib/perl5/site_perl/${PERL_VER}
SITE_PERL?= ${LOCALBASE}/${SITE_PERL_REL}
-.if ${PERL_LEVEL} < 500600
-PERL5= ${DESTDIR}/usr/bin/perl${PERL_VERSION}
-PERL= ${DESTDIR}/usr/bin/perl
-.else
PERL5= ${LOCALBASE}/bin/perl${PERL_VERSION}
PERL= ${LOCALBASE}/bin/perl
-.endif
.if defined(USE_LOCAL_MK)
.if exists(${DEVELPORTSDIR}/Mk/bsd.local.mk)
@@ -1656,11 +1604,7 @@ PERL= ${LOCALBASE}/bin/perl
.endif
.endif
-.if ${OSVERSION} >= 502123
X_WINDOW_SYSTEM ?= xorg
-.else
-X_WINDOW_SYSTEM ?= xfree86-4
-.endif
# Location of mounted CDROM(s) to search for files
CD_MOUNTPTS?= /cdrom ${CD_MOUNTPT}
@@ -1836,22 +1780,8 @@ IGNORE= unknown FAM system: ${FAM_SYSTEM}
.endif
.endif # USE_FAM
-.if defined(USE_GETOPT_LONG)
-.if ${OSVERSION} < 500041
-LIB_DEPENDS+= gnugetopt.1:${PORTSDIR}/devel/libgnugetopt
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib -lgnugetopt
-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
-.endif
-.endif
-
.if defined(USE_RC_SUBR) || defined(USE_RCORDER)
-.if ${OSVERSION} < 500037
-RUN_DEPENDS+= ${LOCALBASE}/etc/rc.subr:${PORTSDIR}/sysutils/rc_subr
-RC_SUBR= ${LOCALBASE}/etc/rc.subr
-.else
RC_SUBR= /etc/rc.subr
-.endif
SUB_LIST+= RC_SUBR=${RC_SUBR}
.if defined(USE_RC_SUBR) && ${USE_RC_SUBR:U} != "YES"
SUB_FILES+= ${USE_RC_SUBR}
@@ -1877,7 +1807,7 @@ NO_LDCONFIG_MTREE= yes
USE_LDCONFIG= ${PREFIX}/lib
.endif
.if defined(USE_LDCONFIG32) && ${USE_LDCONFIG32:L} == "yes"
-IGNORE= has USE_LDCONFIG set to yes, which is not correct
+IGNORE= has USE_LDCONFIG32 set to yes, which is not correct
.endif
.endif
@@ -2037,7 +1967,6 @@ CONFIGURE_ENV+= PERL_MM_USE_DEFAULT="YES"
.endif
.endif
-.if ${PERL_LEVEL} >= 500600
.if defined(USE_PERL5) || defined(USE_PERL5_BUILD)
EXTRACT_DEPENDS+=${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
PATCH_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
@@ -2046,7 +1975,6 @@ BUILD_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.if defined(USE_PERL5) || defined(USE_PERL5_RUN)
RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
-.endif
.if defined(USE_LOCAL_MK)
.if exists(${DEVELPORTSDIR}/Mk/bsd.local.mk)
@@ -2106,6 +2034,10 @@ RUN_DEPENDS+= ${PERL5}:${PORTSDIR}/lang/${PERL_PORT}
.endif
.endif
+.if defined(USE_PHP)
+.include "${PORTSDIR}/Mk/bsd.php.mk"
+.endif
+
.if defined(USE_PYTHON)
.if exists(${DEVELPORTSDIR}/Mk/bsd.python.mk)
.include "${DEVELPORTSDIR}/Mk/bsd.python.mk"
@@ -2265,22 +2197,13 @@ MAKE_ENV+= TARGETDIR=${TARGETDIR} DESTDIR=${DESTDIR} PREFIX=${PREFIX} \
MOTIFLIB="${MOTIFLIB}" LIBDIR="${LIBDIR}" CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" MANPREFIX="${MANPREFIX}"
-.if ${OSVERSION} < 500016
-PTHREAD_CFLAGS?= -D_THREAD_SAFE
-PTHREAD_LIBS?= -pthread
-.elif ${OSVERSION} < 502102
-PTHREAD_CFLAGS?= -D_THREAD_SAFE
-PTHREAD_LIBS?= -lc_r
-.else
PTHREAD_CFLAGS?=
PTHREAD_LIBS?= -pthread
-.endif
.if exists(/usr/bin/fetch)
FETCH_CMD?= /usr/bin/fetch -ApRr
FETCH_REGET?= 1
-.if ${OSVERSION} >= 480000 && !defined(DISABLE_SIZE)
-# Avoid -S for 4.7 and earlier since it causes fetch errors
+.if !defined(DISABLE_SIZE)
FETCH_BEFORE_ARGS+= $${CKSIZE:+-S $$CKSIZE}
.endif
.else
@@ -2292,11 +2215,7 @@ FETCH_REGET?= 0
.if exists(/usr/games/random)
RANDOM_CMD?= /usr/games/random
RANDOM_ARGS?= "-w -f -"
-.if ( ${OSVERSION} > 480000 && ${OSVERSION} < 500000 ) || ${OSVERSION} > 500100
_RANDOMIZE_SITES= " |${RANDOM_CMD} ${RANDOM_ARGS}"
-.else
-_RANDOMIZE_SITES= ''
-.endif
.endif
.endif
@@ -2484,11 +2403,7 @@ PKG_ARGS+= -C "${CONFLICTS}"
.if defined(PKG_NOCOMPRESS)
PKG_SUFX?= .tar
.else
-.if ${OSVERSION} >= 500039
PKG_SUFX?= .tbz
-.else
-PKG_SUFX?= .tgz
-.endif
.endif
# where pkg_add records its dirty deeds.
PKG_DBDIR?= ${DESTDIR}/var/db/pkg
@@ -2498,25 +2413,6 @@ MOTIFLIB?= -L${X11BASE}/lib -lXm -lXp
ALL_TARGET?= all
INSTALL_TARGET?= install
-# This is a mid-term solution patch while pkg-comment files are
-# phased out.
-# The final simpler patch will come afterwards
-.if !defined(COMMENT)
-check-makevars::
- @${ECHO_CMD} 'Makefile error: there is no COMMENT variable defined'
- @${ECHO_CMD} 'for this port. Please, rectify this.'
- @${FALSE}
-.else
-.if exists(${COMMENTFILE})
-check-makevars::
- @${ECHO_CMD} 'Makefile error: There is a COMMENTFILE in this port.'
- @${ECHO_CMD} 'COMMENTFILEs have been deprecated in'
- @${ECHO_CMD} 'favor of COMMENT variables.'
- @${ECHO_CMD} 'Please, rectify this.'
- @${FALSE}
-.endif
-.endif
-
# Popular master sites
.if exists(${DEVELPORTSDIR}/Mk/bsd.sites.mk)
.include "${DEVELPORTSDIR}/Mk/bsd.sites.mk"
@@ -3749,10 +3645,6 @@ do-configure:
.if !defined(PERL_MODBUILD)
@cd ${CONFIGURE_WRKSRC} && \
${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
-.if ${PERL_LEVEL} <= 500503
- @cd ${CONFIGURE_WRKSRC} && \
- ${PERL5} -pi -e 's/^(INSTALLSITELIB|INSTALLSITEARCH|SITELIBEXP|SITEARCHEXP|INSTALLMAN1DIR|INSTALLMAN3DIR) = \/usr\/local/$$1 = \$$(PREFIX)/' Makefile
-.endif
.endif
.endif
.if defined(USE_IMAKE)
diff --git a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk b/ports-mgmt/portmk/Mk/bsd.port.subdir.mk
index 54b58cf..c433ff1 100644
--- a/ports-mgmt/portmk/Mk/bsd.port.subdir.mk
+++ b/ports-mgmt/portmk/Mk/bsd.port.subdir.mk
@@ -416,6 +416,8 @@ _PORTSEARCH= \
} \
} \
{ \
+ if (match($$2, "^/usr/ports/[^/]*/[^/]*$$") > 0) \
+ sub("^/usr/ports", "${PORTSDIR}", $$2); \
if (substr($$2, 1, therelen) != there) \
next; \
for (i in parms) \
OpenPOWER on IntegriCloud