commit f09880489f0273dca4e892eae0ea2e91aa3239d3
Author: Jakub Bogusz <[email protected]>
Date:   Sat Nov 11 21:37:10 2023 +0100

    - versioned Obsoletes, drop .la file, added fixes for swig 4.x; release 16

 ming.spec  | 13 +++++++------
 swig.patch | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 2 files changed, 62 insertions(+), 8 deletions(-)
---
diff --git a/ming.spec b/ming.spec
index c95b51d..611e5cb 100644
--- a/ming.spec
+++ b/ming.spec
@@ -9,7 +9,7 @@ Summary(pl.UTF-8):      Ming - biblioteka do produkcji plików 
SWF
 Name:          ming
 Version:       0.4.8
 %define        ver_tag %(echo %{version} | tr . _)
-Release:       15
+Release:       16
 License:       LGPL v2.1+
 Group:         Libraries
 #Source0Download: https://github.com/libming/libming/releases
@@ -36,8 +36,8 @@ BuildRequires:        rpm-perlprov >= 4.0.2-24
 BuildRequires: rpm-pythonprov
 BuildRequires: rpmbuild(macros) >= 1.344
 %{?with_ruby:BuildRequires:    ruby-devel}
-BuildRequires: swig3
-BuildRequires: swig3-tcl
+BuildRequires: swig
+BuildRequires: swig-tcl
 BuildRequires: tcl
 BuildRequires: tcl-devel
 BuildRequires: zlib-devel
@@ -119,7 +119,7 @@ Summary:    Ming Perl module
 Summary(pl.UTF-8):     Moduł Perla Ming
 Group:         Development/Languages/Perl
 Requires:      %{name} = %{version}-%{release}
-Obsoletes:     ming-perl
+Obsoletes:     ming-perl < 0.2a-1
 
 %description -n perl-ming
 Ming perl module - perl wrapper for Ming library.
@@ -181,7 +181,6 @@ Interfejs Tcl do biblioteki Ming generującej pliki SWF.
 %{__autoheader}
 %{__automake}
 %configure \
-       SWIG=/usr/bin/swig-3 \
        --enable-perl \
        %{?with_php:--enable-php} \
        --enable-python \
@@ -215,6 +214,7 @@ cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT \
        mingc_ladir=%{_libdir}/tclming
@@ -241,6 +241,8 @@ install java_ext/native/libjswf.so $RPM_BUILD_ROOT%{_libdir}
 %{__rm} $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/ming*.py
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/tclming/*.{la,a}
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libming.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -257,7 +259,6 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libming.so
-%{_libdir}/libming.la
 %{_includedir}/ming.h
 %{_includedir}/mingpp.h
 %{_pkgconfigdir}/libming.pc
diff --git a/swig.patch b/swig.patch
index 092adba..0b91ef2 100644
--- a/swig.patch
+++ b/swig.patch
@@ -16,7 +16,7 @@
  
  ming_wrap.c: ../ming.i
 -      swig -I$(srcdir)/.. -python ming.i
-+      $(SWIG) -I$(srcdir)/.. -python ming.i
++      $(SWIG) -I$(srcdir)/.. -outcurrentdir -python $(srcdir)/../ming.i
  
  clean-local:
        rm -Rf test.swf build
@@ -27,4 +27,57 @@
  
  ming_wrap.c: ../ming.i
 -      swig -I$(srcdir)/.. -tcl ming.i
-+      $(SWIG) -I$(srcdir)/.. -tcl ming.i
++      $(SWIG) -I$(srcdir)/.. -outcurrentdir -tcl $(srcdir)/../ming.i
+--- libming-ming-0_4_8/ming.i.orig     2017-04-07 10:12:56.000000000 +0200
++++ libming-ming-0_4_8/ming.i  2023-11-11 21:08:14.719238734 +0100
+@@ -11,7 +11,8 @@
+ 
+ %}
+ 
+-%typemap(python,in) FILE * {
++#ifdef SWIGpython
++%typemap(in) FILE * {
+   if (!PyFile_Check($input)) {
+     PyErr_SetString(PyExc_TypeError, "Need a file!");
+     return NULL;
+@@ -19,25 +20,29 @@
+   $1 = PyFile_AsFile($input);
+ }
+ 
+-%typemap(python,in) char * {
++%typemap(in) char * {
+   if (!PyString_Check($input)) {
+     PyErr_SetString(PyExc_TypeError, "not a string");
+     return NULL;
+   }
+   $1 = PyString_AsString($input);
+ }
++#endif
+ 
+ typedef unsigned char byte;
+ 
+-%typemap(python,in) byte * {
++#ifdef SWIGpython
++%typemap(in) byte * {
+   if (!PyString_Check($input)) {
+     PyErr_SetString(PyExc_TypeError, "not a string");
+     return NULL;
+   }
+   $1 = PyString_AsString($input);
+ }
++#endif
+ 
+-%typemap(ruby,in) int * {
++#ifdef SWIGruby
++%typemap(in) int * {
+   if (NIL_P($input)) {
+          $1 = 0;
+   } else {
+@@ -45,6 +50,7 @@ typedef unsigned char byte;
+     $1 = (int *)RARRAY($input)->ptr;
+   }
+ }
++#endif
+ 
+ %pointer_functions(int, intp);
+ %pointer_functions(float, floatp);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ming.git/commitdiff/f09880489f0273dca4e892eae0ea2e91aa3239d3

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to