Skip to content

Commit

Permalink
Update pngquant (#6147)
Browse files Browse the repository at this point in the history
* update pngquant to v3.0.3 and libimagequant to v4.3.1
- add cross/pngquant3 built with rust
- keep pngquant v2 in cross/pngquant2
- add cross/libimagequant-source to be used by cross/pngquant3
- adjust build order in diyspk/image-optim

* tvheadend dependencies
- update tvheadend to build with openssl3
- add comments regarding the updated pngquant dependency

* tvheadend: move cross/pngquant to the top of the dependencies

* tvheadend: update libhdhomerun
- update libhdhomerun from 20230323 to 20231214
- define CROSS_COMPILE to avoid patching libhdhomerun Makefile

* tvheadend: update changelog
  • Loading branch information
hgy59 committed Jun 17, 2024
1 parent 3e78969 commit eecb557
Show file tree
Hide file tree
Showing 16 changed files with 133 additions and 48 deletions.
8 changes: 5 additions & 3 deletions cross/libhdhomerun/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = libhdhomerun
PKG_VERS = 20230323
PKG_VERS = 20231214
PKG_EXT = tgz
PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://download.silicondust.com/hdhomerun
Expand All @@ -8,14 +8,16 @@ PKG_DIR = $(PKG_NAME)
DEPENDS =

HOMEPAGE = https://www.silicondust.com/hdhomerun/
COMMENT = HDHomerun Library
LICENSE = GNU LGPL2.1, Feb 1999
COMMENT = HDHomerun Library
LICENSE = LGPL v2.1

CONFIGURE_TARGET = nop
INSTALL_TARGET = libhdhomerun_install

include ../../mk/spksrc.cross-cc.mk

COMPILE_MAKE_OPTIONS = CROSS_COMPILE=$(abspath $(CURDIR)/../../toolchain/syno-$(ARCH)-$(TCVERSION)/work/$(TC_TARGET)/bin/$(TC_PREFIX))

.PHONY: libhdhomerun_install
libhdhomerun_install:
@install -m 755 -d $(STAGING_INSTALL_PREFIX)/include/libhdhomerun
Expand Down
6 changes: 3 additions & 3 deletions cross/libhdhomerun/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libhdhomerun_20230323.tgz SHA1 59ef7cc9862ffa69672f9e699aec5e4ad4e12baa
libhdhomerun_20230323.tgz SHA256 4f599c4f774c7accfc78fe07a2d492f2352c7b5ed9aa03f39b74f39c937b96e6
libhdhomerun_20230323.tgz MD5 467ebf3f483a707a32bb41e54e0fc12a
libhdhomerun_20231214.tgz SHA1 de614eb70864ccfbccd7e49b40cd24882614a29f
libhdhomerun_20231214.tgz SHA256 552a102e8aa2abcc416090dec2f6f80da59f97f91f57968e9e9d7b3dc005dbaf
libhdhomerun_20231214.tgz MD5 2e6e56eb97f97ca9d30041b9427c513c
13 changes: 0 additions & 13 deletions cross/libhdhomerun/patches/libhdhomerun.patch

This file was deleted.

23 changes: 23 additions & 0 deletions cross/libimagequant-source/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
PKG_NAME = libimagequant
PKG_VERS = 4.3.1
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/ImageOptim/libimagequant/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = https://pngquant.org/lib/
COMMENT = Small, portable C library for high-quality conversion of RGBA images to 8-bit indexed-color (palette) images.
LICENSE = GPLv3

INSTALL_TARGET = nop

include ../../mk/spksrc.install-resources.mk

.PHONY: libimagequant_install
libimagequant_install:
@$(MSG) "Extract the sources only"
@mkdir -p "$(INSTALL_DIR)/$(INSTALL_PREFIX)/source/"
@tar -cf - -C $(EXTRACT_PATH) . | tar -xf - -C "$(INSTALL_DIR)/$(INSTALL_PREFIX)/source/"
Empty file.
3 changes: 3 additions & 0 deletions cross/libimagequant-source/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
libimagequant-4.3.1.tar.gz SHA1 f34d837a8872cc087ad59f448290e6db8e52de63
libimagequant-4.3.1.tar.gz SHA256 75020204491f14a8cdf4b857f6c5bab08b6b5f1736345412b296a253bc632bf6
libimagequant-4.3.1.tar.gz MD5 574538a72db9879dee9cbd7211c5d740
30 changes: 8 additions & 22 deletions cross/pngquant/Makefile
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
PKG_NAME = pngquant
PKG_VERS = 2.18.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/kornelski/pngquant/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
PKG_NAME = pngquant-main

DEPENDS = cross/libpng cross/libimagequant
OPTIONAL_DEPENDS = cross/pngquant3
OPTIONAL_DEPENDS += cross/pngquant2

HOMEPAGE = https://pngquant.org/
COMMENT = pngquant is a command-line utility and a library for lossy compression of PNG images.
LICENSE = GPLv3
include ../../mk/spksrc.main-depends.mk

GNU_CONFIGURE = 1
ADDITIONAL_CFLAGS = -O3
CONFIGURE_ARGS = --with-libimagequant

include ../../mk/spksrc.archs.mk

ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --enable-sse
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS) $(ARMv5_ARCHS)),$(ARCH))
# std=c11 not fully supported
DEPENDS = cross/pngquant2
else
CONFIGURE_ARGS += --disable-sse
DEPENDS = cross/pngquant3
endif

include ../../mk/spksrc.cross-cc.mk
27 changes: 27 additions & 0 deletions cross/pngquant2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PKG_NAME = pngquant
PKG_VERS = 2.18.0
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/kornelski/pngquant/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS = cross/libpng cross/libimagequant

HOMEPAGE = https://pngquant.org/
COMMENT = pngquant is a command-line utility and a library for lossy compression of PNG images.
LICENSE = GPLv3

GNU_CONFIGURE = 1
ADDITIONAL_CFLAGS = -O3
CONFIGURE_ARGS = --with-libimagequant

include ../../mk/spksrc.archs.mk

ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --enable-sse
else
CONFIGURE_ARGS += --disable-sse
endif

include ../../mk/spksrc.cross-cc.mk
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions cross/pngquant3/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PKG_NAME = pngquant
PKG_VERS = 3.0.3
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/kornelski/pngquant/archive
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

# seems to be the same bug as in former cross/bat (see #6052)
DEPENDS = cross/zlib-ng
# with zlib dependency, there is a linker error
#DEPENDS += cross/libpng
DEPENDS += cross/libimagequant-source

HOMEPAGE = https://pngquant.org/
COMMENT = pngquant is a command-line utility and a library for lossy compression of PNG images.
LICENSE = GPL

GNU_CONFIGURE = 1
ADDITIONAL_CFLAGS = -O3 -std=c11

PRE_COMPILE_TARGET = pngquant_pre_compile

include ../../mk/spksrc.cross-rust.mk

# The archive of pngquant source does not contain libimagequant.
# libimagequant is linked into pngquant source as git submodule.
# Instead of creating a pngquant source package that includes the submodule,
# we created a package cross/libimagequant-source that contains the source.
# To build pngquant, we just have to link the source of libimagequant
# into the pngquant source before building
LIBIMAGEQUANT_SOURCE_FOLDER = $(dir $(wildcard $(WORK_DIR)/libimagequant-*/))
SUBMODULE_FOLDER = $(WORK_DIR)/$(PKG_DIR)/lib

.PHONY: pngquant_pre_compile
pngquant_pre_compile:
@$(MSG) "Link libimagequant '$(LIBIMAGEQUANT_SOURCE_FOLDER)' into folder '$(SUBMODULE_FOLDER)'"
@rm -rf $(SUBMODULE_FOLDER)
@ln -sf $(LIBIMAGEQUANT_SOURCE_FOLDER) $(SUBMODULE_FOLDER)
1 change: 1 addition & 0 deletions cross/pngquant3/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin:bin/pngquant
3 changes: 3 additions & 0 deletions cross/pngquant3/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pngquant-3.0.3.tar.gz SHA1 4f814184067bbd51b7188129e33c555766ae6220
pngquant-3.0.3.tar.gz SHA256 ddd8889a9c269ba454d0c5e4f7167948d55d77c4570b23f671809fd3a68b6822
pngquant-3.0.3.tar.gz MD5 0c92f3f5c5ffb31ca490d7197aff94a0
13 changes: 10 additions & 3 deletions cross/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
PKG_NAME = tvheadend
PKG_VERS = 4.3
PKG_EXT = tar.gz
# no official release since v4.2.8 (Jan 12, 2019)
# git hash from April 8th 2023
PKG_GIT_HASH = f32c7c59a19a276648d7b068041738e4e8337638
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/tvheadend/tvheadend/archive
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH)

DEPENDS = cross/openssl cross/gnutls
# WARNING: pngquant will fail when built after cross/zlib (i.e. cross/libpng)
# with prebuilt ffmpeg this is not a problem
# without prebuilt ffmpeg the "DEPENDS += cross/ffmpeg*" must be defined below
DEPENDS = cross/pngquant

DEPENDS += cross/openssl3 cross/gnutls
DEPENDS += cross/uriparser cross/pcre2 cross/libiconv cross/fontconfig
DEPENDS += cross/libhdhomerun cross/libdvbcsa cross/dvb-apps cross/pngquant
DEPENDS += cross/libhdhomerun cross/libdvbcsa cross/dvb-apps

DEPENDS += cross/curl
# curl build needs additional configuration for gnutls and libssh2
export BUILD_CURL_WITH="gnutls libssh2 zstd"
Expand All @@ -21,7 +28,7 @@ UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)

HOMEPAGE = https://tvheadend.org/
COMMENT = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP and HDHomeRun as input sources. Tvheadend offers HTTP, HTSP and SAT IP streaming.
LICENSE = GPL v3
LICENSE = GPLv3

GNU_CONFIGURE = 1
PRE_CONFIGURE_TARGET = tvheadend_pre_configure
Expand Down
13 changes: 10 additions & 3 deletions diyspk/image-optim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@ SPK_NAME = image-optim
SPK_VERS = 1.0
SPK_REV = 1

DEPENDS = cross/jpegoptim cross/pngcrush cross/advancecomp cross/pngquant
# pngquant (pngquant3) must be built first
OPTIONAL_DEPENDS = cross/pngquant
include ../../mk/spksrc.archs.mk
ifneq ($(findstring $(ARCH), $(OLD_PPC_ARCHS)),$(ARCH))
DEPENDS = cross/pngquant
endif

DEPENDS += cross/jpegoptim cross/pngcrush cross/advancecomp

MAINTAINER = SynoCommunity
DESCRIPTION = Several utilities for image optimization \(jpegoptim, pngcrush, advancecomp\)
DESCRIPTION = Several utilities for image optimization \(pngquant, jpegoptim, pngcrush, advancecomp\)
DISPLAY_NAME = Image Optimizers
STARTABLE = no

LICENSE = GPLv3

SPK_COMMANDS = bin/jpegoptim bin/pngcrush bin/advmng bin/advpng bin/pngquant
SPK_COMMANDS = bin/pngquant bin/jpegoptim bin/pngcrush bin/advmng bin/advpng

include ../../mk/spksrc.spk.mk
2 changes: 1 addition & 1 deletion spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ DESCRIPTION = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD
DESCRIPTION_FRE = Tvheadend est un serveur de streaming et enregistreur TV pour Linux, FreeBSD et Android prenant en charge DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP et HDHomeRun comme sources d\'entrée. Tvheadend offre le streaming HTTP, HTSP et SAT IP.
DISPLAY_NAME = Tvheadend
STARTABLE = yes
CHANGELOG = "1. Update to latest git version f32c7c5 as of April 8th 2023<br/>2. Update FFMPEG 5.1.2<br/>3. Update libhdhomerun to version 20230323<br/>4. Migrate to using python 3.11"
CHANGELOG = "1. Update to latest git version f32c7c5 as of April 8th 2023<br/>2. Update FFMPEG 5.1.2<br/>3. Update libhdhomerun to version 20231214<br/>4. Migrate to using python 3.11 and openssl 3.<br/>5. Update pngquant to v3.0.3."
HOMEPAGE = https://tvheadend.org/
LICENSE = GPL v3

Expand Down

0 comments on commit eecb557

Please sign in to comment.