gutenprint.mk 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. ################################################################################
  2. #
  3. # gutenprint
  4. #
  5. ################################################################################
  6. GUTENPRINT_VERSION_MAJOR = 5.2
  7. GUTENPRINT_VERSION = $(GUTENPRINT_VERSION_MAJOR).14
  8. GUTENPRINT_SITE = http://downloads.sourceforge.net/project/gimp-print/gutenprint-$(GUTENPRINT_VERSION_MAJOR)/$(GUTENPRINT_VERSION)
  9. GUTENPRINT_SOURCE = gutenprint-$(GUTENPRINT_VERSION).tar.bz2
  10. GUTENPRINT_LICENSE = GPL-2.0+
  11. GUTENPRINT_LICENSE_FILES = COPYING
  12. # Needed, as we touch Makefile.am
  13. GUTENPRINT_AUTORECONF = YES
  14. # Needed by autoreconf
  15. define GUTENPRINT_CREATE_M4_DIR
  16. mkdir -p $(@D)/m4local
  17. endef
  18. GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR
  19. HOST_GUTENPRINT_POST_PATCH_HOOKS += GUTENPRINT_CREATE_M4_DIR
  20. GUTENPRINT_DEPENDENCIES = \
  21. cups host-pkgconf \
  22. $(if $(BR2_PACKAGE_LIBICONV),libiconv) \
  23. $(if $(BR2_PACKAGE_LIBUSB),libusb)
  24. # host-gutenprint is needed to generate XML as part of compilation
  25. # the program that generates the xml also links against libgutenprint
  26. # so we need to build both a host package and a target package
  27. GUTENPRINT_DEPENDENCIES += host-gutenprint
  28. GUTENPRINT_CONF_ENV = \
  29. ac_cv_path_CUPS_CONFIG=$(STAGING_DIR)/usr/bin/cups-config \
  30. ac_cv_path_IJS_CONFIG=""
  31. GUTENPRINT_CONF_OPTS = \
  32. --disable-libgutenprintui2 \
  33. --disable-samples \
  34. --without-doc \
  35. --without-gimp2 \
  36. --disable-escputil \
  37. --disable-test \
  38. --disable-testpattern \
  39. --with-cups="/usr" \
  40. --with-sysroot="$(STAGING_DIR)" \
  41. --disable-cups-ppds
  42. # USE_PREGEN_XMLI18N_TMP_H is added by our patch
  43. GUTENPRINT_MAKE_ENV = BR2_USE_PREGEN_XMLI18N_TMP_H=$(HOST_DIR)/include/xmli18n-tmp.h
  44. HOST_GUTENPRINT_DEPENDENCIES = host-pkgconf
  45. # The host-gutenprint shall create the required header
  46. HOST_GUTENPRINT_MAKE_ENV =
  47. # Even with --without-cups, gutenprint will still add the output of
  48. # cups-config --cflags / --ldflags to it's compiler/linker flags if
  49. # available on host.
  50. # Notice: Because of the configure logic, it needs to be set to the
  51. # empty string to to disable this, not just to /bin/false like elsewhere.
  52. HOST_GUTENPRINT_CONF_ENV = ac_cv_path_CUPS_CONFIG=''
  53. HOST_GUTENPRINT_CONF_OPTS = \
  54. --disable-libgutenprintui2 \
  55. --disable-samples \
  56. --without-gimp2 \
  57. --without-doc \
  58. --without-foomatic \
  59. --without-foomatic3 \
  60. --disable-escputil \
  61. --disable-test \
  62. --disable-testpattern \
  63. --without-cups
  64. define HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER
  65. cp $(@D)/src/xml/xmli18n-tmp.h $(HOST_DIR)/include
  66. endef
  67. HOST_GUTENPRINT_POST_BUILD_HOOKS += HOST_GUTENPRINT_POST_BUILD_INSTAL_TMP_HEADER
  68. define GUTENPRINT_POST_INSTALL_TARGET_FIXUP
  69. mkdir -p $(TARGET_DIR)/usr/share/gutenprint/5.2
  70. cp -rf $(HOST_DIR)/share/gutenprint/5.2/xml $(TARGET_DIR)/usr/share/gutenprint/5.2
  71. endef
  72. GUTENPRINT_POST_INSTALL_TARGET_HOOKS += GUTENPRINT_POST_INSTALL_TARGET_FIXUP
  73. $(eval $(autotools-package))
  74. $(eval $(host-autotools-package))