1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- remove expired ports

* lang/python24 and lang/python25: unmaintained upstream
  * www/zope and www/zope211: unmaintained upstream (the only
    consumers of python24)
- clean-up python versions < 2.6 from lang/python-doc-html
- clean-up python24/25 from Mk/bsd.ports.mk
- add www/zope213 glue to bsd.python.mk
- clean-up zope versions != 2.13 from bsd.python.mk

Submitted by:	miwi (based on)
Approved by:	portmgr (miwi)
This commit is contained in:
Ruslan Makhmatkhanov 2012-07-16 17:04:29 +00:00
parent ce07350e5e
commit 473f7fc2dc
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300956
72 changed files with 11 additions and 20917 deletions

4
MOVED
View File

@ -3549,3 +3549,7 @@ science/ics||2012-07-07|ICS is no more a part of Code_Saturne
mail/postfix25||2012-07-07|Has expired: no further upstream development; please consider upgrading
misc/alevt||2012-07-16|Has expired: No more upstream
multimedia/moonlight||2012-07-16|Has expired: BROKEN for more than 6 month
lang/python24||2012-07-16|End Of Life reached
lang/python25||2012-07-16|End Of Life reached
www/zope||2012-07-16|End Of Life reached
www/zope211||2012-07-16|End Of Life reached

View File

@ -202,9 +202,9 @@ Python_Include_MAINTAINER= python@FreeBSD.org
#
_PYTHON_PORTBRANCH= 2.7
_PYTHON_ALLBRANCHES= 2.7 2.6 2.5 2.4 3.2 3.1 # preferred first
_ZOPE_PORTBRANCH= 2.7
_ZOPE_ALLBRANCHES= 2.7 2.8 2.9 2.10 3.2
_PYTHON_ALLBRANCHES= 2.7 2.6 3.2 3.1 # preferred first
_ZOPE_PORTBRANCH= 2.13
_ZOPE_ALLBRANCHES= 2.13
# Determine version number of Zope to use
@ -256,7 +256,7 @@ _ZOPE_VERSION= ${_ZOPE_PORTBRANCH} # just to avoid version sanity checking.
ZOPE_VERSION?= ${_ZOPE_VERSION}
PYTHON_VERSION= python2.4
PYTHON_VERSION= python2.7
.endif # defined(USE_ZOPE)
@ -392,22 +392,6 @@ PYTHON_REL= 268
PYTHON_SUFFIX= 26
PYTHON_VER= 2.6
# Python-2.5
.elif ${PYTHON_VERSION} == "python2.5"
PYTHON_PORTVERSION?=2.5.6
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python25
PYTHON_REL= 256
PYTHON_SUFFIX= 25
PYTHON_VER= 2.5
# Python-2.4
.elif ${PYTHON_VERSION} == "python2.4"
PYTHON_PORTVERSION?=2.4.5
PYTHON_PORTSDIR= ${PORTSDIR}/lang/python24
PYTHON_REL= 245
PYTHON_SUFFIX= 24
PYTHON_VER= 2.4
# Python versions in development
.elif defined(FORCE_PYTHON_VERSION)
PYTHON_PORTSDIR= # empty
@ -422,8 +406,6 @@ PYTHON_VER!= ${PYTHON_CMD} -c 'import sys; print(sys.version[:3])'
check-makevars::
@${ECHO} "Makefile error: bad value for PYTHON_VERSION: ${PYTHON_VERSION}."
@${ECHO} "Legal values are:"
@${ECHO} " python2.4"
@${ECHO} " python2.5"
@${ECHO} " python2.6"
@${ECHO} " python2.7 (default)"
@${ECHO} " python3.1"
@ -530,30 +512,12 @@ CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}"
# Zope-related variables
.if defined(USE_ZOPE)
.if ${ZOPE_VERSION} == "3.2"
SZOPEBASEDIR?= www/Zope3
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope3
ZOPESKELDIR= ${ZOPEBASEDIR}/zopeskel
.elif ${ZOPE_VERSION} == "2.10"
SZOPEBASEDIR?= www/Zope210
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope210
ZOPESKELDIR= ${ZOPEBASEDIR}/skel
.elif ${ZOPE_VERSION} == "2.9"
SZOPEBASEDIR?= www/Zope29
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope29
ZOPESKELDIR= ${ZOPEBASEDIR}/skel
.elif ${ZOPE_VERSION} == "2.8"
SZOPEBASEDIR?= www/Zope28
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope28
ZOPESKELDIR= ${ZOPEBASEDIR}/skel
.elif ${ZOPE_VERSION} == "2.7"
SZOPEBASEDIR?= www/Zope
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope
ZOPESKELDIR= ${ZOPEBASEDIR}/skel
.if ${ZOPE_VERSION} == "2.13"
ZOPE_PORTSDIR= ${PORTSDIR}/www/zope213
.else
check-makevars::
@${ECHO} "Makefile error: bad value for ZOPE_VERSION: ${ZOPE_VERSION}."
@${ECHO} "Legal values are: 2.7 (default), 2.8, 2.9, 2.10, 3.2"
@${ECHO} "Legal values are: 2.13 (default)"
@${FALSE}
.endif
ZOPEBASEDIR?= ${PREFIX}/${SZOPEBASEDIR}

View File

@ -273,8 +273,6 @@
SUBDIR += python-doc-pdf-letter
SUBDIR += python-doc-text
SUBDIR += python-mode.el
SUBDIR += python24
SUBDIR += python25
SUBDIR += python26
SUBDIR += python27
SUBDIR += python31

View File

@ -30,7 +30,6 @@ DOCFORMAT?= html
.include <bsd.port.pre.mk>
.if ${PYTHON_REL} >= 260
. if ${DOCFORMAT} == "html" || ${DOCFORMAT} == "text"
WRKSRC= ${WRKDIR}/${DISTNAME}
. else
@ -39,9 +38,6 @@ WRKSRC= ${WRKDIR}/docs-pdf
. if ${DOCFORMAT} != "html" && ${DOCFORMAT} != "pdf-a4" && ${DOCFORMAT} != "pdf-letter" && ${DOCFORMAT} != "text"
IGNORE= invalid value for DOCFORMAT: "${DOCFORMAT}", possible values are: text, html, pdf-a4, pdf-letter
. endif
.else
IGNORE= there is no documentation for this Python version, because it deprecated upstream
.endif
pre-install:
@cd ${WRKSRC} && \

View File

@ -1,229 +0,0 @@
# New ports collection makefile for: python24
# Date created: 08 August 1995
# Whom: jkh
#
# $FreeBSD$
#
PORTNAME= python24
PORTVERSION= 2.4.5
PORTREVISION= 8
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
DISTFILES= ${PYTHON_DISTFILE}
MAINTAINER= python@FreeBSD.org
COMMENT= An interpreted object-oriented programming language
DIST_SUBDIR= python
WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
CONFIGURE_ENV= OPT="${CFLAGS}"
MAKE_ENV= VPATH="${WRKSRC}"
USE_LDCONFIG= yes
INSTALL_TARGET= altinstall
MAKE_JOBS_SAFE= yes
MAN1= ${PYTHON_VERSION}.1
USE_PYTHON= yes
PYTHON_VERSION= python2.4
PYTHON_NO_DEPENDS= yes
DEPRECATED= deprecated via upstream
EXPIRATION_DATE= 2012-06-30
PLATFORMS= plat-freebsd4 plat-freebsd5 plat-freebsd6 plat-freebsd7 \
plat-freebsd8 plat-freebsd9 plat-freebsd10
SHARED_WRKSRC= ${WRKSRC}/build.shared
PLIST= ${WRKDIR}/pkg-plist
PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//}
EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION}
DATADIR= ${PREFIX}/share/${PYTHON_VERSION}
BIN_SCRIPTS= idle pydoc python python-shared smtpd.py
BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
-e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},'
OPTIONS= THREADS "Enable thread support" on \
UCS4 "Use UCS4 for unicode support" on \
NLS "Enable Gettext support for the locale module" on \
PYMALLOC "Use python's internal malloc" on \
IPV6 "Enable IPv6 support" on \
FPECTL "Enable floating point exception handling" off
.include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
MLINKS= ${PYTHON_VERSION}.1 python.1
PLIST_SUB+= IF_DEFAULT=""
.else
PLIST_SUB+= IF_DEFAULT="@comment "
.endif
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
# XXX do not set any LDFLAGS or CFLAGS - this causes pyexpat to fail building
#LDFLAGS+= "-L${LOCALBASE}/lib"
#CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
.else
CONFIGURE_ARGS+= --without-threads
.endif # !defined(WITHOUT_THREADS)
.if !defined(WITHOUT_UCS4) && !defined(WITH_UCS2)
CONFIGURE_ARGS+= --enable-unicode=ucs4
.endif
.if defined(WITHOUT_PYMALLOC)
CONFIGURE_ARGS+= --without-pymalloc
.endif
.if ${ARCH} == i386
PLIST_SUB+= X86_ONLY=""
.else
PLIST_SUB+= X86_ONLY="@comment "
.endif
.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha
PLIST_SUB+= 32BIT_ONLY="@comment "
.else
PLIST_SUB+= 32BIT_ONLY=""
.endif
.if ${ARCH} == sparc64
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
.endif
# See http://bugs.freebsd.org/115940
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) # the world with NO_NIS
PLIST_SUB+= NO_NIS="@comment "
WITHOUT_NIS?= detected
.else
PLIST_SUB+= NO_NIS=""
.endif
.if !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --enable-ipv6
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if defined(WITH_FPECTL)
CONFIGURE_ARGS+= --with-fpectl
.endif
post-extract:
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${WRKSRC}/Tools/scripts/pydoc > ${WRKDIR}/pydoc2.4
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${WRKSRC}/Tools/scripts/idle > ${WRKDIR}/idle2.4
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${WRKSRC}/Lib/smtpd.py > ${WRKDIR}/smtpd2.4.py
pre-patch:
${REINPLACE_CMD} -e \
's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
${WRKSRC}/Lib/pydoc.py
${REINPLACE_CMD} -e \
's|^\( *prefixes = .*\)\]$$|\1, "${LOCALBASE}"]|g' \
${WRKSRC}/Lib/site.py
.if defined(WITH_FPECTL) && ${ARCH} == i386
${ECHO} "fpectl fpectlmodule.c" >> ${WRKSRC}/Modules/Setup.dist
.endif
post-patch:
.if defined(WITHOUT_NIS)
${REINPLACE_CMD} -e \
's/disabled_module_list =[^]]*/&, "nis"/' \
${PATCH_WRKSRC}/setup.py
.endif
post-configure:
@# prepare a subdir for shared build
.for subdir in Modules Parser Python Objects
${MKDIR} ${SHARED_WRKSRC}/${subdir}
.endfor
${SED} -e 's,^\(LDLIBRARY=\).*$$,\1libpython$$(VERSION).so,' \
-e 's,^\(BLDLIBRARY=\).*$$,\1-L. -lpython$$(VERSION),' \
-e 's,^\(CFLAGSFORSHARED=\).*$$,\1$$(CCSHARED),' \
-e 's,^\(Makefile Modules/config.c:.*\)Makefile.pre,\1,' \
-e 's,^\(.(BUILDPYTHON):.*\).(LIBRARY),\1,' \
${WRKSRC}/Makefile > ${SHARED_WRKSRC}/Makefile
${LN} -sf ${WRKSRC}/pyconfig.h ${WRKSRC}/Include ${WRKSRC}/Grammar \
${SHARED_WRKSRC}/
${LN} -sf ${WRKSRC}/Python/getplatform.c ${WRKSRC}/Python/importdl.c \
${WRKSRC}/Python/importdl.h \
${SHARED_WRKSRC}/Python/
${LN} -sf ${WRKSRC}/Modules/makesetup ${WRKSRC}/Modules/Setup* \
${WRKSRC}/Modules/*.c ${WRKSRC}/Modules/*.h \
${SHARED_WRKSRC}/Modules/
post-build:
cd ${SHARED_WRKSRC}; \
${SETENV} ${MAKE_ENV} ${MAKE} lib${PYTHON_VERSION}.so python; \
${LN} -f lib${PYTHON_VERSION}.so lib${PYTHON_VERSION}.so.1; \
${LN} -f python ${PYTHON_VERSION:S/thon/thon-shared/}
pre-su-install:
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
${PATCH_WRKSRC}/Lib/plat-freebsd9
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
${PATCH_WRKSRC}/Lib/plat-freebsd10
.for platform in ${PLATFORMS}
${MKDIR} ${PYTHONPREFIX_LIBDIR}/${platform}
.for file in IN.py regen
${INSTALL_DATA} ${WRKSRC}/Lib/${platform}/${file} \
${PYTHONPREFIX_LIBDIR}/${platform}/
.endfor
.endfor
pre-install:
${AWK} '{ print $$0; } \
/LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' \
${PKGDIR}/pkg-plist > ${PLIST}
post-install:
@# shared version of executable and library
${INSTALL_PROGRAM} ${SHARED_WRKSRC}/lib${PYTHON_VERSION}.so.1 \
${PREFIX}/lib
cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}.so.1 \
lib${PYTHON_VERSION}.so
${LN} -sf ${PREFIX}/lib/lib${PYTHON_VERSION}.so ${PYTHONPREFIX_LIBDIR}/config
${INSTALL_PROGRAM} \
${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \
${PREFIX}/bin
@# additional files installing by ports
@${MKDIR} ${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/Misc/python.man \
${MANPREFIX}/man/man1/${PYTHON_VERSION}.1
${INSTALL_SCRIPT} ${WRKDIR}/pydoc2.4 ${WRKDIR}/idle2.4 \
${WRKDIR}/smtpd2.4.py ${PREFIX}/bin
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
for f in ${BIN_SCRIPTS}; do \
TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB}`; \
cd ${PREFIX}/bin && ${LN} -f $$TARGET $$f; \
done
.endif
.if !defined(NOPORTDATA)
@${MKDIR} ${DATADIR}
@cd ${WRKSRC}; ${TAR} -c --exclude='*CVS*' -f - Tools | \
(cd ${DATADIR}; ${TAR} xf -)
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
@cd ${WRKSRC}/Demo; ${TAR} -c --exclude='*CVS*' -f - * | \
(cd ${EXAMPLESDIR}; ${TAR} xf -)
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,2 +0,0 @@
SHA256 (python/Python-2.4.5.tgz) = 6ae6f67a388a7f70ed3a20eebab5aae995ee433089d1f1724095c62f4b7389a1
SIZE (python/Python-2.4.5.tgz) = 9625509

View File

@ -1,14 +0,0 @@
--- Lib/test/test_zlib.py 2008/04/08 23:47:30 62234
+++ Lib/test/test_zlib.py 2008/04/09 00:25:17 62235
@@ -83,6 +83,11 @@
# verify failure on building decompress object with bad params
self.assertRaises(ValueError, zlib.decompressobj, 0)
+ def test_decompressobj_badflush(self):
+ # verify failure on calling decompressobj.flush with bad params
+ self.assertRaises(ValueError, zlib.decompressobj().flush, 0)
+ self.assertRaises(ValueError, zlib.decompressobj().flush, -1)
+
class CompressTestCase(unittest.TestCase):

View File

@ -1,38 +0,0 @@
--- Modules/fcntlmodule.c.orig 2006-09-27 15:17:32.000000000 -0400
+++ Modules/fcntlmodule.c 2010-06-24 21:15:48.000000000 -0400
@@ -95,7 +95,7 @@
{
#define IOCTL_BUFSZ 1024
int fd;
- int code;
+ unsigned long code;
int arg;
int ret;
char *str;
@@ -103,7 +103,7 @@
int mutate_arg = 0;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
- if (PyArg_ParseTuple(args, "O&iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -164,7 +164,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > IOCTL_BUFSZ) {
PyErr_SetString(PyExc_ValueError,
@@ -186,7 +186,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&i|i;ioctl requires a file or file descriptor,"
+ "O&k|i;ioctl requires a file or file descriptor,"
" an integer and optionally a integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View File

@ -1,13 +0,0 @@
--- Modules/zlibmodule.c.orig 2008-04-25 01:47:26.000000000 +0200
+++ Modules/zlibmodule.c 2008-04-25 01:48:17.000000000 +0200
@@ -774,6 +774,10 @@
if (!PyArg_ParseTuple(args, "|i:flush", &length))
return NULL;
+ if (length <= 0) {
+ PyErr_SetString(PyExc_ValueError, "length must be greater than zero");
+ return NULL;
+ }
if (!(retval = PyString_FromStringAndSize(NULL, length)))
return NULL;

View File

@ -1,13 +0,0 @@
--- Modules/socketmodule.c.orig Sun Oct 2 21:49:22 2005
+++ Modules/socketmodule.c Sun Oct 2 21:50:01 2005
@@ -142,7 +142,9 @@
/* On systems on which getaddrinfo() is believed to not be thread-safe,
(this includes the getaddrinfo emulation) protect access with a lock. */
-#if defined(WITH_THREAD) && (defined(__APPLE__) || defined(__FreeBSD__) || \
+#include <sys/param.h>
+#if defined(WITH_THREAD) && (defined(__APPLE__) || \
+ (defined(__FreeBSD__) && __FreeBSD_version+0 < 503000) || \
defined(__OpenBSD__) || defined(__NetBSD__) || !defined(HAVE_GETADDRINFO))
#define USE_GETADDRINFO_LOCK
#endif

View File

@ -1,16 +0,0 @@
--- Python/ceval.c.orig Wed Nov 24 03:06:08 2004
+++ Python/ceval.c Wed Dec 1 22:29:37 2004
@@ -414,8 +414,11 @@
/* The interpreter's recursion limit */
-static int recursion_limit = 1000;
-int _Py_CheckRecursionLimit = 1000;
+#ifndef PYTHON_DEFAULT_RECURSION_LIMIT
+#define PYTHON_DEFAULT_RECURSION_LIMIT 1000
+#endif
+static int recursion_limit = PYTHON_DEFAULT_RECURSION_LIMIT;
+int _Py_CheckRecursionLimit = PYTHON_DEFAULT_RECURSION_LIMIT;
int
Py_GetRecursionLimit(void)

View File

@ -1,30 +0,0 @@
$FreeBSD$
--- Python/thread_pthread.h
+++ Python/thread_pthread.h
@@ -149,6 +149,7 @@
{
pthread_t th;
int status;
+ sigset_t set, oset;
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
@@ -177,6 +178,8 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
@@ -188,6 +191,7 @@
(void *)arg
);
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_destroy(&attrs);
#endif

File diff suppressed because it is too large Load Diff

View File

@ -1,58 +0,0 @@
--- Include/pymem.h.orig 2008-03-02 20:20:32.000000000 +0100
+++ Include/pymem.h
@@ -66,8 +66,12 @@ PyAPI_FUNC(void) PyMem_Free(void *);
for malloc(0), which would be treated as an error. Some platforms
would return a pointer with no memory behind it, which would break
pymalloc. To solve these problems, allocate an extra byte. */
-#define PyMem_MALLOC(n) malloc((n) ? (n) : 1)
-#define PyMem_REALLOC(p, n) realloc((p), (n) ? (n) : 1)
+/* Returns NULL to indicate error if a negative size or size larger than
+ Py_ssize_t can represent is supplied. Helps prevents security holes. */
+#define PyMem_MALLOC(n) (((n) < 0 || (n) > INT_MAX) ? NULL \
+ : malloc((n) ? (n) : 1))
+#define PyMem_REALLOC(p, n) (((n) < 0 || (n) > INT_MAX) ? NULL \
+ : realloc((p), (n) ? (n) : 1))
#endif /* PYMALLOC_DEBUG */
@@ -80,24 +84,31 @@ PyAPI_FUNC(void) PyMem_Free(void *);
* Type-oriented memory interface
* ==============================
*
- * These are carried along for historical reasons. There's rarely a good
- * reason to use them anymore (you can just as easily do the multiply and
- * cast yourself).
+ * Allocate memory for n objects of the given type. Returns a new pointer
+ * or NULL if the request was too large or memory allocation failed. Use
+ * these macros rather than doing the multiplication yourself so that proper
+ * overflow checking is always done.
*/
#define PyMem_New(type, n) \
- ( assert((n) <= PY_SIZE_MAX / sizeof(type)) , \
+ ( ((n) > INT_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_Malloc((n) * sizeof(type)) ) )
#define PyMem_NEW(type, n) \
- ( assert((n) <= PY_SIZE_MAX / sizeof(type)) , \
+ ( ((n) > INT_MAX / sizeof(type)) ? NULL : \
( (type *) PyMem_MALLOC((n) * sizeof(type)) ) )
+/*
+ * The value of (p) is always clobbered by this macro regardless of success.
+ * The caller MUST check if (p) is NULL afterwards and deal with the memory
+ * error if so. This means the original value of (p) MUST be saved for the
+ * caller's memory error handler to not lose track of it.
+ */
#define PyMem_Resize(p, type, n) \
- ( assert((n) <= PY_SIZE_MAX / sizeof(type)) , \
- ( (p) = (type *) PyMem_Realloc((p), (n) * sizeof(type)) ) )
+ ( (p) = ((n) > INT_MAX / sizeof(type)) ? NULL : \
+ (type *) PyMem_Realloc((p), (n) * sizeof(type)) )
#define PyMem_RESIZE(p, type, n) \
- ( assert((n) <= PY_SIZE_MAX / sizeof(type)) , \
- ( (p) = (type *) PyMem_REALLOC((p), (n) * sizeof(type)) ) )
+ ( (p) = ((n) > INT_MAX / sizeof(type)) ? NULL : \
+ (type *) PyMem_REALLOC((p), (n) * sizeof(type)) )
/* In order to avoid breaking old code mixing PyObject_{New, NEW} with
PyMem_{Del, DEL} and PyMem_{Free, FREE}, the PyMem "release memory"

View File

@ -1,33 +0,0 @@
--- Modules/arraymodule.c.orig 2008-03-02 20:20:32.000000000 +0100
+++ Modules/arraymodule.c
@@ -814,6 +814,7 @@ static int
array_do_extend(arrayobject *self, PyObject *bb)
{
int size;
+ char *old_item;
if (!array_Check(bb))
return array_iter_extend(self, bb);
@@ -829,10 +830,11 @@ array_do_extend(arrayobject *self, PyObj
return -1;
}
size = self->ob_size + b->ob_size;
+ old_item = self->ob_item;
PyMem_RESIZE(self->ob_item, char, size*self->ob_descr->itemsize);
if (self->ob_item == NULL) {
- PyObject_Del(self);
- PyErr_NoMemory();
+ self->ob_item = old_item;
+ PyErr_NoMemory();
return -1;
}
memcpy(self->ob_item + self->ob_size*self->ob_descr->itemsize,
@@ -884,7 +886,7 @@ array_inplace_repeat(arrayobject *self,
if (size > INT_MAX / n) {
return PyErr_NoMemory();
}
- PyMem_Resize(items, char, n * size);
+ PyMem_RESIZE(items, char, n * size);
if (items == NULL)
return PyErr_NoMemory();
p = items;

View File

@ -1,34 +0,0 @@
--- Objects/obmalloc.c.orig 2005-07-11 07:57:11.000000000 +0200
+++ Objects/obmalloc.c
@@ -585,6 +585,15 @@ PyObject_Malloc(size_t nbytes)
uint size;
/*
+ * Limit ourselves to INT_MAX bytes to prevent security holes.
+ * Most python internals blindly use a signed Py_ssize_t to track
+ * things without checking for overflows or negatives.
+ * As size_t is unsigned, checking for nbytes < 0 is not required.
+ */
+ if (nbytes > INT_MAX)
+ return NULL;
+
+ /*
* This implicitly redirects malloc(0).
*/
if ((nbytes - 1) < SMALL_REQUEST_THRESHOLD) {
@@ -814,6 +823,15 @@ PyObject_Realloc(void *p, size_t nbytes)
if (p == NULL)
return PyObject_Malloc(nbytes);
+ /*
+ * Limit ourselves to INT_MAX bytes to prevent security holes.
+ * Most python internals blindly use a signed Py_ssize_t to track
+ * things without checking for overflows or negatives.
+ * As size_t is unsigned, checking for nbytes < 0 is not required.
+ */
+ if (nbytes > INT_MAX)
+ return NULL;
+
pool = POOL_ADDR(p);
if (Py_ADDRESS_IN_RANGE(p, pool)) {
/* We're in charge of this block */

View File

@ -1,16 +0,0 @@
--- Modules/selectmodule.c.orig 2006-09-27 21:17:32.000000000 +0200
+++ Modules/selectmodule.c
@@ -342,10 +342,12 @@ update_ufd_array(pollObject *self)
{
int i, pos;
PyObject *key, *value;
+ struct pollfd *old_ufds = self->ufds;
self->ufd_len = PyDict_Size(self->dict);
- PyMem_Resize(self->ufds, struct pollfd, self->ufd_len);
+ PyMem_RESIZE(self->ufds, struct pollfd, self->ufd_len);
if (self->ufds == NULL) {
+ self->ufds = old_ufds;
PyErr_NoMemory();
return 0;
}

View File

@ -1,14 +0,0 @@
--- Modules/almodule.c.orig 2006-09-27 21:17:32.000000000 +0200
+++ Modules/almodule.c
@@ -1633,9 +1633,11 @@ al_QueryValues(PyObject *self, PyObject
if (nvals < 0)
goto cleanup;
if (nvals > setsize) {
+ ALvalue *old_return_set = return_set;
setsize = nvals;
PyMem_RESIZE(return_set, ALvalue, setsize);
if (return_set == NULL) {
+ return_set = old_return_set;
PyErr_NoMemory();
goto cleanup;
}

View File

@ -1,23 +0,0 @@
--- Modules/gcmodule.c.orig 2006-09-28 19:08:01.000000000 +0200
+++ Modules/gcmodule.c
@@ -1249,7 +1249,10 @@ PyObject *
_PyObject_GC_Malloc(size_t basicsize)
{
PyObject *op;
- PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
+ PyGC_Head *g;
+ if (basicsize > INT_MAX - sizeof(PyGC_Head))
+ return PyErr_NoMemory();
+ g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
if (g == NULL)
return PyErr_NoMemory();
g->gc.gc_refs = GC_UNTRACKED;
@@ -1291,6 +1294,8 @@ _PyObject_GC_Resize(PyVarObject *op, int
{
const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems);
PyGC_Head *g = AS_GC(op);
+ if (basicsize > INT_MAX - sizeof(PyGC_Head))
+ return (PyVarObject *)PyErr_NoMemory();
g = PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize);
if (g == NULL)
return (PyVarObject *)PyErr_NoMemory();

View File

@ -1,11 +0,0 @@
--- Modules/mmapmodule.c.orig 2008-08-05 12:00:52.000000000 +0200
+++ Modules/mmapmodule.c
@@ -223,7 +223,7 @@ mmap_read_method(mmap_object *self,
return(NULL);
/* silently 'adjust' out-of-range requests */
- if ((self->pos + num_bytes) > self->size) {
+ if (num_bytes > self->size - self->pos) {
num_bytes -= (self->pos+num_bytes) - self->size;
}
result = Py_BuildValue("s#", self->data+self->pos, num_bytes);

View File

@ -1,31 +0,0 @@
--- Modules/stropmodule.c.orig 2008-03-02 20:20:32.000000000 +0100
+++ Modules/stropmodule.c
@@ -214,6 +214,13 @@ strop_joinfields(PyObject *self, PyObjec
return NULL;
}
slen = PyString_GET_SIZE(item);
+ if (slen > INT_MAX - reslen ||
+ seplen > INT_MAX - reslen - seplen) {
+ PyErr_SetString(PyExc_OverflowError,
+ "input too long");
+ Py_DECREF(res);
+ return NULL;
+ }
while (reslen + slen + seplen >= sz) {
if (_PyString_Resize(&res, sz * 2) < 0)
return NULL;
@@ -251,6 +258,14 @@ strop_joinfields(PyObject *self, PyObjec
return NULL;
}
slen = PyString_GET_SIZE(item);
+ if (slen > INT_MAX - reslen ||
+ seplen > INT_MAX - reslen - seplen) {
+ PyErr_SetString(PyExc_OverflowError,
+ "input too long");
+ Py_DECREF(res);
+ Py_XDECREF(item);
+ return NULL;
+ }
while (reslen + slen + seplen >= sz) {
if (_PyString_Resize(&res, sz * 2) < 0) {
Py_DECREF(item);

View File

@ -1,13 +0,0 @@
--- Objects/bufferobject.c.orig 2008-03-02 20:20:32.000000000 +0100
+++ Objects/bufferobject.c
@@ -384,6 +384,10 @@ buffer_repeat(PyBufferObject *self, int
count = 0;
if (!get_buf(self, &ptr, &size))
return NULL;
+ if (count > INT_MAX / size) {
+ PyErr_SetString(PyExc_MemoryError, "result too large");
+ return NULL;
+ }
ob = PyString_FromStringAndSize(NULL, size * count);
if ( ob == NULL )
return NULL;

View File

@ -1,42 +0,0 @@
--- Objects/stringobject.c.orig 2006-10-06 21:26:14.000000000 +0200
+++ Objects/stringobject.c
@@ -69,6 +69,11 @@ PyString_FromStringAndSize(const char *s
return (PyObject *)op;
}
+ if (size > INT_MAX - sizeof(PyStringObject)) {
+ PyErr_SetString(PyExc_OverflowError, "string is too large");
+ return NULL;
+ }
+
/* Inline PyObject_NewVar */
op = (PyStringObject *)PyObject_MALLOC(sizeof(PyStringObject) + size);
if (op == NULL)
@@ -104,7 +109,7 @@ PyString_FromString(const char *str)
assert(str != NULL);
size = strlen(str);
- if (size > INT_MAX) {
+ if (size > INT_MAX - sizeof(PyStringObject)) {
PyErr_SetString(PyExc_OverflowError,
"string is too long for a Python string");
return NULL;
@@ -907,7 +912,18 @@ string_concat(register PyStringObject *a
Py_INCREF(a);
return (PyObject *)a;
}
+ /* Check that string sizes are not negative, to prevent an
+ overflow in cases where we are passed incorrectly-created
+ strings with negative lengths (due to a bug in other code).
+ */
size = a->ob_size + b->ob_size;
+ if (a->ob_size < 0 || b->ob_size < 0 ||
+ a->ob_size > INT_MAX - b->ob_size) {
+ PyErr_SetString(PyExc_OverflowError,
+ "strings are too large to concat");
+ return NULL;
+ }
+
/* Inline PyObject_NewVar */
op = (PyStringObject *)PyObject_MALLOC(sizeof(PyStringObject) + size);
if (op == NULL)

View File

@ -1,17 +0,0 @@
--- Objects/tupleobject.c.orig 2006-03-17 20:04:15.000000000 +0100
+++ Objects/tupleobject.c
@@ -60,11 +60,12 @@ PyTuple_New(register int size)
int nbytes = size * sizeof(PyObject *);
/* Check for overflow */
if (nbytes / sizeof(PyObject *) != (size_t)size ||
- (nbytes += sizeof(PyTupleObject) - sizeof(PyObject *))
- <= 0)
+ (nbytes > INT_MAX - sizeof(PyTupleObject) - sizeof(PyObject *)))
{
return PyErr_NoMemory();
}
+ nbytes += sizeof(PyTupleObject) - sizeof(PyObject *);
+
op = PyObject_GC_NewVar(PyTupleObject, &PyTuple_Type, size);
if (op == NULL)
return NULL;

View File

@ -1,112 +0,0 @@
--- Objects/unicodeobject.c.orig 2006-10-05 20:08:58.000000000 +0200
+++ Objects/unicodeobject.c
@@ -186,6 +186,11 @@ PyUnicodeObject *_PyUnicode_New(int leng
return unicode_empty;
}
+ /* Ensure we won't overflow the size. */
+ if (length > ((INT_MAX / sizeof(Py_UNICODE)) - 1)) {
+ return (PyUnicodeObject *)PyErr_NoMemory();
+ }
+
/* Unicode freelist & memory allocation */
if (unicode_freelist) {
unicode = unicode_freelist;
@@ -1040,6 +1045,9 @@ PyObject *PyUnicode_EncodeUTF7(const Py_
char * out;
char * start;
+ if (cbAllocated / 5 != size)
+ return PyErr_NoMemory();
+
if (size == 0)
return PyString_FromStringAndSize(NULL, 0);
@@ -1638,6 +1646,7 @@ PyUnicode_EncodeUTF16(const Py_UNICODE *
{
PyObject *v;
unsigned char *p;
+ int nsize, bytesize;
#ifdef Py_UNICODE_WIDE
int i, pairs;
#else
@@ -1662,8 +1671,15 @@ PyUnicode_EncodeUTF16(const Py_UNICODE *
if (s[i] >= 0x10000)
pairs++;
#endif
- v = PyString_FromStringAndSize(NULL,
- 2 * (size + pairs + (byteorder == 0)));
+ /* 2 * (size + pairs + (byteorder == 0)) */
+ if (size > INT_MAX ||
+ size > INT_MAX - pairs - (byteorder == 0))
+ return PyErr_NoMemory();
+ nsize = (size + pairs + (byteorder == 0));
+ bytesize = nsize * 2;
+ if (bytesize / 2 != nsize)
+ return PyErr_NoMemory();
+ v = PyString_FromStringAndSize(NULL, bytesize);
if (v == NULL)
return NULL;
@@ -1977,6 +1993,11 @@ PyObject *unicodeescape_string(const Py_
char *p;
static const char *hexdigit = "0123456789abcdef";
+#ifdef Py_UNICODE_WIDE
+ const int expandsize = 10;
+#else
+ const int expandsize = 6;
+#endif
/* Initial allocation is based on the longest-possible unichr
escape.
@@ -1992,13 +2013,12 @@ PyObject *unicodeescape_string(const Py_
escape.
*/
+ if (size > (INT_MAX - 2 - 1) / expandsize)
+ return PyErr_NoMemory();
+
repr = PyString_FromStringAndSize(NULL,
2
-#ifdef Py_UNICODE_WIDE
- + 10*size
-#else
- + 6*size
-#endif
+ + expandsize*size
+ 1);
if (repr == NULL)
return NULL;
@@ -2239,12 +2259,16 @@ PyObject *PyUnicode_EncodeRawUnicodeEsca
char *q;
static const char *hexdigit = "0123456789abcdef";
-
#ifdef Py_UNICODE_WIDE
- repr = PyString_FromStringAndSize(NULL, 10 * size);
+ const int expandsize = 10;
#else
- repr = PyString_FromStringAndSize(NULL, 6 * size);
+ const int expandsize = 6;
#endif
+
+ if (size > INT_MAX / expandsize)
+ return PyErr_NoMemory();
+
+ repr = PyString_FromStringAndSize(NULL, expandsize * size);
if (repr == NULL)
return NULL;
if (size == 0)
@@ -4289,6 +4313,11 @@ PyUnicodeObject *pad(PyUnicodeObject *se
return self;
}
+ if (left > INT_MAX - self->length ||
+ right > INT_MAX - (left + self->length)) {
+ PyErr_SetString(PyExc_OverflowError, "padded string is too long");
+ return NULL;
+ }
u = _PyUnicode_New(left + self->length + right);
if (u) {
if (left)

View File

@ -1,55 +0,0 @@
--- Python/mysnprintf.c.orig 2001-12-21 17:32:15.000000000 +0100
+++ Python/mysnprintf.c
@@ -54,18 +54,28 @@ int
PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
{
int len; /* # bytes written, excluding \0 */
-#ifndef HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
+#define _PyOS_vsnprintf_EXTRA_SPACE 1
+#else
+#define _PyOS_vsnprintf_EXTRA_SPACE 512
char *buffer;
#endif
assert(str != NULL);
assert(size > 0);
assert(format != NULL);
+ /* We take a size_t as input but return an int. Sanity check
+ * our input so that it won't cause an overflow in the
+ * vsnprintf return value or the buffer malloc size. */
+ if (size > INT_MAX - _PyOS_vsnprintf_EXTRA_SPACE) {
+ len = -666;
+ goto Done;
+ }
#ifdef HAVE_SNPRINTF
len = vsnprintf(str, size, format, va);
#else
/* Emulate it. */
- buffer = PyMem_MALLOC(size + 512);
+ buffer = PyMem_MALLOC(size + _PyOS_vsnprintf_EXTRA_SPACE);
if (buffer == NULL) {
len = -666;
goto Done;
@@ -75,7 +85,7 @@ PyOS_vsnprintf(char *str, size_t size, c
if (len < 0)
/* ignore the error */;
- else if ((size_t)len >= size + 512)
+ else if ((size_t)len >= size + _PyOS_vsnprintf_EXTRA_SPACE)
Py_FatalError("Buffer overflow in PyOS_snprintf/PyOS_vsnprintf");
else {
@@ -86,8 +96,10 @@ PyOS_vsnprintf(char *str, size_t size, c
str[to_copy] = '\0';
}
PyMem_FREE(buffer);
-Done:
#endif
- str[size-1] = '\0';
+Done:
+ if (size > 0)
+ str[size-1] = '\0';
return len;
+#undef _PyOS_vsnprintf_EXTRA_SPACE
}

View File

@ -1,64 +0,0 @@
--- setup.py.orig Fri Mar 30 04:28:05 2007
+++ setup.py Fri Mar 30 04:30:54 2007
@@ -15,7 +15,7 @@
from distutils.command.install_lib import install_lib
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+disabled_module_list = ["_bsddb", "_tkinter", "gdbm", "mpz"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -442,7 +442,7 @@
if self.compiler.find_library_file(lib_dirs, 'readline'):
readline_libs = ['readline']
if self.compiler.find_library_file(lib_dirs,
- 'ncursesw'):
+ 'xxxncursesw'):
readline_libs.append('ncursesw')
elif self.compiler.find_library_file(lib_dirs,
'ncurses'):
@@ -465,7 +465,7 @@
readline_extra_link_args = ()
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
if platform not in ['mac']:
@@ -728,7 +728,7 @@
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
panel_library = 'panel'
- if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
+ if (self.compiler.find_library_file(lib_dirs, 'xxxncursesw')):
curses_libs = ['ncursesw']
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
@@ -738,6 +738,7 @@
elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
curses_libs = ['ncurses']
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
libraries = curses_libs) )
elif (self.compiler.find_library_file(lib_dirs, 'curses')
and platform != 'darwin'):
@@ -757,6 +758,7 @@
if (module_enabled(exts, '_curses') and
self.compiler.find_library_file(lib_dirs, panel_library)):
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ library_dirs = ['/usr/lib'],
libraries = [panel_library] + curses_libs) )
@@ -1225,8 +1227,7 @@
ext_modules=[Extension('struct', ['structmodule.c'])],
# Scripts to install
- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
- 'Lib/smtpd.py']
+ scripts = []
)
# --install-platlib

View File

@ -1,4 +0,0 @@
Python is an interpreted object-oriented programming language, and is
often compared to Tcl, Perl or Scheme.
WWW: http://www.python.org/

View File

@ -1,10 +0,0 @@
====
Note that some of the standard modules are provided as separate
ports since they require extra dependencies:
bsddb databases/py-bsddb
gdbm databases/py-gdbm
tkinter x11-toolkits/py-tkinter
Install them as needed.
====

File diff suppressed because it is too large Load Diff

View File

@ -1,243 +0,0 @@
# New ports collection makefile for: python25
# Date created: 3 July 2003
# Whom: Hye-Shik Chang <perky@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= python25
PORTVERSION= 2.5.6
PORTREVISION= 3
CATEGORIES= lang python ipv6
MASTER_SITES= ${PYTHON_MASTER_SITES}
MASTER_SITE_SUBDIR= ${PYTHON_MASTER_SITE_SUBDIR}
DISTFILES= ${PYTHON_DISTFILE}
MAINTAINER= python@FreeBSD.org
COMMENT= An interpreted object-oriented programming language
DIST_SUBDIR= python
WRKSRC= ${PYTHON_WRKSRC}/portbld.static
PATCH_WRKSRC= ${PYTHON_WRKSRC}
GNU_CONFIGURE= yes
CONFIGURE_SCRIPT= ../configure # must be relative
CONFIGURE_ENV= OPT="${CFLAGS}" SVNVERSION="echo freebsd"
MAKE_ENV= VPATH="${PYTHON_WRKSRC}"
USE_LDCONFIG= yes
INSTALL_TARGET= altinstall
MAKE_JOBS_SAFE= yes
MAN1= ${PYTHON_VERSION}.1
USE_PYTHON= yes
PYTHON_VERSION= python2.5
PYTHON_NO_DEPENDS= yes
DEPRECATED= deprecated via upstream
EXPIRATION_DATE= 2012-06-30
SHARED_WRKSRC= ${PYTHON_WRKSRC}/portbld.shared
PLIST= ${WRKDIR}/PLIST
PLIST_TEMPLATE?=${PKGDIR}/pkg-plist
PLIST_SUB= PYVER=${PYTHON_VERSION:S/python//} \
PYVER_WITHPAT=${PORTVERSION:S/.c/c/}
EXAMPLESDIR= ${PREFIX}/share/examples/${PYTHON_VERSION}
DATADIR= ${PREFIX}/share/${PYTHON_VERSION}
PLATFORMS= plat-freebsd4 plat-freebsd5 plat-freebsd6 \
plat-freebsd7 plat-freebsd8 plat-freebsd9 \
plat-freebsd10
BIN_SCRIPTS= idle pydoc python python-shared smtpd.py python-config \
python-shared-config
BINLINKS_SUB= -e 's,smtpd,smtpd${PYTHON_VER},' \
-e 's,(idle|pydoc|python-shared|python),\1${PYTHON_VER},'
OPTIONS= THREADS "Enable thread support" on \
UCS4 "Use UCS4 for unicode support" on \
NLS "Enable Gettext support for the locale module" on \
PYMALLOC "Use python's internal malloc" on \
IPV6 "Enable IPv6 support" on \
FPECTL "Enable floating point exception handling" off
.include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
MLINKS= ${PYTHON_VERSION}.1 python.1
PLIST_SUB+= IF_DEFAULT=""
.else
PLIST_SUB+= IF_DEFAULT="@comment "
.endif
.if !defined(WITHOUT_NLS)
USE_GETTEXT= yes
# XXX do not set any LDFLAGS or CFLAGS - this causes pyexpat to fail building
#LDFLAGS+= "-L${LOCALBASE}/lib"
#CFLAGS+= "-I${LOCALBASE}/include"
.else
CONFIGURE_ENV+= ac_cv_lib_intl_textdomain=no ac_cv_header_libintl_h=no
.endif
.if !defined(WITHOUT_THREADS)
CONFIGURE_ARGS+= --with-threads
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
.else
CONFIGURE_ARGS+= --without-threads
.endif # !defined(WITHOUT_THREADS)
.if !defined(WITHOUT_UCS4) && !defined(WITH_UCS2)
CONFIGURE_ARGS+= --enable-unicode=ucs4
.endif
.if defined(WITHOUT_PYMALLOC)
CONFIGURE_ARGS+= --without-pymalloc
.endif
.if ${ARCH} == amd64 || ${ARCH} == ia64 || ${ARCH} == sparc64 || ${ARCH} == alpha
PLIST_SUB+= 32BIT_ONLY="@comment "
.else
PLIST_SUB+= 32BIT_ONLY=""
.endif
.if ${ARCH} == sparc64
CFLAGS+= -DPYTHON_DEFAULT_RECURSION_LIMIT=900
.endif
# See http://bugs.freebsd.org/115940
.if !exists(/usr/bin/ypcat) || defined(WITHOUT_NIS) # the world with NO_NIS
PLIST_SUB+= NO_NIS="@comment "
WITHOUT_NIS?= detected
.else
PLIST_SUB+= NO_NIS=""
.endif
.if !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --enable-ipv6
.else
CONFIGURE_ARGS+= --disable-ipv6
.endif
.if defined(WITH_FPECTL)
CONFIGURE_ARGS+= --with-fpectl
.endif
pre-patch:
${MKDIR} ${WRKSRC} ${SHARED_WRKSRC}/Modules
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${PATCH_WRKSRC}/Tools/scripts/pydoc > ${WRKDIR}/pydoc2.5
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${PATCH_WRKSRC}/Tools/scripts/idle > ${WRKDIR}/idle2.5
${SED} -e '1s,^.*$$,#!${PREFIX}/bin/${PYTHON_VERSION},' \
${PATCH_WRKSRC}/Lib/smtpd.py > ${WRKDIR}/smtpd2.5.py
${REINPLACE_CMD} -e \
's,/usr/doc/python-docs-,${PREFIX}/share/doc/python,g' \
${PATCH_WRKSRC}/Lib/pydoc.py
${REINPLACE_CMD} -e \
's|^\( *prefixes = .*\)\]$$|\1, "${LOCALBASE}"]|g' \
${PATCH_WRKSRC}/Lib/site.py
${REINPLACE_CMD} -e \
's|^ \(..ASDLGEN.*\)$$| ${TRUE}|g' \
${PATCH_WRKSRC}/Makefile.pre.in
${REINPLACE_CMD} -e \
's|*\(..INSTALL_SCRIPT.*\)python-config$$|#port \1|' \
${PATCH_WRKSRC}/Makefile.pre.in
${SED} -e 's|^#!.*|#!${PREFIX}/bin/${PYTHON_VERSION}|' \
${PATCH_WRKSRC}/Misc/python-config.in > ${WRKDIR}/${PYTHON_VERSION}-config
${SED} -e 's|^#!.*|#!${PREFIX}/bin/${PYTHON_VERSION:S/thon/thon-shared/}|' \
${PATCH_WRKSRC}/Misc/python-config.in > ${WRKDIR}/${PYTHON_VERSION:S/thon/thon-shared/}-config
.if defined(WITH_FPECTL) && ${ARCH} == i386
${MKDIR} ${WRKSRC}/Modules
${ECHO} "fpectl fpectlmodule.c" >> ${WRKSRC}/Modules/Setup.dist
.endif
post-patch:
.if defined(WITHOUT_NIS)
${REINPLACE_CMD} -e \
's/disabled_module_list =[^]]*/&, "nis"/' \
${PATCH_WRKSRC}/setup.py
.endif
post-configure:
${TAR} -C ${WRKSRC} -cf - . | ${TAR} -C ${SHARED_WRKSRC} -xf -
${LN} -sf ${PYTHON_WRKSRC}/Lib ${WRKSRC}/Lib
${SED} -e 's,^\(LDLIBRARY=\).*$$,\1libpython$$(VERSION).so,' \
-e 's,^\(BLDLIBRARY=\).*$$,\1-L. -lpython$$(VERSION),' \
-e 's,^\(CFLAGSFORSHARED=\).*$$,\1$$(CCSHARED),' \
-e 's,^\(Makefile Modules/config.c:.*\)Makefile.pre,\1,' \
-e 's,^\(.(BUILDPYTHON)\: .*\).(LIBRARY),\1,' \
-e 's,^\(.(BUILDPYTHON):.*\).(LIBRARY),\1,' \
${WRKSRC}/Makefile > ${SHARED_WRKSRC}/Makefile
pre-build:
cd ${SHARED_WRKSRC}; \
${SETENV} ${MAKE_ENV} ${MAKE} lib${PYTHON_VERSION}.so python; \
${LN} -f lib${PYTHON_VERSION}.so lib${PYTHON_VERSION}.so.1; \
${LN} -f python ${PYTHON_VERSION:S/thon/thon-shared/}
pre-su-install:
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
${PATCH_WRKSRC}/Lib/plat-freebsd9
${CP} -r ${PATCH_WRKSRC}/Lib/plat-freebsd8 \
${PATCH_WRKSRC}/Lib/plat-freebsd10
.for platform in ${PLATFORMS}
${MKDIR} ${PYTHONPREFIX_LIBDIR}/${platform}
.for file in IN.py regen
${INSTALL_DATA} ${WRKSRC}/Lib/${platform}/${file} \
${PYTHONPREFIX_LIBDIR}/${platform}/
.endfor
.endfor
pre-install:
${CAT} ${PLIST_TEMPLATE} | ${AWK} '{ print $$0; } \
/LIBDIR.*\.py$$/ && !/\/bad/ { print $$0 "o"; print $$0 "c"; }' > ${PLIST}
@# if openssl 0.9.8 is detected, _sha{256,512} module won't be installed
([ -f ${WRKSRC}/.without_own_sha ] && \
${GREP} -v 'lib-dynload/_sha' ${PLIST} > ${PLIST}.tmp && \
${CAT} ${PLIST}.tmp > ${PLIST}) || ${TRUE}
post-install:
@# install config providers
${INSTALL_SCRIPT} ${WRKDIR}/${PYTHON_VERSION}-config ${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKDIR}/${PYTHON_VERSION:S/thon/thon-shared/}-config ${PREFIX}/bin
@# shared version of executable and library
${INSTALL_PROGRAM} ${SHARED_WRKSRC}/lib${PYTHON_VERSION}.so.1 \
${PREFIX}/lib
cd ${PREFIX}/lib; ${LN} -sf lib${PYTHON_VERSION}.so.1 \
lib${PYTHON_VERSION}.so
${LN} -sf ${PREFIX}/lib/lib${PYTHON_VERSION}.so ${PYTHONPREFIX_LIBDIR}/config
${INSTALL_PROGRAM} \
${SHARED_WRKSRC}/${PYTHON_VERSION:S/thon/thon-shared/} \
${PREFIX}/bin
@# additional files installing by ports
${INSTALL_SCRIPT} ${WRKDIR}/pydoc2.5 ${WRKDIR}/idle2.5 \
${WRKDIR}/smtpd2.5.py ${PREFIX}/bin
@${MKDIR} ${MANPREFIX}/man/man1
${INSTALL_MAN} ${PYTHON_WRKSRC}/Misc/python.man \
${MANPREFIX}/man/man1/${PYTHON_VERSION}.1
.if ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION} || !exists(${LOCALBASE}/bin/python)
for f in ${BIN_SCRIPTS}; do \
TARGET=`${ECHO_CMD} $$f | ${SED} -E ${BINLINKS_SUB}`; \
cd ${PREFIX}/bin && ${LN} -f $$TARGET $$f; \
done
.endif
.if !defined(NOPORTDATA)
@${MKDIR} ${DATADIR}
@cd ${PYTHON_WRKSRC}; ${TAR} -cf - Tools | \
(cd ${DATADIR}; ${TAR} -xf -)
.endif
.if !defined(NOPORTEXAMPLES)
@${MKDIR} ${EXAMPLESDIR}
@cd ${PYTHON_WRKSRC}/Demo; ${TAR} -cf - * | \
(cd ${EXAMPLESDIR}; ${TAR} -xf -)
.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>

View File

@ -1,2 +0,0 @@
SHA256 (python/Python-2.5.6.tgz) = c2e4377597241b1065677d23327c04d0f41945d370c61a491cc88be367234c5d
SIZE (python/Python-2.5.6.tgz) = 11608002

View File

@ -1,14 +0,0 @@
--- Lib/SimpleXMLRPCServer.py.orig 2011-06-11 19:46:23.000000000 +0400
+++ Lib/SimpleXMLRPCServer.py 2012-02-15 12:50:23.000000000 +0400
@@ -486,7 +486,10 @@
L = []
while size_remaining:
chunk_size = min(size_remaining, max_chunk_size)
- L.append(self.rfile.read(chunk_size))
+ chunk = self.rfile.read(chunk_size)
+ if not chunk:
+ break
+ L.append(chunk)
size_remaining -= len(L[-1])
data = ''.join(L)

View File

@ -1,27 +0,0 @@
--- Lib/test/test_ioctl.py.orig 2008-08-03 20:45:34.000000000 -0400
+++ Lib/test/test_ioctl.py 2010-06-24 13:26:52.000000000 -0400
@@ -44,21 +44,12 @@ class IoctlTests(unittest.TestCase):
raise TestSkipped('pty module required')
mfd, sfd = pty.openpty()
try:
- if termios.TIOCSWINSZ < 0:
- set_winsz_opcode_maybe_neg = termios.TIOCSWINSZ
- set_winsz_opcode_pos = termios.TIOCSWINSZ & 0xffffffffL
- else:
- set_winsz_opcode_pos = termios.TIOCSWINSZ
- set_winsz_opcode_maybe_neg, = struct.unpack("i",
- struct.pack("I", termios.TIOCSWINSZ))
-
+ set_winsz_opcode = termios.TIOCSWINSZ
# We're just testing that these calls do not raise exceptions.
saved_winsz = fcntl.ioctl(mfd, termios.TIOCGWINSZ, "\0"*8)
our_winsz = struct.pack("HHHH",80,25,0,0)
- # test both with a positive and potentially negative ioctl code
- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_pos, our_winsz)
- new_winsz = fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, our_winsz)
- fcntl.ioctl(mfd, set_winsz_opcode_maybe_neg, saved_winsz)
+ new_winsz = fcntl.ioctl(mfd, set_winsz_opcode, our_winsz)
+ fcntl.ioctl(mfd, set_winsz_opcode, saved_winsz)
finally:
os.close(mfd)
os.close(sfd)

View File

@ -1,11 +0,0 @@
--- Modules/_ctypes/libffi/configure.orig Sun Mar 26 13:22:58 2006
+++ Modules/_ctypes/libffi/configure Sun Mar 26 13:23:07 2006
@@ -3520,7 +3520,7 @@
cris-*-*) TARGET=LIBFFI_CRIS; TARGETDIR=cris;;
s390-*-linux-*) TARGET=S390; TARGETDIR=s390;;
s390x-*-linux-*) TARGET=S390; TARGETDIR=s390;;
-x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;;
+amd64-*-freebsd* | x86_64-*-linux* | x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) TARGET=X86_64; TARGETDIR=x86;;
sh-*-linux* | sh[34]*-*-linux*) TARGET=SH; TARGETDIR=sh;;
sh-*-rtems*) TARGET=SH; TARGETDIR=sh;;
sh64-*-linux* | sh5*-*-linux*) TARGET=SH64; TARGETDIR=sh64;;

View File

@ -1,53 +0,0 @@
--- Modules/fcntlmodule.c.orig 2008-08-03 20:45:34.000000000 -0400
+++ Modules/fcntlmodule.c 2010-06-24 22:22:33.000000000 -0400
@@ -97,20 +97,15 @@
{
#define IOCTL_BUFSZ 1024
int fd;
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
format for the 'code' parameter because Python turns 0x8000000
into either a large positive number (PyLong or PyInt on 64-bit
platforms) or a negative number on others (32-bit PyInt)
whereas the system expects it to be a 32bit bit field value
regardless of it being passed as an int or unsigned long on
- various platforms. See the termios.TIOCSWINSZ constant across
- platforms for an example of thise.
-
- If any of the 64bit platforms ever decide to use more than 32bits
- in their unsigned long ioctl codes this will break and need
- special casing based on the platform being built on.
+ various platforms.
*/
- unsigned int code;
+ unsigned long code;
int arg;
int ret;
char *str;
@@ -118,7 +113,7 @@
int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -169,7 +164,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > IOCTL_BUFSZ) {
PyErr_SetString(PyExc_ValueError,
@@ -191,7 +186,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&I|i;ioctl requires a file or file descriptor,"
+ "O&k|i;ioctl requires a file or file descriptor,"
" an integer and optionally an integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View File

@ -1,30 +0,0 @@
$FreeBSD$
--- Python/thread_pthread.h
+++ Python/thread_pthread.h
@@ -149,6 +149,7 @@
{
pthread_t th;
int status;
+ sigset_t set, oset;
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
@@ -177,6 +178,8 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
@@ -188,6 +191,7 @@
(void *)arg
);
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_destroy(&attrs);
#endif

View File

@ -1,938 +0,0 @@
Index: Lib/plat-freebsd6/IN.py
===================================================================
--- Lib/plat-freebsd6/IN.py (revision 58696)
+++ Lib/plat-freebsd6/IN.py (revision 58697)
@@ -1,6 +1,28 @@
# Generated by h2py from /usr/include/netinet/in.h
# Included from sys/cdefs.h
+__GNUCLIKE_ASM = 3
+__GNUCLIKE_ASM = 2
+__GNUCLIKE___TYPEOF = 1
+__GNUCLIKE___OFFSETOF = 1
+__GNUCLIKE___SECTION = 1
+__GNUCLIKE_ATTRIBUTE_MODE_DI = 1
+__GNUCLIKE_CTOR_SECTION_HANDLING = 1
+__GNUCLIKE_BUILTIN_CONSTANT_P = 1
+__GNUCLIKE_BUILTIN_VARARGS = 1
+__GNUCLIKE_BUILTIN_STDARG = 1
+__GNUCLIKE_BUILTIN_VAALIST = 1
+__GNUC_VA_LIST_COMPATIBILITY = 1
+__GNUCLIKE_BUILTIN_NEXT_ARG = 1
+__GNUCLIKE_BUILTIN_MEMCPY = 1
+__CC_SUPPORTS_INLINE = 1
+__CC_SUPPORTS___INLINE = 1
+__CC_SUPPORTS___INLINE__ = 1
+__CC_SUPPORTS___FUNC__ = 1
+__CC_SUPPORTS_WARNING = 1
+__CC_SUPPORTS_VARADIC_XXX = 1
+__CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1
+__CC_INT_IS_32BIT = 1
def __P(protos): return protos
def __STRING(x): return #x
@@ -29,6 +51,8 @@
def __predict_false(exp): return (exp)
+def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg)))
+
def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
@@ -86,8 +110,6 @@
BIG_ENDIAN = _BIG_ENDIAN
PDP_ENDIAN = _PDP_ENDIAN
BYTE_ORDER = _BYTE_ORDER
-__INTEL_COMPILER_with_FreeBSD_endian = 1
-__INTEL_COMPILER_with_FreeBSD_endian = 1
def __word_swap_int_var(x): return \
def __word_swap_int_const(x): return \
@@ -96,12 +118,16 @@
def __byte_swap_int_var(x): return \
-def __byte_swap_int_var(x): return \
-
def __byte_swap_int_const(x): return \
def __byte_swap_int(x): return __byte_swap_int_var(x)
+def __byte_swap_long_var(x): return \
+
+def __byte_swap_long_const(x): return \
+
+def __byte_swap_long(x): return __byte_swap_long_var(x)
+
def __byte_swap_word_var(x): return \
def __byte_swap_word_const(x): return \
@@ -229,47 +255,50 @@
IPPROTO_APES = 99
IPPROTO_GMTP = 100
IPPROTO_IPCOMP = 108
+IPPROTO_SCTP = 132
IPPROTO_PIM = 103
+IPPROTO_CARP = 112
IPPROTO_PGM = 113
IPPROTO_PFSYNC = 240
IPPROTO_OLD_DIVERT = 254
IPPROTO_MAX = 256
IPPROTO_DONE = 257
IPPROTO_DIVERT = 258
+IPPROTO_SPACER = 32767
IPPORT_RESERVED = 1024
IPPORT_HIFIRSTAUTO = 49152
IPPORT_HILASTAUTO = 65535
IPPORT_RESERVEDSTART = 600
IPPORT_MAX = 65535
-def IN_CLASSA(i): return (((u_int32_t)(i) & (-2147483648)) == 0)
+def IN_CLASSA(i): return (((u_int32_t)(i) & 0x80000000) == 0)
-IN_CLASSA_NET = (-16777216)
+IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 24
IN_CLASSA_HOST = 0x00ffffff
IN_CLASSA_MAX = 128
-def IN_CLASSB(i): return (((u_int32_t)(i) & (-1073741824)) == (-2147483648))
+def IN_CLASSB(i): return (((u_int32_t)(i) & 0xc0000000) == 0x80000000)
-IN_CLASSB_NET = (-65536)
+IN_CLASSB_NET = 0xffff0000
IN_CLASSB_NSHIFT = 16
IN_CLASSB_HOST = 0x0000ffff
IN_CLASSB_MAX = 65536
-def IN_CLASSC(i): return (((u_int32_t)(i) & (-536870912)) == (-1073741824))
+def IN_CLASSC(i): return (((u_int32_t)(i) & 0xe0000000) == 0xc0000000)
-IN_CLASSC_NET = (-256)
+IN_CLASSC_NET = 0xffffff00
IN_CLASSC_NSHIFT = 8
IN_CLASSC_HOST = 0x000000ff
-def IN_CLASSD(i): return (((u_int32_t)(i) & (-268435456)) == (-536870912))
+def IN_CLASSD(i): return (((u_int32_t)(i) & 0xf0000000) == 0xe0000000)
-IN_CLASSD_NET = (-268435456)
+IN_CLASSD_NET = 0xf0000000
IN_CLASSD_NSHIFT = 28
IN_CLASSD_HOST = 0x0fffffff
def IN_MULTICAST(i): return IN_CLASSD(i)
-def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456))
+def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
-def IN_BADCLASS(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456))
+def IN_BADCLASS(i): return (((u_int32_t)(i) & 0xf0000000) == 0xf0000000)
-INADDR_NONE = (-1)
+INADDR_NONE = 0xffffffff
IN_LOOPBACKNET = 127
IP_OPTIONS = 1
IP_HDRINCL = 2
@@ -311,6 +340,8 @@
IP_DUMMYNET_FLUSH = 62
IP_DUMMYNET_GET = 64
IP_RECVTTL = 65
+IP_MINTTL = 66
+IP_DONTFRAG = 67
IP_DEFAULT_MULTICAST_TTL = 1
IP_DEFAULT_MULTICAST_LOOP = 1
IP_MAX_MEMBERSHIPS = 20
@@ -339,7 +370,7 @@
# Included from netinet6/in6.h
-__KAME_VERSION = "20010528/FreeBSD"
+__KAME_VERSION = "FreeBSD"
IPV6PORT_RESERVED = 1024
IPV6PORT_ANONMIN = 49152
IPV6PORT_ANONMAX = 65535
@@ -348,8 +379,8 @@
INET6_ADDRSTRLEN = 46
IPV6_ADDR_INT32_ONE = 1
IPV6_ADDR_INT32_TWO = 2
-IPV6_ADDR_INT32_MNL = (-16711680)
-IPV6_ADDR_INT32_MLL = (-16646144)
+IPV6_ADDR_INT32_MNL = 0xff010000
+IPV6_ADDR_INT32_MLL = 0xff020000
IPV6_ADDR_INT32_SMP = 0x0000ffff
IPV6_ADDR_INT16_ULL = 0xfe80
IPV6_ADDR_INT16_USL = 0xfec0
@@ -358,7 +389,7 @@
IPV6_ADDR_INT32_TWO = 0x02000000
IPV6_ADDR_INT32_MNL = 0x000001ff
IPV6_ADDR_INT32_MLL = 0x000002ff
-IPV6_ADDR_INT32_SMP = (-65536)
+IPV6_ADDR_INT32_SMP = 0xffff0000
IPV6_ADDR_INT16_ULL = 0x80fe
IPV6_ADDR_INT16_USL = 0xc0fe
IPV6_ADDR_INT16_MLL = 0x02ff
@@ -511,5 +542,10 @@
IPV6CTL_RIP6STATS = 36
IPV6CTL_PREFER_TEMPADDR = 37
IPV6CTL_ADDRCTLPOLICY = 38
+IPV6CTL_USE_DEFAULTZONE = 39
IPV6CTL_MAXFRAGS = 41
-IPV6CTL_MAXID = 42
+IPV6CTL_IFQ = 42
+IPV6CTL_ISATAPRTR = 43
+IPV6CTL_MCAST_PMTU = 44
+IPV6CTL_STEALTH = 45
+IPV6CTL_MAXID = 46
Index: Lib/plat-freebsd7/IN.py
===================================================================
--- Lib/plat-freebsd7/IN.py (revision 58696)
+++ Lib/plat-freebsd7/IN.py (revision 58697)
@@ -10,9 +10,9 @@
__GNUCLIKE_CTOR_SECTION_HANDLING = 1
__GNUCLIKE_BUILTIN_CONSTANT_P = 1
__GNUCLIKE_BUILTIN_VARARGS = 1
+__GNUCLIKE_BUILTIN_STDARG = 1
__GNUCLIKE_BUILTIN_VAALIST = 1
__GNUC_VA_LIST_COMPATIBILITY = 1
-__GNUCLIKE_BUILTIN_STDARG = 1
__GNUCLIKE_BUILTIN_NEXT_ARG = 1
__GNUCLIKE_BUILTIN_MEMCPY = 1
__CC_SUPPORTS_INLINE = 1
@@ -51,6 +51,8 @@
def __predict_false(exp): return (exp)
+def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg)))
+
def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
@@ -247,6 +249,7 @@
IPPROTO_APES = 99
IPPROTO_GMTP = 100
IPPROTO_IPCOMP = 108
+IPPROTO_SCTP = 132
IPPROTO_PIM = 103
IPPROTO_CARP = 112
IPPROTO_PGM = 113
@@ -289,6 +292,10 @@
def IN_BADCLASS(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456))
+def IN_LINKLOCAL(i): return (((u_int32_t)(i) & (-65536)) == (-1442971648))
+
+def IN_LOCAL_GROUP(i): return (((u_int32_t)(i) & (-256)) == (-536870912))
+
INADDR_NONE = (-1)
IN_LOOPBACKNET = 127
IP_OPTIONS = 1
@@ -326,14 +333,35 @@
IP_FW_ZERO = 53
IP_FW_GET = 54
IP_FW_RESETLOG = 55
+IP_FW_NAT_CFG = 56
+IP_FW_NAT_DEL = 57
+IP_FW_NAT_GET_CONFIG = 58
+IP_FW_NAT_GET_LOG = 59
IP_DUMMYNET_CONFIGURE = 60
IP_DUMMYNET_DEL = 61
IP_DUMMYNET_FLUSH = 62
IP_DUMMYNET_GET = 64
IP_RECVTTL = 65
+IP_MINTTL = 66
+IP_DONTFRAG = 67
+IP_ADD_SOURCE_MEMBERSHIP = 70
+IP_DROP_SOURCE_MEMBERSHIP = 71
+IP_BLOCK_SOURCE = 72
+IP_UNBLOCK_SOURCE = 73
+IP_MSFILTER = 74
+MCAST_JOIN_GROUP = 80
+MCAST_LEAVE_GROUP = 81
+MCAST_JOIN_SOURCE_GROUP = 82
+MCAST_LEAVE_SOURCE_GROUP = 83
+MCAST_BLOCK_SOURCE = 84
+MCAST_UNBLOCK_SOURCE = 85
IP_DEFAULT_MULTICAST_TTL = 1
IP_DEFAULT_MULTICAST_LOOP = 1
-IP_MAX_MEMBERSHIPS = 20
+IP_MIN_MEMBERSHIPS = 31
+IP_MAX_MEMBERSHIPS = 4095
+IP_MAX_SOURCE_FILTER = 1024
+MCAST_INCLUDE = 1
+MCAST_EXCLUDE = 2
IP_PORTRANGE_DEFAULT = 0
IP_PORTRANGE_HIGH = 1
IP_PORTRANGE_LOW = 2
@@ -359,7 +387,7 @@
# Included from netinet6/in6.h
-__KAME_VERSION = "20010528/FreeBSD"
+__KAME_VERSION = "FreeBSD"
IPV6PORT_RESERVED = 1024
IPV6PORT_ANONMIN = 49152
IPV6PORT_ANONMAX = 65535
@@ -430,6 +458,8 @@
def IN6_IS_SCOPE_LINKLOCAL(a): return \
+def IN6_IS_SCOPE_EMBED(a): return \
+
def IFA6_IS_DEPRECATED(a): return \
def IFA6_IS_INVALID(a): return \
@@ -488,6 +518,7 @@
IPV6_TCLASS = 61
IPV6_DONTFRAG = 62
IPV6_PREFER_TEMPADDR = 63
+IPV6_MSFILTER = 74
IPV6_RTHDR_LOOSE = 0
IPV6_RTHDR_STRICT = 1
IPV6_RTHDR_TYPE_0 = 0
@@ -531,5 +562,10 @@
IPV6CTL_RIP6STATS = 36
IPV6CTL_PREFER_TEMPADDR = 37
IPV6CTL_ADDRCTLPOLICY = 38
+IPV6CTL_USE_DEFAULTZONE = 39
IPV6CTL_MAXFRAGS = 41
-IPV6CTL_MAXID = 42
+IPV6CTL_IFQ = 42
+IPV6CTL_ISATAPRTR = 43
+IPV6CTL_MCAST_PMTU = 44
+IPV6CTL_STEALTH = 45
+IPV6CTL_MAXID = 46
Index: Lib/plat-freebsd8/regen
===================================================================
--- Lib/plat-freebsd8/regen (revision 0)
+++ Lib/plat-freebsd8/regen (revision 58697)
@@ -0,0 +1,3 @@
+#! /bin/sh
+set -v
+python ../../Tools/scripts/h2py.py -i '(u_long)' /usr/include/netinet/in.h
Index: Lib/plat-freebsd8/IN.py
===================================================================
--- Lib/plat-freebsd8/IN.py (revision 0)
+++ Lib/plat-freebsd8/IN.py (revision 58697)
@@ -0,0 +1,571 @@
+# Generated by h2py from /usr/include/netinet/in.h
+
+# Included from sys/cdefs.h
+__GNUCLIKE_ASM = 3
+__GNUCLIKE_ASM = 2
+__GNUCLIKE___TYPEOF = 1
+__GNUCLIKE___OFFSETOF = 1
+__GNUCLIKE___SECTION = 1
+__GNUCLIKE_ATTRIBUTE_MODE_DI = 1
+__GNUCLIKE_CTOR_SECTION_HANDLING = 1
+__GNUCLIKE_BUILTIN_CONSTANT_P = 1
+__GNUCLIKE_BUILTIN_VARARGS = 1
+__GNUCLIKE_BUILTIN_STDARG = 1
+__GNUCLIKE_BUILTIN_VAALIST = 1
+__GNUC_VA_LIST_COMPATIBILITY = 1
+__GNUCLIKE_BUILTIN_NEXT_ARG = 1
+__GNUCLIKE_BUILTIN_MEMCPY = 1
+__CC_SUPPORTS_INLINE = 1
+__CC_SUPPORTS___INLINE = 1
+__CC_SUPPORTS___INLINE__ = 1
+__CC_SUPPORTS___FUNC__ = 1
+__CC_SUPPORTS_WARNING = 1
+__CC_SUPPORTS_VARADIC_XXX = 1
+__CC_SUPPORTS_DYNAMIC_ARRAY_INIT = 1
+__CC_INT_IS_32BIT = 1
+def __P(protos): return protos
+
+def __STRING(x): return #x
+
+def __XSTRING(x): return __STRING(x)
+
+def __P(protos): return ()
+
+def __STRING(x): return "x"
+
+def __aligned(x): return __attribute__((__aligned__(x)))
+
+def __section(x): return __attribute__((__section__(x)))
+
+def __aligned(x): return __attribute__((__aligned__(x)))
+
+def __section(x): return __attribute__((__section__(x)))
+
+def __nonnull(x): return __attribute__((__nonnull__(x)))
+
+def __predict_true(exp): return __builtin_expect((exp), 1)
+
+def __predict_false(exp): return __builtin_expect((exp), 0)
+
+def __predict_true(exp): return (exp)
+
+def __predict_false(exp): return (exp)
+
+def __format_arg(fmtarg): return __attribute__((__format_arg__ (fmtarg)))
+
+def __FBSDID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
+
+def __RCSID(s): return __IDSTRING(__CONCAT(__rcsid_,__LINE__),s)
+
+def __RCSID_SOURCE(s): return __IDSTRING(__CONCAT(__rcsid_source_,__LINE__),s)
+
+def __SCCSID(s): return __IDSTRING(__CONCAT(__sccsid_,__LINE__),s)
+
+def __COPYRIGHT(s): return __IDSTRING(__CONCAT(__copyright_,__LINE__),s)
+
+_POSIX_C_SOURCE = 199009
+_POSIX_C_SOURCE = 199209
+__XSI_VISIBLE = 600
+_POSIX_C_SOURCE = 200112
+__XSI_VISIBLE = 500
+_POSIX_C_SOURCE = 199506
+_POSIX_C_SOURCE = 198808
+__POSIX_VISIBLE = 200112
+__ISO_C_VISIBLE = 1999
+__POSIX_VISIBLE = 199506
+__ISO_C_VISIBLE = 1990
+__POSIX_VISIBLE = 199309
+__ISO_C_VISIBLE = 1990
+__POSIX_VISIBLE = 199209
+__ISO_C_VISIBLE = 1990
+__POSIX_VISIBLE = 199009
+__ISO_C_VISIBLE = 1990
+__POSIX_VISIBLE = 198808
+__ISO_C_VISIBLE = 0
+__POSIX_VISIBLE = 0
+__XSI_VISIBLE = 0
+__BSD_VISIBLE = 0
+__ISO_C_VISIBLE = 1990
+__POSIX_VISIBLE = 0
+__XSI_VISIBLE = 0
+__BSD_VISIBLE = 0
+__ISO_C_VISIBLE = 1999
+__POSIX_VISIBLE = 200112
+__XSI_VISIBLE = 600
+__BSD_VISIBLE = 1
+__ISO_C_VISIBLE = 1999
+
+# Included from sys/_types.h
+
+# Included from machine/_types.h
+
+# Included from machine/endian.h
+_QUAD_HIGHWORD = 1
+_QUAD_LOWWORD = 0
+_LITTLE_ENDIAN = 1234
+_BIG_ENDIAN = 4321
+_PDP_ENDIAN = 3412
+_BYTE_ORDER = _LITTLE_ENDIAN
+LITTLE_ENDIAN = _LITTLE_ENDIAN
+BIG_ENDIAN = _BIG_ENDIAN
+PDP_ENDIAN = _PDP_ENDIAN
+BYTE_ORDER = _BYTE_ORDER
+def __word_swap_int_var(x): return \
+
+def __word_swap_int_const(x): return \
+
+def __word_swap_int(x): return __word_swap_int_var(x)
+
+def __byte_swap_int_var(x): return \
+
+def __byte_swap_int_const(x): return \
+
+def __byte_swap_int(x): return __byte_swap_int_var(x)
+
+def __byte_swap_word_var(x): return \
+
+def __byte_swap_word_const(x): return \
+
+def __byte_swap_word(x): return __byte_swap_word_var(x)
+
+def __htonl(x): return __bswap32(x)
+
+def __htons(x): return __bswap16(x)
+
+def __ntohl(x): return __bswap32(x)
+
+def __ntohs(x): return __bswap16(x)
+
+IPPROTO_IP = 0
+IPPROTO_ICMP = 1
+IPPROTO_TCP = 6
+IPPROTO_UDP = 17
+def htonl(x): return __htonl(x)
+
+def htons(x): return __htons(x)
+
+def ntohl(x): return __ntohl(x)
+
+def ntohs(x): return __ntohs(x)
+
+IPPROTO_RAW = 255
+INET_ADDRSTRLEN = 16
+IPPROTO_HOPOPTS = 0
+IPPROTO_IGMP = 2
+IPPROTO_GGP = 3
+IPPROTO_IPV4 = 4
+IPPROTO_IPIP = IPPROTO_IPV4
+IPPROTO_ST = 7
+IPPROTO_EGP = 8
+IPPROTO_PIGP = 9
+IPPROTO_RCCMON = 10
+IPPROTO_NVPII = 11
+IPPROTO_PUP = 12
+IPPROTO_ARGUS = 13
+IPPROTO_EMCON = 14
+IPPROTO_XNET = 15
+IPPROTO_CHAOS = 16
+IPPROTO_MUX = 18
+IPPROTO_MEAS = 19
+IPPROTO_HMP = 20
+IPPROTO_PRM = 21
+IPPROTO_IDP = 22
+IPPROTO_TRUNK1 = 23
+IPPROTO_TRUNK2 = 24
+IPPROTO_LEAF1 = 25
+IPPROTO_LEAF2 = 26
+IPPROTO_RDP = 27
+IPPROTO_IRTP = 28
+IPPROTO_TP = 29
+IPPROTO_BLT = 30
+IPPROTO_NSP = 31
+IPPROTO_INP = 32
+IPPROTO_SEP = 33
+IPPROTO_3PC = 34
+IPPROTO_IDPR = 35
+IPPROTO_XTP = 36
+IPPROTO_DDP = 37
+IPPROTO_CMTP = 38
+IPPROTO_TPXX = 39
+IPPROTO_IL = 40
+IPPROTO_IPV6 = 41
+IPPROTO_SDRP = 42
+IPPROTO_ROUTING = 43
+IPPROTO_FRAGMENT = 44
+IPPROTO_IDRP = 45
+IPPROTO_RSVP = 46
+IPPROTO_GRE = 47
+IPPROTO_MHRP = 48
+IPPROTO_BHA = 49
+IPPROTO_ESP = 50
+IPPROTO_AH = 51
+IPPROTO_INLSP = 52
+IPPROTO_SWIPE = 53
+IPPROTO_NHRP = 54
+IPPROTO_MOBILE = 55
+IPPROTO_TLSP = 56
+IPPROTO_SKIP = 57
+IPPROTO_ICMPV6 = 58
+IPPROTO_NONE = 59
+IPPROTO_DSTOPTS = 60
+IPPROTO_AHIP = 61
+IPPROTO_CFTP = 62
+IPPROTO_HELLO = 63
+IPPROTO_SATEXPAK = 64
+IPPROTO_KRYPTOLAN = 65
+IPPROTO_RVD = 66
+IPPROTO_IPPC = 67
+IPPROTO_ADFS = 68
+IPPROTO_SATMON = 69
+IPPROTO_VISA = 70
+IPPROTO_IPCV = 71
+IPPROTO_CPNX = 72
+IPPROTO_CPHB = 73
+IPPROTO_WSN = 74
+IPPROTO_PVP = 75
+IPPROTO_BRSATMON = 76
+IPPROTO_ND = 77
+IPPROTO_WBMON = 78
+IPPROTO_WBEXPAK = 79
+IPPROTO_EON = 80
+IPPROTO_VMTP = 81
+IPPROTO_SVMTP = 82
+IPPROTO_VINES = 83
+IPPROTO_TTP = 84
+IPPROTO_IGP = 85
+IPPROTO_DGP = 86
+IPPROTO_TCF = 87
+IPPROTO_IGRP = 88
+IPPROTO_OSPFIGP = 89
+IPPROTO_SRPC = 90
+IPPROTO_LARP = 91
+IPPROTO_MTP = 92
+IPPROTO_AX25 = 93
+IPPROTO_IPEIP = 94
+IPPROTO_MICP = 95
+IPPROTO_SCCSP = 96
+IPPROTO_ETHERIP = 97
+IPPROTO_ENCAP = 98
+IPPROTO_APES = 99
+IPPROTO_GMTP = 100
+IPPROTO_IPCOMP = 108
+IPPROTO_SCTP = 132
+IPPROTO_PIM = 103
+IPPROTO_CARP = 112
+IPPROTO_PGM = 113
+IPPROTO_PFSYNC = 240
+IPPROTO_OLD_DIVERT = 254
+IPPROTO_MAX = 256
+IPPROTO_DONE = 257
+IPPROTO_DIVERT = 258
+IPPROTO_SPACER = 32767
+IPPORT_RESERVED = 1024
+IPPORT_HIFIRSTAUTO = 49152
+IPPORT_HILASTAUTO = 65535
+IPPORT_RESERVEDSTART = 600
+IPPORT_MAX = 65535
+def IN_CLASSA(i): return (((u_int32_t)(i) & (-2147483648)) == 0)
+
+IN_CLASSA_NET = (-16777216)
+IN_CLASSA_NSHIFT = 24
+IN_CLASSA_HOST = 0x00ffffff
+IN_CLASSA_MAX = 128
+def IN_CLASSB(i): return (((u_int32_t)(i) & (-1073741824)) == (-2147483648))
+
+IN_CLASSB_NET = (-65536)
+IN_CLASSB_NSHIFT = 16
+IN_CLASSB_HOST = 0x0000ffff
+IN_CLASSB_MAX = 65536
+def IN_CLASSC(i): return (((u_int32_t)(i) & (-536870912)) == (-1073741824))
+
+IN_CLASSC_NET = (-256)
+IN_CLASSC_NSHIFT = 8
+IN_CLASSC_HOST = 0x000000ff
+def IN_CLASSD(i): return (((u_int32_t)(i) & (-268435456)) == (-536870912))
+
+IN_CLASSD_NET = (-268435456)
+IN_CLASSD_NSHIFT = 28
+IN_CLASSD_HOST = 0x0fffffff
+def IN_MULTICAST(i): return IN_CLASSD(i)
+
+def IN_EXPERIMENTAL(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456))
+
+def IN_BADCLASS(i): return (((u_int32_t)(i) & (-268435456)) == (-268435456))
+
+def IN_LINKLOCAL(i): return (((u_int32_t)(i) & (-65536)) == (-1442971648))
+
+def IN_LOCAL_GROUP(i): return (((u_int32_t)(i) & (-256)) == (-536870912))
+
+INADDR_NONE = (-1)
+IN_LOOPBACKNET = 127
+IP_OPTIONS = 1
+IP_HDRINCL = 2
+IP_TOS = 3
+IP_TTL = 4
+IP_RECVOPTS = 5
+IP_RECVRETOPTS = 6
+IP_RECVDSTADDR = 7
+IP_SENDSRCADDR = IP_RECVDSTADDR
+IP_RETOPTS = 8
+IP_MULTICAST_IF = 9
+IP_MULTICAST_TTL = 10
+IP_MULTICAST_LOOP = 11
+IP_ADD_MEMBERSHIP = 12
+IP_DROP_MEMBERSHIP = 13
+IP_MULTICAST_VIF = 14
+IP_RSVP_ON = 15
+IP_RSVP_OFF = 16
+IP_RSVP_VIF_ON = 17
+IP_RSVP_VIF_OFF = 18
+IP_PORTRANGE = 19
+IP_RECVIF = 20
+IP_IPSEC_POLICY = 21
+IP_FAITH = 22
+IP_ONESBCAST = 23
+IP_FW_TABLE_ADD = 40
+IP_FW_TABLE_DEL = 41
+IP_FW_TABLE_FLUSH = 42
+IP_FW_TABLE_GETSIZE = 43
+IP_FW_TABLE_LIST = 44
+IP_FW_ADD = 50
+IP_FW_DEL = 51
+IP_FW_FLUSH = 52
+IP_FW_ZERO = 53
+IP_FW_GET = 54
+IP_FW_RESETLOG = 55
+IP_FW_NAT_CFG = 56
+IP_FW_NAT_DEL = 57
+IP_FW_NAT_GET_CONFIG = 58
+IP_FW_NAT_GET_LOG = 59
+IP_DUMMYNET_CONFIGURE = 60
+IP_DUMMYNET_DEL = 61
+IP_DUMMYNET_FLUSH = 62
+IP_DUMMYNET_GET = 64
+IP_RECVTTL = 65
+IP_MINTTL = 66
+IP_DONTFRAG = 67
+IP_ADD_SOURCE_MEMBERSHIP = 70
+IP_DROP_SOURCE_MEMBERSHIP = 71
+IP_BLOCK_SOURCE = 72
+IP_UNBLOCK_SOURCE = 73
+IP_MSFILTER = 74
+MCAST_JOIN_GROUP = 80
+MCAST_LEAVE_GROUP = 81
+MCAST_JOIN_SOURCE_GROUP = 82
+MCAST_LEAVE_SOURCE_GROUP = 83
+MCAST_BLOCK_SOURCE = 84
+MCAST_UNBLOCK_SOURCE = 85
+IP_DEFAULT_MULTICAST_TTL = 1
+IP_DEFAULT_MULTICAST_LOOP = 1
+IP_MIN_MEMBERSHIPS = 31
+IP_MAX_MEMBERSHIPS = 4095
+IP_MAX_SOURCE_FILTER = 1024
+MCAST_INCLUDE = 1
+MCAST_EXCLUDE = 2
+IP_PORTRANGE_DEFAULT = 0
+IP_PORTRANGE_HIGH = 1
+IP_PORTRANGE_LOW = 2
+IPPROTO_MAXID = (IPPROTO_AH + 1)
+IPCTL_FORWARDING = 1
+IPCTL_SENDREDIRECTS = 2
+IPCTL_DEFTTL = 3
+IPCTL_DEFMTU = 4
+IPCTL_RTEXPIRE = 5
+IPCTL_RTMINEXPIRE = 6
+IPCTL_RTMAXCACHE = 7
+IPCTL_SOURCEROUTE = 8
+IPCTL_DIRECTEDBROADCAST = 9
+IPCTL_INTRQMAXLEN = 10
+IPCTL_INTRQDROPS = 11
+IPCTL_STATS = 12
+IPCTL_ACCEPTSOURCEROUTE = 13
+IPCTL_FASTFORWARDING = 14
+IPCTL_KEEPFAITH = 15
+IPCTL_GIF_TTL = 16
+IPCTL_MAXID = 17
+def in_nullhost(x): return ((x).s_addr == INADDR_ANY)
+
+
+# Included from netinet6/in6.h
+__KAME_VERSION = "FreeBSD"
+IPV6PORT_RESERVED = 1024
+IPV6PORT_ANONMIN = 49152
+IPV6PORT_ANONMAX = 65535
+IPV6PORT_RESERVEDMIN = 600
+IPV6PORT_RESERVEDMAX = (IPV6PORT_RESERVED-1)
+INET6_ADDRSTRLEN = 46
+IPV6_ADDR_INT32_ONE = 1
+IPV6_ADDR_INT32_TWO = 2
+IPV6_ADDR_INT32_MNL = (-16711680)
+IPV6_ADDR_INT32_MLL = (-16646144)
+IPV6_ADDR_INT32_SMP = 0x0000ffff
+IPV6_ADDR_INT16_ULL = 0xfe80
+IPV6_ADDR_INT16_USL = 0xfec0
+IPV6_ADDR_INT16_MLL = 0xff02
+IPV6_ADDR_INT32_ONE = 0x01000000
+IPV6_ADDR_INT32_TWO = 0x02000000
+IPV6_ADDR_INT32_MNL = 0x000001ff
+IPV6_ADDR_INT32_MLL = 0x000002ff
+IPV6_ADDR_INT32_SMP = (-65536)
+IPV6_ADDR_INT16_ULL = 0x80fe
+IPV6_ADDR_INT16_USL = 0xc0fe
+IPV6_ADDR_INT16_MLL = 0x02ff
+def IN6_IS_ADDR_UNSPECIFIED(a): return \
+
+def IN6_IS_ADDR_LOOPBACK(a): return \
+
+def IN6_IS_ADDR_V4COMPAT(a): return \
+
+def IN6_IS_ADDR_V4MAPPED(a): return \
+
+IPV6_ADDR_SCOPE_NODELOCAL = 0x01
+IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01
+IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
+IPV6_ADDR_SCOPE_SITELOCAL = 0x05
+IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
+IPV6_ADDR_SCOPE_GLOBAL = 0x0e
+__IPV6_ADDR_SCOPE_NODELOCAL = 0x01
+__IPV6_ADDR_SCOPE_INTFACELOCAL = 0x01
+__IPV6_ADDR_SCOPE_LINKLOCAL = 0x02
+__IPV6_ADDR_SCOPE_SITELOCAL = 0x05
+__IPV6_ADDR_SCOPE_ORGLOCAL = 0x08
+__IPV6_ADDR_SCOPE_GLOBAL = 0x0e
+def IN6_IS_ADDR_LINKLOCAL(a): return \
+
+def IN6_IS_ADDR_SITELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_NODELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_INTFACELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
+
+def IN6_IS_ADDR_MC_SITELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
+
+def IN6_IS_ADDR_MC_GLOBAL(a): return \
+
+def IN6_IS_ADDR_MC_NODELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_LINKLOCAL(a): return \
+
+def IN6_IS_ADDR_MC_SITELOCAL(a): return \
+
+def IN6_IS_ADDR_MC_ORGLOCAL(a): return \
+
+def IN6_IS_ADDR_MC_GLOBAL(a): return \
+
+def IN6_IS_SCOPE_LINKLOCAL(a): return \
+
+def IN6_IS_SCOPE_EMBED(a): return \
+
+def IFA6_IS_DEPRECATED(a): return \
+
+def IFA6_IS_INVALID(a): return \
+
+IPV6_OPTIONS = 1
+IPV6_RECVOPTS = 5
+IPV6_RECVRETOPTS = 6
+IPV6_RECVDSTADDR = 7
+IPV6_RETOPTS = 8
+IPV6_SOCKOPT_RESERVED1 = 3
+IPV6_UNICAST_HOPS = 4
+IPV6_MULTICAST_IF = 9
+IPV6_MULTICAST_HOPS = 10
+IPV6_MULTICAST_LOOP = 11
+IPV6_JOIN_GROUP = 12
+IPV6_LEAVE_GROUP = 13
+IPV6_PORTRANGE = 14
+ICMP6_FILTER = 18
+IPV6_2292PKTINFO = 19
+IPV6_2292HOPLIMIT = 20
+IPV6_2292NEXTHOP = 21
+IPV6_2292HOPOPTS = 22
+IPV6_2292DSTOPTS = 23
+IPV6_2292RTHDR = 24
+IPV6_2292PKTOPTIONS = 25
+IPV6_CHECKSUM = 26
+IPV6_V6ONLY = 27
+IPV6_BINDV6ONLY = IPV6_V6ONLY
+IPV6_IPSEC_POLICY = 28
+IPV6_FAITH = 29
+IPV6_FW_ADD = 30
+IPV6_FW_DEL = 31
+IPV6_FW_FLUSH = 32
+IPV6_FW_ZERO = 33
+IPV6_FW_GET = 34
+IPV6_RTHDRDSTOPTS = 35
+IPV6_RECVPKTINFO = 36
+IPV6_RECVHOPLIMIT = 37
+IPV6_RECVRTHDR = 38
+IPV6_RECVHOPOPTS = 39
+IPV6_RECVDSTOPTS = 40
+IPV6_RECVRTHDRDSTOPTS = 41
+IPV6_USE_MIN_MTU = 42
+IPV6_RECVPATHMTU = 43
+IPV6_PATHMTU = 44
+IPV6_REACHCONF = 45
+IPV6_PKTINFO = 46
+IPV6_HOPLIMIT = 47
+IPV6_NEXTHOP = 48
+IPV6_HOPOPTS = 49
+IPV6_DSTOPTS = 50
+IPV6_RTHDR = 51
+IPV6_PKTOPTIONS = 52
+IPV6_RECVTCLASS = 57
+IPV6_AUTOFLOWLABEL = 59
+IPV6_TCLASS = 61
+IPV6_DONTFRAG = 62
+IPV6_PREFER_TEMPADDR = 63
+IPV6_MSFILTER = 74
+IPV6_RTHDR_LOOSE = 0
+IPV6_RTHDR_STRICT = 1
+IPV6_RTHDR_TYPE_0 = 0
+IPV6_DEFAULT_MULTICAST_HOPS = 1
+IPV6_DEFAULT_MULTICAST_LOOP = 1
+IPV6_PORTRANGE_DEFAULT = 0
+IPV6_PORTRANGE_HIGH = 1
+IPV6_PORTRANGE_LOW = 2
+IPV6PROTO_MAXID = (IPPROTO_PIM + 1)
+IPV6CTL_FORWARDING = 1
+IPV6CTL_SENDREDIRECTS = 2
+IPV6CTL_DEFHLIM = 3
+IPV6CTL_DEFMTU = 4
+IPV6CTL_FORWSRCRT = 5
+IPV6CTL_STATS = 6
+IPV6CTL_MRTSTATS = 7
+IPV6CTL_MRTPROTO = 8
+IPV6CTL_MAXFRAGPACKETS = 9
+IPV6CTL_SOURCECHECK = 10
+IPV6CTL_SOURCECHECK_LOGINT = 11
+IPV6CTL_ACCEPT_RTADV = 12
+IPV6CTL_KEEPFAITH = 13
+IPV6CTL_LOG_INTERVAL = 14
+IPV6CTL_HDRNESTLIMIT = 15
+IPV6CTL_DAD_COUNT = 16
+IPV6CTL_AUTO_FLOWLABEL = 17
+IPV6CTL_DEFMCASTHLIM = 18
+IPV6CTL_GIF_HLIM = 19
+IPV6CTL_KAME_VERSION = 20
+IPV6CTL_USE_DEPRECATED = 21
+IPV6CTL_RR_PRUNE = 22
+IPV6CTL_MAPPED_ADDR = 23
+IPV6CTL_V6ONLY = 24
+IPV6CTL_RTEXPIRE = 25
+IPV6CTL_RTMINEXPIRE = 26
+IPV6CTL_RTMAXCACHE = 27
+IPV6CTL_USETEMPADDR = 32
+IPV6CTL_TEMPPLTIME = 33
+IPV6CTL_TEMPVLTIME = 34
+IPV6CTL_AUTO_LINKLOCAL = 35
+IPV6CTL_RIP6STATS = 36
+IPV6CTL_PREFER_TEMPADDR = 37
+IPV6CTL_ADDRCTLPOLICY = 38
+IPV6CTL_USE_DEFAULTZONE = 39
+IPV6CTL_MAXFRAGS = 41
+IPV6CTL_IFQ = 42
+IPV6CTL_ISATAPRTR = 43
+IPV6CTL_MCAST_PMTU = 44
+IPV6CTL_STEALTH = 45
+IPV6CTL_MAXID = 46
--- Lib/posixfile.py.orig 2005-07-17 11:36:59.000000000 +0900
+++ Lib/posixfile.py 2007-10-28 21:41:27.000000000 +0900
@@ -179,7 +179,7 @@
if sys.platform in ('netbsd1',
'openbsd2',
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
- 'freebsd6', 'freebsd7',
+ 'freebsd6', 'freebsd7', 'freebsd8',
'bsdos2', 'bsdos3', 'bsdos4'):
flock = struct.pack('lxxxxlxxxxlhh', \
l_start, l_len, os.getpid(), l_type, l_whence)
--- Lib/test/regrtest.py.orig 2007-03-09 04:58:46.000000000 +0900
+++ Lib/test/regrtest.py 2007-10-28 21:40:49.000000000 +0900
@@ -1314,6 +1314,7 @@
_expectations['freebsd5'] = _expectations['freebsd4']
_expectations['freebsd6'] = _expectations['freebsd4']
_expectations['freebsd7'] = _expectations['freebsd4']
+_expectations['freebsd8'] = _expectations['freebsd4']
class _ExpectedSkips:
def __init__(self):
--- Lib/test/test_fcntl.py.orig 2006-09-05 11:54:42.000000000 +0900
+++ Lib/test/test_fcntl.py 2007-10-28 21:41:12.000000000 +0900
@@ -23,7 +23,7 @@
if sys.platform in ('netbsd1', 'netbsd2', 'netbsd3',
'Darwin1.2', 'darwin',
'freebsd2', 'freebsd3', 'freebsd4', 'freebsd5',
- 'freebsd6', 'freebsd7',
+ 'freebsd6', 'freebsd7', 'freebsd8',
'bsdos2', 'bsdos3', 'bsdos4',
'openbsd', 'openbsd2', 'openbsd3', 'openbsd4'):
if struct.calcsize('l') == 8:
--- Lib/test/test_socket.py.orig 2007-04-01 03:56:11.000000000 +0900
+++ Lib/test/test_socket.py 2007-10-28 21:40:59.000000000 +0900
@@ -316,7 +316,7 @@
# I've ordered this by protocols that have both a tcp and udp
# protocol, at least for modern Linuxes.
if sys.platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'darwin'):
+ 'freebsd7', 'freebsd8', 'darwin'):
# avoid the 'echo' service on this platform, as there is an
# assumption breaking non-standard port/protocol entry
services = ('daytime', 'qotd', 'domain')
--- setup.py.orig 2007-10-28 20:38:55.000000000 +0900
+++ setup.py 2007-10-28 21:40:05.000000000 +0900
@@ -1045,7 +1045,7 @@
exts.append( Extension('linuxaudiodev', ['linuxaudiodev.c']) )
if platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7'):
+ 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
if platform == 'sunos5':

View File

@ -1,82 +0,0 @@
--- setup.py.orig 2008-02-29 22:57:02.000000000 +0900
+++ setup.py 2008-02-29 23:01:47.000000000 +0900
@@ -15,7 +15,7 @@
from distutils.command.install_lib import install_lib
# This global variable is used to hold the list of modules to be disabled.
-disabled_module_list = []
+disabled_module_list = ["_bsddb", "_sqlite3", "_tkinter", "gdbm", "mpz"]
def add_dir_to_list(dirlist, dir):
"""Add the directory 'dir' to the list 'dirlist' (at the front) if
@@ -489,7 +489,7 @@
readline_libs = ['readline']
if self.compiler.find_library_file(lib_dirs,
- 'ncursesw'):
+ 'xxxncursesw'):
readline_libs.append('ncursesw')
elif self.compiler.find_library_file(lib_dirs,
'ncurses'):
@@ -501,7 +501,7 @@
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
if platform not in ['mac']:
@@ -591,6 +591,8 @@
# OpenSSL doesn't do these until 0.9.8 so we'll bring our own hash
exts.append( Extension('_sha256', ['sha256module.c']) )
exts.append( Extension('_sha512', ['sha512module.c']) )
+ else:
+ open('.without_own_sha', 'w')
# Modules that provide persistent dictionary-like semantics. You will
@@ -857,7 +859,7 @@
# the more recent berkeleydb's db.h file first in the include path
# when attempting to compile and it will fail.
f = "/usr/include/db.h"
- if os.path.exists(f) and not db_incs:
+ if os.path.exists(f):
data = open(f).read()
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
if m is not None:
@@ -922,7 +930,7 @@
# Curses support, requiring the System V version of curses, often
# provided by the ncurses library.
panel_library = 'panel'
- if (self.compiler.find_library_file(lib_dirs, 'ncursesw')):
+ if (self.compiler.find_library_file(lib_dirs, 'xxxncursesw')):
curses_libs = ['ncursesw']
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
@@ -932,6 +940,7 @@
elif (self.compiler.find_library_file(lib_dirs, 'ncurses')):
curses_libs = ['ncurses']
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
libraries = curses_libs) )
elif (self.compiler.find_library_file(lib_dirs, 'curses')
and platform != 'darwin'):
@@ -951,6 +960,7 @@
if (module_enabled(exts, '_curses') and
self.compiler.find_library_file(lib_dirs, panel_library)):
exts.append( Extension('_curses_panel', ['_curses_panel.c'],
+ library_dirs = ['/usr/lib'],
libraries = [panel_library] + curses_libs) )
@@ -1535,8 +1545,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
- 'Lib/smtpd.py']
+ scripts = []
)
# --install-platlib

View File

@ -1,4 +0,0 @@
Python is an interpreted object-oriented programming language, and is
often compared to Tcl, Perl or Scheme.
WWW: http://www.python.org/

View File

@ -1,11 +0,0 @@
====
Note that some of the standard modules are provided as separate
ports since they require extra dependencies:
bsddb databases/py-bsddb
gdbm databases/py-gdbm
sqlite3 databases/py-sqlite3
tkinter x11-toolkits/py-tkinter
Install them as needed.
====

File diff suppressed because it is too large Load Diff

View File

@ -2128,8 +2128,6 @@
SUBDIR += zend-framework
SUBDIR += zenphoto
SUBDIR += zerowait-httpd
SUBDIR += zope
SUBDIR += zope211
SUBDIR += zope213
.include <bsd.port.subdir.mk>

View File

@ -1,103 +0,0 @@
# New ports collection makefile for: Zope
# Date created: Sat 21 Aug 1999
# Whom: Peter Cornelius <pcc@gmx.net>
#
# $FreeBSD$
#
PORTNAME= zope
PORTVERSION= 2.7.9
PORTREVISION= 3
CATEGORIES= www python zope
MASTER_SITES= http://www.zope.org/Products/Zope/Zope-${PORTVERSION}/:src \
http://www.zope.org/Products/Zope/Hotfix-2007-03-20/Hotfix-20070320/:hotfix
DISTFILES= Zope-${PORTVERSION}-final.tgz:src \
${HOTFIX}.tgz:hotfix
MAINTAINER= estartu@augusta.de
COMMENT= An object-based web application platform
WRKSRC= ${WRKDIR}/Zope-${PORTVERSION}-final
USE_PYTHON= 2.4
USE_RC_SUBR= ${PORTNAME}
DIST_SUBDIR= zope
HOTFIX= Hotfix_20070320
# Note: the notes that follow reflect the decisions of prior maintainers
# of this port. IOW, don't blame me if you don't like the way it's done.
# Exceptions to this are marked as such.
# Change these, if you like, via the environment.
ZOPE_USER?= www
WEBBASEDIR?= www
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope
# Do not change anything below this line.
.if defined(INSTANCENAME)
ZOPEINSTANCENAME= ${INSTANCENAME}
.endif
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
ZOPEINSTANCEBASE?= ${PREFIX}/${SZOPEBASEDIR}
ZOPEINSTANCEDIR?= ${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${ZOPEBASEDIR}
USE_GMAKE= yes
ALL_TARGET= build
MAKEFILE= makefile
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR}
CONFIG_SUB= ZOPEBASEDIR=${ZOPEBASEDIR} \
ZOPE_USER=${ZOPE_USER} \
ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
PKGMESSAGE= ${WRKDIR}/pkg-message
.if defined(BATCH)
ISBATCH= -u admin:test123
.else
ISBATCH= ""
.endif
post-patch:
@${REINPLACE_CMD} -e 's,^\(ACCEPTABLE="\).*"$$,\1${PYTHON_PORTVERSION}",g' \
-e 's,^\(TARGET="\).*"$$,\1${PYTHON_PORTVERSION}",g' \
-e 's,^\(EXENAMES="\).*"$$,\1${PYTHON_VERSION}",g' \
${WRKSRC}/configure
post-build:
-${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${WRKDIR}/${HOTFIX}
post-install:
@${CP} -R ${WRKDIR}/${HOTFIX} ${ZOPEBASEDIR}/lib/python/Products/
@${MV} ${ZOPEBASEDIR}/skel/etc/zope.conf.in ${ZOPEBASEDIR}/skel/etc/zope.conf.sample.in
@${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} < ${FILESDIR}/pkg-message.in \
> ${PKGMESSAGE}
@${MKDIR} ${ZOPEBASEDIR}/Products
@${CP} ${FILESDIR}/Products_00readme-freebsd.txt ${ZOPEBASEDIR}/Products/00readme-freebsd.txt
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
instance:
@${ZOPEBASEDIR}/bin/mkzopeinstance.py -d ${ZOPEINSTANCEDIR} ${ISBATCH}
@${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/zope.conf_changes | \
${PATCH} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample
@${RM} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample.orig
@${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
@${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
@${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/instance_message
@${RM} -f ${ZOPEBASEDIR}/bin/copyzopeskel.pyc
zeo:
@${ZOPEBASEDIR}/bin/mkzeoinstance.py ${ZOPEINSTANCEDIR}
@${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
@${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
@${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/zeo_message
pre-package:
@${SED} ${CONFIG_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} < ${FILESDIR}/pkg-message.package.in \
> ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -1,4 +0,0 @@
SHA256 (zope/Zope-2.7.9-final.tgz) = b3982421dded26e95c8a5a7272365224ba399d552a143a9d457509f11b9d94ab
SIZE (zope/Zope-2.7.9-final.tgz) = 2993519
SHA256 (zope/Hotfix_20070320.tgz) = 3b8760301826aba22386a561de48523663fc7840fc11280e2c34163ba4be383a
SIZE (zope/Hotfix_20070320.tgz) = 3805

View File

@ -1,2 +0,0 @@
This directory is used for install Zope products via ports/package.
All products in here are enabled on all Zope instances.

View File

@ -1,15 +0,0 @@
**********************************************************************
Zope instance successfully installed
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zope_enable="YES"
zope_instances="%%ZOPEINSTANCEDIR%%"
If there is already a zope_instances entry please add
%%ZOPEINSTANCEDIR%% separated by a space.
Don`t forget to create %%ZOPEINSTANCEDIR%%/etc/zope.conf before
starting the zope server

View File

@ -1,10 +0,0 @@
--- lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py.orig Thu Jun 17 13:38:08 2004
+++ lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py Thu Jun 17 13:38:24 2004
@@ -12,6 +12,7 @@
from Testing.makerequest import makerequest
+from __future__ import generators
import Zope
Zope.startup()

View File

@ -1,10 +0,0 @@
--- lib/python/RestrictedPython/tests/verify.py.orig Thu Jun 17 13:39:24 2004
+++ lib/python/RestrictedPython/tests/verify.py Thu Jun 17 13:39:41 2004
@@ -21,6 +21,7 @@
function.
"""
+from __future__ import generators
import dis
import types

View File

@ -1,37 +0,0 @@
**********************************************************************
Zope 2.7 Successfull installed.
To create an instance of Zope please run
make instance
You can set the following Variables in /etc/make.conf
ZOPEINSTANCEBASE Directory where Zope instance should go
(default: %%ZOPEBASEDIR%%)
ZOPEINSTANCENAME Default name for a new Zope instance
(default: none)
If you want have multiple Zope you should run
make instance INSTANCENAME=<somename>
The Instancefiles created by make instance will not be remove when the
port is deinstalled. You'll have to delete them yourself.
** ZEO Instances ** (Optional)
** Please refere to http://zope.org/Products/ZEO/ZEOFactSheet
To create a ZEO instance please run
make zeo [INSTANCENAME=<somename>]
**********************************************************************
****** ATTENTION ***** ATTENTION ***** ATTENTION ***** ATTENTION *****
The default installation directory for Zope Products has changed from
%%ZOPEBASEDIR%%/lib/python/Products
to %%ZOPEBASEDIR%%/Products.
You might have to add the following lines to your zope.conf
products %%ZOPEBASEDIR%%/Products
products $INSTANCE/Products

View File

@ -1,50 +0,0 @@
**********************************************************************
Zope 2.7 Successfull installed.
To create an instance of Zope please run
%%ZOPEBASEDIR%%/bin/mkzopeinstance.py -d <INSTANCEDIR>
<INSTANCEDIR> is the directory where the instance files should
be installed. This can be %%ZOPEBASEDIR%%
Command-line options to 'mkzopeinstance' are available, and can be
investigated by running 'mkzopeinstance.py --help'.
The Instancefiles created by mkzopeinstance.py will not be remove
when the package is deinstalled. You`ll have to delete them yourself.
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zope_enable="YES"
zope_instances="<INSTANCEDIR>"
Additional zope Instances have to be added to zope_instances
seperated by a space.
** ZEO Instances ** (Optional)
** Please refere to http://zope.org/Products/ZEO/ZEOFactSheet
If you want to run a ZEO server please create a ZEO instancen by
calling %%ZOPEBASEDIR%%/bin/mkzopeinstance.py <ZEODIR>
To start the ZEO Server at System startup add the following lines to
/etc/rc.conf
zeo_enable="YES"
zeo_instances="<ZEODIR>"
Additional zeo Instances have to be added to zeo_instances seperated
by a space.
**********************************************************************
****** ATTENTION ***** ATTENTION ***** ATTENTION ***** ATTENTION *****
The default installation directory for Zope Products has changed from
%%ZOPEBASEDIR%%/lib/python/Products
to %%ZOPEBASEDIR%%/Products.
You might have to add the following lines to your zope.conf
products %%ZOPEBASEDIR%%/Products
products $INSTANCE/Products

View File

@ -1,39 +0,0 @@
#!/bin/sh
# Start or stop zope
# $FreeBSD$
# PROVIDE: zeo
# REQUIRE: DAEMON
# BEFORE: zope
# KEYWORD: shutdown
# Define these zope_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/zeo
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
zeo_enable=${zeo_enable:-"NO"} # Enable zeo server
zeo_instances=${zeo_instances:-""} # List of instancehome dirs
. /etc/rc.subr
name="zeo"
rcvar=zeo_enable
load_rc_config $name
extra_commands="status"
if checkyesno zeo_enable; then
for instance in $zeo_instances; do
required_files="${instance}/etc/${name}.conf ${instance}/bin/zeoctl"
zeo_command="${instance}/bin/zeoctl"
start_cmd="${zeo_command} start"
stop_cmd="${zeo_command} stop"
restart_cmd="${zeo_command} restart"
status_cmd="${zeo_command} status"
echo -n "Zeo instance ${instance} -> "
run_rc_command "$1"
done
fi

View File

@ -1,15 +0,0 @@
**********************************************************************
ZEO instance successfully installed
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zeo_enable="YES"
zeo_instances="%%ZOPEINSTANCEDIR%%"
If there is already a zeo_instances entry please add
%%ZOPEINSTANCEDIR%% separated by a space.
Don`t forget to edit %%ZOPEINSTANCEDIR%%/etc/zeo.conf before starting
the zeo server

View File

@ -1,20 +0,0 @@
--- work/Zope-2.7.0/skel/etc/zope.conf.in Fri Jan 9 00:34:08 2004
+++ /data/infosys/zope/etc/zope.conf Wed Apr 14 09:36:46 2004
@@ -78,7 +78,8 @@
#
# Example:
#
-# products /home/chrism/projects/myproducts
+products %%ZOPEBASEDIR%%/Products
+products $INSTANCE/Products
# Directive: environment
@@ -137,6 +138,7 @@
# Example:
#
# effective-user chrism
+effective-user %%ZOPE_USER%%
# Directive: enable-product-installation

View File

@ -1,39 +0,0 @@
#!/bin/sh
# Start or stop zope
# $FreeBSD$
# PROVIDE: zope
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: shutdown
# Define these zope_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/zope
#
# DO NOT CHANGE THESE DEFAULT VALUES HERE
#
zope_enable=${zope_enable:-"NO"} # Enable zope
zope_instances=${zope_instances:-""} # List of instancehome dirs
. /etc/rc.subr
name="zope"
rcvar=zope_enable
load_rc_config $name
extra_commands="status"
if checkyesno zope_enable; then
for instance in $zope_instances; do
required_files="${instance}/etc/${name}.conf ${instance}/bin/zopectl"
zope_command="${instance}/bin/zopectl"
start_cmd="${zope_command} start"
stop_cmd="${zope_command} stop"
restart_cmd="${zope_command} restart"
status_cmd="${zope_command} status"
echo -n "Zope instance ${instance} -> "
run_rc_command "$1"
done
fi

View File

@ -1,19 +0,0 @@
"Zope is an exciting new object-based, open source web application
platform. It allows you to build powerful and dynamic web applications
easily. Zope comes with source code and is friendly to developers as
well as users.
Zope is distinguished by its integrated object database which, when
combined with a revolutionary object model, provides a completely unique
facility for servicing content managers and web application developers."
Here are some of the "headlines" mentioned in the features list.
Database Integration Content Management
SQL and HTML in Harmony Builtin Objects
Multiple Data Sources Document Templates
Publish Databases Web to Objects
Application Development Integrated Object Database
DTML Scripting Managed Through the Web
External Methods Direct URL Access to Objects
WWW: http://www.zope.org/

File diff suppressed because it is too large Load Diff

View File

@ -1,108 +0,0 @@
# New ports collection makefile for: Zope-2.10.x
# Date created: Mon Mar 22 15:32:00 CET 2006
# Whom: Gerhard Schmidt <estartu@augusta.de>
#
# $FreeBSD$
#
PORTNAME= zope211
PORTVERSION= 2.11.8
CATEGORIES= www python zope
MASTER_SITES= http://old.zope.org/Products/Zope/${PORTVERSION}/
DISTNAME= Zope-${PORTVERSION}-final
EXTRACT_SUFX= .tgz
DIST_SUBDIR= zope
MAINTAINER= estartu@augusta.de
COMMENT= An object-based web application platform Version 2.11
USE_PYTHON= 2.4
USE_RC_SUBR= ${PORTNAME} zeo211
ZOPE_USER?= www
WEBBASEDIR?= www
SZOPEBASEDIR?= ${WEBBASEDIR}/Zope211
.if defined(INSTANCENAME)
ZOPEINSTANCENAME= ${INSTANCENAME}
.endif
ZOPEBASEDIR= ${PREFIX}/${SZOPEBASEDIR}
ZOPEINSTANCEBASE?= ${PREFIX}/${SZOPEBASEDIR}
ZOPEINSTANCEDIR?= ${ZOPEINSTANCEBASE}/${ZOPEINSTANCENAME}
HAS_CONFIGURE= yes
CONFIGURE_ARGS= --prefix=${ZOPEBASEDIR}
ALL_TARGET= build
MAKEFILE= makefile
PKGMESSAGE= ${WRKDIR}/pkg-message
PLIST_SUB= ZOPEBASEDIR=${SZOPEBASEDIR}
SUB_FILES= instance_message package-pkg-message pkg-message zeo_message
SUB_LIST= ZOPEBASEDIR=${ZOPEBASEDIR} \
ZOPE_USER=${ZOPE_USER} \
ZOPEINSTANCEDIR=${ZOPEINSTANCEDIR}
.if defined(BATCH)
ISBATCH= -u admin:test123
.else
ISBATCH= ""
.endif
post-patch:
@${FIND} ${WRKSRC} -name '*.orig' -delete
@${REINPLACE_CMD} \
-e 's,^\(ACCEPTABLE="\).*"$$,\1${PYTHON_PORTVERSION}",g' \
-e 's,^\(TARGET="\).*"$$,\1${PYTHON_PORTVERSION}",g' \
-e 's,^\(EXENAMES="\).*"$$,\1${PYTHON_VERSION}",g' \
${WRKSRC}/configure
post-configure:
@${REINPLACE_CMD} \
-e 's,\(--home="\).*",\1${ZOPEBASEDIR}",g' \
-e 's,^.*LN.*PYTHON.*$$,,g' \
${WRKSRC}/${MAKEFILE}
post-install:
${MV} ${ZOPEBASEDIR}/skel/etc/zope.conf.in \
${ZOPEBASEDIR}/skel/etc/zope.conf.sample.in
${MKDIR} ${ZOPEBASEDIR}/Products
${INSTALL_DATA} ${FILESDIR}/Products_00readme-freebsd.txt \
${ZOPEBASEDIR}/Products/00readme-freebsd.txt
-@${PYTHON_CMD} ${PYTHON_LIBDIR}/compileall.py ${ZOPEBASEDIR}/
.for d in lib bin doc skel Products
${FIND} ${ZOPEBASEDIR}/$d -type f -print0 | ${XARGS} -0 -- ${CHMOD} a-w+r
.endfor
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
instance:
${ZOPEBASEDIR}/bin/mkzopeinstance.py -d ${ZOPEINSTANCEDIR} ${ISBATCH}
${SED} ${SUB_LIST:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
${FILESDIR}/zope.conf_changes \
| ${PATCH} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample
${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
${RM} ${ZOPEINSTANCEDIR}/etc/zope.conf.sample.orig
${RM} -f ${ZOPEBASEDIR}/bin/copyzopeskel.pyc
@${CAT} ${WRKDIR}/instance_message
zeo:
${ZOPEBASEDIR}/bin/mkzeoinstance.py ${ZOPEINSTANCEDIR}
${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/var
${CHOWN} ${ZOPE_USER} ${ZOPEINSTANCEDIR}/log
@${CAT} ${WRKDIR}/zeo_message
pre-package:
${INSTALL_DATA} ${WRKDIR}/package-pkg-message ${PKGMESSAGE}
.include <bsd.port.mk>

View File

@ -1,2 +0,0 @@
SHA256 (zope/Zope-2.11.8-final.tgz) = cdae1f71f8164901bec15d53a11cbedd17731dbb3c00963665a2aaebc44cad26
SIZE (zope/Zope-2.11.8-final.tgz) = 7335479

View File

@ -1,2 +0,0 @@
This directory is used for install Zope products via ports/package.
All products in here are enabled on all Zope instances.

View File

@ -1,15 +0,0 @@
**********************************************************************
Zope instance successfully installed
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zope211_enable="YES"
zope211_instances="%%ZOPEINSTANCEDIR%%"
If there is already a zope211_instances entry please add
%%ZOPEINSTANCEDIR%% separated by a space.
Don`t forget to create %%ZOPEINSTANCEDIR%%/etc/zope.conf before
starting the zope server

View File

@ -1,39 +0,0 @@
**********************************************************************
Zope Successfull installed.
To create an instance of Zope please run
%%ZOPEBASEDIR%%/bin/mkzopeinstance.py -d <INSTANCEDIR>
<INSTANCEDIR> is the directory where the instance files should
be installed. This can be %%ZOPEBASEDIR%%
Command-line options to 'mkzopeinstance' are available, and can be
investigated by running 'mkzopeinstance.py --help'.
The Instancefiles created by mkzopeinstance.py will not be remove
when the package is deinstalled. You`ll have to delete them yourself.
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zope211_enable="YES"
zope211_instances="<INSTANCEDIR>"
Additional zope Instances have to be added to zope211_instances
seperated by a space.
** ZEO Instances ** (Optional)
** Please refere to http://zope.org/Products/ZEO/ZEOFactSheet
If you want to run a ZEO server please create a ZEO instancen by
calling %%ZOPEBASEDIR%%/bin/mkzeoinstance.py <ZEODIR>
To start the ZEO Server at System startup add the following lines to
/etc/rc.conf
zeo211_enable="YES"
zeo211_instances="<ZEODIR>"
Additional zeo Instances have to be added to zeo211_instances seperated
by a space.

View File

@ -1,83 +0,0 @@
--- lib/python/Zope2/Startup/zopeschema.xml.orig 2009-05-20 10:09:56.000000000 +0200
+++ lib/python/Zope2/Startup/zopeschema.xml 2009-05-20 09:02:27.000000000 +0200
@@ -444,6 +444,14 @@
<metadefault>us</metadefault>
</key>
+ <key name="datetime-default-localtimezone" datatype="boolean" default="off">
+ <description>
+ By default datetime uses the UTC timezone if no timezone is given.
+ Set this option to on to use system local time zone as default time zone.
+ </description>
+ <metadefault>off</metadefault>
+ </key>
+
<key name="zserver-threads" datatype="integer" default="4">
<description>
Specify the number of threads that Zope's ZServer web server will use
--- lib/python/DateTime/DateTime.py.orig 2009-05-20 09:09:32.000000000 +0200
+++ lib/python/DateTime/DateTime.py 2009-05-20 10:12:07.000000000 +0200
@@ -16,13 +16,14 @@
import re, math, DateTimeZone
-from time import time, gmtime, localtime
+from time import time, gmtime, localtime, strptime, mktime
from time import daylight, timezone, altzone, strftime
from datetime import datetime
from interfaces import IDateTime
from interfaces import DateTimeError, SyntaxError, DateError, TimeError
from zope.interface import implements
from pytz_support import PytzCache
+from App.config import getConfiguration
_cache = PytzCache
default_datefmt = None
@@ -31,7 +32,6 @@
global default_datefmt
if default_datefmt is None:
try:
- from App.config import getConfiguration
default_datefmt = getConfiguration().datetime_format
return default_datefmt
except:
@@ -1805,10 +1805,14 @@
if fields['signal'] or fields['Z']:
tznaive = False
else:
- tznaive = True
+ if getConfiguration().datetime_default_localtimezone :
+ dtstr = "%04.4d-%02.2d-%02.2d %02.2d:%02.2d:%02.2d" % (year, month, day, hour, minute, seconds)
+ dsttime = strptime(dtstr, "%Y-%m-%d %H:%M:%S")
+ dsdtime = localtime(mktime(dsttime))
+ ltzoff = _tzoffset(self.localZone(dsdtime), None)
+ hour_off = ltzoff / 3600
+ min_off = (ltzoff % 3600) / 60
- # Differ from the specification here. To preserve backwards
- # compatibility assume a default timezone == UTC.
tz = 'GMT%+03d%02d' % (hour_off, min_off)
return year, month, day, hour, minute, seconds, tz, tznaive
--- skel/etc/zope.conf.in.orig 2009-06-22 08:30:40.000000000 +0200
+++ skel/etc/zope.conf.in 2009-06-22 08:31:15.000000000 +0200
@@ -204,6 +204,19 @@
# datetime-format international
+# Directive: datetime-default-localtimezone
+#
+# Description:
+# By default datetime uses the UTC timezone if no timezone is given.
+# Set this option to on to use system local time zone as default time zone.
+#
+# Default: off
+#
+# Example:
+#
+# datetime-default-localtimezone on
+
+
# Directive: zserver-threads
#
# Description:

View File

@ -1,10 +0,0 @@
--- lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py.orig Sat Jan 7 21:07:42 2006
+++ lib/python/Products/SiteAccess/tests/testVirtualHostMonster.py Sun Jan 15 13:39:37 2006
@@ -12,6 +12,7 @@
from Testing.makerequest import makerequest
+from __future__ import generators
import Zope2
Zope2.startup()

View File

@ -1,10 +0,0 @@
--- lib/python/RestrictedPython/tests/verify.py.orig Sat Jan 7 21:07:51 2006
+++ lib/python/RestrictedPython/tests/verify.py Sun Jan 15 13:43:23 2006
@@ -21,6 +21,7 @@
function.
"""
+from __future__ import generators
import dis
import types

View File

@ -1,25 +0,0 @@
**********************************************************************
Zope Successfull installed.
To create an instance of Zope please run
make instance
You can set the following Variables in /etc/make.conf
ZOPEINSTANCEBASE Directory where Zope instance should go
(default: %%ZOPEBASEDIR%%)
ZOPEINSTANCENAME Default name for a new Zope instance
(default: none)
If you want have multiple Zope you should run
make instance INSTANCENAME=<somename>
The Instancefiles created by make instance will not be remove when the
port is deinstalled. You'll have to delete them yourself.
** ZEO Instances ** (Optional)
** Please refere to http://zope.org/Products/ZEO/ZEOFactSheet
To create a ZEO instance please run
make zeo [INSTANCENAME=<somename>]

View File

@ -1,65 +0,0 @@
#!/bin/sh
#
# Startup script for Zeo server.
#
# $FreeBSD$
#
# PROVIDE: zeo211
# REQUIRE: DAEMON
# BEFORE: zope211
# Define these zeo211_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/zeo211
#
# zeo211_enable : bool
# Enable Zeo ("YES") or not ("NO", the default).
#
# zeo211_instances : list
# List of dirs with Zeo's instances ("" by default).
#
. /etc/rc.subr
name="zeo211"
rcvar=zeo211_enable
zeo211ctl () {
for instance in $zeo211_instances; do
if [ -d ${instance} ]; then
echo -n " Zeo instance ${instance} -> "
${instance}/bin/zeoctl "$1"
fi
done
}
zeo211_start () {
echo "Starting Zeo 2.11:"
zeo211ctl "start"
}
zeo211_stop () {
echo "Stopping Zeo 2.11:"
zeo211ctl "stop"
}
zeo211_restart () {
echo "Restarting Zeo 2.11:"
zeo211ctl "restart"
}
start_cmd="zeo211_start"
stop_cmd="zeo211_stop"
restart_cmd="zeo211_restart"
load_rc_config $name
: ${zeo211_enable="NO"}
cmd="$1"
[ $# -gt 0 ] && shift
[ -n "$*" ] && zeo211_instances="$*"
run_rc_command "${cmd}"

View File

@ -1,15 +0,0 @@
**********************************************************************
ZEO instance successfully installed
If Zope should get started automatically when the system starts,
please add the following lines to /etc/rc.conf
zeo211_enable="YES"
zeo211_instances="%%ZOPEINSTANCEDIR%%"
If there is already a zeo211_instances entry please add
%%ZOPEINSTANCEDIR%% separated by a space.
Don`t forget to edit %%ZOPEINSTANCEDIR%%/etc/zeo.conf before starting
the zeo server

View File

@ -1,20 +0,0 @@
--- work/Zope-2.7.0/skel/etc/zope.conf.in Fri Jan 9 00:34:08 2004
+++ /data/infosys/zope/etc/zope.conf Wed Apr 14 09:36:46 2004
@@ -78,7 +78,8 @@
#
# Example:
#
-# products /home/chrism/projects/myproducts
+products %%ZOPEBASEDIR%%/Products
+products $INSTANCE/Products
# Directive: environment
@@ -137,6 +138,7 @@
# Example:
#
# effective-user chrism
+effective-user %%ZOPE_USER%%
# Directive: enable-product-installation

View File

@ -1,63 +0,0 @@
#!/bin/sh
#
# Startup script for Zope server.
#
# $FreeBSD$
#
# PROVIDE: zope211
# REQUIRE: DAEMON
# Define these zope211_* variables in one of these files:
# /etc/rc.conf
# /etc/rc.conf.local
# /etc/rc.conf.d/zope211
#
# zope211_enable : bool
# Enable Zope ("YES") or not ("NO", the default).
#
# zope211_instances : list
# List of dirs with Zope's instances ("" by default).
#
. /etc/rc.subr
name="zope211"
rcvar=zope211_enable
zope211ctl () {
for instance in $zope211_instances; do
if [ -d ${instance} ]; then
echo -n " Zope instance ${instance} -> "
${instance}/bin/zopectl "$1"
fi
done
}
zope211_start () {
echo "Starting Zope 2.11:"
zope211ctl "start"
}
zope211_stop () {
echo "Stopping Zope 2.11:"
zope211ctl "stop"
}
zope211_restart () {
echo "Restarting Zope 2.11:"
zope211ctl "restart"
}
start_cmd="zope211_start"
stop_cmd="zope211_stop"
restart_cmd="zope211_restart"
load_rc_config $name
: ${zope211_enable="NO"}
cmd="$1"
[ $# -gt 0 ] && shift
[ -n "$*" ] && zope211_instances="$*"
run_rc_command "${cmd}"

View File

@ -1,19 +0,0 @@
"Zope is an exciting new object-based, open source web application
platform. It allows you to build powerful and dynamic web applications
easily. Zope comes with source code and is friendly to developers as
well as users.
Zope is distinguished by its integrated object database which, when
combined with a revolutionary object model, provides a completely unique
facility for servicing content managers and web application developers."
Here are some of the "headlines" mentioned in the features list.
Database Integration Content Management
SQL and HTML in Harmony Builtin Objects
Multiple Data Sources Document Templates
Publish Databases Web to Objects
Application Development Integrated Object Database
DTML Scripting Managed Through the Web
External Methods Direct URL Access to Objects
WWW: http://www.zope.org/

File diff suppressed because it is too large Load Diff