summaryrefslogtreecommitdiff
path: root/x11/py-sip
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2008-10-08 14:10:45 +0000
committerwiz <wiz@pkgsrc.org>2008-10-08 14:10:45 +0000
commitdda2d2ebe4758f856540d1439d58e696ec36651f (patch)
treef675cd6f34d33ec16960965ef056856936d4a539 /x11/py-sip
parente11f9956e51491b296075287d16df9b638178579 (diff)
downloadpkgsrc-dda2d2ebe4758f856540d1439d58e696ec36651f.tar.gz
Import py-sip, successor of py-qt3-sip.
Renamed because there is no dependency on any qt version in it. Changes since py-qt3-sip (4.3.2): v4.7.7 8th Aug 2008 - C++ structs are now properly handled as a class with a default public section. - sip.dump() now includes the object's first child wrapper. v4.7.6 20th May 2008 - Added the -s flag to configure.py to specify the SDK directory to use when building universal binaries on MacOS/X. - Added support for MSVC 2008 to the build system. - Added support for v10.x of the Intel compiler and removed support for earlier versions. - MSVC 2008 is the default platform when using Python v2.6. v4.7.5 13th May 2008 - The sip.voidptr type has an optional size associated with it and supports const void *. If a size is associated then it also supports Python's buffer protocol. - Added sipConvertToVoidPtr() to the SIP API. - Added sipConvertFromConstVoidPtr(), sipConvertFromConstVoidPtrAndSize(), sipConvertFromVoidPtr() and sipConvertFromVoidPtrAndSize() to the SIP API. - Added the /ResultSize/ argument annotation to specify the size of a block of memory returned as a void * or const void *. - Added the /NoArgParser/ function annotation to give %MethodCode complete responsibility for argument parsing. - Added the /NoRelease/ mapped type annotation to specify that the sipReleaseMappedType() function is not supported. - The /ArraySize/ annotation now supports arrays with more than 2^31 elements. - %GetCode and %SetCode for class attributes now have access to the referencing type object. - Any object that supports the Python buffer protocol can now be passed as a char or char * argument. v4.7.4 12th February 2008 - The build system handles the directory structure used by Leopard's Python installation. - Added support for /Transfer/ as a constructor annotation. v4.7.3 6th December 2007 - Added support for automatically generating missing complementary comparision operators. Note that this introduces a potential compatibility problem - see the documentation for details. v4.7.2 5th December 2007 - Added the /SingleShot/ argument annotation. - Added the /TransferThis/ function annotation. v4.7.1 28th September 2007 - A bug fix release. v4.7 30th July 2007 - Added %PickleCode to allow handwritten code to pickle a wrapped C++ instance or C structure. - Added %CompositeModule to create modules that are composites of ordinary modules. - Added %ConsolidatedModule (and the -p command line option) to create modules that contain all the wrapper code on behalf of ordinary modules. - Added the dump() function to the sip module. - Added sipTransferBreak() to the SIP API. - Added support for /Transfer/ as a function annotation. v4.6 10th April 2007 - Added support for wchar_t. - The -g command line option releases the GIL whenever a call is made to the wrapped library. - Added the /HoldGIL/ annotation to explicitly retain the GIL when calling a particular function in the wrapped library. - Added sipFindClass() and sipFindNamedEnum() to the public API. - /TransferThis/ may be specified more than once. - Added support for __truediv__ and __itruediv__. - The SIP code generator and module may be built as universal binaries under MacOS/X using the -n command line option to configure.py. v4.5.2 9th December 2006 - A bug fix release. v4.5.1 9th December 2006 - Added the SIP_SSIZE_T type to help write PEP 353 compliant handwritten code. v4.5 4th November 2006 - Added support for Python v2.5. - Added sip_config_args to sipconfig.py. - sip.voidptr now implements __hex__(). - Added sip.delete() to call a C++ instance's destructor, or return a C structure to the heap. - Added sip.isdeleted() to check if a C++ instance or C structure has been destroyed or returned to the heap. - Added sip.setdeleted() to mark that a C++ instance or C structure has been destroyed or returned to the heap. - Added support for pure virtual destructors. - Added the __dtor__() method to allow Python code to be called from a C++ destructor. - Added the /NoDefaultCtors/ class annotation. - The generated API files are now more complete and use Python types rather than C/C++ types. - Added support for embedding manifests for MSVC 2005. v4.4.5 10th June 2006 - A bug fix release. v4.4.4 8th June 2006 - Added %ExportedHeaderCode and %UnitCode. - Added sipExportSymbol() and sipImportSymbol() to the public API. v4.4.3 27th April 2006 - A bug fix release. v4.4.2 23rd April 2006 - A bug fix release. v4.4.1 3rd April 2006 - A bug fix release. v4.4 24th March 2006 - The major number of the internal API has changed so it will be necessary to regenerate all modules. - This release introduces small incompatibilities that may affect handwritten code. See the documentation for the details. - Module names specified with %Module and %CModule can now include periods to denote a Python package structure. - Namespaces can be split across multiple Python modules. - Class templates are now supported and instantiated using "typedef". - Mapped type templates are now supported and instantiated automatically. - Global operators are now supported. - Operator casts in classes are now supported. - C/C++ signed char type is now treated as a separate type to char. - C/C++ long and unsigned long types are now wrapped as Python long objects rather than Python integer objects. - C/C++ long long and unsigned long long types are now supported. - unsigned short and unsigned int are now implemented as long objects instead of integer objects. - Classes can now be declared using the /External/ annotation and be defined in another, unspecified, module. - /TransferThis/ can now be used in non-factory methods to change the ownership to a different C++ instance or to change it to Python. - /Constrained/ can now be used with booleans. - Added support for Python's buffer interface, %BIGetCharBufferCode, %BIGetReadBufferCode, %BIGetSegCountCode and %BIGetWriteBufferCode. - The "user" member has been added to the sipWrapper structure and can be used for any purpose by handwritten code. - Function argument names are now parsed, but otherwise ignored. - The "explicit" keyword is now parsed, but otherwise ignored. - Added the /DelayDtor/ class annotation which given more control over the order in which instances are deleted when an application terminates. - Added support for the SIP_PYTYPE pseudo-type that represents a Python type object. - Added support for ellipsis (ie. "...") in function arguments. Any remaining arguments will be gathered as a Python tuple. - Add support for the /NoDerived/ annotation for Python class constructors that have no C/C++ equivalent. - The sipSelfWasArg boolean is now available to the %MethodCode of non-abstract, virtual methods to indicate whether the class implementation of the method rather than the virtual implementation should be called. %MethodCode for non-abstract, virtual, protected methods must now call the sipProtectVirt wrapper (rather than sipProtect). - sipCanConvertToInstance(), sipConvertToInstance(), sipForceConvertToInstance(), sipReleaseInstance(), sipConvertFromInstance(), sipConvertFromNewInstance(), sipCanConvertToMappedType(), sipConvertToMappedType(), sipForceConvertToMappedType(), sipReleaseMappedType(), sipConvertFromMappedType() and sipFindMappedType() have been added to the SIP API. - sipLong_AsUnsignedLong() has been added, primarily as a workaround for a bug in Python v2.3.x and earlier. - Added the 't', 'u', 'C' and 'D' format characters to sipParseResult(). - Added the 't', 'u', 'B', 'C' and 'D' format characters to sipBuildResult(). - Responsibility for interpreting and implementing the /Transfer/ and /TransferBack/ annotations has been pushed down to %ConvertToTypeCode and %ConvertFromTypeCode. The generated type convertors sipForceConvertTo_*() and sipConvertFrom_*() have been deprecated. - Added the %SIPNoEmitters directive for PyQt4. - Added support for the __hash__ Python special method. - The __getitem__ Python special method no longer requires %MethodCode. - All of the calls to Qt have been moved out of the sip module and into PyQt. The generated sipconfig.py file no longer contains any Qt specific information. These changes mean that SIP can support PyQt v3 and v4 at the same time. - Static methods can now be defined as Qt slots. - Removed SIP_BUILD from sip.h. - The -c, -l, -q and -x flags to configure.py have been removed. - Added the PythonModuleMakefile class to the build system for installing pure Python modules. - Added the create_wrapper() function to the build system for creating platform dependent executable wrappers for Python scripts. - Added Configuration.platform to the build system.
Diffstat (limited to 'x11/py-sip')
-rw-r--r--x11/py-sip/DESCR4
-rw-r--r--x11/py-sip/Makefile61
-rw-r--r--x11/py-sip/PLIST7
-rw-r--r--x11/py-sip/buildlink3.mk21
-rw-r--r--x11/py-sip/distinfo7
-rw-r--r--x11/py-sip/patches/patch-aa31
-rw-r--r--x11/py-sip/patches/patch-ab12
7 files changed, 143 insertions, 0 deletions
diff --git a/x11/py-sip/DESCR b/x11/py-sip/DESCR
new file mode 100644
index 00000000000..066f40f3895
--- /dev/null
+++ b/x11/py-sip/DESCR
@@ -0,0 +1,4 @@
+SIP is a tool that makes it very easy to create Python bindings for
+C++ libraries. It was originally developed to create PyQt, the Python
+bindings for the Qt toolkit, but can be used to create bindings for any
+C++ library.
diff --git a/x11/py-sip/Makefile b/x11/py-sip/Makefile
new file mode 100644
index 00000000000..95e25edd146
--- /dev/null
+++ b/x11/py-sip/Makefile
@@ -0,0 +1,61 @@
+# $NetBSD: Makefile,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+#
+
+DISTNAME= sip-4.7.7
+PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
+CATEGORIES= x11 devel python
+MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/sip4/
+
+MAINTAINER= pkgsrc-users@NetBSD.org
+HOMEPAGE= http://www.riverbankcomputing.com/software/sip/intro
+COMMENT= Tool to create Python bindings for C++ libraries
+
+PKG_DESTDIR_SUPPORT= user-destdir
+
+CONFLICTS+= ${PYPKGPREFIX}-qt2-sip-* ${PYPKGPREFIX}-qt3-sip-*
+
+PYTHON_VERSIONS_ACCEPTED= 25 24 23
+
+USE_LIBTOOL= yes
+USE_TOOLS+= gmake
+USE_LANGUAGES= c c++
+
+CONFIGURE_ARGS+= -b ${PREFIX}/bin
+CONFIGURE_ARGS+= -d ${PREFIX}/${PYSITELIB}
+CONFIGURE_ARGS+= -e ${PREFIX}/${PYINC}
+CONFIGURE_ARGS+= -v ${PREFIX}/share/sip${PYVERSSUFFIX}
+CONFIGURE_ARGS+= INCDIR=${PREFIX}/include
+CONFIGURE_ARGS+= LIBDIR=${PREFIX}/lib
+
+PY_PATCHPLIST= yes
+PLIST_SUBST+= PYVERSSUFFIX=${PYVERSSUFFIX:Q}
+
+.include "../../mk/bsd.prefs.mk"
+.include "../../mk/compiler.mk"
+
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+= CFLAGS_SHLIB=-fno-common
+CONFIGURE_ARGS+= LFLAGS_PLUGIN="-bundle -flat_namespace -undefined suppress"
+.else
+CONFIGURE_ARGS+= CFLAGS_SHLIB=-fPIC
+CONFIGURE_ARGS+= CXXFLAGS_SHLIB=-fPIC
+.if ${OPSYS} == "SunOS" && !empty(CC_VERSION:Mgcc*)
+# gcc3 uses -mimpure-text to not pass -assert pure-text to the linker
+CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared -mimpure-text"
+.else
+CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared"
+.endif
+.endif
+
+SUBST_CLASSES+= pyversfx
+SUBST_STAGE.pyversfx= pre-configure
+SUBST_FILES.pyversfx= sipgen/sipgen.sbf
+SUBST_SED.pyversfx= -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g"
+
+do-configure:
+ (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${PYTHONBIN} configure.py ${CONFIGURE_ARGS})
+
+.include "../../lang/python/extension.mk"
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/x11/py-sip/PLIST b/x11/py-sip/PLIST
new file mode 100644
index 00000000000..e92466cb0de
--- /dev/null
+++ b/x11/py-sip/PLIST
@@ -0,0 +1,7 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+bin/sip${PYVERSSUFFIX}
+${PYINC}/sip.h
+${PYSITELIB}/sip.so
+${PYSITELIB}/sipconfig.py
+${PYSITELIB}/sipconfig.pyc
+${PYSITELIB}/sipdistutils.py
diff --git a/x11/py-sip/buildlink3.mk b/x11/py-sip/buildlink3.mk
new file mode 100644
index 00000000000..0e0cd4f383b
--- /dev/null
+++ b/x11/py-sip/buildlink3.mk
@@ -0,0 +1,21 @@
+# $NetBSD: buildlink3.mk,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+PY_SIP_BUILDLINK3_MK:= ${PY_SIP_BUILDLINK3_MK}+
+
+.include "../../lang/python/pyversion.mk"
+
+.if ${BUILDLINK_DEPTH} == "+"
+BUILDLINK_DEPENDS+= py-sip
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Npy-sip}
+BUILDLINK_PACKAGES+= py-sip
+BUILDLINK_ORDER:= ${BUILDLINK_ORDER} ${BUILDLINK_DEPTH}py-sip
+
+.if ${PY_SIP_BUILDLINK3_MK} == "+"
+BUILDLINK_API_DEPENDS.py-sip+= ${PYPKGPREFIX}-sip>=4.7.7
+BUILDLINK_PKGSRCDIR.py-sip?= ../../x11/py-sip
+.endif # PY_SIP_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/x11/py-sip/distinfo b/x11/py-sip/distinfo
new file mode 100644
index 00000000000..811320325cd
--- /dev/null
+++ b/x11/py-sip/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+
+SHA1 (sip-4.7.7.tar.gz) = e9842ddcd7e4f973ddd3c5337d5540d664463152
+RMD160 (sip-4.7.7.tar.gz) = 117cf22b71e6b88c8181a1b0f40f1735d0c52f45
+Size (sip-4.7.7.tar.gz) = 464994 bytes
+SHA1 (patch-aa) = 97bf03e1bfd687773d137a88f6eb527e481c400d
+SHA1 (patch-ab) = f5ba9704fc3867a1273dca534b145cdb14b070e7
diff --git a/x11/py-sip/patches/patch-aa b/x11/py-sip/patches/patch-aa
new file mode 100644
index 00000000000..945953051d0
--- /dev/null
+++ b/x11/py-sip/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+
+--- configure.py.orig 2008-08-08 16:07:36.000000000 +0200
++++ configure.py
+@@ -230,7 +230,7 @@ def set_platform_directories():
+
+ plat_py_lib_dir = lib_dir + "/config"
+ plat_bin_dir = sys.exec_prefix + "/bin"
+- plat_sip_dir = sys.prefix + "/share/sip"
++ plat_sip_dir = sys.prefix + "/share/sip%s" % sys.version[0:3]
+
+
+ def create_config(module, template, macros):
+@@ -248,7 +248,7 @@ def create_config(module, template, macr
+ "sip_version": sip_version,
+ "sip_version_str": sip_version_str,
+ "platform": opt_platform,
+- "sip_bin": os.path.join(opt_sipbindir, "sip"),
++ "sip_bin": os.path.join(opt_sipbindir, "sip%s" % sys.version[0:3]),
+ "sip_inc_dir": opt_sipincdir,
+ "sip_mod_dir": opt_sipmoddir,
+ "default_bin_dir": plat_bin_dir,
+@@ -282,7 +282,7 @@ def create_makefiles(macros):
+ sipconfig.ParentMakefile(
+ configuration=cfg,
+ subdirs=["sipgen", "siplib"],
+- installs=(["sipconfig.py", "sipdistutils.py"], cfg.sip_mod_dir)
++ installs=(["sipconfig.py", "sipconfig.pyc", "sipdistutils.py"], cfg.sip_mod_dir)
+ ).generate()
+
+ sipconfig.inform("Creating sip code generator Makefile...")
diff --git a/x11/py-sip/patches/patch-ab b/x11/py-sip/patches/patch-ab
new file mode 100644
index 00000000000..b60b96be0ee
--- /dev/null
+++ b/x11/py-sip/patches/patch-ab
@@ -0,0 +1,12 @@
+$NetBSD: patch-ab,v 1.1.1.1 2008/10/08 14:10:45 wiz Exp $
+
+--- sipgen/sipgen.sbf.orig 2008-08-08 16:07:36.000000000 +0200
++++ sipgen/sipgen.sbf
+@@ -10,6 +10,6 @@
+ # SIP is supplied WITHOUT ANY WARRANTY; without even the implied warranty of
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+-target = sip
++target = sip@PYVERSSUFFIX@
+ sources = main.c transform.c gencode.c export.c heap.c parser.c lexer.c
+ headers = sip.h parser.h