Browse Source

libjpeg: import from oldpackages, add myself as maintainer, add fix for CVE-2013-6629, change PKG_LICENSE to SPDX identifier

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
lilik-openwrt-22.03
Jo-Philipp Wich 11 years ago
parent
commit
6a87c8d6a2
4 changed files with 2022 additions and 0 deletions
  1. +100
    -0
      libs/libjpeg/Makefile
  2. +11
    -0
      libs/libjpeg/patches/001-allow-ccache.patch
  3. +1896
    -0
      libs/libjpeg/patches/200-crop.patch
  4. +15
    -0
      libs/libjpeg/patches/300-CVE-2013-6629.patch

+ 100
- 0
libs/libjpeg/Makefile View File

@ -0,0 +1,100 @@
#
# 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:=6b
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)src.v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/libjpeg
PKG_MD5SUM:=dbd5f3b47ed13132f04c685d608a7547
PKG_LICENSE:=IJG
PKG_LICENSE_FILES:=README
PKG_BUILD_PARALLEL:=1
PKG_BUILD_DEPENDS:=libltdl
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
DEPENDS:=+libjpeg
TITLE+= manipulation tools
endef
TARGET_CFLAGS += $(FPIC)
CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
HOST_CONFIGURE_ARGS += \
--enable-shared \
--enable-static \
define Build/Prepare
$(call Build/Prepare/Default)
(cd $(PKG_BUILD_DIR); \
rm -f ltconfig ltmain.sh libtool; \
ln -s `which true` ltconfig; \
ln -s $(STAGING_DIR)/host/bin/libtool libtool; \
)
endef
define Build/Compile
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/{include,lib,bin,man/man1}
+$(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) \
prefix="$(PKG_INSTALL_DIR)/usr" \
exec_prefix="$(PKG_INSTALL_DIR)/usr" \
install install-headers install-lib
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/
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))

+ 11
- 0
libs/libjpeg/patches/001-allow-ccache.patch View File

@ -0,0 +1,11 @@
--- a/makefile.cfg
+++ b/makefile.cfg
@@ -168,7 +168,7 @@ libjpeg.a: @A2K_DEPS@ $(LIBOBJECTS)
# with libtool:
libjpeg.la: @A2K_DEPS@ $(LIBOBJECTS)
- $(LIBTOOL) --mode=link $(CC) -o libjpeg.la $(LIBOBJECTS) \
+ $(LIBTOOL) --mode=link "$(CC)" -o libjpeg.la $(LIBOBJECTS) \
-rpath $(libdir) -version-info $(JPEG_LIB_VERSION)
# sample programs:

+ 1896
- 0
libs/libjpeg/patches/200-crop.patch
File diff suppressed because it is too large
View File


+ 15
- 0
libs/libjpeg/patches/300-CVE-2013-6629.patch View File

@ -0,0 +1,15 @@
--- a/jdmarker.c
+++ b/jdmarker.c
@@ -342,6 +342,12 @@ get_sos (j_decompress_ptr cinfo)
TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+ /* This CSi (cc) should differ from the previous CSi */
+ for (ci = 0; ci < i; ci++) {
+ if (cinfo->cur_comp_info[ci] == compptr)
+ ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+ }
}
/* Collect the additional scan parameters Ss, Se, Ah/Al. */

Loading…
Cancel
Save