]>
Commit | Line | Data |
---|---|---|
b8fac701 | 1 | # TODO: provide configurations for other configurations (e.g. x11)? |
274c91a3 MŁ |
2 | # |
3 | # Conditional build: | |
b8fac701 JB |
4 | %bcond_without tests # do not perform "make test" |
5 | %bcond_without gtk2 # wxGTK2 packages support | |
6 | %bcond_without gtk3 # wxGTK3 packages support | |
3ca195d8 | 7 | %bcond_with ansi # ANSI wx packages support |
b8fac701 | 8 | %bcond_without unicode # Unicode wx packages support |
274c91a3 | 9 | # |
f8e0f5f9 JR |
10 | %define _enable_debug_packages 0 |
11 | # | |
274c91a3 MŁ |
12 | %define pdir Alien |
13 | %define pnam wxWidgets | |
14 | Summary: Alien::wxWidgets - building, finding and using wxWidgets binaries | |
6b8dacf7 | 15 | Summary(pl.UTF-8): Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets |
274c91a3 | 16 | Name: perl-Alien-wxWidgets |
7f333a93 | 17 | Version: 0.69 |
3ca195d8 | 18 | Release: 7 |
274c91a3 MŁ |
19 | # same as perl |
20 | License: GPL v1+ or Artistic | |
21 | Group: Development/Languages/Perl | |
22 | Source0: http://www.cpan.org/modules/by-module/Alien/%{pdir}-%{pnam}-%{version}.tar.gz | |
7f333a93 | 23 | # Source0-md5: 4edfec992976b71333699a84d07c8aa6 |
bbe2b626 | 24 | Patch0: %{name}-nobuild.patch |
7f333a93 JB |
25 | Patch1: %{name}-config.patch |
26 | URL: https://metacpan.org/release/Alien-wxWidgets | |
0e5aa9c3 | 27 | BuildRequires: perl-ExtUtils-CBuilder >= 0.24 |
b8fac701 JB |
28 | BuildRequires: perl-Module-Build >= 0.28 |
29 | BuildRequires: perl-Module-Pluggable >= 3.1-4 | |
bbe2b626 | 30 | BuildRequires: perl-devel >= 1:5.8.0 |
b8fac701 | 31 | BuildRequires: perl(File::Spec) >= 1.50 |
3ca195d8 JR |
32 | BuildRequires: perl-Test-Pod >= 1.0 |
33 | BuildRequires: perl-Test-Pod-Coverage >= 1.0 | |
274c91a3 | 34 | BuildRequires: rpm-perlprov >= 4.1-13 |
7f333a93 | 35 | BuildRequires: rpmbuild(macros) >= 1.745 |
b8fac701 JB |
36 | %if %{with gtk2} |
37 | %if %{with ansi} | |
38 | BuildRequires: wxGTK2-devel >= 2.6.3 | |
39 | BuildRequires: wxGTK2-gl-devel >= 2.6.3 | |
40 | %endif | |
41 | %if %{with unicode} | |
42 | BuildRequires: wxGTK2-unicode-devel >= 2.6.3 | |
43 | BuildRequires: wxGTK2-unicode-gl-devel >= 2.6.3 | |
44 | %endif | |
45 | %endif | |
46 | %if %{with gtk3} | |
47 | %if %{with ansi} | |
48 | BuildRequires: wxGTK3-devel >= 2.6.3 | |
49 | BuildRequires: wxGTK3-gl-devel >= 2.6.3 | |
50 | %endif | |
51 | %if %{with unicode} | |
52 | BuildRequires: wxGTK3-unicode-devel >= 2.6.3 | |
53 | BuildRequires: wxGTK3-unicode-gl-devel >= 2.6.3 | |
54 | %endif | |
55 | %endif | |
274c91a3 MŁ |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
3ca195d8 JR |
58 | %if %{with gtk2} |
59 | %if %{with ansi} | |
60 | %define wx_config wx-gtk2-ansi-config | |
61 | %else | |
62 | %if %{with unicode} | |
63 | %define wx_config wx-gtk2-unicode-config | |
64 | %endif | |
65 | %endif | |
66 | %else | |
67 | %if %{with gtk3} | |
68 | %if %{with ansi} | |
69 | %define wx_config wx-gtk3-ansi-config | |
70 | %else | |
71 | %if %{with unicode} | |
72 | %define wx_config wx-gtk3-unicode-config | |
73 | %endif | |
74 | %endif | |
75 | %endif | |
76 | %endif | |
77 | %define wx_ver %(%{wx_config} --version) | |
b8fac701 JB |
78 | %define wx_ver_tag %(echo %{wx_ver} | tr . _) |
79 | ||
274c91a3 | 80 | %description |
bbe2b626 JB |
81 | Alien::wxWidgets allows wxPerl to easily find information about your |
82 | wxWidgets installation. It can store this information for multiple | |
83 | wxWidgets versions or configurations (debug, Unicode, etc.). It can | |
84 | also build and install a private copy of wxWidgets as part of the | |
85 | build process. | |
274c91a3 | 86 | |
530a3377 JR |
87 | %description -l pl.UTF-8 |
88 | Alien::wxWidgets pozwala wxPerlowi łatwo uzyskać informacje na temat | |
89 | instalacji wxWidgets. Może przechowywać informacje o wielu wersjach | |
90 | lub konfiguracjach (debug, Unicode, itp.). Może także zbudować i | |
91 | zainstalować prywatną kopię wxWidgets jako część procesu budowania. | |
274c91a3 MŁ |
92 | |
93 | %prep | |
94 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
95 | %patch0 -p1 | |
7f333a93 | 96 | %patch1 -p1 |
274c91a3 MŁ |
97 | |
98 | %build | |
b8fac701 JB |
99 | for toolkit in %{?with_gtk2:gtk2} %{?with_gtk3:gtk3} ; do |
100 | for charset in %{?with_ansi:ansi} %{?with_unicode:unicode} ; do | |
101 | export WX_CONFIG=wx-${toolkit}-${charset}-config | |
102 | %{__perl} Build.PL \ | |
103 | destdir=$RPM_BUILD_ROOT \ | |
104 | installdirs=vendor \ | |
105 | --wxWidgets-build=0 | |
14d6bda2 | 106 | |
b8fac701 | 107 | ./Build |
274c91a3 | 108 | |
b8fac701 JB |
109 | %{?with_tests:./Build test} |
110 | done | |
111 | done | |
274c91a3 MŁ |
112 | |
113 | %install | |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
b8fac701 | 116 | ./Build install |
274c91a3 MŁ |
117 | |
118 | %clean | |
119 | rm -rf $RPM_BUILD_ROOT | |
120 | ||
121 | %files | |
122 | %defattr(644,root,root,755) | |
b8fac701 | 123 | %{perl_vendorarch}/Alien/wxWidgets.pm |
274c91a3 | 124 | %dir %{perl_vendorarch}/Alien/wxWidgets |
b8fac701 | 125 | %{perl_vendorarch}/Alien/wxWidgets/Utility.pm |
85bb3c52 | 126 | %dir %{perl_vendorarch}/Alien/wxWidgets/Config |
b8fac701 JB |
127 | %if %{with gtk2} |
128 | %if %{with ansi} | |
129 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_gcc_3_4.pm | |
130 | %endif | |
131 | %if %{with unicode} | |
132 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk2_%{wx_ver_tag}_uni_gcc_3_4.pm | |
133 | %endif | |
134 | %endif | |
135 | %if %{with gtk3} | |
136 | # should be gtk3_*.pm? | |
137 | %if %{with ansi} | |
138 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_gcc_3_4.pm | |
139 | %endif | |
140 | %if %{with unicode} | |
141 | %{perl_vendorarch}/Alien/wxWidgets/Config/gtk_%{wx_ver_tag}_uni_gcc_3_4.pm | |
142 | %endif | |
143 | %endif | |
144 | %{_mandir}/man3/Alien::wxWidgets*.3pm* |