diff options
author | rm <rm@FreeBSD.org> | 2013-09-23 21:42:48 +0800 |
---|---|---|
committer | rm <rm@FreeBSD.org> | 2013-09-23 21:42:48 +0800 |
commit | d9d3fabb19f099b1d8e50d589cc2689d2f30425c (patch) | |
tree | 511fdd73e7fa1001193cab28ce8d1d1e202e994b /Mk/Uses | |
parent | 7e6228a93bc92334a3f08c3d38f1290a15379d7c (diff) | |
download | freebsd-ports-gnome-d9d3fabb19f099b1d8e50d589cc2689d2f30425c.tar.gz freebsd-ports-gnome-d9d3fabb19f099b1d8e50d589cc2689d2f30425c.tar.zst freebsd-ports-gnome-d9d3fabb19f099b1d8e50d589cc2689d2f30425c.zip |
- add new USES target: zope, and convert the tree to it
- old USE_ZOPE knob support was removed from bsd.python.mk
- update CHANGES and bsd.sanity.mk accordingly
- add ZOPE options knob and use it in lang/py-mx-base
The work is done by Marcus von Appen, but any problems are mine.
Submitted by: mva (python ML)
Diffstat (limited to 'Mk/Uses')
-rw-r--r-- | Mk/Uses/zope.mk | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/Mk/Uses/zope.mk b/Mk/Uses/zope.mk new file mode 100644 index 000000000000..0ab4802053e7 --- /dev/null +++ b/Mk/Uses/zope.mk @@ -0,0 +1,94 @@ +# $FreeBSD$ +# +# Provide support for Zope-related ports +# +# MAINTAINER: zope@FreeBSD.org +# +# SZOPEBASEDIR - relative base directory of zope server +# ZOPEBASEDIR - absolute base directory of zope that is +# ${LOCALBASE}/${SZOPEBASEDIR} by default, +# ZOPEPRODUCTDIR - directory, where products for zope can be found +# +# ZOPE_VERSION - Version of zope that will be used in the port. Set this +# in your /etc/make.conf in case you want to use a +# specific version of zope. +# +.if !defined(_INCLUDE_USES_ZOPE_MK) +_INCLUDE_USES_ZOPE_MK= yes + +_ZOPE_PORTBRANCH= 2.13 +_ZOPE_ALLBRANCHES= 2.13 + +_PYTHON_VER_REQUIRED= python2.7 + +.if defined(ZOPE_VERSION) +_ZOPE_VERSION:= ${ZOPE_VERSION} +.else +_ZOPE_VERSION:= ${_ZOPE_PORTBRANCH} +.endif + +# Validate Zope version whether it meets USE_ZOPE version restriction. +_ZOPE_VERSION_CHECK:= ${USE_ZOPE:C/^([1-9]\.[0-9]*)$/\1-\1/} +_ZOPE_VERSION_MINIMUM_TMP:= ${_ZOPE_VERSION_CHECK:C/([1-9]\.[0-9]*)[-+].*/\1/} +_ZOPE_VERSION_MINIMUM:= ${_ZOPE_VERSION_MINIMUM_TMP:M[1-9].[0-9]} +_ZOPE_VERSION_MAXIMUM_TMP:= ${_ZOPE_VERSION_CHECK:C/.*-([1-9]\.[0-9]*)/\1/} +_ZOPE_VERSION_MAXIMUM:= ${_ZOPE_VERSION_MAXIMUM_TMP:M[1-9].[0-9]} + +.if !empty(_ZOPE_VERSION_MINIMUM) && ( \ + ${_ZOPE_VERSION} < ${_ZOPE_VERSION_MINIMUM}) +_ZOPE_VERSION_NONSUPPORTED= ${_ZOPE_VERSION_MINIMUM} at least +.elif !empty(_ZOPE_VERSION_MAXIMUM) && ( \ + ${_ZOPE_VERSION} > ${_ZOPE_VERSION_MAXIMUM}) +_ZOPE_VERSION_NONSUPPORTED= ${_ZOPE_VERSION_MAXIMUM} at most +.endif + +# If we have an unsupported version of Zope, try another. +.if defined(_ZOPE_VERSION_NONSUPPORTED) +.if defined(ZOPE_VERSION) +IGNORE= needs Zope ${_ZOPE_VERSION_NONSUPPORTED}.\ + But you specified ${_ZOPE_VERSION} +.else +.undef _ZOPE_VERSION +.for ver in ${_ZOPE_ALLBRANCHES} +__VER= ${ver} +.if !defined(_ZOPE_VERSION) && \ + !(!empty(_ZOPE_VERSION_MINIMUM) && ( \ + ${__VER} < ${_ZOPE_VERSION_MINIMUM})) && \ + !(!empty(_ZOPE_VERSION_MAXIMUM) && ( \ + ${__VER} > ${_ZOPE_VERSION_MAXIMUM})) +_ZOPE_VERSION= ${ver} +.endif +.endfor +.if !defined(_ZOPE_VERSION) +IGNORE= needs an unsupported version of Zope +_ZOPE_VERSION= ${_ZOPE_PORTBRANCH} # just to avoid version sanity checking. +.endif +.endif # defined(ZOPE_VERSION) +.endif # defined(_ZOPE_VERSION_NONSUPPORTED) + +ZOPE_VERSION?= ${_ZOPE_VERSION} + +.if !defined(PYTHON_VERSION) +PYTHON_VERSION= ${_PYTHON_VER_REQUIRED} +.elif ${PYTHON_VERSION} != ${_PYTHON_VER_REQUIRED} +IGNORE+= Zope requires Python ${_PYTHON_VER_REQUIRED}.\ + But you or a port dependency specified ${PYTHON_VERSION} +.endif # !defined(PYTHON_VERSION) + +# Zope-related variables +.if ${ZOPE_VERSION} == ${_ZOPE_PORTBRANCH} +RUN_DEPENDS+= zope213>0:${PORTSDIR}/www/zope213 +.else +check-makevars:: + @${ECHO} "Makefile error: bad value for ZOPE_VERSION: ${ZOPE_VERSION}." + @${ECHO} "Legal values are: ${_ZOPE_PORTBRANCH} (default)" + @${FALSE} +.endif +ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR} +ZOPEPRODUCTDIR?= Products + +# Zope specific substitutions +PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \ + ZOPEPRODUCTDIR=${SZOPEBASEDIR}/${ZOPEPRODUCTDIR} + +.endif # !defined(_INCLUDE_USES_ZOPE_MK) |