generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
117
package/libgtk2/0001-reduce-dependencies.patch
Normal file
117
package/libgtk2/0001-reduce-dependencies.patch
Normal file
@ -0,0 +1,117 @@
|
||||
Hack the configure.in file to add a "none" gdktarget which removes
|
||||
dependencies on graphic backends such as X.org or DirectFB. Gtk does
|
||||
not fully build in this mode, but it builds sufficiently to build the
|
||||
host tools that are needed to build the target Gtk.
|
||||
|
||||
Changes:
|
||||
Ported to 2.24.18
|
||||
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
|
||||
---
|
||||
Index: libgtk2-2.24.18/configure.ac
|
||||
===================================================================
|
||||
--- libgtk2-2.24.18.orig/configure.ac 2013-05-13 07:02:44.000000000 -0500
|
||||
+++ libgtk2-2.24.18/configure.ac 2013-05-27 02:12:09.947030335 -0500
|
||||
@@ -258,12 +258,12 @@
|
||||
gdktarget=x11
|
||||
fi
|
||||
|
||||
-AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
|
||||
+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb/none]] select non-default GDK target],
|
||||
gdktarget=$with_gdktarget)
|
||||
|
||||
AC_SUBST(gdktarget)
|
||||
case $gdktarget in
|
||||
- x11|win32|quartz|directfb) ;;
|
||||
+ x11|win32|quartz|directfb|none) ;;
|
||||
*) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
|
||||
esac
|
||||
|
||||
@@ -372,11 +373,15 @@
|
||||
## annoying to construct
|
||||
PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
[glib-2.0 >= glib_required_version dnl
|
||||
- atk >= atk_required_version dnl
|
||||
- pango >= pango_required_version dnl
|
||||
- cairo >= cairo_required_version dnl
|
||||
gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
|
||||
|
||||
+if test "x$gdktarget" != "xnone"; then
|
||||
+ PKG_CHECK_MODULES(BASE_DEPENDENCIES,
|
||||
+ [atk >= atk_required_version dnl
|
||||
+ pango >= pango_required_version dnl
|
||||
+ cairo >= cairo_required_version])
|
||||
+fi
|
||||
+
|
||||
## In addition to checking that cairo is present, we also need to
|
||||
## check that the correct cairo backend is there. E.g. if the GDK
|
||||
## target is win32 we need the cairo-win32 backend and so on.
|
||||
@@ -387,8 +392,11 @@
|
||||
if test "x$cairo_backend" = "xx11"; then
|
||||
cairo_backend=xlib
|
||||
fi
|
||||
-PKG_CHECK_MODULES(CAIRO_BACKEND,
|
||||
- [cairo-$cairo_backend >= cairo_required_version])
|
||||
+
|
||||
+if test "x$gdktarget" != "xnone"; then
|
||||
+ PKG_CHECK_MODULES(CAIRO_BACKEND,
|
||||
+ [cairo-$cairo_backend >= cairo_required_version])
|
||||
+fi
|
||||
|
||||
PKG_CHECK_MODULES(GMODULE, [gmodule-2.0])
|
||||
|
||||
@@ -1279,6 +1287,7 @@
|
||||
AM_CONDITIONAL(USE_DIRECTFB, false)
|
||||
fi
|
||||
|
||||
+if test "x$gdktarget" != "xnone"; then
|
||||
|
||||
# Check for Pango flags
|
||||
|
||||
@@ -1324,6 +1333,8 @@
|
||||
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 gdk-pixbuf-2.0 cairo-$cairo_backend"
|
||||
fi
|
||||
|
||||
+fi # gdktarget != none
|
||||
+
|
||||
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES` $MATH_LIB"
|
||||
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
|
||||
#
|
||||
@@ -1341,6 +1352,7 @@
|
||||
AC_SUBST(GDK_DEP_LIBS)
|
||||
AC_SUBST(GDK_DEP_CFLAGS)
|
||||
|
||||
+if test "x$gdktarget" != "xnone"; then
|
||||
|
||||
########################################
|
||||
# Check for Accessibility Toolkit flags
|
||||
@@ -1372,6 +1384,10 @@
|
||||
fi
|
||||
|
||||
GTK_PACKAGES="atk cairo gdk-pixbuf-2.0 gio-2.0"
|
||||
+else # gdktarget != none
|
||||
+GTK_PACKAGES="gdk-pixbuf-2.0"
|
||||
+fi # gdktarget != none
|
||||
+
|
||||
if test "x$gdktarget" = "xx11"; then
|
||||
GTK_PACKAGES="$GTK_PACKAGES pangoft2"
|
||||
fi
|
||||
@@ -1533,6 +1549,8 @@
|
||||
gtk_save_cppflags="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
|
||||
|
||||
+if test "x$gdktarget" != "xnone"; then
|
||||
+
|
||||
AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
|
||||
*** Can't find cairo-pdf.h. You must build Cairo with the pdf
|
||||
*** backend enabled.]))
|
||||
@@ -1547,6 +1565,8 @@
|
||||
*** svg backend enabled.]))
|
||||
fi
|
||||
|
||||
+fi # gdktarget != none
|
||||
+
|
||||
CPPFLAGS="$gtk_save_cppflags"
|
||||
|
||||
|
||||
43
package/libgtk2/Config.in
Normal file
43
package/libgtk2/Config.in
Normal file
@ -0,0 +1,43 @@
|
||||
config BR2_PACKAGE_LIBGTK2
|
||||
bool "libgtk2"
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on BR2_USE_WCHAR # glib2
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # glib2
|
||||
depends on BR2_USE_MMU # glib2
|
||||
depends on BR2_INSTALL_LIBSTDCPP # pango
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # pango -> harfbuzz
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # pango -> harfbuzz
|
||||
select BR2_PACKAGE_ATK
|
||||
select BR2_PACKAGE_CAIRO
|
||||
select BR2_PACKAGE_CAIRO_PS
|
||||
select BR2_PACKAGE_CAIRO_PDF
|
||||
select BR2_PACKAGE_CAIRO_SVG
|
||||
select BR2_PACKAGE_LIBGLIB2
|
||||
select BR2_PACKAGE_PANGO
|
||||
select BR2_PACKAGE_GDK_PIXBUF
|
||||
select BR2_PACKAGE_FONTCONFIG
|
||||
select BR2_PACKAGE_XLIB_LIBX11
|
||||
select BR2_PACKAGE_XLIB_LIBXEXT
|
||||
select BR2_PACKAGE_XLIB_LIBXRENDER
|
||||
help
|
||||
The GTK+ version 2 graphical user interface library
|
||||
|
||||
http://www.gtk.org/
|
||||
|
||||
if BR2_PACKAGE_LIBGTK2
|
||||
|
||||
config BR2_PACKAGE_LIBGTK2_DEMO
|
||||
bool "Install libgtk2 demo program"
|
||||
help
|
||||
The GTK+ source base contains a gtk-demo program. This
|
||||
option allows to install this program to the target.
|
||||
|
||||
endif
|
||||
|
||||
comment "libgtk2 needs a toolchain w/ wchar, threads, C++, gcc >= 4.9"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on BR2_PACKAGE_XORG7
|
||||
depends on !BR2_USE_WCHAR || !BR2_INSTALL_LIBSTDCPP || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS
|
||||
5
package/libgtk2/libgtk2.hash
Normal file
5
package/libgtk2/libgtk2.hash
Normal file
@ -0,0 +1,5 @@
|
||||
# From http://ftp.gnome.org/pub/gnome/sources/gtk+/2.24/gtk+-2.24.33.sha256sum
|
||||
sha256 ac2ac757f5942d318a311a54b0c80b5ef295f299c2a73c632f6bfb1ff49cc6da gtk+-2.24.33.tar.xz
|
||||
|
||||
# Hash for license file:
|
||||
sha256 d245807f90032872d1438d741ed21e2490e1175dc8aa3afa5ddb6c8e529b58e5 COPYING
|
||||
139
package/libgtk2/libgtk2.mk
Normal file
139
package/libgtk2/libgtk2.mk
Normal file
@ -0,0 +1,139 @@
|
||||
################################################################################
|
||||
#
|
||||
# libgtk2
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBGTK2_VERSION_MAJOR = 2.24
|
||||
LIBGTK2_VERSION = $(LIBGTK2_VERSION_MAJOR).33
|
||||
LIBGTK2_SOURCE = gtk+-$(LIBGTK2_VERSION).tar.xz
|
||||
LIBGTK2_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk+/$(LIBGTK2_VERSION_MAJOR)
|
||||
LIBGTK2_INSTALL_STAGING = YES
|
||||
LIBGTK2_LICENSE = LGPL-2.0+
|
||||
LIBGTK2_LICENSE_FILES = COPYING
|
||||
LIBGTK2_CPE_ID_VENDOR = gnome
|
||||
LIBGTK2_CPE_ID_PRODUCT = gtk
|
||||
# For 0001-reduce-dependencies.patch
|
||||
LIBGTK2_AUTORECONF = YES
|
||||
|
||||
LIBGTK2_CONF_ENV = \
|
||||
ac_cv_path_GTK_UPDATE_ICON_CACHE=$(HOST_DIR)/bin/gtk-update-icon-cache \
|
||||
ac_cv_path_GDK_PIXBUF_CSOURCE=$(HOST_DIR)/bin/gdk-pixbuf-csource \
|
||||
DB2HTML=false
|
||||
|
||||
LIBGTK2_CONF_OPTS = --disable-glibtest --enable-explicit-deps=no
|
||||
|
||||
LIBGTK2_DEPENDENCIES = host-pkgconf host-libgtk2 libglib2 cairo pango atk \
|
||||
gdk-pixbuf $(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
LIBGTK2_MAKE_OPTS = LIBS=$(TARGET_NLS_LIBS)
|
||||
|
||||
# Xorg dependencies
|
||||
LIBGTK2_CONF_OPTS += \
|
||||
--with-x \
|
||||
--x-includes=$(STAGING_DIR)/usr/include/X11 \
|
||||
--x-libraries=$(STAGING_DIR)/usr/lib \
|
||||
--with-gdktarget=x11
|
||||
LIBGTK2_DEPENDENCIES += \
|
||||
fontconfig xlib_libX11 xlib_libXext xlib_libXrender
|
||||
|
||||
ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
|
||||
LIBGTK2_CONF_OPTS += --enable-introspection
|
||||
LIBGTK2_DEPENDENCIES += gobject-introspection
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --disable-introspection
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXINERAMA),y)
|
||||
LIBGTK2_CONF_OPTS += --enable-xinerama
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXinerama
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --disable-xinerama
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXI),y)
|
||||
LIBGTK2_CONF_OPTS += --with-xinput=yes
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXi
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --with-xinput=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXRANDR),y)
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXrandr
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXCURSOR),y)
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXcursor
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXFIXES),y)
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXfixes
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXCOMPOSITE),y)
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXcomposite
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXDAMAGE),y)
|
||||
LIBGTK2_DEPENDENCIES += xlib_libXdamage
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBPNG),y)
|
||||
LIBGTK2_DEPENDENCIES += libpng
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --without-libpng
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_JPEG),y)
|
||||
LIBGTK2_DEPENDENCIES += jpeg
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --without-libjpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_TIFF),y)
|
||||
LIBGTK2_DEPENDENCIES += tiff
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --without-libtiff
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CUPS),y)
|
||||
LIBGTK2_CONF_OPTS += CUPS_CONFIG="$(STAGING_DIR)/usr/bin/cups-config"
|
||||
LIBGTK2_DEPENDENCIES += cups
|
||||
else
|
||||
LIBGTK2_CONF_OPTS += --disable-cups
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGTK2_DEMO),)
|
||||
define LIBGTK2_POST_INSTALL_TWEAKS
|
||||
rm -rf $(TARGET_DIR)/usr/share/gtk-2.0/demo $(TARGET_DIR)/usr/bin/gtk-demo
|
||||
endef
|
||||
|
||||
LIBGTK2_POST_INSTALL_TARGET_HOOKS += LIBGTK2_POST_INSTALL_TWEAKS
|
||||
endif
|
||||
|
||||
# We do not build a full version of libgtk2 for the host, because that
|
||||
# requires compiling Cairo, Pango, ATK and X.org for the
|
||||
# host. Therefore, we patch it to remove dependencies, and we hack the
|
||||
# build to only build gdk-pixbuf-from-source and
|
||||
# gtk-update-icon-cache, which are the host tools needed to build Gtk
|
||||
# for the target.
|
||||
|
||||
HOST_LIBGTK2_DEPENDENCIES = host-libglib2 host-libpng host-gdk-pixbuf
|
||||
HOST_LIBGTK2_CONF_OPTS = \
|
||||
--disable-static \
|
||||
--disable-glibtest \
|
||||
--without-libtiff \
|
||||
--without-libjpeg \
|
||||
--with-gdktarget=none \
|
||||
--disable-cups
|
||||
|
||||
define HOST_LIBGTK2_BUILD_CMDS
|
||||
$(HOST_MAKE_ENV) make -C $(@D)/gtk gtk-update-icon-cache
|
||||
endef
|
||||
|
||||
define HOST_LIBGTK2_INSTALL_CMDS
|
||||
cp $(@D)/gtk/gtk-update-icon-cache $(HOST_DIR)/bin
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
$(eval $(host-autotools-package))
|
||||
Reference in New Issue
Block a user