libieee1284: openEuler init
This commit is contained in:
parent
33de7fc41e
commit
81779a96e9
BIN
libieee1284-0.2.11.tar.bz2
Normal file
BIN
libieee1284-0.2.11.tar.bz2
Normal file
Binary file not shown.
2682
libieee1284-aarch64.patch
Normal file
2682
libieee1284-aarch64.patch
Normal file
File diff suppressed because it is too large
Load Diff
60
libieee1284-strict-aliasing.patch
Normal file
60
libieee1284-strict-aliasing.patch
Normal file
@ -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
libieee1284.spec
Normal file
84
libieee1284.spec
Normal file
@ -0,0 +1,84 @@
|
||||
Name: libieee1284
|
||||
Version: 0.2.11
|
||||
Release: 29
|
||||
Summary: IEEE1284 communications library
|
||||
License: GPLv2+
|
||||
URL: http://cyberelk.net/tim/libieee1284/
|
||||
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
|
||||
|
||||
Patch0001: libieee1284-strict-aliasing.patch
|
||||
Patch0002: libieee1284-aarch64.patch
|
||||
|
||||
BuildRequires: xmlto python2-devel
|
||||
|
||||
%description
|
||||
This 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.
|
||||
|
||||
%package devel
|
||||
Summary: Development headers and libraries for libieee1284
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The libieee1284-devel package includes header files and libraries necessary
|
||||
for the libieee1284 library.
|
||||
|
||||
%package -n python2-libieee1284
|
||||
%{?python_provide:%python_provide python2-libieee1284}
|
||||
Summary: Python extension module for libieee1284
|
||||
Provides: %{name}-python = %{version}-%{release}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Obsoletes: %{name}-python < %{version}-%{release}
|
||||
|
||||
%description -n python2-libieee1284
|
||||
The python2-libieee1284 package includes extension module for libieee1284.
|
||||
To use libieee1284 with Python, use 'import ieee1284'.
|
||||
|
||||
%package help
|
||||
Summary: This package contains help documents
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description help
|
||||
Files for help with libieee1284.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
touch doc/interface.xml
|
||||
%configure
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
%delete_la
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
|
||||
%files
|
||||
%doc COPYING
|
||||
%{_libdir}/*.so.*
|
||||
%{_bindir}/*
|
||||
%exclude %{_libdir}/libieee1284.a
|
||||
%exclude %{_libdir}/python*/*/ieee1284module.a
|
||||
|
||||
%files devel
|
||||
%{_includedir}/ieee1284.h
|
||||
%{_libdir}/*.so
|
||||
|
||||
%files -n python2-libieee1284
|
||||
%{_libdir}/python*/*/*.so
|
||||
|
||||
%files help
|
||||
%doc README TODO AUTHORS NEWS
|
||||
%{_mandir}/*/*
|
||||
|
||||
|
||||
%changelog
|
||||
* Mon Nov 18 2019 gulining<gulining1@huawei.com> - 0.2.11-29
|
||||
- Pakcage init
|
||||
Loading…
x
Reference in New Issue
Block a user