[packages/perl-Alien-FLTK] - new; but still broken noarch /usr/share - added system-fltk patch to use system fltk instead of do
qboosh
qboosh at pld-linux.org
Sat May 2 21:39:12 CEST 2020
commit 621ff426a5baf34a2c69ec8bb8b1d50bff885e9d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat May 2 21:39:25 2020 +0200
- new; but still broken noarch /usr/share
- added system-fltk patch to use system fltk instead of downloading and building separate one
perl-Alien-FLTK-system-fltk.patch | 24 ++++++++++++
perl-Alien-FLTK.spec | 78 +++++++++++++++++++++++++++++++++++++++
2 files changed, 102 insertions(+)
---
diff --git a/perl-Alien-FLTK.spec b/perl-Alien-FLTK.spec
new file mode 100644
index 0000000..90b0fb1
--- /dev/null
+++ b/perl-Alien-FLTK.spec
@@ -0,0 +1,78 @@
+# FIXME: arch-dependent config.json in %{perl_vendorlib}/auto/share/dist
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
+%define pdir Alien
+%define pnam FLTK
+Summary: Alien::FLTK - use the stable 1.3.x branch of the Fast Light Toolkit
+Summary(pl.UTF-8): Alien::FLTK - korzystanie ze stabilnej gałęzi 1.3.x biblioteki Fast Light Toolkit
+Name: perl-Alien-FLTK
+Version: 1.3.5
+Release: 1
+License: Artistic v2.0
+Group: Development/Languages/Perl
+Source0: http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-v%{version}.tar.gz
+# Source0-md5: e5147c8b59040cb0b45b85776138439b
+Patch0: %{name}-system-fltk.patch
+URL: https://metacpan.org/release/Alien-FLTK
+BuildRequires: perl-Module-Build-Tiny >= 0.035
+BuildRequires: perl-devel >= 1:5.8.1
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires: perl(Exporter) >= 5.57
+BuildRequires: perl-Archive-Extract
+BuildRequires: perl-Devel-CheckBin
+BuildRequires: perl-ExtUtils-Config >= 0.003
+BuildRequires: perl-ExtUtils-Helpers >= 0.020
+BuildRequires: perl-ExtUtils-InstallPaths >= 0.002
+BuildRequires: perl-File-ShareDir >= 1.00
+BuildRequires: perl-File-Find-Rule
+BuildRequires: perl-File-pushd
+BuildRequires: perl-JSON-Tiny
+%endif
+Requires: fltk >= 1.3.5
+# see comment on top
+#BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This distribution brings libraries for the (stable) 1.3.x branch of
+the FLTK GUI toolkit.
+
+%description -l pl.UTF-8
+Ten pakiet udostępnia biblioteki ze stabilnej gałęzi 1.3.x toolkitu
+graficznego FLTK.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-v%{version}
+%patch0 -p1
+
+%build
+%{__perl} Build.PL \
+ --perl=%{__perl} \
+ --installdirs=vendor
+./Build
+
+%{?with_tests:./Build test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+./Build install \
+ --destdir=$RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -p examples/*.pl $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README.md
+%{perl_vendorlib}/Alien/FLTK.pm
+%{perl_vendorlib}/auto/share/dist/Alien-FLTK
+%{_mandir}/man3/Alien::FLTK.3pm*
+%{_examplesdir}/%{name}-%{version}
diff --git a/perl-Alien-FLTK-system-fltk.patch b/perl-Alien-FLTK-system-fltk.patch
new file mode 100644
index 0000000..637ee78
--- /dev/null
+++ b/perl-Alien-FLTK-system-fltk.patch
@@ -0,0 +1,24 @@
+--- Alien-FLTK-v1.3.5/inc/MBTFLTK.pm.orig 2020-01-21 04:22:42.000000000 +0100
++++ Alien-FLTK-v1.3.5/inc/MBTFLTK.pm 2020-05-02 20:14:17.593233087 +0200
+@@ -126,7 +126,20 @@
+ my $cwd = rel2abs './'; # XXX - use Cwd;
+
+ # This is an ugly cludge. A working, ugly cludge though. :\
+- if (!-d 'share') {
++ if (-x '/usr/bin/fltk-config') {
++ mkpath('share', $options->{verbose}, oct '755') unless -d 'share';
++ my $archdir = catdir($cwd, qw[share]);
++ mkpath($archdir, $options->{verbose}, oct '755') unless -d $archdir;
++ $libinfo{cflags} = `fltk-config --cflags --optim`;
++ $libinfo{cxxflags} = `fltk-config --cxxflags --optim`;
++ $libinfo{ldflags} = `fltk-config --ldflags`;
++ $libinfo{ldflags_gl} = `fltk-config --ldflags --use-gl`;
++ $libinfo{ldflags_gl_images}
++ = `fltk-config --ldflags --use-gl --use-images`;
++ $libinfo{ldflags_images} = `fltk-config --ldflags --use-images`;
++ write_file(catfile($archdir, qw[config.json]),
++ 'utf8', encode_json(\%libinfo));
++ } elsif (!-d 'share') {
+ mkpath('share', $options->{verbose}, oct '755') unless -d 'share';
+ $dir = tempd();
+ $libinfo{archive} = get_lib($meta->custom('x_alien'));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/perl-Alien-FLTK.git/commitdiff/621ff426a5baf34a2c69ec8bb8b1d50bff885e9d
More information about the pld-cvs-commit
mailing list