You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

107 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2006-2018 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tiff
  9. PKG_VERSION:=4.2.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://download.osgeo.org/libtiff
  13. PKG_HASH:=eb0484e568ead8fa23b513e9b0041df7e327f4ee2d22db5a533929dfc19633cb
  14. PKG_MAINTAINER:=Jiri Slachta <jiri@slachta.eu>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_LICENSE_FILES:=COPYRIGHT
  17. PKG_CPE_ID:=cpe:/a:libtiff:libtiff
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_CONFIG_DEPENDS:=CONFIG_PACKAGE_libtiffxx
  20. include $(INCLUDE_DIR)/uclibc++.mk
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/cmake.mk
  23. define Package/tiff/Default
  24. TITLE:=TIFF
  25. URL:=http://simplesystems.org/libtiff/
  26. endef
  27. define Package/libtiff
  28. $(call Package/tiff/Default)
  29. SECTION:=libs
  30. CATEGORY:=Libraries
  31. TITLE+= library
  32. DEPENDS:=+zlib +libjpeg
  33. ABI_VERSION:=5
  34. endef
  35. define Package/libtiffxx
  36. $(call Package/tiff/Default)
  37. SECTION:=libs
  38. CATEGORY:=Libraries
  39. TITLE+= library(c++ bindings)
  40. DEPENDS:=+libtiff $(CXX_DEPENDS)
  41. ABI_VERSION:=5
  42. endef
  43. define Package/tiff-utils
  44. $(call Package/tiff/Default)
  45. SECTION:=utils
  46. CATEGORY:=Utilities
  47. SUBMENU:=Image Manipulation
  48. TITLE+= utilities
  49. DEPENDS:=+libtiff
  50. endef
  51. CMAKE_OPTIONS += \
  52. -Dld-version-script=OFF \
  53. -Dccitt=ON \
  54. -Dpackbits=ON \
  55. -Dlzw=ON \
  56. -Dthunder=ON \
  57. -Dnext=ON \
  58. -Dlogluv=ON \
  59. -Dmdi=ON \
  60. -Dzlib=ON \
  61. -Dpixarlog=ON \
  62. -Djpeg=ON \
  63. -Dold-jpeg=OFF \
  64. -Djbig=OFF \
  65. -Dlzma=OFF \
  66. -Dzstd=OFF \
  67. -Dwebp=OFF \
  68. -Djpeg12=OFF \
  69. -Dcxx=O$(if $(CONFIG_PACKAGE_libtiffxx),N,FF)
  70. TARGET_CFLAGS += $(TARGET_CPPFLAGS)
  71. define Build/InstallDev
  72. $(call Build/InstallDev/cmake,$(1))
  73. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc
  74. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libtiff-4.pc
  75. endef
  76. define Package/libtiff/install
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiff.so.$(ABI_VERSION)* $(1)/usr/lib
  79. endef
  80. define Package/libtiffxx/install
  81. $(INSTALL_DIR) $(1)/usr/lib
  82. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libtiffxx.so.$(ABI_VERSION)* $(1)/usr/lib/
  83. endef
  84. define Package/tiff-utils/install
  85. $(INSTALL_DIR) $(1)/usr/bin
  86. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  87. endef
  88. $(eval $(call BuildPackage,libtiff))
  89. $(eval $(call BuildPackage,libtiffxx))
  90. $(eval $(call BuildPackage,tiff-utils))