mxe/src/wxwidgets.mk

127 lines
4.6 KiB
Makefile
Raw Normal View History

2010-01-16 22:02:02 +00:00
# This file is part of mingw-cross-env.
# See doc/index.html for further information.
2009-02-27 14:26:55 +00:00
# wxWidgets
PKG := wxwidgets
$(PKG)_IGNORE :=
2010-09-09 21:25:41 +01:00
$(PKG)_VERSION := 2.8.11
$(PKG)_CHECKSUM := fa31e7fdb972baa28d89a7196391a9c1371e5f0e
$(PKG)_SUBDIR := wxMSW-$($(PKG)_VERSION)
$(PKG)_FILE := wxMSW-$($(PKG)_VERSION).tar.bz2
$(PKG)_WEBSITE := http://www.wxwidgets.org/
2010-09-09 21:25:41 +01:00
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/wxwindows/$($(PKG)_VERSION)/$($(PKG)_FILE)
$(PKG)_DEPS := gcc libiconv libpng jpeg tiff sdl zlib expat
2009-02-27 14:26:55 +00:00
define $(PKG)_UPDATE
wget -q -O- 'http://sourceforge.net/projects/wxwindows/files/' | \
2010-09-09 21:25:41 +01:00
$(SED) -n 's,.*/\([0-9][^"9]*\)/".*,\1,p' | \
head -1
2009-02-27 14:26:55 +00:00
endef
define $(PKG)_BUILD
$(SED) -i 's,png_check_sig,png_sig_cmp,g' '$(1)/configure'
$(SED) -i 's,wx_cv_cflags_mthread=yes,wx_cv_cflags_mthread=no,' '$(1)/configure'
# wine confuses the cross-compiling detection, so set it explicitly
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
2009-02-27 14:26:55 +00:00
cd '$(1)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-compat24 \
--enable-compat26 \
--enable-gui \
2009-02-27 14:26:55 +00:00
--enable-stl \
--enable-threads \
2009-02-27 14:26:55 +00:00
--enable-unicode \
--disable-universal \
2009-02-27 14:26:55 +00:00
--with-themes=all \
--with-msw \
--with-opengl \
--with-libpng=builtin \
2009-02-27 14:26:55 +00:00
--with-libjpeg=sys \
--with-libtiff=sys \
--with-regex=yes \
2009-02-27 14:26:55 +00:00
--with-zlib=sys \
--with-expat=sys \
--with-sdl \
--without-gtk \
--without-motif \
--without-mac \
--without-macosx-sdk \
--without-cocoa \
--without-wine \
--without-pm \
--without-microwin \
--without-libxpm \
--without-libmspack \
--without-gnomeprint \
--without-gnomevfs \
--without-hildon \
--without-dmalloc \
--without-odbc
2009-02-27 14:26:55 +00:00
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= __install_wxrc___depname=
$(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/bin/$(TARGET)-wx-config'
# build the wxWidgets variant without unicode support
cd '$(1)' && $(call UNPACK_PKG_ARCHIVE,wxwidgets)
$(SED) -i 's,png_check_sig,png_sig_cmp,g' '$(1)/$(wxwidgets_SUBDIR)/configure'
$(SED) -i 's,wx_cv_cflags_mthread=yes,wx_cv_cflags_mthread=no,' '$(1)/$(wxwidgets_SUBDIR)/configure'
# wine confuses the cross-compiling detection, so set it explicitly
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/$(wxwidgets_SUBDIR)/configure'
cd '$(1)/$(wxwidgets_SUBDIR)' && ./configure \
--host='$(TARGET)' \
--disable-shared \
--prefix='$(PREFIX)/$(TARGET)' \
--enable-compat24 \
--enable-compat26 \
--enable-gui \
--enable-stl \
--enable-threads \
--disable-unicode \
--disable-universal \
--with-themes=all \
--with-msw \
--with-opengl \
--with-libpng=builtin \
--with-libjpeg=sys \
--with-libtiff=sys \
--with-regex=yes \
--with-zlib=sys \
--with-expat=sys \
--with-sdl \
--without-gtk \
--without-motif \
--without-mac \
--without-macosx-sdk \
--without-cocoa \
--without-wine \
--without-pm \
--without-microwin \
--without-libxpm \
--without-libmspack \
--without-gnomeprint \
--without-gnomevfs \
--without-hildon \
--without-dmalloc \
--without-odbc
$(MAKE) -C '$(1)/$(wxwidgets_SUBDIR)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS=
# backup of the unicode wx-config script
# such that "make install" won't overwrite it
mv '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/$(TARGET)/bin/wx-config-backup'
$(MAKE) -C '$(1)/$(wxwidgets_SUBDIR)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= __install_wxrc___depname=
mv '$(PREFIX)/$(TARGET)/bin/wx-config' '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode'
$(INSTALL) -m755 '$(PREFIX)/$(TARGET)/bin/wx-config-nounicode' '$(PREFIX)/bin/$(TARGET)-wx-config-nounicode'
# restore the unicode wx-config script
mv '$(PREFIX)/$(TARGET)/bin/wx-config-backup' '$(PREFIX)/$(TARGET)/bin/wx-config'
2010-12-05 17:37:02 +00:00
# build test program
'$(TARGET)-g++' \
-W -Wall -Werror -pedantic -std=gnu++0x \
'$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \
`'$(TARGET)-wx-config' --cflags --libs`
2009-02-27 14:26:55 +00:00
endef