python-PyKDE patch
migo
migo at norwida.net
Sat Oct 18 19:57:14 CEST 2003
Witam,
załączam patch do python-PyKDE, umozliwia kompilacje pakietu z pythonem
2.3 i PyQt 3.8.
Moze komus sie przyda ;)
--
Pozdrawiam,
Tomasz Kolaj
-------------- next part --------------
diff -urN PyKDE-3.7-4/build.py Pynew/build.py
--- PyKDE-3.7-4/build.py 2003-08-14 03:05:45.000000000 +0200
+++ Pynew/build.py 2003-10-18 18:34:54.568432240 +0200
@@ -18,7 +18,7 @@
import time
# Release numbers - don't forget to update these !!!
-Release = "3.7"
+Release = "3.8"
Version = "3.7-4"
internalError = \
diff -urN PyKDE-3.7-4/sip/kzip.sip Pynew/sip/kzip.sip
--- PyKDE-3.7-4/sip/kzip.sip 2003-08-13 23:28:57.000000000 +0200
+++ Pynew/sip/kzip.sip 2003-08-13 23:28:57.000000000 +0200
@@ -104,6 +104,7 @@
{
%HeaderCode
typedef long long longlong;
+#define LONG_LONG PY_LONG_LONG
%End
%ConvertFromTypeCode
if (!sipCpp)
@@ -142,6 +143,7 @@
{
%HeaderCode
typedef unsigned long long ulonglong;
+#define LONG_LONG PY_LONG_LONG
%End
%ConvertFromTypeCode
if (!sipCpp)
diff -urN PyKDE-3.7-4/sip/kzip.sip22 Pynew/sip/kzip.sip22
--- PyKDE-3.7-4/sip/kzip.sip22 1970-01-01 01:00:00.000000000 +0100
+++ Pynew/sip/kzip.sip22 2003-08-13 23:28:57.000000000 +0200
@@ -0,0 +1,176 @@
+//
+// Copyright 2003 Jim Bublitz <jbublitz at nwinternet.com>
+// Earlier copyrights 1998 - 2002 Jim Bublitz and/or Phil Thompson
+// may also apply
+
+
+// Generated by preSip
+// module kio version KDE_3_1_3
+
+
+// This software is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License as
+// published by the Free Software Foundation; either version 2 of
+// the License, or (at your option) any later version.
+//
+// This software is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public
+// License along with this library; see the file COPYING.
+// If not, write to the Free Software Foundation, Inc.,
+// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+%If ( KDE_3_1_0 - )
+
+class KZip : KArchive
+{
+%HeaderCode
+#include <kzip.h>
+%End
+
+
+public:
+ KZip (const QString&);
+ KZip (QIODevice*);
+ QString fileName ();
+
+ enum Compression
+ {
+ NoCompression = 0,
+ DeflateCompression = 1
+ };
+
+ void setCompression (KZip::Compression);
+ KZip::Compression compression () const;
+ virtual bool writeFile (const QString&, const QString&, const QString&, uint, const char*);
+ virtual bool prepareWriting (const QString&, const QString&, const QString&, uint);
+ bool writeData (const char*, uint);
+ virtual bool doneWriting (uint);
+
+protected:
+ virtual bool openArchive (int);
+ virtual bool closeArchive ();
+ virtual bool writeDir (const QString&, const QString&, const QString&);
+
+protected:
+//igx virtual void virtual_hook (int, void*);
+
+}; // class KZip
+
+%End
+
+
+%If ( KDE_3_1_0 - )
+
+class KZipFileEntry : KArchiveFile
+{
+%HeaderCode
+#include <kzip.h>
+%End
+
+
+public:
+ KZipFileEntry (KZip*, const QString&, int, int, const QString&, const QString&, const QString&, const QString&, Q_LONG, Q_LONG, int, Q_LONG);
+ int encoding () const;
+ Q_LONG compressedSize () const;
+ void setCompressedSize (Q_LONG);
+ void setHeaderStart (Q_LONG);
+ Q_LONG headerStart () const;
+ ulong crc32 () const;
+ void setCRC32 (ulong);
+ QString path () const;
+ virtual QByteArray data () const;
+ QIODevice* device () const;
+
+}; // class KZipFileEntry
+
+%End
+
+
+%If ( KDE_3_1_0 - )
+//force
+typedef longlong Q_LONG;
+typedef ulonglong Q_ULONG;
+%End
+
+
+%If (KDE_3_1_0 - )
+%MappedType longlong
+//converts a Python long
+{
+%HeaderCode
+typedef long long longlong;
+%End
+%ConvertFromTypeCode
+ if (!sipCpp)
+ Py_INCREF (Py_None);
+ return Py_None;
+
+ PyObject *LongLong;
+
+ return PyLong_FromLongLong (*(LONG_LONG *)sipCpp);
+%End
+
+%ConvertToTypeCode
+ if (sipIsErr == NULL)
+ return PyLong_Check (sipPy) || PyInt_Check (sipPy);
+
+ long long *ll = new long long;
+ *ll = 0;
+
+ if (PyLong_Check (sipPy))
+ *ll = PyLong_AsLongLong (sipPy);
+ else if (PyInt_Check (sipPy))
+ *ll = (long long)PyInt_AS_LONG (sipPy);
+
+ *sipCppPtr = ll;
+
+ return 1;
+%End
+
+};
+%End
+
+
+%If (KDE_3_1_0 - )
+%MappedType ulonglong
+//converts a Python long
+{
+%HeaderCode
+typedef unsigned long long ulonglong;
+%End
+%ConvertFromTypeCode
+ if (!sipCpp)
+ Py_INCREF (Py_None);
+ return Py_None;
+
+ PyObject *LongLong;
+
+ return PyLong_FromUnsignedLongLong (*(LONG_LONG *)sipCpp);
+%End
+
+%ConvertToTypeCode
+ if (sipIsErr == NULL)
+ return PyLong_Check (sipPy) || PyInt_Check (sipPy);
+
+ unsigned long long *ul = new unsigned long long;
+ *ul = 0;
+
+ if (PyLong_Check (sipPy))
+ *ul = PyLong_AsUnsignedLongLong (sipPy);
+ else if (PyInt_Check (sipPy))
+ *ul = (unsigned long long)PyInt_AS_LONG (sipPy);
+
+ *sipCppPtr = ul;
+
+ return 1;
+%End
+
+};
+%End
+
+
diff -urN PyKDE-3.7-4/sip/kzip.sip23 Pynew/sip/kzip.sip23
--- PyKDE-3.7-4/sip/kzip.sip23 2003-08-13 23:28:57.000000000 +0200
+++ Pynew/sip/kzip.sip23 1970-01-01 01:00:00.000000000 +0100
@@ -1,178 +0,0 @@
-//
-// Copyright 2003 Jim Bublitz <jbublitz at nwinternet.com>
-// Earlier copyrights 1998 - 2002 Jim Bublitz and/or Phil Thompson
-// may also apply
-
-
-// Generated by preSip
-// module kio version KDE_3_1_3
-
-
-// This software is free software; you can redistribute it and/or
-// modify it under the terms of the GNU General Public License as
-// published by the Free Software Foundation; either version 2 of
-// the License, or (at your option) any later version.
-//
-// This software is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public
-// License along with this library; see the file COPYING.
-// If not, write to the Free Software Foundation, Inc.,
-// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-%If ( KDE_3_1_0 - )
-
-class KZip : KArchive
-{
-%HeaderCode
-#include <kzip.h>
-%End
-
-
-public:
- KZip (const QString&);
- KZip (QIODevice*);
- QString fileName ();
-
- enum Compression
- {
- NoCompression = 0,
- DeflateCompression = 1
- };
-
- void setCompression (KZip::Compression);
- KZip::Compression compression () const;
- virtual bool writeFile (const QString&, const QString&, const QString&, uint, const char*);
- virtual bool prepareWriting (const QString&, const QString&, const QString&, uint);
- bool writeData (const char*, uint);
- virtual bool doneWriting (uint);
-
-protected:
- virtual bool openArchive (int);
- virtual bool closeArchive ();
- virtual bool writeDir (const QString&, const QString&, const QString&);
-
-protected:
-//igx virtual void virtual_hook (int, void*);
-
-}; // class KZip
-
-%End
-
-
-%If ( KDE_3_1_0 - )
-
-class KZipFileEntry : KArchiveFile
-{
-%HeaderCode
-#include <kzip.h>
-%End
-
-
-public:
- KZipFileEntry (KZip*, const QString&, int, int, const QString&, const QString&, const QString&, const QString&, Q_LONG, Q_LONG, int, Q_LONG);
- int encoding () const;
- Q_LONG compressedSize () const;
- void setCompressedSize (Q_LONG);
- void setHeaderStart (Q_LONG);
- Q_LONG headerStart () const;
- ulong crc32 () const;
- void setCRC32 (ulong);
- QString path () const;
- virtual QByteArray data () const;
- QIODevice* device () const;
-
-}; // class KZipFileEntry
-
-%End
-
-
-%If ( KDE_3_1_0 - )
-//force
-typedef longlong Q_LONG;
-typedef ulonglong Q_ULONG;
-%End
-
-
-%If (KDE_3_1_0 - )
-%MappedType longlong
-//converts a Python long
-{
-%HeaderCode
-typedef long long longlong;
-#define LONG_LONG PY_LONG_LONG
-%End
-%ConvertFromTypeCode
- if (!sipCpp)
- Py_INCREF (Py_None);
- return Py_None;
-
- PyObject *LongLong;
-
- return PyLong_FromLongLong (*(LONG_LONG *)sipCpp);
-%End
-
-%ConvertToTypeCode
- if (sipIsErr == NULL)
- return PyLong_Check (sipPy) || PyInt_Check (sipPy);
-
- long long *ll = new long long;
- *ll = 0;
-
- if (PyLong_Check (sipPy))
- *ll = PyLong_AsLongLong (sipPy);
- else if (PyInt_Check (sipPy))
- *ll = (long long)PyInt_AS_LONG (sipPy);
-
- *sipCppPtr = ll;
-
- return 1;
-%End
-
-};
-%End
-
-
-%If (KDE_3_1_0 - )
-%MappedType ulonglong
-//converts a Python long
-{
-%HeaderCode
-typedef unsigned long long ulonglong;
-#define LONG_LONG PY_LONG_LONG
-%End
-%ConvertFromTypeCode
- if (!sipCpp)
- Py_INCREF (Py_None);
- return Py_None;
-
- PyObject *LongLong;
-
- return PyLong_FromUnsignedLongLong (*(LONG_LONG *)sipCpp);
-%End
-
-%ConvertToTypeCode
- if (sipIsErr == NULL)
- return PyLong_Check (sipPy) || PyInt_Check (sipPy);
-
- unsigned long long *ul = new unsigned long long;
- *ul = 0;
-
- if (PyLong_Check (sipPy))
- *ul = PyLong_AsUnsignedLongLong (sipPy);
- else if (PyInt_Check (sipPy))
- *ul = (unsigned long long)PyInt_AS_LONG (sipPy);
-
- *sipCppPtr = ul;
-
- return 1;
-%End
-
-};
-%End
-
-
More information about the pld-devel-pl
mailing list