]> git.pld-linux.org Git - packages/perl-Alien-wxWidgets.git/blobdiff - perl-Alien-wxWidgets.spec
- up to 0.67
[packages/perl-Alien-wxWidgets.git] / perl-Alien-wxWidgets.spec
index bf313847941f3cd06feae85891b2d70f9daa39c8..8f24e51255390bbc1fc026ac41aaadf679317e8b 100644 (file)
@@ -1,62 +1,94 @@
+# TODO: provide configurations for other configurations (e.g. x11)?
 #
 # Conditional build:
-%bcond_without tests   # do not perform "make test"
-%bcond_with unicode
+%bcond_without tests           # do not perform "make test"
+%bcond_without gtk2            # wxGTK2 packages support
+%bcond_without gtk3            # wxGTK3 packages support
+%bcond_without ansi            # ANSI wx packages support
+%bcond_without unicode         # Unicode wx packages support
 #
 %include       /usr/lib/rpm/macros.perl
 %define                pdir    Alien
 %define                pnam    wxWidgets
 Summary:       Alien::wxWidgets - building, finding and using wxWidgets binaries
-Summary(pl):   Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets
+Summary(pl.UTF-8):     Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets
 Name:          perl-Alien-wxWidgets
-Version:       0.22
+Version:       0.67
 Release:       1
 # same as perl
 License:       GPL v1+ or Artistic
 Group:         Development/Languages/Perl
 Source0:       http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-%{version}.tar.gz
-# Source0-md5: 98de414f8d378170ede6cf96a0e2f73e
-Patch0:     %{name}-nobuild.patch
+# Source0-md5: 510a7817fdaf59089b50a877a621d770
+Patch0:                %{name}-nobuild.patch
+URL:           http://search.cpan.org/dist/Alien-wxWidgets/
+BuildRequires: perl-ExtUtils-CBuilder >= 0.24
+BuildRequires: perl-Module-Build >= 0.28
+BuildRequires: perl-Module-Pluggable >= 3.1-4
 BuildRequires: perl-devel >= 1:5.8.0
-BuildRequires:  perl-Module-Build >= 0.2611-1
-BuildRequires:  perl-Module-Pluggable >= 3.1-4
+BuildRequires: perl(File::Spec) >= 1.50
 BuildRequires: rpm-perlprov >= 4.1-13
-BuildRequires:  wxGTK2-%{?with_unicode:unicode-}devel >= 2.6.3
-BuildRequires:  wxGTK2-%{?with_unicode:unicode-}gl-devel >= 2.6.3
-
+%if %{with gtk2}
+%if %{with ansi}
+BuildRequires: wxGTK2-devel >= 2.6.3
+BuildRequires: wxGTK2-gl-devel >= 2.6.3
+%endif
+%if %{with unicode}
+BuildRequires: wxGTK2-unicode-devel >= 2.6.3
+BuildRequires: wxGTK2-unicode-gl-devel >= 2.6.3
+%endif
+%endif
+%if %{with gtk3}
+%if %{with ansi}
+BuildRequires: wxGTK3-devel >= 2.6.3
+BuildRequires: wxGTK3-gl-devel >= 2.6.3
+%endif
+%if %{with unicode}
+BuildRequires: wxGTK3-unicode-devel >= 2.6.3
+BuildRequires: wxGTK3-unicode-gl-devel >= 2.6.3
+%endif
+%endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                wx_ver          %(rpm -q wxWidgets-devel --qf '%%{VERSION}')
+%define                wx_ver_tag      %(echo %{wx_ver} | tr . _)
+
 %description
-Alien::wxWidgets allows wxPerl to easily find information about your wxWidgets installation.
-It can store this information for multiple wxWidgets versions or configurations
-(debug, Unicode, etc.). It can also build and install a private copy of wxWidgets
-as part of the build process.
+Alien::wxWidgets allows wxPerl to easily find information about your
+wxWidgets installation. It can store this information for multiple
+wxWidgets versions or configurations (debug, Unicode, etc.). It can
+also build and install a private copy of wxWidgets as part of the
+build process.
 
-%description -l pl
-Alien::wxWidgets pozwala wxPerlowi ³atwo uzyskaæ informacje na temat instalacji wxWidgets.
-Mo¿e przechowywaæ informacje o wielu wersjach lub konfiguracjach (debug, Unicode, itp.).
-Mo¿e tak¿e zbudowaæ i zainstalowaæ prywatn± kopiê wxWidgets jako czê¶æ procesu budowania.
+%description -l pl.UTF-8
+Alien::wxWidgets pozwala wxPerlowi łatwo uzyskać informacje na temat
+instalacji wxWidgets. Może przechowywać informacje o wielu wersjach
+lub konfiguracjach (debug, Unicode, itp.). Może także zbudować i
+zainstalować prywatną kopię wxWidgets jako część procesu budowania.
 
 %prep
 %setup -q -n %{pdir}-%{pnam}-%{version}
 %patch0 -p1
 
 %build
-WX_CONFIG=wx-gtk2-%{?with_unicode:unicode}%{!?with_unicode:ansi}-config
-export WX_CONFIG
-%{__perl} Makefile.PL \
-    INSTALLDIRS=vendor
-    
-%{__make} \
-    OPTIMIZE="%{rpmcflags}"
+for toolkit in %{?with_gtk2:gtk2} %{?with_gtk3:gtk3} ; do
+for charset in %{?with_ansi:ansi} %{?with_unicode:unicode} ; do
+export WX_CONFIG=wx-${toolkit}-${charset}-config
+%{__perl} Build.PL \
+       destdir=$RPM_BUILD_ROOT \
+       installdirs=vendor \
+       --wxWidgets-build=0
+
+./Build
 
-%{?with_tests:%{__make} test}
+%{?with_tests:./Build test}
+done
+done
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+./Build install
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -64,10 +96,25 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %dir %{perl_vendorarch}/Alien
-%{perl_vendorarch}/Alien/*.pm
+%{perl_vendorarch}/Alien/wxWidgets.pm
 %dir %{perl_vendorarch}/Alien/wxWidgets
-%{perl_vendorarch}/Alien/wxWidgets/*.pm
-%dir %{perl_vendorarch}/auto/Alien
-%dir %{perl_vendorarch}/auto/Alien/wxWidgets
-%{perl_vendorarch}/auto/Alien/wxWidgets/*
-%{_mandir}/man3/*
+%{perl_vendorarch}/Alien/wxWidgets/Utility.pm
+%dir %{perl_vendorarch}/Alien/wxWidgets/Config
+%if %{with gtk2}
+%if %{with ansi}
+%{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_gcc_3_4.pm
+%endif
+%if %{with unicode}
+%{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_uni_gcc_3_4.pm
+%endif
+%endif
+%if %{with gtk3}
+# should be gtk3_*.pm?
+%if %{with ansi}
+%{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_gcc_3_4.pm
+%endif
+%if %{with unicode}
+%{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_uni_gcc_3_4.pm
+%endif
+%endif
+%{_mandir}/man3/Alien::wxWidgets*.3pm*
This page took 0.046637 seconds and 4 git commands to generate.