libjpeg-turbo: add package
authorFlorian Fainelli <florian@openwrt.org>
Sat, 8 Dec 2012 17:06:01 +0000 (17:06 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sat, 8 Dec 2012 17:06:01 +0000 (17:06 +0000)
Libjpeg-turbo is a fork of jpeg-6b, which includes MMX, SSE and NEON
acceleration and other performance enhancements. It is meant to be
ABI/API compatible with the Independent JPEG Group's (IJG) jpeg
implementation. Since its initial release, it also emulates jpeg 7 or
8, and has been adopted as the system jpeg library of Fedora, and an
option in Gentoo.

The SIMD acceleration provides a 2-4x speedup. On non-SIMD machines
the enhancements provides up to a 25% improvement.

Signed-off-by: Ian Leonard <antonlacon@gmail.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
SVN-Revision: 34580

libs/libjpeg-turbo/Makefile [new file with mode: 0644]

diff --git a/libs/libjpeg-turbo/Makefile b/libs/libjpeg-turbo/Makefile
new file mode 100644 (file)
index 0000000..cbe7b00
--- /dev/null
@@ -0,0 +1,82 @@
+# 
+# Copyright (C) 20011 OpenWrt.org
+#
+# This is free software, licensed under the wxWindows Library Licence, Version 3.1.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libjpeg-turbo
+PKG_VERSION:=1.1.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/libjpeg-turbo
+PKG_MD5SUM:=03b9c1406c7bfdc204313c2917ce6962
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libjpeg-turbo/Default
+  TITLE:=Fork of libjpeg with performance improvements
+  URL:=http://libjpeg-turbo.virtualgl.org/
+endef
+
+define Package/libjpeg-turbo
+  $(call Package/libjpeg-turbo/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= runtime library
+endef
+
+define Package/jpeg-tools
+  $(call Package/libjpeg-turbo/Default)
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libjpeg-turbo
+  TITLE+= manipulation tools
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+       --enable-shared \
+       --enable-static \
+       --with-jpeg8 \
+       --without-simd \
+
+#
+# libjpegturbo.{a,so} provides the TurboJPEG/OSS interface. 
+# No known use in OpenWRT at this time. 14/11/11
+#
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) $(PKG_BUILD_DIR)/jpeglib.h $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
+       $(CP) $(PKG_BUILD_DIR)/j{config,error,morecfg}.h $(1)/usr/include/
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libjpeg.{a,so*} $(1)/usr/lib/
+#      $(CP) $(PKG_BUILD_DIR)/.libs/libturbojpeg.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/libjpeg-turbo/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_BUILD_DIR)/.libs/libjpeg.{a,so*} $(1)/usr/lib/
+#      $(CP) $(PKG_BUILD_DIR)/.libs/libturbojpeg.{a,so*} $(1)/usr/lib/
+endef
+
+define Package/jpeg-tools/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{c,d}jpeg $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jpeg{tran,gut} $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{rd,wr}jpgcom $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/jpgtest $(1)/usr/bin/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libjpeg-turbo))
+$(eval $(call BuildPackage,jpeg-tools))