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.

93 lines
2.7 KiB

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