]> git.pld-linux.org Git - packages/poldek.git/commitdiff
- fix building and installing python bindings auto/th/poldek-0.32.2-5
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 16 Apr 2017 12:48:33 +0000 (14:48 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 16 Apr 2017 12:48:33 +0000 (14:48 +0200)
poldek.spec
python-fix.patch [new file with mode: 0644]

index 2b70655b8a3675313661d1ee5e5c1a2eecbea79b..18e1addd8cda37e10d2f871e268a05a7858b5870 100644 (file)
@@ -65,6 +65,7 @@ Patch1:               %{name}-config.patch
 Patch2:                pm-hooks.patch
 Patch3:                WTERMSIG.patch
 Patch4:                %{name}-multiproto.patch
+Patch5:                python-fix.patch
 URL:           http://poldek.pld-linux.org/
 BuildRequires: %{db_pkg}-devel >= %{ver_db}-%{ver_db_rel}
 BuildRequires: autoconf
@@ -230,6 +231,7 @@ Moduły języka Python dla poldka.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %{__rm} m4/libtool.m4 m4/lt*.m4
 
@@ -268,6 +270,10 @@ CPPFLAGS="%{rpmcppflags} -std=gnu99 -fgnu89-inline"
 %{__make} -j1
 #      --enable-trace
 
+%if %{with python}
+%{__make} -C python
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/var/cache/%{name}
@@ -280,7 +286,7 @@ install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/poldek-config
 %if %{with python}
 %{__make} -C python -j1 install \
        DESTDIR=$RPM_BUILD_ROOT \
-       libdir=%{py_sitedir}
+       py_sitedir=%{py_sitedir}
 %endif
 
 %{?with_static:%{__rm} $RPM_BUILD_ROOT%{_bindir}/rpmvercmp}
@@ -405,7 +411,7 @@ cp -a conf configs
 
 %if %{with python}
 %py_postclean
-%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/_poldekmod.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/_poldekmod.{la,so}
 %endif
 
 %find_lang %{name}
diff --git a/python-fix.patch b/python-fix.patch
new file mode 100644 (file)
index 0000000..f5b4c3f
--- /dev/null
@@ -0,0 +1,66 @@
+In file included from /usr/include/stdint.h:27:0,
+                 from /usr/lib64/gcc/x86_64-pld-linux/6.3.0/include/stdint.h:9,
+                 from local_stdint.c:2,
+                 from wrap_poldekmod.c:3066:
+/usr/include/bits/types.h:143:34: error: conflicting types for ‘__fsid_t’
+ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs.  */
+                                  ^~~~~~~~
+In file included from /usr/include/stdio.h:36:0,
+                 from /usr/include/python2.7/Python.h:33,
+                 from wrap_poldekmod.c:149:
+/usr/include/bits/types.h:143:26: note: previous declaration of ‘__fsid_t’ was here
+ __STD_TYPE __FSID_T_TYPE __fsid_t; /* Type of file system IDs.  */
+                          ^~~~~~~~
+make: *** [Makefile:487: wrap_poldekmod.lo] Error 1
+
+--- poldek-0.32.2/python/Makefile.am~  2016-01-30 15:05:57.000000000 +0100
++++ poldek-0.32.2/python/Makefile.am   2017-04-16 14:28:51.269840377 +0200
+@@ -3,8 +3,8 @@
+ py_prefix  = $(shell python -c "import sys; print sys.prefix")
+ py_incdir  = $(py_prefix)/include/python$(py_ver)
+-EXTRA_DIST = poldekmod.i local_stdint.c pyldek.py run.sh
+-CLEANFILES = wrap_* poldekmod.py local_stdint.h
++EXTRA_DIST = poldekmod.i pyldek.py run.sh
++CLEANFILES = wrap_* poldekmod.py
+ AM_CPPFLAGS = @TRURL_INCLUDE@ @TNDB_INCLUDE@ -I$(top_srcdir) -I$(py_incdir) -I.
+@@ -21,16 +21,12 @@
+ CFLAGS=
+ CPPFLAGS += -DSWIG -DPOCLIDEK_ITSELF 
+-poldekmod.i: local_stdint.h
+-
+-#install-exec-hook:
+-#     $(mkinstalldirs) "$(DESTDIR)$(py_sitedir)"
++install-exec-hook:
++      $(mkinstalldirs) "$(DESTDIR)$(py_sitedir)"
++      $(install_sh) .libs/_poldekmod.so "$(DESTDIR)$(py_sitedir)"
+ poldekmod.py: wrap_poldekmod.c
+-local_stdint.h: local_stdint.c
+-      $(CPP) $< > $@
+-
+ #wrap_poldekmod.c: poldekmod.i
+ #     $(SWIG) $(SWIG_PYTHON_OPT) $(INCLUDES) -I/usr/include -o $@ $<
+--- poldek-0.32.2/python/poldekmod.i~  2016-01-30 15:05:57.000000000 +0100
++++ poldek-0.32.2/python/poldekmod.i   2017-04-16 14:27:50.169060494 +0200
+@@ -1,7 +1,6 @@
+ %module poldekmod
+ %{
+-#include "local_stdint.h"
+ #include "poldek.h"
+ #include "trurl/narray.h"
+ #include "trurl/nhash.h"
+@@ -32,7 +32,6 @@
+ %}
+ %include exception.i
+-%include "local_stdint.h"
+ %include "trurl/narray.h"
+ %include "capreq.h"
+ %include "pkg.h"
This page took 0.040378 seconds and 4 git commands to generate.