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.

53 lines
1.5 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:=2
  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. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.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. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
  30. define Build/InstallDev
  31. $(INSTALL_DIR) $(1)/usr/include
  32. $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica $(1)/usr/include/
  33. $(INSTALL_DIR) $(1)/usr/lib
  34. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.{a,so*} $(1)/usr/lib/
  35. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lept.pc $(1)/usr/lib/pkgconfig/
  37. endef
  38. define Package/libleptonica/install
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.so.* $(1)/usr/lib/
  41. endef
  42. $(eval $(call BuildPackage,libleptonica))