gdk-pixbuf.mk 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. ################################################################################
  2. #
  3. # gdk-pixbuf
  4. #
  5. ################################################################################
  6. GDK_PIXBUF_VERSION_MAJOR = 2.36
  7. GDK_PIXBUF_VERSION = $(GDK_PIXBUF_VERSION_MAJOR).12
  8. GDK_PIXBUF_SOURCE = gdk-pixbuf-$(GDK_PIXBUF_VERSION).tar.xz
  9. GDK_PIXBUF_SITE = http://ftp.gnome.org/pub/gnome/sources/gdk-pixbuf/$(GDK_PIXBUF_VERSION_MAJOR)
  10. GDK_PIXBUF_LICENSE = LGPL-2.0+
  11. GDK_PIXBUF_LICENSE_FILES = COPYING
  12. GDK_PIXBUF_INSTALL_STAGING = YES
  13. GDK_PIXBUF_DEPENDENCIES = \
  14. host-gdk-pixbuf host-libglib2 host-pkgconf \
  15. libglib2 $(if $(BR2_ENABLE_LOCALE),,libiconv)
  16. HOST_GDK_PIXBUF_DEPENDENCIES = host-libpng host-pkgconf host-libglib2
  17. GDK_PIXBUF_CONF_ENV = \
  18. ac_cv_path_GLIB_GENMARSHAL=$(LIBGLIB2_HOST_BINARY) \
  19. gio_can_sniff=no
  20. HOST_GDK_PIXBUF_CONF_ENV = \
  21. gio_can_sniff=no
  22. GDK_PIXBUF_CONF_OPTS = --disable-glibtest
  23. HOST_GDK_PIXBUF_CONF_OPTS = --disable-introspection
  24. ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
  25. GDK_PIXBUF_CONF_OPTS += --enable-introspection
  26. GDK_PIXBUF_DEPENDENCIES += gobject-introspection
  27. else
  28. GDK_PIXBUF_CONF_OPTS += --disable-introspection
  29. endif
  30. ifneq ($(BR2_PACKAGE_LIBPNG),y)
  31. GDK_PIXBUF_CONF_OPTS += --without-libpng
  32. else
  33. GDK_PIXBUF_DEPENDENCIES += libpng
  34. endif
  35. ifneq ($(BR2_PACKAGE_JPEG),y)
  36. HOST_GDK_PIXBUF_CONF_OPTS += --without-libjpeg
  37. GDK_PIXBUF_CONF_OPTS += --without-libjpeg
  38. else
  39. GDK_PIXBUF_DEPENDENCIES += jpeg
  40. HOST_GDK_PIXBUF_DEPENDENCIES += host-libjpeg
  41. endif
  42. ifneq ($(BR2_PACKAGE_TIFF),y)
  43. GDK_PIXBUF_CONF_OPTS += --without-libtiff
  44. HOST_GDK_PIXBUF_CONF_OPTS += --without-libtiff
  45. else
  46. GDK_PIXBUF_DEPENDENCIES += tiff
  47. GDK_PIXBUF_CONF_ENV += \
  48. LIBS="`$(PKG_CONFIG_HOST_BINARY) --libs libtiff-4`"
  49. HOST_GDK_PIXBUF_DEPENDENCIES += host-tiff
  50. endif
  51. ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
  52. GDK_PIXBUF_CONF_OPTS += --with-x11
  53. GDK_PIXBUF_DEPENDENCIES += xlib_libX11
  54. endif
  55. # gdk-pixbuf requires the loaders.cache file populated to work properly
  56. # Rather than doing so at runtime, since the fs can be read-only, do so
  57. # here after building and installing to target.
  58. # And since the cache file will contain absolute host directory names we
  59. # need to sanitize (strip) them.
  60. ifeq ($(BR2_STATIC_LIBS),)
  61. define GDK_PIXBUF_UPDATE_CACHE
  62. GDK_PIXBUF_MODULEDIR=$(HOST_DIR)/lib/gdk-pixbuf-2.0/2.10.0/loaders \
  63. $(HOST_DIR)/bin/gdk-pixbuf-query-loaders \
  64. > $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
  65. $(SED) "s,$(HOST_DIR)/lib,/usr/lib,g" \
  66. $(TARGET_DIR)/usr/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache
  67. endef
  68. GDK_PIXBUF_POST_INSTALL_TARGET_HOOKS += GDK_PIXBUF_UPDATE_CACHE
  69. endif
  70. # Tests don't build correctly with uClibc
  71. define GDK_PIXBUF_DISABLE_TESTS
  72. $(SED) 's/ tests//' $(@D)/Makefile.in
  73. endef
  74. GDK_PIXBUF_POST_PATCH_HOOKS += GDK_PIXBUF_DISABLE_TESTS
  75. # Target gdk-pixbuf needs loaders.cache populated to build for the
  76. # thumbnailer. Use the host-built since it matches the target options
  77. # regarding mime types (which is the used information).
  78. define GDK_PIXBUF_COPY_LOADERS_CACHE
  79. cp -f $(HOST_DIR)/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache \
  80. $(@D)/gdk-pixbuf
  81. endef
  82. GDK_PIXBUF_PRE_BUILD_HOOKS += GDK_PIXBUF_COPY_LOADERS_CACHE
  83. $(eval $(autotools-package))
  84. $(eval $(host-autotools-package))