blob: d7d3a78eaa5c4af71b0236fef02e34a7254a87bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
################################################################################
# Embtoolkit
# Copyright(C) 2009-2011 Abdoulaye Walsimou GAYE.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that 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, see <http://www.gnu.org/licenses/>.
#
################################################################################
#
# \file gtk.mk
# \brief gtk.mk of Embtoolkit
# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
# \date December 2009
################################################################################
GTK_NAME := gtk+
GTK_MAJOR_VERSION := $(call embtk_get_pkgversion,gtk_major)
GTK_VERSION := $(call embtk_get_pkgversion,gtk)
GTK_SITE := http://ftp.gnome.org/pub/gnome/sources/gtk+/$(GTK_MAJOR_VERSION)
GTK_SITE_MIRROR3 := ftp://ftp.embtoolkit.org/embtoolkit.org/packages-mirror
GTK_PACKAGE := gtk+-$(GTK_VERSION).tar.bz2
GTK_SRC_DIR := $(embtk_pkgb)/gtk+-$(GTK_VERSION)
GTK_BUILD_DIR := $(embtk_pkgb)/gtk+-$(GTK_VERSION)
GTK_BINS = gtk-* gdk-*
GTK_SBINS =
GTK_INCLUDES = gail-* gtk-*
GTK_LIBS = gtk-* libgail* libgdk-* libgdk_* libgtk-*
GTK_PKGCONFIGS = gail*.pc gdk*.pc gtk*.pc
GTK_ETC = gtk-*
GTK_DEPS := libjpeg_install libpng_install libtiff_install \
fontconfig_install glib_install gdkpixbuf_host_install \
atk_install cairo_install pango_install
ifeq ($(CONFIG_EMBTK_GTK_BACKEND_DIRECTFB),y)
GTK_BACKEND := --with-gdktarget=directfb --without-x
GTK_DEPS += directfb_install
else
GTK_BACKEND := --with-gdktarget=x11 --with-x --with-xinput=yes
GTK_DEPS += libx11_install libxext_install libxrender_install xinput_install
endif
GTK_CONFIGURE_ENV := gio_can_sniff=yes
GTK_CONFIGURE_ENV += ac_cv_path_GDK_PIXBUF_CSOURCE=$(embtk_htools)/usr/bin/gdk-pixbuf-csource
GTK_CONFIGURE_OPTS := $(GTK_BACKEND)
GTK_CONFIGURE_OPTS += --disable-cups --disable-gtk-doc --disable-glibtest
GTK_CONFIGURE_OPTS += LIBPNG=-lpng
define embtk_postinstallonce_gtk
$(MAKE) $(GTK_BUILD_DIR)/.patchlibtool
endef
define embtk_postinstall_gtk
mkdir -p $(embtk_rootfs)
mkdir -p $(embtk_rootfs)/usr
mkdir -p $(embtk_rootfs)/usr/$(LIBDIR)
-cp -R $(embtk_sysroot)/usr/$(LIBDIR)/gtk-* $(embtk_rootfs)/usr/$(LIBDIR)/
endef
$(GTK_BUILD_DIR)/.patchlibtool:
ifeq ($(CONFIG_EMBTK_64BITS_FS_COMPAT32),y)
GTK_LT_FILES=`find $(embtk_sysroot)/usr/lib32/ -type f -name *.la`; \
for i in $$GTK_LT_FILES; \
do \
sed \
-e "s; \/usr\/lib32\/libgtk-directfb-2.0.la ; $(embtk_sysroot)\/usr\/lib32\/libgtk-directfb-2.0.la ;" \
-e "s; \/usr\/lib32\/libgdk-directfb-2.0.la ; $(embtk_sysroot)\/usr\/lib32\/libgdk-directfb-2.0.la ;" \
-e "s; \/usr\/lib32\/libgdk_pixbuf-2.0.la ; $(embtk_sysroot)\/usr\/lib32\/libgdk_pixbuf-2.0.la ;" \
-e "s; \/usr\/lib\/libgtk-x11-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgtk-x11-2.0.la ;" \
-e "s; \/usr\/lib\/libgdk-x11-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgdk-x11-2.0.la ;" \
< $$i > $$i.new; \
mv $$i.new $$i; \
done
else
GTK_LT_FILES=`find $(embtk_sysroot)/usr/lib/ -type f -name *.la`; \
for i in $$GTK_LT_FILES; \
do \
sed \
-e "s; \/usr\/lib\/libgtk-directfb-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgtk-directfb-2.0.la ;" \
-e "s; \/usr\/lib\/libgdk-directfb-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgdk-directfb-2.0.la ;" \
-e "s; \/usr\/lib\/libgdk_pixbuf-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgdk_pixbuf-2.0.la ;" \
-e "s; \/usr\/lib\/libgtk-x11-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgtk-x11-2.0.la ;" \
-e "s; \/usr\/lib\/libgdk-x11-2.0.la ; $(embtk_sysroot)\/usr\/lib\/libgdk-x11-2.0.la ;" \
< $$i > $$i.new; \
mv $$i.new $$i; \
done
endif
|