File perl-Wx.spec of Package perl-Wx

# spec file for package perl-Wx
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           perl-Wx
Version:        0.9932
Release:        0
%define cpan_name Wx
Summary:        Interface to the Wxwidgets Cross-Platform Gui Toolkit
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Source1:        perl-Wx-rpmlintrc
Source2:        cpanspec.yml
Patch1:         0001-Sort-output-of-dumped-dictionaries-for-reproducible-.patch
Patch2:         0002-Provide-overload-methods-to-XSpp-in-sorted-order.patch
Patch3:         fix_wxWidgets_3_0_3_API_break.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Alien::wxWidgets) >= 0.25
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.46
BuildRequires:  perl(ExtUtils::ParseXS) >= 3.15
BuildRequires:  perl(ExtUtils::XSpp) >= 0.1602
Requires:       perl(Alien::wxWidgets) >= 0.25
Requires:       perl(ExtUtils::MakeMaker) >= 6.46
Requires:       perl(ExtUtils::ParseXS) >= 3.15
Requires:       perl(ExtUtils::XSpp) >= 0.1602
BuildRequires:  gcc-c++
%if 0%{?suse_version} > 1320
# upstream wxWidgets broke API between 3.0.2 and 3.0.3 ...
BuildRequires:  wxWidgets-3_0-nostl-devel >= 3.0.3
Requires:       libwx_baseu-suse-nostl3 >= 3.0.3
%if 0%{?sle_version} >= 120200
BuildRequires:  wxWidgets-3_0-nostl-devel <= 3.0.2
Requires:       libwx_baseu-suse-nostl3 <= 3.0.2
BuildRequires:  wxWidgets-ansi-devel
BuildRequires:  xspp

The Wx module is a wrapper for the wxWidgets (formerly known as wxWindows)
GUI toolkit.

This module comes with extensive documentation in HTML format; you can
download it from

%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1

%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}

# MANUAL no testing (needs X)
#%{__make} test


%files -f %{name}.files
%doc Changes docs README.txt samples typemap.tmpl typemap.xsp wxpl.ico wxpl.xpm Wx.rc