]> git.pld-linux.org Git - packages/perl-Alien-wxWidgets.git/blob - perl-Alien-wxWidgets.spec
- query wx-config for version, rpm may be different, rel 7
[packages/perl-Alien-wxWidgets.git] / perl-Alien-wxWidgets.spec
1 # TODO: provide configurations for other configurations (e.g. x11)?
2 #
3 # Conditional build:
4 %bcond_without  tests           # do not perform "make test"
5 %bcond_without  gtk2            # wxGTK2 packages support
6 %bcond_without  gtk3            # wxGTK3 packages support
7 %bcond_with     ansi            # ANSI wx packages support
8 %bcond_without  unicode         # Unicode wx packages support
9 #
10 %define         _enable_debug_packages  0
11 #
12 %define         pdir    Alien
13 %define         pnam    wxWidgets
14 Summary:        Alien::wxWidgets - building, finding and using wxWidgets binaries
15 Summary(pl.UTF-8):      Alien::wxWidgets - budowanie, znajdowanie i wykorzystywanie binariów wxWidgets
16 Name:           perl-Alien-wxWidgets
17 Version:        0.69
18 Release:        7
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
23 # Source0-md5:  4edfec992976b71333699a84d07c8aa6
24 Patch0:         %{name}-nobuild.patch
25 Patch1:         %{name}-config.patch
26 URL:            https://metacpan.org/release/Alien-wxWidgets
27 BuildRequires:  perl-ExtUtils-CBuilder >= 0.24
28 BuildRequires:  perl-Module-Build >= 0.28
29 BuildRequires:  perl-Module-Pluggable >= 3.1-4
30 BuildRequires:  perl-devel >= 1:5.8.0
31 BuildRequires:  perl(File::Spec) >= 1.50
32 BuildRequires:  perl-Test-Pod >= 1.0
33 BuildRequires:  perl-Test-Pod-Coverage >= 1.0
34 BuildRequires:  rpm-perlprov >= 4.1-13
35 BuildRequires:  rpmbuild(macros) >= 1.745
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
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
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)
78 %define         wx_ver_tag      %(echo %{wx_ver} | tr . _)
79
80 %description
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.
86
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.
92
93 %prep
94 %setup -q -n %{pdir}-%{pnam}-%{version}
95 %patch0 -p1
96 %patch1 -p1
97
98 %build
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
106
107 ./Build
108
109 %{?with_tests:./Build test}
110 done
111 done
112
113 %install
114 rm -rf $RPM_BUILD_ROOT
115
116 ./Build install
117
118 %clean
119 rm -rf $RPM_BUILD_ROOT
120
121 %files
122 %defattr(644,root,root,755)
123 %{perl_vendorarch}/Alien/wxWidgets.pm
124 %dir %{perl_vendorarch}/Alien/wxWidgets
125 %{perl_vendorarch}/Alien/wxWidgets/Utility.pm
126 %dir %{perl_vendorarch}/Alien/wxWidgets/Config
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*
This page took 0.611119 seconds and 4 git commands to generate.