libvips.mk 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. ################################################################################
  2. #
  3. # libvips
  4. #
  5. ################################################################################
  6. LIBVIPS_VERSION = 8.17.2
  7. LIBVIPS_SOURCE = vips-$(LIBVIPS_VERSION).tar.xz
  8. LIBVIPS_SITE = https://github.com/libvips/libvips/releases/download/v$(LIBVIPS_VERSION)
  9. LIBVIPS_LICENSE = LGPL-2.1+
  10. LIBVIPS_LICENSE_FILES = LICENSE
  11. LIBVIPS_CPE_ID_VENDOR = libvips
  12. # Sparc64 compile fails, for all optimization levels except -O0. To
  13. # fix the problem, use -O0 with no optimization instead. Bug reported
  14. # upstream at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69038.
  15. ifeq ($(BR2_sparc64),y)
  16. LIBVIPS_CXXFLAGS += -O0
  17. endif
  18. LIBVIPS_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) $(LIBVIPS_CXXFLAGS)" \
  19. LIBS=$(TARGET_NLS_LIBS)
  20. LIBVIPS_CONF_OPTS = \
  21. -Dopenexr=disabled \
  22. -Dopenslide=disabled \
  23. -Dcfitsio=disabled \
  24. -Dpangocairo=disabled
  25. LIBVIPS_INSTALL_STAGING = YES
  26. LIBVIPS_DEPENDENCIES = \
  27. host-pkgconf expat libglib2 \
  28. $(TARGET_NLS_DEPENDENCIES)
  29. ifeq ($(BR2_PACKAGE_GOBJECT_INTROSPECTION),y)
  30. LIBVIPS_CONF_OPTS += -Dintrospection=enabled
  31. LIBVIPS_DEPENDENCIES += gobject-introspection
  32. else
  33. LIBVIPS_CONF_OPTS += -Dintrospection=disabled
  34. endif
  35. ifeq ($(BR2_PACKAGE_IMAGEMAGICK),y)
  36. LIBVIPS_CONF_OPTS += \
  37. -Dmagick=enabled \
  38. -Dmagick-package=MagickCore
  39. LIBVIPS_DEPENDENCIES += imagemagick
  40. else ifeq ($(BR2_PACKAGE_GRAPHICSMAGICK),y)
  41. LIBVIPS_CONF_OPTS += \
  42. -Dmagick=enabled \
  43. -Dmagick-package=GraphicsMagick
  44. LIBVIPS_DEPENDENCIES += graphicsmagick
  45. else
  46. LIBVIPS_CONF_OPTS += -Dmagick=disabled
  47. endif
  48. ifeq ($(BR2_PACKAGE_JPEG),y)
  49. LIBVIPS_CONF_OPTS += -Djpeg=enabled
  50. LIBVIPS_DEPENDENCIES += jpeg
  51. else
  52. LIBVIPS_CONF_OPTS += -Djpeg=disabled
  53. endif
  54. ifeq ($(BR2_PACKAGE_LCMS2),y)
  55. LIBVIPS_CONF_OPTS += -Dlcms=enabled
  56. LIBVIPS_DEPENDENCIES += lcms2
  57. else
  58. LIBVIPS_CONF_OPTS += -Dlcms=disabled
  59. endif
  60. ifeq ($(BR2_PACKAGE_LIBPNG),y)
  61. LIBVIPS_CONF_OPTS += -Dpng=enabled
  62. LIBVIPS_DEPENDENCIES += libpng
  63. else
  64. LIBVIPS_CONF_OPTS += -Dpng=disabled
  65. endif
  66. ifeq ($(BR2_PACKAGE_LIBRSVG),y)
  67. LIBVIPS_CONF_OPTS += -Drsvg=enabled
  68. LIBVIPS_DEPENDENCIES += librsvg
  69. else
  70. LIBVIPS_CONF_OPTS += -Drsvg=disabled
  71. endif
  72. ifeq ($(BR2_PACKAGE_MATIO),y)
  73. LIBVIPS_CONF_OPTS += -Dmatio=enabled
  74. LIBVIPS_DEPENDENCIES += matio
  75. else
  76. LIBVIPS_CONF_OPTS += -Dmatio=disabled
  77. endif
  78. ifeq ($(BR2_PACKAGE_ORC),y)
  79. LIBVIPS_CONF_OPTS += -Dorc=enabled
  80. LIBVIPS_DEPENDENCIES += orc
  81. else
  82. LIBVIPS_CONF_OPTS += -Dorc=disabled
  83. endif
  84. ifeq ($(BR2_PACKAGE_POPPLER),y)
  85. LIBVIPS_CONF_OPTS += -Dpoppler=enabled
  86. LIBVIPS_DEPENDENCIES += poppler
  87. else
  88. LIBVIPS_CONF_OPTS += -Dpoppler=disabled
  89. endif
  90. ifeq ($(BR2_PACKAGE_TIFF),y)
  91. LIBVIPS_CONF_OPTS += -Dtiff=enabled
  92. LIBVIPS_DEPENDENCIES += tiff
  93. else
  94. LIBVIPS_CONF_OPTS += -Dtiff=disabled
  95. endif
  96. ifeq ($(BR2_PACKAGE_FFTW_DOUBLE),y)
  97. LIBVIPS_CONF_OPTS += -Dfftw=enabled
  98. LIBVIPS_DEPENDENCIES += fftw-double
  99. else
  100. LIBVIPS_CONF_OPTS += -Dfftw=disabled
  101. endif
  102. ifeq ($(BR2_PACKAGE_LIBEXIF),y)
  103. LIBVIPS_CONF_OPTS += -Dexif=enabled
  104. LIBVIPS_DEPENDENCIES += libexif
  105. else
  106. LIBVIPS_CONF_OPTS += -Dexif=disabled
  107. endif
  108. ifeq ($(BR2_PACKAGE_LIBHEIF),y)
  109. LIBVIPS_CONF_OPTS += -Dheif=enabled
  110. LIBVIPS_DEPENDENCIES += libheif
  111. else
  112. LIBVIPS_CONF_OPTS += -Dheif=disabled
  113. endif
  114. ifeq ($(BR2_PACKAGE_WEBP_DEMUX)$(BR2_PACKAGE_WEBP_MUX),yy)
  115. LIBVIPS_CONF_OPTS += -Dwebp=enabled
  116. LIBVIPS_DEPENDENCIES += webp
  117. else
  118. LIBVIPS_CONF_OPTS += -Dwebp=disabled
  119. endif
  120. ifeq ($(BR2_PACKAGE_ZLIB),y)
  121. LIBVIPS_CONF_OPTS += -Dzlib=enabled
  122. LIBVIPS_DEPENDENCIES += zlib
  123. else
  124. LIBVIPS_CONF_OPTS += -Dzlib=disabled
  125. endif
  126. $(eval $(meson-package))