work for sane-backends 1

This commit is contained in:
Ertuğrul Erata
2015-08-02 22:36:35 +03:00
parent 636428c722
commit 35c121d1b3
30 changed files with 1359 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
def setup():
autotools.autoreconf("-fi")
autotools.configure("--disable-static")
def configure():
autotools.make()
def install():
autotools.install()
shelltools.system("chrpath --delete %s/usr/lib/python2.7/site-packages/ieee1284module.so" % get.installDIR())
pisitools.dodoc("AUTHORS", "NEWS", "TODO", "README", "doc/interface*")
@@ -0,0 +1,60 @@
diff -up libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing libieee1284-0.2.11/src/ieee1284module.c
--- libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing 2004-02-03 11:50:57.000000000 +0000
+++ libieee1284-0.2.11/src/ieee1284module.c 2010-06-23 12:36:05.093026807 +0100
@@ -28,6 +28,17 @@ typedef struct {
struct parport *port;
} ParportObject;
+static PyObject *
+Parport_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+ ParportObject *self;
+ self = (ParportObject *) type->tp_alloc (type, 0);
+ if (self != NULL)
+ self->port = NULL;
+
+ return (PyObject *) self;
+}
+
static int
Parport_init (ParportObject *self, PyObject *args, PyObject *kwds)
{
@@ -562,6 +573,23 @@ static PyTypeObject ParportType = {
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT, /* tp_flags */
"parallel port object", /* tp_doc */
+ 0, /* tp_traverse */
+ 0, /* tp_clear */
+ 0, /* tp_richcompare */
+ 0, /* tp_weaklistoffset */
+ 0, /* tp_iter */
+ 0, /* tp_iternext */
+ Parport_methods, /* tp_methods */
+ 0, /* tp_members */
+ Parport_getseters, /* tp_getset */
+ 0, /* tp_base */
+ 0, /* tp_dict */
+ 0, /* tp_descr_get */
+ 0, /* tp_descr_set */
+ 0, /* tp_dictoffset */
+ (initproc)Parport_init, /* tp_init */
+ 0, /* tp_alloc */
+ Parport_new, /* tp_new */
};
static PyObject *
@@ -625,14 +653,9 @@ initieee1284 (void)
PyObject *d = PyModule_GetDict (m);
PyObject *c;
- ParportType.tp_new = PyType_GenericNew;
- ParportType.tp_init = (initproc) Parport_init;
- ParportType.tp_getset = Parport_getseters;
- ParportType.tp_methods = Parport_methods;
if (PyType_Ready (&ParportType) < 0)
return;
- Py_INCREF (&ParportType);
PyModule_AddObject (m, "Parport", (PyObject *) &ParportType);
pyieee1284_error = PyErr_NewException("ieee1284.error", NULL, NULL);
+84
View File
@@ -0,0 +1,84 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
<Source>
<Name>libieee1284</Name>
<Homepage>http://cyberelk.net/tim/libieee1284/</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>library</IsA>
<Summary>Library to query devices using IEEE1284</Summary>
<Description>Library is intended to be used by applications that need to communicate with (or at least identify) devices that are attached via a parallel port.</Description>
<Archive sha1sum="600e6f8a5c79b435ee81df3618cd82e2b74812de" type="tarbz2">mirrors://sourceforge/libieee1284/libieee1284-0.2.11.tar.bz2</Archive>
<Patches>
<Patch level="1">libieee1284-strict-aliasing.patch</Patch>
</Patches>
</Source>
<Package>
<Name>libieee1284</Name>
<Files>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="library">/usr/lib</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="man">/usr/share/man</Path>
</Files>
</Package>
<Package>
<Name>python-libieee1284</Name>
<Summary>Python bindings for libieee1284</Summary>
<RuntimeDependencies>
<Dependency release="current">libieee1284</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib/python*</Path>
</Files>
</Package>
<Package>
<Name>libieee1284-devel</Name>
<Summary>Development files for libieee1284</Summary>
<RuntimeDependencies>
<Dependency release="current">libieee1284</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include</Path>
<Path fileType="man">/usr/share/man/man3</Path>
</Files>
</Package>
<History>
<Update release="4">
<Date>2014-03-10</Date>
<Version>0.2.11</Version>
<Comment>Fix rpath</Comment>
<Name>Varol Maksutoğlu</Name>
<Email>waroi@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2014-03-09</Date>
<Version>0.2.11</Version>
<Comment>Rebuild.</Comment>
<Name>Kamil Atlı</Name>
<Email>suvarice@gmail.com</Email>
</Update>
<Update release="2">
<Date>2013-07-28</Date>
<Version>0.2.11</Version>
<Comment>Dep Fixed</Comment>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2010-10-13</Date>
<Version>0.2.11</Version>
<Comment>First release</Comment>
<Name>Pisi Linux Admins</Name>
<Email>admins@pisilinux.org</Email>
</Update>
</History>
</PISI>
@@ -0,0 +1,20 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>libieee1284</Name>
<Summary xml:lang="tr">IEEE1284 kullanarak donanımların sorgulanması için bir kütüphane</Summary>
<Description xml:lang="tr">Paralel portlar aracılığı ile bağlanmış araçlarla iletişimi (en azından tanımlanmasını) gerçekleştiren uygulamalar için gerekli olan kütüphanedir.</Description>
<Description xml:lang="fr">Cette librairie est à destination des applications qui ont besoins de communiquer avec (ou au moins identifier) des périphériques liés au système par le port parallèle.</Description>
<Description xml:lang="es">La librería usado por aplicaciones que necesitan comunicarse con (,o al menos necesitan identificar) dispositivos conectados al puerto paralelo.</Description>
</Source>
<Package>
<Name>python-libieee1284</Name>
<Summary xml:lang="tr">libieee1284 için Python bağlayıcıları</Summary>
</Package>
<Package>
<Name>libieee1284-devel</Name>
<Summary xml:lang="tr">libieee1284 için geliştirme dosyaları</Summary>
</Package>
</PISI>