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.

57 lines
1.7 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.80.0
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://www.leptonica.org/source/
  13. PKG_HASH:=ec9c46c2aefbb960fb6a6b7f800fe39de48343437b6ce08e30a8d9688ed14ba4
  14. PKG_MAINTAINER:=Valentín Kivachuk <vk18496@gmail.com>
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_LICENSE_FILES:=leptonica-license.txt
  17. CMAKE_BINARY_SUBDIR:=openwrt-build
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../../devel/ninja/ninja-cmake.mk
  20. define Package/libleptonica
  21. SECTION:=libs
  22. CATEGORY:=Libraries
  23. TITLE:=A library for efficient image processing and image analysis operations
  24. URL:=http://www.leptonica.org/
  25. DEPENDS:=+giflib +libjpeg +libpng +libtiff +libwebp +zlib
  26. endef
  27. CMAKE_OPTIONS += \
  28. -DBUILD_SHARED_LIBS=ON \
  29. -DWEBPMUX_INCLUDE_DIR=$(STAGING_DIR)/usr/include
  30. TARGET_CFLAGS:=$(filter-out -O%,$(TARGET_CFLAGS)) -O3
  31. define Build/InstallDev
  32. $(INSTALL_DIR) $(1)/usr/include/leptonica
  33. $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica/*.h $(1)/usr/include/leptonica/
  34. $(INSTALL_DIR) $(1)/usr/lib
  35. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libleptonica.so* $(1)/usr/lib/
  36. $(INSTALL_DIR) $(1)/usr/lib/cmake
  37. $(CP) $(PKG_INSTALL_DIR)/usr/cmake/*.cmake $(1)/usr/lib/cmake/
  38. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lept.pc $(1)/usr/lib/pkgconfig/
  40. endef
  41. define Package/libleptonica/install
  42. $(INSTALL_DIR) $(1)/usr/lib
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libleptonica.so.* $(1)/usr/lib/
  44. endef
  45. $(eval $(call BuildPackage,libleptonica))