aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorrm <rm@FreeBSD.org>2013-09-23 21:42:48 +0800
committerrm <rm@FreeBSD.org>2013-09-23 21:42:48 +0800
commitd9d3fabb19f099b1d8e50d589cc2689d2f30425c (patch)
tree511fdd73e7fa1001193cab28ce8d1d1e202e994b /Mk
parent7e6228a93bc92334a3f08c3d38f1290a15379d7c (diff)
downloadfreebsd-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')
-rw-r--r--Mk/Uses/zope.mk94
-rw-r--r--Mk/bsd.python.mk91
-rw-r--r--Mk/bsd.sanity.mk4
3 files changed, 98 insertions, 91 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)
diff --git a/Mk/bsd.python.mk b/Mk/bsd.python.mk
index 5311f616bf21..74aa22434449 100644
--- a/Mk/bsd.python.mk
+++ b/Mk/bsd.python.mk
@@ -210,76 +210,9 @@ Python_Include_MAINTAINER= python@FreeBSD.org
#
# USE_TWISTED_RUN - Same as USE_TWISTED but add only run dependency.
#
-# USE_ZOPE - Use Zope - an object-based web application platform, this
-# also sets up:
-# 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.
-#
_PYTHON_PORTBRANCH= 2.7
_PYTHON_ALLBRANCHES= 2.7 2.6 3.3 3.2 3.1 # preferred first
-_ZOPE_PORTBRANCH= 2.13
-_ZOPE_ALLBRANCHES= 2.13
-
-
-# Determine version number of Zope to use
-.if defined(USE_ZOPE)
-.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}
-
-PYTHON_VERSION= python2.7
-.endif # defined(USE_ZOPE)
-
# Determine version number of Python to use
.if !defined(PYTHON_DEFAULT_VERSION)
@@ -555,20 +488,6 @@ PLIST_FILES+= ${PYDISTUTILS_EGGINFODIR:S;${PREFIX}/;;}/${egg}
# Fix for programs that build python from a GNU auto* environment
CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}"
-# Zope-related variables
-.if defined(USE_ZOPE)
-.if ${ZOPE_VERSION} == "2.13"
-ZOPE_DEPENDS= zope213>0:${PORTSDIR}/www/zope213
-.else
-check-makevars::
- @${ECHO} "Makefile error: bad value for ZOPE_VERSION: ${ZOPE_VERSION}."
- @${ECHO} "Legal values are: 2.13 (default)"
- @${FALSE}
-.endif
-ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR}
-ZOPEPRODUCTDIR?= Products
-.endif
-
# Python 3rd-party modules
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:${PORTSDIR}/devel/py-game
PYNUMERIC= ${PYTHON_SITELIBDIR}/Numeric/Numeric.py:${PORTSDIR}/math/py-numeric
@@ -589,10 +508,6 @@ RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} \
.endif
.endif # ${PYTHON_NO_DEPENDS} == "NO"
-.if defined(USE_ZOPE)
-RUN_DEPENDS+= ${ZOPE_DEPENDS}
-.endif
-
# set $PREFIX as Python's one
.if defined(USE_PYTHON_PREFIX)
PREFIX= ${PYTHONBASE}
@@ -607,12 +522,6 @@ PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \
PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \
PYTHON_VERSION=${PYTHON_VERSION}
-# Zope specific substitutions
-.if defined(USE_ZOPE)
-PLIST_SUB+= ZOPEBASEDIR=${SZOPEBASEDIR} \
- ZOPEPRODUCTDIR=${SZOPEBASEDIR}/${ZOPEPRODUCTDIR}
-.endif
-
# Twisted specific routines
.if defined(USE_TWISTED) || defined(USE_TWISTED_BUILD) || defined(USE_TWISTED_RUN)
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index d1a1842c853a..20e619eb6bf0 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -79,6 +79,10 @@ DEV_ERROR+= "USE_GETTEXT is unsupported, replaced by USES=gettext"
DEV_ERROR+= "USE_GNOME=pkgconfig is unsupported, please use USES=pkgconfig"
.endif
+.if defined(USE_ZOPE) && ${USE_ZOPE} == yes
+DEV_ERROR+= "USE_ZOPE=yes is unsupported, please use USES=zope instead"
+.endif
+
.if defined(USE_GNOME) && ${USE_GNOME:Mgnomehack}
DEV_WARNING+= "USE_GNOME=gnomehack is deprecated, please use USES=pathfix"
.endif