%global use_x11_tests 1
Name: perl-Qt
Version: 4.14.3
Release: 4%{?dist}
Summary: Perl bindings for Qt
# qtcore/lib/QtCore4.pm: GPL+ or Artistic
# other files: GPLv2+
## devel subpackage
# qtcore/tools: LGPLv2+ with Nokia exceptions or GPLv3+
# qtcore/tools/puic/perl/plwriteinitialization.h:
# GPLv2 or GPLv3+ with Trolltech exception
# qtdbus/tools: LGPLv2.1+ with Nokia exceptions or GPLv3+
# qtgui/examples/draganddrop/delayedencoding/images/example.svg:
# LGPLv2 with Nokia exception or GPLv3+
# qtgui/examples/xml/htmlinfo/apache_org.html: ASL 2.0
License: GPLv2+ and (GPL+ or Artistic)
Group: Development/Libraries
URL: https://techbase.kde.org/Languages/Perl
Source0: http://download.kde.org/stable/%{version}/src/perlqt-%{version}.tar.xz
# Adjust to GCC 6, bug #1303658, KDE bug #360844, CPAN RT#111630
Patch1: perlqt-4.14.3-Initialize-smokeperl_object-properly.patch
BuildRequires: coreutils
BuildRequires: cmake
# gcc for C standard library headers
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: make
BuildRequires: perl
BuildRequires: perl-devel
# Perl modules used by qtcore/src/doxsubpp.pl and cmake/FindPerlMore.cmake
BuildRequires: perl(Config)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec)
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
BuildRequires: phonon-devel
BuildRequires: qimageblitz-devel
BuildRequires: qscintilla-devel
BuildRequires: qt-devel
BuildRequires: qwt-devel
BuildRequires: sed
# smokegen-devel provided cmake modules for Qt components
BuildRequires: smokegen-devel
BuildRequires: smokeqt-devel
# Run-time:
# search in lib subdirectories, exclude examples,
BuildRequires: perl(base)
BuildRequires: perl(Carp)
BuildRequires: perl(Exporter)
BuildRequires: perl(List::MoreUtils)
BuildRequires: perl(overload)
BuildRequires: perl(Scalar::Util)
BuildRequires: perl(XSLoader)
# Tests:
# search for *.t files, they use modules from examples like Calculator
BuildRequires: perl(blib)
BuildRequires: perl(Devel::Peek)
BuildRequires: perl(lib)
BuildRequires: perl(Test::More)
BuildRequires: perl(utf8)
%if %{use_x11_tests}
# X11 tests:
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: font(:lang=en)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%?perl_default_filter
# Filter private modules
%global __provides_exclude %{?__provides_exclude:%__provides_exclude|}::_(internal|overload)\\)
%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}::_(internal|overload)\\)
%description
This module provides Perl bindings for the Qt 4 libraries.
%package devel
Summary: Development files for perl-Qt
License: GPLv2+ and (GPL+ or Artistic) and (LGPLv2+ with exceptions or GPLv3+) and (LGPLv2 with exception or GPLv3+) and ASL 2.0
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
%description devel
Development files for perl-Qt.
%prep
%setup -q -n perlqt-%{version}
%patch1 -p1
mkdir build
# fix smoke qwt detection
sed -i -e 's/SMOKE_Qwt5_Qt4_FOUND/SMOKE_QWT_FOUND/' CMakeLists.txt
%if !%{use_x11_tests}
# these tests require running X server
sed -i -e '/perlqt_qtcore4_qapp/d' \
-e '/perlqt_qtcore4_sigslot/d' \
-e '/perlqt_qtcore4_sigslot_inherit/d' \
-e '/perlqt_qtcore4_handlers/d' qtcore/t/CMakeLists.txt
sed -i -e '/perlqt_qsignalspy/d' qttest/t/CMakeLists.txt
sed -i -e '/perlqt_itemviewspixelator/d' \
-e '/perlqt_itemviewspuzzle/d' \
-e '/perlqt_helpcontextsensitivehelp/d' \
-e '/perlqt_mainwindowsmdi/d' \
-e '/perlqt_networkbroadcast/d' \
-e '/perlqt_networkfortune/d' \
-e '/perlqt_networkgooglesuggest/d' \
-e '/perlqt_paintingfontsampler/d' \
-e '/perlqt_richtextcalendar/d' \
-e '/perlqt_sqlquerymodel/d' \
-e '/perlqt_widgetscalculator/d' \
-e '/perlqt_xmlstreambookmarks/d' qtgui/t/CMakeLists.txt
%endif
# Network tests fail without network
sed -i \
-e '/perlqt_networkbroadcast/d' \
-e '/perlqt_networkgooglesuggest/d' \
qtgui/t/CMakeLists.txt
# These tests fail even in latest upstream code,
# <https://bugs.kde.org/show_bug.cgi?id=360846>
sed -i \
-e '/perlqt_helpcontextsensitivehelp/d' \
-e '/perlqt_mainwindowsmdi/d' \
qtgui/t/CMakeLists.txt
# This test hangs, <https://bugs.kde.org/show_bug.cgi?id=360899>
sed -i \
-e '/perlqt_itemviewspuzzle/d' \
qtgui/t/CMakeLists.txt
%ifarch armv7hl ppc64 s390 s390x
# perlqt_qtcore4_handlers fails on armv7hl
sed -i \
-e '/perlqt_qtcore4_handlers/d' \
qtcore/t/CMakeLists.txt
%endif
%build
cd build
%{cmake_kde4} \
-DCUSTOM_PERL_SITE_ARCH_DIR=%{perl_vendorarch} \
-DCMAKE_SKIP_RPATH=YES \
-DENABLE_GUI_TESTS=YES \
..
make %{?_smp_mflags}
%install
cd build
make install/fast DESTDIR=%{buildroot}
%{_fixperms} %{buildroot}/*
%check
cd build
export PERL5LIB="$PWD/blib/lib:$PWD/blib/arch"
%if %{use_x11_tests}
xvfb-run -a make test
%else
make test
%endif
%files
%license LICENSE*
%doc README
%{perl_vendorarch}/*
%exclude %dir %{perl_vendorarch}/auto/
%files devel
%doc qtgui/examples
%{_bindir}/*
%{_includedir}/perlqt
%{_datadir}/perlqt
%changelog
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 4.14.3-4
- Perl 5.24 rebuild
* Wed Mar 30 2016 Petr Pisar <ppisar@redhat.com> - 4.14.3-3
- Disable perlqt_qtcore4_handlers test failing on big-endian s390 machines
* Thu Mar 24 2016 Petr Pisar <ppisar@redhat.com> - 4.14.3-2
- Disable perlqt_qtcore4_handlers test failing on big-endian 64-bit PowerPC
* Wed Mar 23 2016 Petr Pisar <ppisar@redhat.com> - 4.14.3-1
- 4.14.3 bump (upstream changed from CPAN to KDE)
- perl-Qt-devel license changed to (GPLv2+ and (GPL+ or Artistic) and (LGPLv2+
with exceptions or GPLv3+) and (LGPLv2 with exception or GPLv3+) and ASL 2.0)
* Tue Mar 22 2016 Petr Pisar <ppisar@redhat.com> - 0.96.0-19
- Modernize spec file
- Run X11 tests
- Fix code generation with "puic4 -x" (bug #1118240)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.96.0-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Mon Feb 01 2016 Petr Pisar <ppisar@redhat.com> - 0.96.0-17
- Adjust to GCC 6 (bug #1303658)
- Specify more dependencies
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.96.0-15
- Perl 5.22 rebuild
* Mon Apr 20 2015 Petr Pisar <ppisar@redhat.com> - 0.96.0-14
- Rebuild owing to C++ ABI change in GCC-5 (bug #1211226)
* Mon Nov 03 2014 Petr Pisar <ppisar@redhat.com> - 0.96.0-13
- Adjust to perl-5.20.0 (bug #1136340)
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.96.0-12
- Perl 5.20 rebuild
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Aug 30 2013 Paul Howarth <paul@city-fan.org> - 0.96.0-9
- Add some fixes from upstream git for Perl 5.18 compatibility
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Jul 26 2013 Petr Pisar <ppisar@redhat.com> - 0.96.0-7
- Perl 5.18 rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jun 19 2012 Petr Pisar <ppisar@redhat.com> - 0.96.0-4
- Perl 5.16 rebuild
* Thu Apr 19 2012 Iain Arnell <iarnell@gmail.com> 0.96.0-3
- build against db5 (rhbz#814083)
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Nov 08 2011 Iain Arnell <iarnell@gmail.com> 0.96.0-1
- initial packaging attempt