aboutsummaryrefslogtreecommitdiff
path: root/net/py-qt4-network
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-03-27 10:08:48 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-03-27 10:08:48 +0000
commitbf5e18b5aa70aadff7cf3f23902f200cf7ae4a71 (patch)
treed8e8cecb2756c4dc4f8837c4ae2a313a772c0c40 /net/py-qt4-network
parent5398cf95f688884332906c57df9b2ffd00e386b6 (diff)
downloadports-bf5e18b5aa70aadff7cf3f23902f200cf7ae4a71.tar.gz
ports-bf5e18b5aa70aadff7cf3f23902f200cf7ae4a71.zip
PyQt4 is a set of Python bindings for Trolltech's Qt4 application framework.
This package provides the QtNetwork module. WWW: http://www.riverbankcomputing.co.uk/pyqt/ PR: ports/109620 Submitted by: Danny Pansters <danny at ricin.com>
Notes
Notes: svn path=/head/; revision=188512
Diffstat (limited to 'net/py-qt4-network')
-rw-r--r--net/py-qt4-network/Makefile71
-rw-r--r--net/py-qt4-network/distinfo3
-rw-r--r--net/py-qt4-network/files/patch-configure.py160
-rw-r--r--net/py-qt4-network/pkg-descr4
-rw-r--r--net/py-qt4-network/pkg-plist19
5 files changed, 257 insertions, 0 deletions
diff --git a/net/py-qt4-network/Makefile b/net/py-qt4-network/Makefile
new file mode 100644
index 000000000000..904dfe1960db
--- /dev/null
+++ b/net/py-qt4-network/Makefile
@@ -0,0 +1,71 @@
+# New ports collection makefile for: py-qt4-network
+# Date created: 2007-02-19
+# Whom: Danny Pansters <danny@ricin.com>
+#
+# $FreeBSD$
+
+PORTNAME= network
+PORTVERSION= 20070318
+CATEGORIES= net devel python
+MASTER_SITES= http://www.riverbankcomputing.com/Downloads/Snapshots/PyQt4/ \
+ http://freebsd.ricin.com/ports/distfiles/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}qt4-
+DISTNAME= PyQt-x11-gpl-4-snapshot-${PORTVERSION}
+
+MAINTAINER= danny@ricin.com
+COMMENT= Python bindings for the Qt4 toolkit, QtNetwork module
+
+BUILD_DEPENDS= ${PYTHON_SITELIBDIR}/PyQt4/QtCore.so:${PORTSDIR}/devel/py-qt4-core
+RUN_DEPENDS= ${BUILD_DEPENDS}
+
+HAS_CONFIGURE= yes
+USE_PYTHON= 2.3+
+USE_QT_VER= 4
+QT_COMPONENTS= network qmake
+
+OPTIONS= API "Install QtNetwork API for QScintilla2" on \
+ DEBUG "Enable debugging in generated code" off \
+ SIPFILES "Install the QtNetwork SIP files" on \
+ TRACING "Enable tracing in generated code" off
+
+OPTIONSFILE= ${PORT_DBDIR}/py-qt4-${PORTNAME}/options
+SIPDIR= ${PREFIX}/share/py-sip
+ARGS= -b ${PREFIX}/bin -c -j 2 -d ${PYTHONPREFIX_SITELIBDIR}/PyQt4 \
+ -q ${QT_PREFIX}/bin/qmake-qt4 -a
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_DEBUG)
+ARGS+= -u
+.endif
+.if defined(WITHOUT_API)
+PLIST_SUB+= API="@comment "
+PLIST_SUB+= APIFILE="@comment "
+.else
+LIB_DEPENDS+= qscintilla2.1:${PORTSDIR}/devel/qscintilla2
+PLIST_SUB+= API=""
+PLIST_SUB+= APIFILE="share/qt4/qsci/api/python/QtNetwork.api"
+.endif
+.if defined(WITHOUT_SIPFILES)
+ARGS+= -v /dev/null
+PLIST_SUB+= SIPFILES="@comment "
+PLIST_SUB+= SIPDIR="@comment "
+.else
+ARGS+= -v ${SIPDIR}
+PLIST_SUB+= SIPFILES=""
+PLIST_SUB+= SIPDIR="share/py-sip"
+.endif
+.if defined(WITH_TRACING)
+ARGS+= -r
+.endif
+
+do-configure:
+ ( cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
+ ${PYTHON_CMD} configure.py ${ARGS} )
+
+post-install:
+.if defined(WITHOUT_API)
+ ( ${RM} ${APIFILE} )
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/net/py-qt4-network/distinfo b/net/py-qt4-network/distinfo
new file mode 100644
index 000000000000..b42fc45ded6f
--- /dev/null
+++ b/net/py-qt4-network/distinfo
@@ -0,0 +1,3 @@
+MD5 (PyQt-x11-gpl-4-snapshot-20070318.tar.gz) = 538cd5167ccb14a6b6a3ee687432617a
+SHA256 (PyQt-x11-gpl-4-snapshot-20070318.tar.gz) = d98516e20b02194264c199deddda2562845efca64315608522cc05a36c9210c7
+SIZE (PyQt-x11-gpl-4-snapshot-20070318.tar.gz) = 1076275
diff --git a/net/py-qt4-network/files/patch-configure.py b/net/py-qt4-network/files/patch-configure.py
new file mode 100644
index 000000000000..d0a72f84c8c9
--- /dev/null
+++ b/net/py-qt4-network/files/patch-configure.py
@@ -0,0 +1,160 @@
+--- configure.py.orig Mon Feb 19 04:39:13 2007
++++ configure.py Tue Feb 20 16:24:03 2007
+@@ -133,21 +133,21 @@
+ }
+
+ def check_modules(self):
+- pyqt_modules.append("QtCore")
++ #pyqt_modules.append("QtCore")
+
+- check_module("QtGui", "qwidget.h", "new QWidget()")
++ #check_module("QtGui", "qwidget.h", "new QWidget()")
+ check_module("QtNetwork", "qhostaddress.h", "new QHostAddress()")
+- check_module("QtOpenGL", "qgl.h", "new QGLWidget()")
+- check_module("QtSql", "qsqldatabase.h", "new QSqlDatabase()")
+- check_module("QtSvg", "qsvgwidget.h", "new QSvgWidget()")
+- check_module("QtTest", "QtTest", "QTest::qSleep(0)")
+- check_module("QtXml", "qdom.h", "new QDomDocument()")
+- check_module("QtAssistant", "qassistantclient.h", "new QAssistantClient(\"foo\")")
+- check_module("QtDesigner", "QExtensionFactory", "new QExtensionFactory()")
+- check_module("QAxContainer", "qaxobject.h", "new QAxObject()", "QAxContainer")
++ #check_module("QtOpenGL", "qgl.h", "new QGLWidget()")
++ #check_module("QtSql", "qsqldatabase.h", "new QSqlDatabase()")
++ #check_module("QtSvg", "qsvgwidget.h", "new QSvgWidget()")
++ #check_module("QtTest", "QtTest", "QTest::qSleep(0)")
++ #check_module("QtXml", "qdom.h", "new QDomDocument()")
++ #check_module("QtAssistant", "qassistantclient.h", "new QAssistantClient(\"foo\")")
++ #check_module("QtDesigner", "QExtensionFactory", "new QExtensionFactory()")
++ #check_module("QAxContainer", "qaxobject.h", "new QAxObject()", "QAxContainer")
+
+- if os.path.isdir("dbus"):
+- check_dbus()
++ #if os.path.isdir("dbus"):
++ # check_dbus()
+
+ def code(self):
+ # Note that the order of the dependent modules is important.
+@@ -201,31 +201,31 @@
+ generate_code("QAxContainer", ["QAxContainer", "QtGui", "QtCore"])
+
+ # Generate the consolidated module.
+- sipconfig.inform("Creating Qt consolidated module...")
+- f = open("Qt.py", "w")
++ #sipconfig.inform("Creating Qt consolidated module...")
++ #f = open("Qt.py", "w")
+
+- for m in pyqt_modules:
+- f.write("from PyQt4.%s import *\n" % m)
++ #for m in pyqt_modules:
++ # f.write("from PyQt4.%s import *\n" % m)
+
+- f.close()
++ #f.close()
+
+ # Generate the QScintilla API file.
+- sipconfig.inform("Creating QScintilla API file...")
+- f = open("PyQt4.api", "w")
++ #sipconfig.inform("Creating QScintilla API file...")
++ #f = open("PyQt4.api", "w")
+
+- for m in pyqt_modules:
+- api = open(m + ".api")
++ #for m in pyqt_modules:
++ # api = open(m + ".api")
+
+- for l in api:
+- f.write("PyQt4." + l)
++ # for l in api:
++ # f.write("PyQt4." + l)
+
+- api.close()
+- os.remove(m + ".api")
++ # api.close()
++ # os.remove(m + ".api")
+
+- f.close()
++ #f.close()
+
+ def module_installs(self):
+- return ["__init__.py", "Qt.py", "pyqtconfig.py"]
++ return []
+
+ def qpylibs(self):
+ # See which QPy libraries to build.
+@@ -278,7 +278,7 @@
+ tool.append("dbus")
+
+ # Only include ElementTree for older versions of Python.
+- if sipcfg.py_version < 0x020500:
++ """if sipcfg.py_version < 0x020500:
+ sipconfig.inform("Creating elementtree Makefile...")
+
+ makefile = sipconfig.PythonModuleMakefile(
+@@ -309,7 +309,7 @@
+ )
+
+ makefile.generate()
+- tool.append("pyuic")
++ tool.append("pyuic")"""
+
+ if "QtXml" in pyqt_modules:
+ sipconfig.inform("Creating pylupdate4 Makefile...")
+@@ -428,7 +428,7 @@
+
+ sipconfig.inform("The PyQt .sip files will be installed in %s." % opt_pyqtsipdir)
+
+- sipconfig.inform("pyuic4, pyrcc4 and pylupdate4 will be installed in %s." % opt_pyqtbindir)
++ #sipconfig.inform("pyuic4, pyrcc4 and pylupdate4 will be installed in %s." % opt_pyqtbindir)
+
+ if opt_vendorcheck:
+ sipconfig.inform("PyQt will only be usable with signed interpreters.")
+@@ -761,7 +761,8 @@
+ sipfiles = []
+
+ for s in glob.glob("sip/" + mname + "/*.sip"):
+- sipfiles.append(os.path.join("..", "sip", mname, os.path.basename(s)))
++ if mname == "QtNetwork":
++ sipfiles.append(os.path.join("..", "sip", mname, os.path.basename(s)))
+
+ installs.append([sipfiles, os.path.join(opt_pyqtsipdir, mname)])
+
+@@ -825,7 +826,7 @@
+ sipconfig.error("This version of PyQt and the %s edition of Qt have incompatible licenses." % qted)
+
+ # Confirm the license.
+- print
++ """print
+ print "Type 'L' to view the license."
+ print "Type 'yes' to accept the terms of the license."
+ print "Type 'no' to decline the terms of the license."
+@@ -847,7 +848,7 @@
+
+ if resp == "l":
+ os.system("more LICENSE")
+-
++ """
+ # If there should be a license file then check it is where it should be.
+ if lfile:
+ if os.access(os.path.join("sip", lfile), os.F_OK):
+@@ -1367,16 +1368,18 @@
+ scidir = os.path.join(qt_datadir, "qsci")
+
+ if opt_api or os.path.isdir(scidir):
+- installs.append(("PyQt4.api", os.path.join(scidir, "api", "python")))
++ installs.append(("QtNetwork.api", os.path.join(scidir, "api", "python")))
++
++ pyqt_modules = ["QtNetwork"]
+
+ sipconfig.ParentMakefile(
+ configuration=sipcfg,
+- subdirs=pyqt.qpylibs() + pyqt_modules + pyqt.tools(),
++ subdirs=pyqt_modules,
+ installs=installs
+ ).generate()
+
+ # Install the configuration module.
+- create_config("pyqtconfig.py", "pyqtconfig.py.in", macros)
++ #create_config("pyqtconfig.py", "pyqtconfig.py.in", macros)
+
+
+ ###############################################################################
diff --git a/net/py-qt4-network/pkg-descr b/net/py-qt4-network/pkg-descr
new file mode 100644
index 000000000000..86d86b994507
--- /dev/null
+++ b/net/py-qt4-network/pkg-descr
@@ -0,0 +1,4 @@
+PyQt4 is a set of Python bindings for Trolltech's Qt4 application framework.
+This package provides the QtNetwork module.
+
+WWW: http://www.riverbankcomputing.co.uk/pyqt/
diff --git a/net/py-qt4-network/pkg-plist b/net/py-qt4-network/pkg-plist
new file mode 100644
index 000000000000..b4bc948e4fdb
--- /dev/null
+++ b/net/py-qt4-network/pkg-plist
@@ -0,0 +1,19 @@
+%%PYTHON_SITELIBDIR%%/PyQt4/QtNetwork.so
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/QtNetworkmod.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qabstractsocket.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qftp.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qhostaddress.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qhostinfo.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qhttp.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qnetworkinterface.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qnetworkproxy.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qtcpserver.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qtcpsocket.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qudpsocket.sip
+%%SIPFILES%%%%SIPDIR%%/QtNetwork/qurlinfo.sip
+%%SIPFILES%%@dirrm %%SIPDIR%%/QtNetwork
+@cwd %%LOCALBASE%%
+%%API%%%%APIFILE%%
+%%API%%@dirrmtry share/qt4/qsci/api/python
+%%API%%@dirrmtry share/qt4/qsci/api
+%%API%%@dirrmtry share/qt4/qsci