%global use_x11_tests 1
Name: perl-Gtk3-WebKit
Version: 0.04
Release: 1%{?dist}
Summary: WebKit bindings for Perl
License: LGPLv2 or Artistic 2.0
Group: Development/Libraries
URL: http://search.cpan.org/dist/Gtk3-WebKit/
Source0: http://www.cpan.org/authors/id/P/PO/POTYL/Gtk3-WebKit-%{version}.tar.gz
# https://rt.cpan.org/Ticket/Display.html?id=93421
Patch1: webkit_xvfb_segfault.patch
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl(base)
BuildRequires: perl(constant)
BuildRequires: perl(Data::Dumper)
BuildRequires: perl(Exporter)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec)
BuildRequires: perl(Glib::Object::Introspection)
BuildRequires: perl(Gtk3)
BuildRequires: perl(strict)
BuildRequires: perl(Test::More)
BuildRequires: perl(Test::NeedsDisplay)
BuildRequires: perl(warnings)
BuildRequires: webkitgtk3-devel
%if %{use_x11_tests}
# X11 tests:
BuildRequires: xorg-x11-server-Xvfb
BuildRequires: xorg-x11-xinit
BuildRequires: font(:lang=en)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
This module provides the Perl bindings for the Gtk3 port of WebKit.
%prep
%setup -q -n Gtk3-WebKit-%{version}
%patch1
%build
%if %{use_x11_tests}
xvfb-run %{__perl} Makefile.PL INSTALLDIRS=vendor
%else
%{__perl} Makefile.PL INSTALLDIRS=vendor
%endif
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check
%if %{use_x11_tests}
xvfb-run -a make test
%else
make test
%endif
%files
%doc Changes COPYING README examples
%{perl_vendorlib}/*
%{_mandir}/man3/*
%changelog
* Fri Feb 28 2014 David Dick <ddick@cpan.org> - 0.04-1
- Initial release