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
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
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.
%{__autoheader}
%{__automake}
%configure \
- SWIG=/usr/bin/swig-3 \
--enable-perl \
%{?with_php:--enable-php} \
--enable-python \
%install
rm -rf $RPM_BUILD_ROOT
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT \
mingc_ladir=%{_libdir}/tclming
%{__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
%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
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
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);