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.

54 lines
1.6 KiB

  1. #
  2. # Copyright (C) 2019 Valentín Kivachuk <vk18496@gmail.com>
  3. #
  4. # This is free software, licensed under the GNU General Public License v3.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=leptonica
  9. PKG_VERSION:=1.78.0
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.leptonica.org/source/
  13. PKG_HASH:=e2ed2e81e7a22ddf45d2c05f0bc8b9ae7450545d995bfe28517ba408d14a5a88
  14. PKG_MAINTAINER:=Valentín Kivachuk <vk18496@gmail.com>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILES:=leptonica-license.txt
  17. PKG_BUILD_PARALLEL:=1
  18. CMAKE_BINARY_SUBDIR:=openwrt-build
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/libleptonica
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A library for efficient image processing and image analysis operations
  25. URL:=http://www.leptonica.org/
  26. DEPENDS:=+giflib +libjpeg +libpng +libtiff +libwebp +zlib
  27. endef
  28. TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -O3
  29. define Build/InstallDev
  30. $(INSTALL_DIR) $(1)/usr/include/leptonica
  31. $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica/*.h $(1)/usr/include/leptonica/
  32. $(INSTALL_DIR) $(1)/usr/lib
  33. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libleptonica.so* $(1)/usr/lib/
  34. $(INSTALL_DIR) $(1)/usr/lib/cmake
  35. $(CP) $(PKG_INSTALL_DIR)/usr/cmake/*.cmake $(1)/usr/lib/cmake/
  36. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  37. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lept.pc $(1)/usr/lib/pkgconfig/
  38. endef
  39. define Package/libleptonica/install
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libleptonica.so.* $(1)/usr/lib/
  42. endef
  43. $(eval $(call BuildPackage,libleptonica))