]> git.pld-linux.org Git - packages/perl-Alien-FLTK.git/commitdiff
- new; but still broken noarch /usr/share master auto/th/perl-Alien-FLTK-1.3.5-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 2 May 2020 19:39:25 +0000 (21:39 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 2 May 2020 19:39:25 +0000 (21:39 +0200)
- added system-fltk patch to use system fltk instead of downloading and building separate one

perl-Alien-FLTK-system-fltk.patch [new file with mode: 0644]
perl-Alien-FLTK.spec [new file with mode: 0644]

diff --git a/perl-Alien-FLTK-system-fltk.patch b/perl-Alien-FLTK-system-fltk.patch
new file mode 100644 (file)
index 0000000..637ee78
--- /dev/null
@@ -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'));
diff --git a/perl-Alien-FLTK.spec b/perl-Alien-FLTK.spec
new file mode 100644 (file)
index 0000000..90b0fb1
--- /dev/null
@@ -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}
This page took 0.060398 seconds and 4 git commands to generate.