Commit 0aef9eb1 authored by Ivan Yossi's avatar Ivan Yossi 👌

packaging: Add HEIF support for 3rdparty builds

Heif only builds correctly with pkg-config using configure script, cmake build
does not create install targets and cannot find dependencies.

pkg-config is needed as defining dependencies directories as stated in
configure --help, does find the libraries but creates linker errors using
libde265 and x265 include flags.

ref D20038
parent 77ef190d
......@@ -212,5 +212,10 @@ if (NOT APPLE)
add_subdirectory( ext_gmic )
endif ()
if(UNIX)
add_subdirectory( ext_pkgconfig )
add_subdirectory( ext_heif )
endif()
add_subdirectory(ext_giflib)
add_subdirectory(ext_quazip)
SET(EXTPREFIX_heif "${EXTPREFIX}" )
ExternalProject_Add(
ext_libde265
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://github.com/strukturag/libde265/releases/download/v1.0.3/libde265-1.0.3.tar.gz
URL_MD5 0e1e26ffcb2177c3749c748e20fcd588
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTPREFIX_heif} ${GLOBAL_AUTOMAKE_PROFILE}
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
)
ExternalProject_Add(
ext_yasm
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz
URL_MD5 fc9e586751ff789b34b1f21d572d96af
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTPREFIX_heif} ${GLOBAL_AUTOMAKE_PROFILE}
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
)
ExternalProject_Add(
ext_nasm
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://www.nasm.us/pub/nasm/releasebuilds/2.14.03rc2/nasm-2.14.03rc2.tar.gz
URL_MD5 4cd1fe6788cd15d08c1a8f18b6d2428e
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTPREFIX_heif} ${GLOBAL_AUTOMAKE_PROFILE}
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
)
ExternalProject_Add(
ext_libx265
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://ftp.videolan.org/pub/videolan/x265/x265_3.0.tar.gz
URL_MD5 8ff1780246bb7ac8506239f6129c04ec
SOURCE_SUBDIR source/
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_heif}
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
DEPENDS ext_yasm ext_nasm
)
ExternalProject_Add(
ext_libheif
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://github.com/strukturag/libheif/releases/download/v1.4.0/libheif-1.4.0.tar.gz
URL_MD5 b3c726609a8750c5fc1687a7b193adff
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXTPREFIX_heif} ${GLOBAL_AUTOMAKE_PROFILE}
BUILD_COMMAND CXXFLAGS="-Wno-error" make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
DEPENDS ext_libde265 ext_libx265 ext_pkgconfig
)
SET(PREFIX_pkgconfig "${EXTPREFIX}" )
ExternalProject_Add( ext_pkgconfig
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.1.tar.gz
URL_MD5 f739a28cae4e0ca291f82d1d41ef107d
BUILD_IN_SOURCE 1
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_pkgconfig} ${GLOBAL_AUTOMAKE_PROFILE} --with-internal-glib
BUILD_COMMAND make
INSTALL_COMMAND make install
)
......@@ -169,6 +169,7 @@ build_3rdparty () {
# build 3rdparty tools
# The order must not be changed!
cmake_3rdparty \
ext_pkgconfig \
ext_gettext \
ext_openssl \
ext_qt \
......@@ -209,6 +210,8 @@ build_3rdparty () {
ext_sip \
ext_pyqt
cmake_3rdparty ext_libheif
cmake_3rdparty \
ext_extra_cmake_modules \
ext_kconfig \
......@@ -235,6 +238,8 @@ rebuild_3rdparty () {
cd ${KIS_TBUILD_DIR}/${pkg}/${pkg}-prefix/src/${pkg}-stamp
} || {
cd ${KIS_TBUILD_DIR}/ext_frameworks/${pkg}-prefix/src/${pkg}-stamp
} || {
cd ${KIS_TBUILD_DIR}/ext_heif/${pkg}-prefix/src/${pkg}-stamp
}
echo "Installing ${pkg} files..."
rm ${pkg}-configure ${pkg}-build ${pkg}-install
......@@ -251,6 +256,7 @@ rebuild_3rdparty () {
fi
build_install_ext \
ext_pkgconfig \
ext_gettext \
ext_openssl \
ext_qt \
......@@ -274,6 +280,8 @@ rebuild_3rdparty () {
ext_sip \
ext_pyqt \
build_install_ext ext_libheif
# Build kde_frameworks
build_install_ext \
ext_extra_cmake_modules \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment