Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${ADK_TOPDIR}/rules.mk
  4. PKG_NAME:= cairo
  5. PKG_VERSION:= 1.12.16
  6. PKG_RELEASE:= 4
  7. PKG_HASH:= 2505959eb3f1de3e1841023b61585bfd35684b9733c7b6a3643f4f4cbde6d846
  8. PKG_DESCR:= cairo graphics library
  9. PKG_SECTION:= libs/image
  10. PKG_DEPENDS:= fontconfig libfreetype libx11 pixman
  11. PKG_DEPENDS+= libxrender
  12. PKG_BUILDDEP:= pixman freetype fontconfig libX11 libXrender glib
  13. PKG_BUILDDEP+= libXext
  14. HOST_BUILDDEP:= libpng-host pixman-host freetype-host fontconfig-host
  15. PKG_URL:= http://cairographics.org/
  16. PKG_SITES:= http://cairographics.org/releases/
  17. PKG_OPTS:= dev
  18. PKG_FLAVOURS_CAIRO:= WITH_PS WITH_PDF WITH_XML WITH_PNG WITH_TEE WITH_SVG WITH_XRENDER
  19. PKGFD_WITH_PS:= postscript support
  20. PKGFD_WITH_PDF:= pdf support
  21. PKGFD_WITH_XML:= xml support
  22. PKGFD_WITH_PNG:= png support
  23. PKGFB_WITH_PNG:= libpng
  24. PKGFS_WITH_PNG:= libpng
  25. PKGFD_WITH_TEE:= tee support
  26. PKGFD_WITH_SVG:= svg support
  27. PKGFD_WITH_XRENDER:= xorg xrender support
  28. include ${ADK_TOPDIR}/mk/host.mk
  29. include ${ADK_TOPDIR}/mk/package.mk
  30. $(eval $(call HOST_template,CAIRO,cairo,${PKG_VERSION}-${PKG_RELEASE}))
  31. $(eval $(call PKG_template,CAIRO,cairo,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
  32. HOST_CONFIGURE_ARGS+= --enable-ft=yes \
  33. --enable-png=yes \
  34. --enable-fc=yes \
  35. --enable-tee=no \
  36. --enable-xlib=no \
  37. --enable-pdf=no \
  38. --enable-quartz=no \
  39. --disable-test-surfaces \
  40. --disable-full-testing
  41. ifeq (,$(filter arm,$(ADK_TARGET_ARCH)))
  42. TARGET_CFLAGS:= $(filter-out -Os,$(TARGET_CFLAGS))
  43. endif
  44. ifneq ($(ADK_PACKAGE_CAIRO_WITH_XRENDER),)
  45. CONFIGURE_ARGS+= --enable-xlib-xrender=yes
  46. else
  47. CONFIGURE_ARGS+= --enable-xlib-xrender=no
  48. endif
  49. ifneq ($(ADK_PACKAGE_CAIRO_WITH_SVG),)
  50. CONFIGURE_ARGS+= --enable-svg=yes \
  51. --enable-png=yes
  52. else
  53. CONFIGURE_ARGS+= --enable-svg=no
  54. endif
  55. ifneq ($(ADK_PACKAGE_CAIRO_WITH_PDF),)
  56. CONFIGURE_ARGS+= --enable-pdf=yes
  57. else
  58. CONFIGURE_ARGS+= --enable-pdf=no
  59. endif
  60. ifneq ($(ADK_PACKAGE_CAIRO_WITH_PS),)
  61. CONFIGURE_ARGS+= --enable-ps=yes
  62. else
  63. CONFIGURE_ARGS+= --enable-ps=no
  64. endif
  65. ifneq ($(ADK_PACKAGE_CAIRO_WITH_PNG)$(ADK_PACKAGE_CAIRO_WITH_SVG),)
  66. CONFIGURE_ARGS+= --enable-png=yes
  67. else
  68. CONFIGURE_ARGS+= --enable-png=no
  69. endif
  70. ifneq ($(ADK_PACKAGE_CAIRO_WITH_XML),)
  71. CONFIGURE_ARGS+= --enable-xml=yes
  72. else
  73. CONFIGURE_ARGS+= --enable-xml=no
  74. endif
  75. ifneq ($(ADK_PACKAGE_CAIRO_WITH_TEE),)
  76. CONFIGURE_ARGS+= --enable-tee=yes
  77. else
  78. CONFIGURE_ARGS+= --enable-tee=no
  79. endif
  80. CONFIGURE_ARGS+= --enable-ft=yes \
  81. --enable-fc=yes \
  82. --enable-xlib=yes \
  83. --enable-quartz=no \
  84. --disable-test-surfaces \
  85. --disable-full-testing
  86. cairo-install:
  87. ${INSTALL_DIR} ${IDIR_CAIRO}/usr/lib/cairo
  88. ${CP} ${WRKINST}/usr/lib/libcairo*.so* ${IDIR_CAIRO}/usr/lib
  89. ${CP} ${WRKINST}/usr/lib/cairo/*.so* ${IDIR_CAIRO}/usr/lib/cairo
  90. include ${ADK_TOPDIR}/mk/host-bottom.mk
  91. include ${ADK_TOPDIR}/mk/pkg-bottom.mk