[packages] wxbase: fix build with native toolchain
[openwrt/svn-archive/archive.git] / libs / wxbase / Makefile
1 #
2 # Copyright (C) 2007-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=wxbase
11 PKG_VERSION:=2.8.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=wxGTK-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=@SF/wxwindows
16 PKG_MD5SUM:=88b867bc118a183af56efc67014bdf27
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/wxGTK-$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libwxbase
23 SECTION:=libs
24 CATEGORY:=Libraries
25 TITLE:=Cross-platform C++ framework
26 URL:=http://www.wxwidgets.org/
27 DEPENDS:=+libexpat +libstdcpp +zlib
28 endef
29
30 define Package/libwxbase/description
31 wxBase contains most of the non-GUI classes from the wxWindows cross-
32 -platform C++ framework. There are 2 categories: generally useful portable
33 code (date/time handling, command line parsing, regular expression support)
34 and wrappers for the OS objects (files, directories, sockets, threads,
35 etc.) allowing you to write portable programs easily.
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 # XXX: aMule *needs* the following configure options to be enabled:
41 # --enable-intl
42 # --enable-largefile
43 # --disable-no_rtti
44 # --with-regex
45 # --enable-unicode
46 CONFIGURE_ARGS+= \
47 --enable-shared \
48 --disable-rpath \
49 --with-gnu-ld \
50 --disable-gui \
51 --disable-monolithic \
52 --enable-plugins \
53 --disable-universal \
54 --disable-nanox \
55 --disable-gtk2 \
56 --disable-gpe \
57 --disable-optimise \
58 --disable-debug \
59 --disable-stl \
60 --disable-omf \
61 --disable-debug_flag \
62 --disable-debug_info \
63 --disable-debug_gdb \
64 --disable-debug_cntxt \
65 --disable-mem_tracing \
66 --disable-profile \
67 --disable-no_rtti \
68 --disable-no_exceptions \
69 --disable-compat22 \
70 --disable-compat24 \
71 --enable-intl \
72 --disable-backtrace \
73 --enable-exceptions \
74 --disable-sound \
75 --enable-largefile \
76 \
77 --without-gtk \
78 --without-motif \
79 --without-mac \
80 --without-cocoa \
81 --without-wine \
82 --without-msw \
83 --without-pm \
84 --without-mgl \
85 --without-microwin \
86 --without-x11 \
87 --without-libpng \
88 --without-libjpeg \
89 --without-libtiff \
90 --without-libxpm \
91 --without-libmspack \
92 --without-sdl \
93 --without-gnomeprint \
94 --without-opengl \
95 --without-dmalloc \
96 --with-regex="sys" \
97 --with-zlib="sys" \
98 --without-odbc \
99 --with-expat="sys" \
100 --without-gtk-prefix \
101 --without-x \
102 --without-libiconv-prefix \
103 --without-sdl-prefix \
104 --without-cppunit-prefix \
105
106 UNICODE=yes
107
108 ifeq ($(UNICODE),yes)
109 CONFIGURE_ARGS+= --enable-unicode
110 LIB_PFX:=u
111 else
112 CONFIGURE_ARGS+= --disable-unicode
113 LIB_PFX:=
114 endif
115
116 define Build/Compile
117 $(MAKE) -C $(PKG_BUILD_DIR) \
118 DESTDIR="$(PKG_INSTALL_DIR)" \
119 all install
120 endef
121
122 define Build/InstallDev
123 $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
124 $(CP) -L $(PKG_BUILD_DIR)/wx-config $(1)/usr/bin/
125 $(CP) $(PKG_INSTALL_DIR)/usr/include/wx-2.8 $(1)/usr/include/
126 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so* $(1)/usr/lib/
127 $(CP) $(PKG_INSTALL_DIR)/usr/lib/wx $(1)/usr/lib/
128 $(SED) 's,-I$$$${includedir}/wx-2.8,-I$(STAGING_DIR)/usr/include/wx-2.8,g' $(1)/usr/bin/wx-config
129 $(SED) 's,-I$$$${libdir}/wx/include,-I$(STAGING_DIR)/usr/lib/wx/include,g' $(1)/usr/bin/wx-config
130 endef
131
132 define Package/libwxbase/install
133 $(INSTALL_DIR) $(1)/usr/lib
134 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libwx_base$(LIB_PFX){,_net,_xml}-*.so.* $(1)/usr/lib/
135 endef
136
137 $(eval $(call BuildPackage,libwxbase))