Browse Source

Merge pull request #11017 from neheb/jpeg-turbo

libjpeg-turbo: Add new package
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
020ac4f500
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 94 additions and 93 deletions
  1. +94
    -0
      libs/libjpeg-turbo/Makefile
  2. +0
    -93
      libs/libjpeg/Makefile

+ 94
- 0
libs/libjpeg-turbo/Makefile View File

@ -0,0 +1,94 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libjpeg-turbo
PKG_VERSION:=2.0.5
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/$(PKG_NAME)
PKG_HASH:=16f8f6f2715b3a38ab562a84357c793dd56ae9899ce130563c72cd93d8357b5d
PKG_MAINTAINER:=Rosen Penev <rosenp@gmail.com>
PKG_LICENSE:=BSD-3-Clause IJG zlib
PKG_LICENSE_FILES:=LICENSE.md
PKG_USE_MIPS16:=0 #Allows ASM compilation for speed.
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
define Package/libjpeg-turbo/Default
TITLE:=libjpeg-turbo
URL:=https://www.libjpeg-turbo.org/
endef
define Package/libjpeg-turbo
$(call Package/libjpeg-turbo/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= runtime library
PROVIDES:=libjpeg
endef
define Package/libjpeg-turbo-utils
$(call Package/libjpeg-turbo/Default)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Image Manipulation
DEPENDS:=+libjpeg-turbo
TITLE+= manipulation tools
PROVIDES:=jpeg-tools
endef
define Package/libjpeg-turbo/description
libjpeg-turbo is a speed focused fork of libjpeg.
endef
define Package/libjpeg-turbo-utils/description
These are the JPEG utilities that come with libjpeg-turbo.
endef
CMAKE_OPTIONS += \
-DENABLE_SHARED=ON \
-DENABLE_STATIC=OFF \
-DREQUIRE_SIMD=OFF \
-DWITH_12BIT=OFF \
-DWITH_ARITH_DEC=OFF \
-DWITH_ARITH_ENC=OFF \
-DWITH_JAVA=OFF \
-DWITH_JPEG7=OFF \
-DWITH_JPEG8=OFF \
-DWITH_MEM_SRCDST=OFF \
-DWITH_SIMD=O$(if $(findstring mips,$(CONFIG_ARCH)),FF,N) \
-DWITH_TURBOJPEG=OFF
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so* $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libjpeg.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libjpeg.pc
$(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/libturbojpeg.pc
$(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/libturbojpeg.pc
endef
define Package/libjpeg-turbo/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so* $(1)/usr/lib
endef
define Package/libjpeg-turbo-utils/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rdjpgcom $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wrjpgcom $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cjpeg $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/djpeg $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/jpegtran $(1)/usr/bin
endef
$(eval $(call BuildPackage,libjpeg-turbo))
$(eval $(call BuildPackage,libjpeg-turbo-utils))

+ 0
- 93
libs/libjpeg/Makefile View File

@ -1,93 +0,0 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=jpeg
PKG_VERSION:=9c
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.ijg.org/files
PKG_HASH:=650250979303a649e21f87b5ccd02672af1ea6954b911342ea491f351ceb7122
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=IJG
PKG_LICENSE_FILES:=README
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=libtool
include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/package.mk
define Package/jpeg/Default
TITLE:=The Independent JPEG Group's JPEG
URL:=http://www.ijg.org/
endef
define Package/libjpeg
$(call Package/jpeg/Default)
SECTION:=libs
CATEGORY:=Libraries
TITLE+= runtime library
endef
define Package/jpeg-tools
$(call Package/jpeg/Default)
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Image Manipulation
DEPENDS:=+libjpeg
TITLE+= manipulation tools
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
HOST_CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
define Build/Compile
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
LIBTOOL="./libtool --tag=CC" \
prefix="$(PKG_INSTALL_DIR)/usr" \
exec_prefix="$(PKG_INSTALL_DIR)/usr" \
all
$(MAKE) -C $(PKG_BUILD_DIR) \
DESTDIR="$(PKG_INSTALL_DIR)" \
install
endef
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include
$(CP) $(PKG_INSTALL_DIR)/usr/include/jpeglib.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/jpegint.h $(1)/usr/include/
$(CP) $(PKG_INSTALL_DIR)/usr/include/j{config,error,morecfg}.h $(1)/usr/include/
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.{a,so*} $(1)/usr/lib/
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libjpeg.pc $(1)/usr/lib/pkgconfig/
endef
define Package/libjpeg/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libjpeg.so.* $(1)/usr/lib/
endef
define Package/jpeg-tools/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/*jpeg* $(1)/usr/bin/
endef
$(eval $(call HostBuild))
$(eval $(call BuildPackage,libjpeg))
$(eval $(call BuildPackage,jpeg-tools))

Loading…
Cancel
Save