%global __strip %{_mingw32_strip} %global __objdump %{_mingw32_objdump} %global _use_internal_dependency_generator 0 %global __find_requires %{_mingw32_findrequires} %global __find_provides %{_mingw32_findprovides} # Don't build debuginfo packages %define debug_package %{nil} %define pkgVer 2.8.11 Name: mingw32-wxWidgets Summary: MinGW Windows port of wxWidgets Version: %{pkgVer} Release: 1%{?dist} License: wxWidgets BuildArch: noarch Group: Development/Libraries URL: http://wxwidgets.org Source: http://prdownloads.sourceforge.net/wxwindows/wxWidgets-%{pkgVer}.tar.bz2 Patch0: wxWidgets-use-fedora-mingw-libjpeg-jpeg-boolean-type.patch Patch1: wxWidgets-generate-rcdefs.h-for-windows.patch Patch2: wxWidgets-fix-m4-macro-definitions-for-autoconf-2.65.patch BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) BuildRequires: mingw32-filesystem BuildRequires: mingw32-gcc-c++ BuildRequires: mingw32-expat BuildRequires: mingw32-libjpeg BuildRequires: mingw32-libpng BuildRequires: mingw32-libtiff BuildRequires: mingw32-zlib BuildRequires: autoconf %description wxWidgets is the C++ cross-platform GUI library, offering classes for all common GUI controls as well as a comprehensive set of helper classes for most common application tasks, ranging from networking to HTML display and image manipulation. %package static Summary: Static libraries for mingw32-wxWidgets development Group: Development/Libraries Requires: mingw32-wxWidgets = %{version}-%{release} %description static mingw32-wxWidgets-static contains static library for mingw32-wxWidgets development. %prep %setup -q -n wxWidgets-%{pkgVer} %patch0 %patch1 %patch2 -p1 # patches that modify configure.in and require running autoconf here include: # wxWidgets-use-fedora-mingw-libjpeg-jpeg-boolean-type.patch # wxWidgets-configure.in-generate-rcdefs.h.patch autoconf #========================================== %build #========= Shared Libraries ========== mkdir obj-shared cd obj-shared %_mingw32_configure --enable-shared \ --with-msw \ --with-sdl \ --enable-unicode \ --enable-optimise \ --with-regex=builtin \ --disable-rpath \ --without-subdirs make %{?_smp_mflags} cd .. #========= Static Libraries ========== mkdir obj-static cd obj-static %_mingw32_configure --disable-shared \ --with-msw \ --with-sdl \ --enable-unicode \ --enable-optimise \ --with-regex=builtin \ --disable-rpath \ --without-subdirs #TODO verify this doesn't overwrite anything from the shared build make %{?_smp_mflags} cd .. #========================================== %install rm -rf $RPM_BUILD_ROOT make install -C obj-shared DESTDIR=$RPM_BUILD_ROOT make install -C obj-static DESTDIR=$RPM_BUILD_ROOT if ls $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll ; then mv $RPM_BUILD_ROOT%{_mingw32_libdir}/*.dll $RPM_BUILD_ROOT%{_mingw32_bindir} else echo "No shared libraries found." fi # we need to modify the absolute wx-config link to be relative or rpm complains # (and our package wouldn't be relocatable) wx_config_filename=$(basename $RPM_BUILD_ROOT%{_mingw32_libdir}/wx/config/%{_mingw32_target}-*-release-[0-9]*) ln -sf ../lib/wx/config/$wx_config_filename $RPM_BUILD_ROOT%{_mingw32_bindir}/wx-config %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_mingw32_prefix} #TODO Need to select all files EXCEPT for static libraries %files static %defattr(-,root,root,-) %{_mingw32_libdir}/*.a %{_mingw32_libdir}/wx/config/%{_mingw32_target}-*-static-* %changelog * Wed Apr 28 2010 Scott Tsai 2.8.11-1 - noarch - update to 2.8.11 - add wxWidgets-use-fedora-mingw-libjpeg-jpeg-boolean-type.patch - add wxWidgets-generate-rcdefs.h-for-windows.patch - add wxWidgets-fix-m4-macro-definitions-for-autoconf-2.65.patch for F13 * Tue Sep 8 2009 Michael Ansel 2.8.10-1 - update to 2.8.10 * Tue Sep 8 2009 Michael Ansel 2.8.9-3 - Adjust to Fedora packaging guidelines * Wed Aug 26 2009 Michael Ansel 2.8.9-2 - update for Fedora 11 (mingw -> mingw32) - use mingw32 macros - add static subpackage * Thu Dec 18 2008 Keiichi Takahashi 2.8.9-1 - update to 2.8.9 * Tue Aug 12 2008 Keiichi Takahashi 2.8.8-1 - update to 2.8.8 * Sat Mar 15 2008 Keiichi Takahashi 2.8.7-2 - rebuilt with current libraries. - add BuildPrereq and Requires more explicitly. * Thu Feb 28 2008 Keiichi Takahashi 2.8.7-1 - initial release