Skip to content

Commit

Permalink
update libheif to 1.19.3 version
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Piskun <[email protected]>
  • Loading branch information
bigcat88 committed Nov 17, 2024
1 parent 03c7beb commit 82af8f1
Show file tree
Hide file tree
Showing 8 changed files with 358 additions and 45 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
All notable changes to this project will be documented in this file.

## [0.21.0 - 2024-1x-xx]

### Changed

- libheif updated from `1.18.2` to `1.19.3` version.

## [0.20.0 - 2024-10-19]

### Added
Expand Down
354 changes: 325 additions & 29 deletions libheif/heif.h

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions libheif/linux_build_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
from re import IGNORECASE, MULTILINE, match, search
from subprocess import DEVNULL, PIPE, STDOUT, CalledProcessError, TimeoutExpired, run

# 1
# 0
BUILD_DIR = environ.get("BUILD_DIR", "/tmp/ph_build_stuff")
INSTALL_DIR_LIBS = environ.get("INSTALL_DIR_LIBS", "/usr")
PH_LIGHT_VERSION = sys.maxsize <= 2**32 or getenv("PH_LIGHT_ACTION", "0") != "0"

LIBX265_URL = "https://bitbucket.org/multicoreware/x265_git/get/0b75c44c10e605fe9e9ebed58f04a46271131827.tar.gz"
LIBAOM_URL = "https://aomedia.googlesource.com/aom/+archive/v3.6.1.tar.gz"
LIBDE265_URL = "https://github.com/strukturag/libde265/releases/download/v1.0.15/libde265-1.0.15.tar.gz"
LIBHEIF_URL = "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz"
LIBHEIF_URL = "https://github.com/strukturag/libheif/releases/download/v1.19.3/libheif-1.18.2.tar.gz"


def download_file(url: str, out_path: str) -> bool:
Expand Down Expand Up @@ -212,7 +212,8 @@ def build_lib_linux(url: str, name: str):
"-DWITH_OpenJPEG_ENCODER=OFF "
"-DENABLE_PLUGIN_LOADING=OFF "
"-DWITH_LIBSHARPYUV=OFF "
"-DWITH_EXAMPLES=OFF".split()
"-DWITH_EXAMPLES=OFF "
"-DBUILD_TESTING=OFF".split()
)
_hide_build_process = False
if is_musllinux():
Expand Down
9 changes: 7 additions & 2 deletions libheif/macos/libheif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@
class Libheif < Formula
desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
homepage "https://www.libde265.org/"
url "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz"
sha256 "c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf"
url "https://github.com/strukturag/libheif/releases/download/v1.19.3/libheif-1.19.3.tar.gz"
sha256 "1e6d3bb5216888a78fbbf5fd958cd3cf3b941aceb002d2a8d635f85cc59a8599"
license "LGPL-3.0-only"
# Set current revision from what it was taken plus 10
revision 10

depends_on "cmake" => :build
depends_on "pkg-config" => :build

depends_on "aom"
depends_on "jpeg-turbo"
depends_on "libde265"
depends_on "libpng"
depends_on "libtiff"
depends_on "shared-mime-info"
depends_on "webp"
depends_on "x265"

def install
Expand Down Expand Up @@ -47,8 +50,10 @@ def install
-DWITH_OpenJPEG_ENCODER=OFF
-DENABLE_PLUGIN_LOADING=OFF
-DWITH_LIBSHARPYUV=OFF
-DWITH_GDK_PIXBUF=OFF
-DCMAKE_INSTALL_RPATH=#{rpath}
]

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
Expand Down
9 changes: 5 additions & 4 deletions libheif/windows/mingw-w64-libheif/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
_realname=libheif
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.18.2
pkgrel=1
pkgver=1.19.3
pkgrel=2
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/strukturag/libheif"
license=('spdx:LGPL-3.0' 'spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
Expand All @@ -20,7 +20,7 @@ depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libde265"
"${MINGW_PACKAGE_PREFIX}-x265")
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf')
sha256sums=('1e6d3bb5216888a78fbbf5fd958cd3cf3b941aceb002d2a8d635f85cc59a8599')

build() {
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
Expand Down Expand Up @@ -63,6 +63,7 @@ build() {
-DENABLE_PLUGIN_LOADING=OFF \
-DWITH_LIBSHARPYUV=OFF \
-DWITH_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
-DX265_CFLAGS="-DX265_API_IMPORTS" \
../${_realname}-${pkgver}

Expand Down
7 changes: 5 additions & 2 deletions pi-heif/libheif/macos/libheif.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
class Libheif < Formula
desc "ISO/IEC 23008-12:2017 HEIF file format decoder and encoder"
homepage "https://www.libde265.org/"
url "https://github.com/strukturag/libheif/releases/download/v1.18.2/libheif-1.18.2.tar.gz"
sha256 "c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf"
url "https://github.com/strukturag/libheif/releases/download/v1.19.3/libheif-1.19.3.tar.gz"
sha256 "1e6d3bb5216888a78fbbf5fd958cd3cf3b941aceb002d2a8d635f85cc59a8599"
license "LGPL-3.0-only"
# Set current revision from what it was taken plus 10
revision 10

depends_on "cmake" => :build
depends_on "pkg-config" => :build

depends_on "libde265"

def install
Expand Down Expand Up @@ -42,9 +43,11 @@ def install
-DWITH_OpenJPEG_ENCODER=OFF
-DENABLE_PLUGIN_LOADING=OFF
-DWITH_LIBSHARPYUV=OFF
-DWITH_GDK_PIXBUF=OFF
-DWITH_EXAMPLES=OFF
-DCMAKE_INSTALL_RPATH=#{rpath}
]

system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
Expand Down
9 changes: 5 additions & 4 deletions pi-heif/libheif/windows/mingw-w64-libheif/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
_realname=libheif
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=1.18.2
pkgrel=1
pkgver=1.19.3
pkgrel=2
pkgdesc="HEIF image decoder/encoder library and tools (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://github.com/strukturag/libheif"
license=('spdx:LGPL-3.0' 'spdx:MIT')
makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
Expand All @@ -18,7 +18,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libde265")
source=("https://github.com/strukturag/libheif/releases/download/v${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('c4002a622bec9f519f29d84bfdc6024e33fd67953a5fb4dc2c2f11f67d5e45bf')
sha256sums=('1e6d3bb5216888a78fbbf5fd958cd3cf3b941aceb002d2a8d635f85cc59a8599')

build() {
mkdir -p "${srcdir}"/build-${MSYSTEM} && cd "${srcdir}"/build-${MSYSTEM}
Expand Down Expand Up @@ -60,6 +60,7 @@ build() {
-DENABLE_PLUGIN_LOADING=OFF \
-DWITH_LIBSHARPYUV=OFF \
-DWITH_EXAMPLES=OFF \
-DBUILD_TESTING=OFF \
../${_realname}-${pkgver}

${MINGW_PREFIX}/bin/cmake --build .
Expand Down
2 changes: 1 addition & 1 deletion tests/basic_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_libheif_info():
assert key in info

version = pillow_heif.libheif_version()
valid_prefixes = ["1.17.", "1.18."]
valid_prefixes = ["1.17.", "1.18.", "1.19."]
assert any(version.startswith(prefix) for prefix in valid_prefixes)


Expand Down

0 comments on commit 82af8f1

Please sign in to comment.