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.

94 lines
2.7 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libjpeg-turbo
  3. PKG_VERSION:=2.0.6
  4. PKG_RELEASE:=1
  5. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  6. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  7. PKG_HASH:=d74b92ac33b0e3657123ddcf6728788c90dc84dcb6a52013d758af3c4af481bb
  8. PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
  9. PKG_LICENSE:=BSD-3-Clause IJG zlib
  10. PKG_LICENSE_FILES:=LICENSE.md
  11. PKG_USE_MIPS16:=0 #Allows ASM compilation for speed.
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. include $(INCLUDE_DIR)/cmake.mk
  15. define Package/libjpeg-turbo/Default
  16. TITLE:=libjpeg-turbo
  17. URL:=https://www.libjpeg-turbo.org/
  18. endef
  19. define Package/libjpeg-turbo
  20. $(call Package/libjpeg-turbo/Default)
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE+= runtime library
  24. PROVIDES:=libjpeg
  25. endef
  26. define Package/libjpeg-turbo-utils
  27. $(call Package/libjpeg-turbo/Default)
  28. SECTION:=utils
  29. CATEGORY:=Utilities
  30. SUBMENU:=Image Manipulation
  31. DEPENDS:=+libjpeg-turbo
  32. TITLE+= manipulation tools
  33. PROVIDES:=jpeg-tools
  34. endef
  35. define Package/libjpeg-turbo/description
  36. libjpeg-turbo is a speed focused fork of libjpeg.
  37. endef
  38. define Package/libjpeg-turbo-utils/description
  39. These are the JPEG utilities that come with libjpeg-turbo.
  40. endef
  41. CMAKE_OPTIONS += \
  42. -DENABLE_SHARED=ON \
  43. -DENABLE_STATIC=OFF \
  44. -DREQUIRE_SIMD=OFF \
  45. -DWITH_12BIT=OFF \
  46. -DWITH_ARITH_DEC=OFF \
  47. -DWITH_ARITH_ENC=OFF \
  48. -DWITH_JAVA=OFF \
  49. -DWITH_JPEG7=OFF \
  50. -DWITH_JPEG8=OFF \
  51. -DWITH_MEM_SRCDST=OFF \
  52. -DWITH_SIMD=O$(if $(findstring mips,$(CONFIG_ARCH)),FF,N) \
  53. -DWITH_TURBOJPEG=OFF
  54. define Build/InstallDev
  55. $(INSTALL_DIR) $(1)/usr/include
  56. $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so* $(1)/usr/lib/
  59. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  60. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
  61. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libjpeg.pc
  62. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libjpeg.pc
  63. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libturbojpeg.pc
  64. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libturbojpeg.pc
  65. endef
  66. define Package/libjpeg-turbo/install
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so* $(1)/usr/lib
  69. endef
  70. define Package/libjpeg-turbo-utils/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdjpgcom $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wrjpgcom $(1)/usr/bin
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cjpeg $(1)/usr/bin
  75. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/djpeg $(1)/usr/bin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jpegtran $(1)/usr/bin
  77. endef
  78. $(eval $(call BuildPackage,libjpeg-turbo))
  79. $(eval $(call BuildPackage,libjpeg-turbo-utils))