%define name wx-gtk2
%define wxconfig gtk2-unicode-release-2.8
%define wx_ver 2.8

Summary: The GTK+ 2 port of the wxWidgets library
Summary(ja): GTK+ バージョン 2 を使用した wxWidgets ライブラリ
Name: %{name}
Version: %{wx_ver}.12
Release: 1%{?_dist_release}
License: wxWindows License
Group: System Environment/Libraries
URL: http://www.wxwidgets.org/
Source0: wxGTK-%{version}.tar.gz
#Patch10: wxGTK-2.8.10-gsockgtk.patch
#Patch100: wxGTK-2.8.10-CVE-2009-2369.patch

#BuildPreReq: gtk2-devel libpng-devel libjpeg-devel libtiff-devel
#BuildPreReq: mesa-libGL-devel mesa-libGLU-devel zlib-devel expat-devel pkgconfig
BuildRequires: gtk2-devel libpng-devel libjpeg-turbo-devel libtiff-devel
BuildRequires: libSM-devel cppunit-devel libgnomeprintui-devel
BuildRequires: mesa-libGL-devel mesa-libGLU-devel zlib-devel expat-devel pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-root

Obsoletes: %{name}-gl <= 2.4.2-0vl1
Obsoletes: %{name}-samples <= 2.4.2-0vl1
Provides: wxwin wxBase wxGTK

Vendor: Project Vine
Distribution: Vine Linux

%description
wxWidgets is a free C++ library for cross-platform GUI development.
With wxWidgets, you can create applications for different GUIs (GTK+,
Motif, MS Windows, MacOS X, Windows CE, GPE) from the same source code.


%package devel
Summary: The GTK+ 2 port of the wxWidgets library
Summary(ja): wxWidgets ライブラリの開発用ファイル
Group: Development/Libraries
Provides: wxBase-devel wxGTK-devel
Requires: %{name} = %{version}-%{release}

%description devel
The GTK+ 2 port of the wxWidgets library, header files.


%prep
%setup -q -n wxGTK-%{version}
#%patch10 -p1 -b .gsockgtk
#%patch100 -p0 -b .CVE-2009-2369

%build
%configure --enable-shared --enable-unicode --with-gtk \
	--with-libpng --with-libjpeg --with-libtiff --with-libxpm \
	--with-opengl --with-regex --with-zlib

%__make %{?_smp_mflags}

%install
%__rm -rf %{buildroot}
%makeinstall
ln -sf %{_libdir}/wx/config/%{wxconfig} %{buildroot}%{_bindir}/wx-config

%makeinstall -C contrib

%clean
%__rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc *.txt demos docs
%{_libdir}/libwx_base*.so.*
%{_libdir}/libwx_gtk2*.so.*
#%{_datadir}/locale/*/LC_MESSAGES/*

%files devel
%defattr(-,root,root)
%{_includedir}/wx-%{wx_ver}/wx/*.h
%{_includedir}/wx-%{wx_ver}/wx/*/*.h
%{_includedir}/wx-%{wx_ver}/wx/*/*/*.h
%{_includedir}/wx-%{wx_ver}/wx/*.cpp
%{_includedir}/wx-%{wx_ver}/wx/plot/*.bmp
%{_includedir}/wx-%{wx_ver}/wx/plot/*.rc
%{_libdir}/wx
%{_libdir}/libwx_base*.so
%{_libdir}/libwx_gtk2*.so
%{_bindir}/*
%{_datadir}/aclocal/*.m4
%{_datadir}/bakefile/*

%changelog
* Wed May 4 2011 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.12-1
- new upstream version

* Thu Sep 23 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.11-2
- built with rpm-4.8.1-1 for pkg-config file
- changed libjpeg-devel to libjpeg-turbo-devel
- added BuildRequires: libSM-devel, cppunit-devel, libgnomeprintui-devel

* Tue Jun 8 2010 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.11-1
- new upstream version
- dropt all patches

* Tue Feb 23 2010 Shu KONNO <owa@bg.wakwak.com> 2.8.10-4
- added Patch10: wxGTK-2.8.10-gsockgtk.patch
- added conrib libraries
- rebuilt with new toolchain

* Tue Jul 28 2009 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 2.8.10-3
- add patch100 for fix CVE-2009-2369 (Interger OF) from fc10

* Mon Jun 22 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.10-2vl5
- spec in UTF-8

* Thu Mar 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.10-1vl5
- new upstream version
- built with gtk2-2.16.0

* Wed Jan 21 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> 2.8.9-1vl5
- new upstream version
- modified BuildPreReq: mesa-libGL-devel mesa-libGLU-devel (instead of XOrg-gl-devel)

* Tue Feb 26 2008 AKIYAMA Kazuhito <akiyama@yb3.so-net.ne.jp> 2.8.7-0vl5
- rebuild with expat-2.0.1
- add BuildPreReq: expat-devel pkgconfig

* Sun Jan 13 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.8.7-0vl4
- rebuilt with gtk2-2.12.5

* Sun Dec 30 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.8.7-0vl3
- rebuilt for VineSeed

* Sun Dec 30 2007 Kazutaka HARADA <kazutaka@dc4.so-net.ne.jp> 2.8.7-0vl2
- add --enable-unicode configure option

* Sat Dec 29 2007 Shu KONNO  <owa@bg.wakwak.com> - 2.8.7-0vl1
- new upstream version

* Fri Jun  1 2007 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.3-0vl2
- rebuilt with new toolchain

* Thu May 18 2006 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.3-0vl1
- new upstream version
- fixed Obsoletes tag

* Fri Oct 21 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.6.2-0vl1
- new upstream version
- added Obsoletes: %{name}-gl %{name}-samples

* Sun Jul 10 2005 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 2.6.1-0vl1
- new upstream version
- remove private symbol patch 
- remove wx-gtk2-gl, wx-gtk2-samples subpackage

* Tue May 25 2004 USAMI Kosuke <usami-k@yc5.so-net.ne.jp> - 2.4.2-0vl1
- Initial build.