From 3fde2a7b8e68cbdf2ae1365dbe2ae6f48e667f41 Mon Sep 17 00:00:00 2001 From: Kevin Kofler Date: Nov 14 2016 04:38:37 +0000 Subject: Import libyui-bindings-1.1.1-6.fc26.src.rpm --- diff --git a/libyui-bindings/.gitignore b/libyui-bindings/.gitignore new file mode 100644 index 0000000..d2bfa63 --- /dev/null +++ b/libyui-bindings/.gitignore @@ -0,0 +1,2 @@ +/*.src.rpm +/libyui-bindings-1.1.1.tar.gz diff --git a/libyui-bindings/libyui-bindings-1.1.0-perlcmake.patch b/libyui-bindings/libyui-bindings-1.1.0-perlcmake.patch new file mode 100644 index 0000000..2e7cec9 --- /dev/null +++ b/libyui-bindings/libyui-bindings-1.1.0-perlcmake.patch @@ -0,0 +1,25 @@ +--- a/swig/CMakeLists.txt.orig 2015-12-04 10:04:56.318251131 +0100 ++++ a/swig/CMakeLists.txt 2015-12-04 10:14:54.478993267 +0100 +@@ -31,8 +31,9 @@ IF (WITH_PERL) + # doesn't work yet :-( + # CMake problem, FindPerlLibs.cmake is in a _really_ bad, bad state :-(( + # see e.g. http://www.vtk.org/Bug/print_bug_page.php?bug_id=3665 +- #FIND_PACKAGE(PerlLibs) +- FIND_PACKAGE(Perl) ++ FIND_PACKAGE(PerlLibs) ++ #FindPerl.cmake included by FindPerlLibs.cmake ++ #FIND_PACKAGE(Perl) + IF (PERL_EXECUTABLE) + MESSAGE(STATUS "Perl executable: ${PERL_EXECUTABLE}") + ADD_SUBDIRECTORY(perl) +--- a/swig/perl/CMakeLists.txt.orig 2015-12-04 10:04:56.318251131 +0100 ++++ a/swig/perl/CMakeLists.txt 2015-12-04 10:16:10.805332741 +0100 +@@ -14,7 +14,7 @@ EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABL + EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{archlib}.\"/CORE\"" OUTPUT_VARIABLE PERL_CORE_DIR) + EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{installvendorarch}" OUTPUT_VARIABLE PERL_VENDOR_ARCH) + EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{installvendorlib}" OUTPUT_VARIABLE PERL_VENDOR_LIB) +-EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{ccdlflags}" OUTPUT_VARIABLE PERL_LINK_FLAGS) ++EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -e "use Config; print \$Config{ccdlflags}; print \",-lpthread\"" OUTPUT_VARIABLE PERL_LINK_FLAGS) + + STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDOR_ARCH "${PERL_VENDOR_ARCH}") + STRING(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" PERL_VENDOR_LIB "${PERL_VENDOR_LIB}") diff --git a/libyui-bindings/libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch b/libyui-bindings/libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch new file mode 100644 index 0000000..ec9f00b --- /dev/null +++ b/libyui-bindings/libyui-bindings-1.1.0-python3-YWidget-and-YItem.patch @@ -0,0 +1,28 @@ +--- a/swig/yui.i 2015-12-05 21:09:48.996373277 +0100 ++++ b/swig/yui.i 2015-12-06 00:22:11.517161595 +0100 +@@ -278,8 +278,10 @@ class Exception; + { return ($self != i); } + #endif + #if defined(SWIGPYTHON) +- int __cmp__( YItem *i ) +- { return ($self - i); } ++ int __eq__( YItem *i ) ++ { return ($self == i); } ++ int __ne__( YItem *i ) ++ { return ($self != i); } + #endif + #if defined(SWIGRUBY) + %rename( "==" ) equals( YItem *i ); +@@ -304,8 +306,10 @@ typedef std::vector YItemCollec + { return ($self != w); } + #endif + #if defined(SWIGPYTHON) +- int __cmp__( YWidget *w ) +- { return ($self - w); } ++ int __eq__( YWidget *w ) ++ { return ($self == w); } ++ int __ne__( YWidget *w ) ++ { return ($self != w); } + #endif + #if defined(SWIGRUBY) + %rename( "==" ) equals( YWidget *w ); diff --git a/libyui-bindings/libyui-bindings-1.1.1-python-missing-constants.patch b/libyui-bindings/libyui-bindings-1.1.1-python-missing-constants.patch new file mode 100644 index 0000000..420546f --- /dev/null +++ b/libyui-bindings/libyui-bindings-1.1.1-python-missing-constants.patch @@ -0,0 +1,10 @@ +--- a/swig/yui.i.mga 2015-12-04 11:43:42.614392025 +0100 ++++ a/swig/yui.i 2015-12-04 12:02:08.414341480 +0100 +@@ -223,6 +223,7 @@ class Exception; + %include yui/YMultiLineEdit.h + %include yui/YMultiProgressMeter.h + %include yui/YMultiSelectionBox.h ++%include yui/YWizard.h + %include yui/YOptionalWidgetFactory.h + %include yui/YPackageSelector.h + %include yui/YPackageSelectorPlugin.h diff --git a/libyui-bindings/libyui-bindings.spec b/libyui-bindings/libyui-bindings.spec new file mode 100644 index 0000000..6d5d66f --- /dev/null +++ b/libyui-bindings/libyui-bindings.spec @@ -0,0 +1,377 @@ +# Define libsuffix. +%global libsuffix yui +%global libname lib%{libsuffix} + +# Do we build with Mono? +%ifarch %{mono_arches} +%global with_mono 1 +%endif # arch %%{mono_arches} + +# Do we build with Python3? +%if 0%{?fedora} >= 13 || 0%{?rhel} >= 8 +%global with_py3 1 +%endif #0%{?fedora} >= 13 || 0%{?rhel} >= 8 + +# CMake-builds go out-of-tree. +%global _cmake_build_subdir build-%{?_arch}%{?dist} + +Name: %{libname}-bindings +Version: 1.1.1 +Release: 6%{?dist} +Summary: Language bindings for %{libname} + +License: LGPLv2 or LGPLv3 +URL: https://github.com/%{libname}/%{name} +Source0: %{url}/archive/%{name}/master/%{version}.tar.gz#/%{name}-%{version}.tar.gz + +# Patches from Mageia +Patch0: %{name}-1.1.0-perlcmake.patch +Patch1: %{name}-1.1.1-python-missing-constants.patch +Patch2: %{name}-1.1.0-python3-YWidget-and-YItem.patch + +BuildRequires: boost-devel +BuildRequires: cmake >= 2.8 +BuildRequires: %{libname}-devel +BuildRequires: swig + +%description +This package provides Mono / CSharp, Perl, Python and Ruby language +bindings to access functions of %{libname}. +An User Interface engine that provides abstraction from graphical user +interfaces (Qt, Gtk) and text based user interfaces (ncurses). + + +%if 0%{?with_mono} +%package -n mono-%{libsuffix} +Summary: Mono / CSharp bindings for %{libname} +%if 0%{?fedora} >= 23 +BuildRequires: mono-devel >= 4.0.0 +%else # 0%%{?fedora} >= 23 +BuildRequires: mono-devel +%endif # 0%%{?fedora} >= 23 + +%description -n mono-%{libsuffix} +This package provides Mono / CSharp language bindings to access +functions of %{libname}. +An User Interface engine that provides the abstraction from +graphical user interfaces (Qt, Gtk) and text based user +interfaces (ncurses). +%endif # 0%%{?with_mono} + + +%package -n perl-%{libsuffix} +Summary: Perl bindings for %{libname} + +BuildRequires: perl-devel +BuildRequires: perl-generators +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +%description -n perl-%{libsuffix} +This package provides Perl language bindings to access +functions of %{libname}. +An User Interface engine that provides the abstraction from +graphical user interfaces (Qt, Gtk) and text based user +interfaces (ncurses). + + +%package -n python2-%{libsuffix} +Summary: Python bindings for %{libname} +BuildRequires: python2-devel + +Provides: python-%{libsuffix} == %{version}-%{release} +Provides: python-%{libsuffix}%{?_isa} == %{version}-%{release} +Obsoletes: python-%{libsuffix} <= 1.1.1-2 +Obsoletes: python-%{libsuffix}%{?_isa} <= 1.1.1-2 + +%description -n python2-%{libsuffix} +This package provides Python language bindings to access +functions of %{libname}. +An User Interface engine that provides the abstraction from +graphical user interfaces (Qt, Gtk) and text based user +interfaces (ncurses). + + +%if 0%{?with_py3} +%package -n python3-%{libsuffix} +Summary: Python3 bindings for %{libname} +BuildRequires: python3-devel + +%description -n python3-%{libsuffix} +This package provides Python3 language bindings to access +functions of %{libname}. +An User Interface engine that provides the abstraction from +graphical user interfaces (Qt, Gtk) and text based user +interfaces (ncurses). +%endif #0%{?with_py3} + + +%package -n ruby-%{libsuffix} +Summary: Ruby bindings for %{libname} + +BuildRequires: ruby-devel + +%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7 +Requires: ruby(release) +%else #0%{?fedora} >= 19 || 0%{?rhel} >= 7 +%if (0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6) +Requires: ruby(abi) == 1.8 +%else #(0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6) +Requires: ruby(abi) == 1.9.1 +%endif #(0%{?fedora} && 0%{?fedora} <= 16) || (0%{?rhel} >= 4 && 0%{?rhel} <= 6) +%endif #0%{?fedora} >= 19 || 0%{?rhel} >= 7 + +%description -n ruby-%{libsuffix} +This package provides Ruby language bindings to access +functions of %{libname}. +An User Interface engine that provides the abstraction from +graphical user interfaces (Qt, Gtk) and text based user +interfaces (ncurses). + + +%prep +%setup -qn %{name}-%{name}-master-%{version} + +%patch0 -p1 +%patch1 -p1 + +%if 0%{?with_py3} +cp -a . %{py3dir} +pushd %{py3dir} +%patch2 -p1 +popd +%endif #0%{?with_py3} + + +%build +%{__mkdir} -p %{_cmake_build_subdir} +pushd %{_cmake_build_subdir} +%cmake \ + -DLIB=%{_libdir} \ + -DMONO_LIBRARIES=%{_libdir} \ + -DPython_ADDITIONAL_VERSIONS=%{python2_version} \ + -DPYTHON_EXECUTABLE=%{__python2} \ + -DPYTHON_SITEDIR=%{python2_sitearch} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DBUILD_RUBY_GEM=no \ + -DWITH_MONO=%{?with_mono:ON}%{!?with_mono:OFF} \ + -DWITH_PERL=ON \ + -DWITH_PYTHON=ON \ + -DWITH_RUBY=ON \ + .. + +%{__make} %{?_smp_mflags} +popd + +%if 0%{?with_py3} +pushd %{py3dir} +%{__mkdir} -p py3-%{_cmake_build_subdir} +pushd py3-%{_cmake_build_subdir} +%cmake \ + -DLIB=%{_libdir} \ + -DPython_ADDITIONAL_VERSIONS=%{python3_version} \ + -DPYTHON_EXECUTABLE=%{__python3} \ + -DPYTHON_SITEDIR=%{python3_sitearch} \ + -DCMAKE_BUILD_TYPE=RELEASE \ + -DBUILD_RUBY_GEM=no \ + -DWITH_MONO=OFF \ + -DWITH_PERL=OFF \ + -DWITH_PYTHON=ON \ + -DWITH_RUBY=OFF \ + .. + +%{__make} %{?_smp_mflags} +popd +popd +%endif #0%{?with_py3} + + +%install +pushd %{_cmake_build_subdir} +%make_install +popd + +%if 0%{?with_py3} +pushd %{py3dir} +pushd py3-%{_cmake_build_subdir} +%make_install +popd +popd +%endif #0%{?with_py3} + + +%if 0%{?with_mono} +%files -n mono-%{libsuffix} +%doc package/%{name}.changes README +%license COPYING* +%{_libdir}/%{libsuffix}/%{libsuffix}.dll +%{_libdir}/%{libsuffix}/%{libsuffix}.so +%endif + +%files -n perl-%{libsuffix} +%doc package/%{name}.changes README swig/perl/examples +%license COPYING* +%{perl_vendorarch}/%{libsuffix}.so +%{perl_vendorlib}/%{libsuffix}.pm + +%files -n python2-%{libsuffix} +%doc package/%{name}.changes README swig/python/examples +%license COPYING* +%{python2_sitearch}/*%{libsuffix}.* + +%if 0%{?with_py3} +%files -n python3-%{libsuffix} +%doc package/%{name}.changes README swig/python/examples +%license COPYING* +%{python3_sitearch}/__pycache__/* +%{python3_sitearch}/*%{libsuffix}.* +%endif #0%{?with_py3} + +%files -n ruby-%{libsuffix} +%doc package/%{name}.changes README swig/ruby/examples +%license COPYING* +%{ruby_vendorarchdir}/_%{libsuffix}.* + + +%changelog +* Tue Oct 25 2016 Philippe Makowski - 1.1.1-6 +- fixed python 2 and 3 bindings +- fixed python3 YWidget and YItem pointer comparison +- added patch to use FindPerlLibs.cmake instead of FindPerl.cmake + +* Tue Jul 19 2016 Fedora Release Engineering - 1.1.1-5 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Sat May 14 2016 Jitka Plesnikova - 1.1.1-4 +- Perl 5.24 rebuild + +* Wed Mar 30 2016 Björn Esser - 1.1.1-3 +- bump to avoid self-obsoletion + +* Wed Mar 30 2016 Björn Esser - 1.1.1-2 +- replace `python-yui` with `python2-yui` using proper Provides and Obsoletes + +* Tue Mar 29 2016 Björn Esser - 1.1.1-1 +- new upstream release +- drop Patch0, applied in upstream tarball +- handle %%license and %%doc properly + +* Thu Feb 04 2016 Fedora Release Engineering - 1.1.0-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jan 15 2016 Jonathan Wakely - 1.1.0-17 +- Rebuilt for Boost 1.60 + +* Tue Jan 12 2016 Vít Ondruch - 1.1.0-16 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 + +* Tue Nov 10 2015 Fedora Release Engineering - 1.1.0-15 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Aug 27 2015 Jonathan Wakely - 1.1.0-14 +- Rebuilt for Boost 1.59 + +* Thu Aug 27 2015 Björn Esser - 1.1.0-13 +- rebuilt for so-name-bump in libyui-3.2.1 + +* Wed Jul 29 2015 Fedora Release Engineering - 1.1.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Changes/F23Boost159 + +* Wed Jul 22 2015 David Tardon - 1.1.0-11 +- rebuild for Boost 1.58 + +* Wed Jun 17 2015 Fedora Release Engineering - 1.1.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Jun 03 2015 Jitka Plesnikova - 1.1.0-9 +- Perl 5.22 rebuild + +* Tue May 19 2015 Björn Esser - 1.1.0-8 +- rebuilt for mono-4.0.1, again + +* Mon May 18 2015 Björn Esser - 1.1.0-7 +- rebuilt for mono-4.0.1 + +* Sat May 02 2015 Kalev Lember - 1.1.0-6 +- Rebuilt for GCC 5 C++11 ABI change + +* Mon Feb 02 2015 Björn Esser - 1.1.0-5 +- rebuilt for libyui-3.1.5, again + +* Mon Feb 02 2015 Björn Esser - 1.1.0-4 +- Rebuild for boost 1.57.0 + +* Thu Jan 22 2015 Björn Esser - 1.1.0-3 +- add Patch0: use upstream-patch for older CMake instead of sed-cludge + +* Thu Jan 22 2015 Dan Horák - 1.1.0-2 +- fix build without Mono + +* Tue Jan 20 2015 Björn Esser - 1.1.0-1 +- new upstream release +- rebuilt for libyui-3.1.5 +- keep doc-files in unfied %%{_pkgdocdir} +- small improvements to spec-file +- drop Patch0, now in upstream sources + +* Sun Jan 18 2015 Mamoru TASAKA - 0.5.0-6 +- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_2.2 +- Remove deprecated Config: usage + +* Wed Aug 27 2014 Jitka Plesnikova - 1.0.4-4 +- Perl 5.20 rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 1.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Fri May 23 2014 Björn Esser - 1.0.4-1 +- new upstream version +- build a Python3 version +- minor improvents on spec + +* Thu Apr 24 2014 Vít Ondruch - 1.0.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 + +* Tue Mar 18 2014 Björn Esser - 1.0.2-10 +- rebuilt for libyui-3.0.13 + +* Wed Oct 02 2013 Björn Esser - 1.0.2-9 +- added "Versioned MODULE_COMPAT_ Requires" + +* Wed Oct 02 2013 Björn Esser - 1.0.2-8 +- adaptions for new Python-guidelines +- use %%{ruby_vendorarchdir} instead of hardcoded path + +* Fri Aug 30 2013 Björn Esser - 1.0.2-7 +- libyui 3.0.10 rebuilt + +* Sat Aug 03 2013 Petr Pisar - 1.0.2-6 +- Perl 5.18 rebuild + +* Sat Jul 27 2013 Björn Esser - 1.0.2-5 +- include examples in own subdir +- removed hardening flags + +* Sat Jul 27 2013 Björn Esser - 1.0.2-4 +- fix build, removed trailing backslash + +* Sat Jul 27 2013 Björn Esser - 1.0.2-3 +- libyui-3.0.9 rebuilt on all branches +- removed Group-tag + +* Wed Jul 17 2013 Petr Pisar - 1.0.2-2 +- Perl 5.18 rebuild on F20 / rawhide + +* Thu Jun 20 2013 Björn Esser - 1.0.2-1 +- new upstream-version +- copyright changed GPLv2 -> LGPLv2 or LGPLv3 matching libyui* now. +- removed `/usr/bin/env` from hashbang of examples +- adapted Source0 obsoleting %%commit + +* Sat May 18 2013 Björn Esser - 1.0.1-2 +- improved readability: tag ordering + +* Wed May 15 2013 Björn Esser - 1.0.1-1 +- Initial RPM release.