packages: add leptonica (used by upcoming tesseract package)
authorNicolas Thill <nico@openwrt.org>
Sun, 6 Nov 2011 18:15:27 +0000 (18:15 +0000)
committerNicolas Thill <nico@openwrt.org>
Sun, 6 Nov 2011 18:15:27 +0000 (18:15 +0000)
SVN-Revision: 28782

libs/leptonica/Makefile [new file with mode: 0644]

diff --git a/libs/leptonica/Makefile b/libs/leptonica/Makefile
new file mode 100644 (file)
index 0000000..8cf9b67
--- /dev/null
@@ -0,0 +1,47 @@
+#\r
+# Copyright (C) 2011 OpenWrt.org\r
+#\r
+# This is free software, licensed under the GNU General Public License v2.\r
+# See /LICENSE for more information.\r
+#\r
+\r
+include $(TOPDIR)/rules.mk\r
+\r
+PKG_NAME:=leptonica\r
+PKG_VERSION:=1.68\r
+PKG_RELEASE:=1\r
+\r
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz\r
+PKG_SOURCE_URL:=http://leptonica.googlecode.com/files/\r
+PKG_MD5SUM:=5cd7092f9ff2ca7e3f3e73bfcd556403\r
+\r
+PKG_FIXUP:=libtool\r
+PKG_INSTALL:=1\r
+\r
+include $(INCLUDE_DIR)/package.mk\r
+\r
+define Package/libleptonica\r
+  SECTION:=libs\r
+  CATEGORY:=Libraries\r
+  TITLE:=A library for efficient image processing and image analysis operations\r
+  URL:=http://leptonica.googlecode.com/\r
+  DEPENDS:=+giflib +libjpeg +libpng +libtiff +zlib\r
+endef\r
+\r
+TARGET_CFLAGS += $(FPIC)\r
+TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib\r
+\r
+define Build/InstallDev\r
+       $(INSTALL_DIR) $(1)/usr/include\r
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/leptonica $(1)/usr/include/\r
+       $(INSTALL_DIR) $(1)/usr/lib\r
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.{a,so*} $(1)/usr/lib/\r
+endef\r
+\r
+define Package/libleptonica/install\r
+       $(INSTALL_DIR) $(1)/usr/lib\r
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblept.so.* $(1)/usr/lib/\r
+endef\r
+\r
+$(eval $(call BuildPackage,libleptonica))\r
+