diff options
author | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-26 00:51:50 +0100 |
---|---|---|
committer | Abdoulaye Walsimou Gaye <walsimou@walsimou.com> | 2009-12-26 00:52:51 +0100 |
commit | 133a77c381d893f294cac396cfee1a4e2c79d4d9 (patch) | |
tree | a509ed7290c4f3942bcfbf3cbe895cc189c0530f /packages/graphics | |
parent | be3a05c3de4bd285f80ab8a1add7d2b69ed24268 (diff) | |
download | embtoolkit-133a77c381d893f294cac396cfee1a4e2c79d4d9.tar.gz embtoolkit-133a77c381d893f294cac396cfee1a4e2c79d4d9.tar.bz2 embtoolkit-133a77c381d893f294cac396cfee1a4e2c79d4d9.tar.xz |
Packages: New GTK: add gtk as buildable package
Signed-off-by: Abdoulaye Walsimou Gaye <walsimou@walsimou.com>
Diffstat (limited to 'packages/graphics')
-rw-r--r-- | packages/graphics/gtk/gtk.kconfig | 62 | ||||
-rw-r--r-- | packages/graphics/gtk/gtk.mk | 137 |
2 files changed, 199 insertions, 0 deletions
diff --git a/packages/graphics/gtk/gtk.kconfig b/packages/graphics/gtk/gtk.kconfig new file mode 100644 index 0000000..f3d0059 --- /dev/null +++ b/packages/graphics/gtk/gtk.kconfig @@ -0,0 +1,62 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file gtk.kconfig +# \brief gtk.kconfig of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +config EMBTK_HAVE_GTK + bool "Have gtk+" + select EMBTK_HAVE_GLIB + select EMBTK_HAVE_PANGO + select EMBTK_HAVE_ATK + select EMBTK_HAVE_LIBJEPG + select EMBTK_HAVE_LIBPNG + select EMBTK_HAVE_LIBTIFF + select EMBTK_HAVE_FONTCONFIG + select EMBTK_HAVE_CAIRO + select EMBTK_HAVE_DIRECTFB + help + GTK+ is a highly usable, feature rich toolkit for creating + graphical user interfaces which boasts cross platform + compatibility and an easy to use API. GTK+ it is written in C, + but has bindings to many other popular programming languages + such as C++, Python and C# among others. GTK+ is licensed under + the GNU LGPL 2.1 allowing development of both free and + proprietary software with GTK+ without any license fees or + royalties. +choice + prompt "gtk+ version you wish" + depends on EMBTK_HAVE_GTK + help + Here you can choose which version of gtk you want to use. + + config EMBTK_GTK_VERSION_2_18_5 + bool "gtk+-2.18.5" +endchoice + +config EMBTK_GTK_MAJOR_VERSION_STRING + string + default "2.18" if EMBTK_GTK_VERSION_2_18_5 + +config EMBTK_GTK_VERSION_STRING + string + default "2.18.5" if EMBTK_GTK_VERSION_2_18_5 + diff --git a/packages/graphics/gtk/gtk.mk b/packages/graphics/gtk/gtk.mk new file mode 100644 index 0000000..89fd0f2 --- /dev/null +++ b/packages/graphics/gtk/gtk.mk @@ -0,0 +1,137 @@ +################################################################################ +# GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# Copyright(C) 2009 GAYE Abdoulaye Walsimou. All rights reserved. +# +# This program is free software; you can distribute it and/or modify it +# under the terms of the GNU General Public License +# (Version 2 or later) published by the Free Software Foundation. +# +# This program is distributed in the hope it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. +################################################################################ +# +# \file gtk.mk +# \brief gtk.mk of Embtoolkit +# \author GAYE Abdoulaye Walsimou, <walsimou@walsimou.com> +# \date December 2009 +################################################################################ + +GTK_MAJOR_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GTK_MAJOR_VERSION_STRING))) +GTK_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_GTK_VERSION_STRING))) +GTK_SITE := http://ftp.gnome.org/pub/gnome/sources/gtk+/$(GTK_MAJOR_VERSION) +GTK_PACKAGE := gtk+-$(GTK_VERSION).tar.bz2 +GTK_BUILD_DIR := $(PACKAGES_BUILD)/gtk+-$(GTK_VERSION) + +GTK_BINS = gtk-* +GTK_SBINS = +GTK_INCLUDES = gail-* gtk-* +GTK_LIBS = gtk-* libgail* libgdk-* libgdk_* libgtk-* +GTK_PKGCONFIGS = gail*.pc gdk*.pc gtk*.pc + +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) +PKG_CONFIG_PATH=$(SYSROOT)/usr/lib32/pkgconfig +else +PKG_CONFIG_PATH=$(SYSROOT)/usr/lib/pkgconfig +endif + +gtk_install: $(GTK_BUILD_DIR)/.installed + +$(GTK_BUILD_DIR)/.installed: directfb_install libtiff_install \ + fontconfig_install download_gtk glib_install atk_install cairo_install \ + pango_install $(GTK_BUILD_DIR)/.decompressed \ + $(GTK_BUILD_DIR)/.configured + $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \ + gtk-$(GTK_VERSION) in your root filesystem...") + $(Q)$(MAKE) -C $(GTK_BUILD_DIR) $(J) + $(Q)$(MAKE) -C $(GTK_BUILD_DIR) DESTDIR=$(SYSROOT) install + $(Q)$(MAKE) libtool_files_adapt + $(Q)$(MAKE) pkgconfig_files_adapt + $(Q)-cp $(SYSROOT)/usr/etc/gtk-* $(ROOTFS)/etc/ +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cp $(SYSROOT)/usr/lib32/gtk-* $(ROOTFS)/usr/lib32/ +else + $(Q)-cp $(SYSROOT)/usr/lib/gtk-* $(ROOTFS)/usr/lib/ +endif + @touch $@ + +download_gtk: + $(call EMBTK_GENERIC_MESSAGE,"Downloading $(GTK_PACKAGE) \ + if necessary...") + @test -e $(DOWNLOAD_DIR)/$(GTK_PACKAGE) || \ + wget -O $(DOWNLOAD_DIR)/$(GTK_PACKAGE) \ + $(GTK_SITE)/$(GTK_PACKAGE) + +$(GTK_BUILD_DIR)/.decompressed: + $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(GTK_PACKAGE) ...") + @tar -C $(PACKAGES_BUILD) -xjf $(DOWNLOAD_DIR)/$(GTK_PACKAGE) + @touch $@ + +$(GTK_BUILD_DIR)/.configured: + $(Q)cd $(GTK_BUILD_DIR); \ + CC=$(TARGETCC_CACHED) \ + CXX=$(TARGETCXX_CACHED) \ + AR=$(TARGETAR) \ + RANLIB=$(TARGETRANLIB) \ + AS=$(CROSS_COMPILE)as \ + LD=$(TARGETLD) \ + NM=$(TARGETNM) \ + STRIP=$(TARGETSTRIP) \ + OBJDUMP=$(TARGETOBJDUMP) \ + OBJCOPY=$(TARGETOBJCOPY) \ + CFLAGS="$(TARGET_CFLAGS)" \ + CXXFLAGS="$(TARGET_CFLAGS)" \ + LDFLAGS="-L$(SYSROOT)/lib -L$(SYSROOT)/usr/lib \ + -L$(SYSROOT)/lib32 -L$(SYSROOT)/usr/lib32" \ + CPPFLGAS="-I$(SYSROOT)/usr/include" \ + PKG_CONFIG=$(PKGCONFIG_BIN) \ + PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \ + gio_can_sniff=yes \ + ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \ + --target=$(STRICT_GNU_TARGET) \ + --prefix=/usr --disable-cups --disable-gtk-doc --disable-glibtest \ + --with-gdktarget=directfb + @touch $@ + +$(GTK_BUILD_DIR)/.patchlibtool: +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)GTK_LT_FILES=`find $(SYSROOT)/usr/lib32/ -type f -name *.la`; \ + for i in $$GTK_LT_FILES; \ + do \ + sed \ + -e "s; \/usr\/lib32\/libgtk-directfb-2.0.la ; $(SYSROOT)\/usr\/lib32\/libgtk-directfb-2.0.la ;" \ + -e "s; \/usr\/lib32\/libgdk-directfb-2.0.la ; $(SYSROOT)\/usr\/lib32\/libgdk-directfb-2.0.la ;" \ + -e "s; \/usr\/lib32\/libgdk_pixbuf-2.0.la ; $(SYSROOT)\/usr\/lib32\/libgdk_pixbuf-2.0.la ;" \ + < $$i > $$i.new; \ + mv $$i.new $$i; \ + done +else + $(Q)GTK_LT_FILES=`find $(SYSROOT)/usr/lib/ -type f -name *.la`; \ + for i in $$GTK_LT_FILES; \ + do \ + sed \ + -e "s; \/usr\/lib\/libgtk-directfb-2.0.la ; $(SYSROOT)\/usr\/lib\/libgtk-directfb-2.0.la ;" \ + -e "s; \/usr\/lib\/libgdk-directfb-2.0.la ; $(SYSROOT)\/usr\/lib\/libgdk-directfb-2.0.la ;" \ + -e "s; \/usr\/lib\/libgdk_pixbuf-2.0.la ; $(SYSROOT)\/usr\/lib\/libgdk_pixbuf-2.0.la ;" \ + < $$i > $$i.new; \ + mv $$i.new $$i; \ + done +endif + +gtk_clean: + $(call EMBTK_GENERIC_MESSAGE,"cleanup gtk-$(GTK_VERSION)...") + $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(GTK_BINS) + $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(GTK_SBINS) + $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(GTK_INCLUDES) + $(Q)-cd $(SYSROOT)/usr/lib; rm -rf $(GTK_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib/pkgconfig; rm -rf $(GTK_PKGCONFIGS) +ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y) + $(Q)-cd $(SYSROOT)/usr/lib32; rm -rf $(GTK_LIBS) + $(Q)-cd $(SYSROOT)/usr/lib32/pkgconfig; rm -rf $(GTK_PKGCONFIGS) +endif + |