Commit fcc075cb authored by Julius Künzel's avatar Julius Künzel 💬
Browse files

Remove deprecated Appimage tools (we use KDE Craft now)

Pipelines have been disabled recently so we don't need this any longer.
And for reference one can still look things up in the git history…
parent 1abf2cb6
project (kdenlive-and-all-its-deps)
#
# Build all dependencies for KMyMoney and finally KMyMoney itself.
# Parameters: EXT_DOWNLOAD_DIR place to download all packages
# INSTALL_ROOT place to install everything to
#
# Example usage: cmake ..\kmymoneydep -DEXT_DOWNLOAD_DIR=/dev2/d -DINSTALL_ROOT=/dev2/i
cmake_minimum_required(VERSION 2.8.6)
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
message(FATAL_ERROR "Compiling in the source directory is not supported. Use for example 'mkdir build; cd build; cmake ..'.")
endif()
# Tools must be obtained to work with:
include(ExternalProject)
# allow specification of a directory with pre-downloaded
# requirements
if(NOT IS_DIRECTORY ${EXT_DOWNLOAD_DIR})
message(FATAL_ERROR "No externals download dir set. Use -DEXT_DOWNLOAD_DIR")
endif()
if(NOT IS_DIRECTORY ${EXT_INSTALL_DIR})
message(FATAL_ERROR "No install dir set. Use -DEXT_INSTALL_DIR")
endif()
message( STATUS "CMAKE_GENERATOR: ${CMAKE_GENERATOR}")
set(CMAKE_PREFIX_PATH "${EXT_INSTALL_DIR};${EXT_INSTALL_DIR}/openssl")
set(CMAKE_INSTALL_PREFIX "${EXT_INSTALL_DIR}")
set(CMAKE_BUILD_TYPE RelWithDebInfo)
set(CMAKE_GLOBAL_PROFILE
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_INSTALL_PREFIX=${CMAKE_PREFIX_PATH}
-DCMAKE_PREFIX_PATH=${CMAKE_INSTALL_PREFIX}
-DBUILD_TESTING=FALSE
)
set(AT_SHARED_ONLY --disable-static --enable-shared)
set(AT_CPP_FLAGS "-I${EXT_INSTALL_DIR}/include -I${EXT_INSTALL_DIR}/openssl/include")
set(AT_LD_FLAGS "-L${EXT_INSTALL_DIR}/lib -L${EXT_INSTALL_DIR}/openssl/lib")
set(PATCH_COMMAND patch -l)
# this list must be dependency-ordered
add_subdirectory( ext_iconv )
add_subdirectory( ext_zlib )
add_subdirectory( ext_lzma )
add_subdirectory( ext_icu )
add_subdirectory( ext_ncurses )
add_subdirectory( ext_readline )
add_subdirectory( ext_xml )
add_subdirectory( ext_gettext )
add_subdirectory( ext_png )
add_subdirectory( ext_nasm )
add_subdirectory( ext_yasm )
add_subdirectory( ext_jpeg )
add_subdirectory( ext_boost )
add_subdirectory( ext_xslt )
add_subdirectory( ext_fontconfig )
add_subdirectory( ext_intltool )
add_subdirectory( ext_sharedmimeinfo )
add_subdirectory( ext_gpgerror )
add_subdirectory( ext_assuan2 )
add_subdirectory( ext_unistring )
add_subdirectory( ext_cmake )
add_subdirectory( ext_pcre2 )
add_subdirectory( ext_freetype )
add_subdirectory( ext_harfbuzz )
add_subdirectory( ext_sqlite )
add_subdirectory( ext_openssl )
add_subdirectory( ext_qt )
add_subdirectory( ext_fcitx-qt5 )
add_subdirectory( ext_phonon )
add_subdirectory( ext_gpgme )
add_subdirectory( ext_gcrypt )
add_subdirectory( ext_frameworks )
add_subdirectory( ext_libsndfile )
add_subdirectory( ext_libsamplerate )
add_subdirectory( ext_alsa )
add_subdirectory( ext_fftw3 )
add_subdirectory( ext_fftw3f )
add_subdirectory( ext_sdl2 )
add_subdirectory( ext_sox )
add_subdirectory( ext_jack )
add_subdirectory( ext_ladspa )
add_subdirectory( ext_tap-plugins )
add_subdirectory( ext_x264 )
add_subdirectory( ext_x265 )
add_subdirectory( ext_libvpx )
add_subdirectory( ext_nv-codec-headers )
add_subdirectory( ext_amf )
add_subdirectory( ext_mfx )
add_subdirectory( ext_fribidi )
add_subdirectory( ext_ass )
add_subdirectory( ext_libva )
add_subdirectory( ext_lame )
add_subdirectory( ext_ogg )
add_subdirectory( ext_vorbis )
add_subdirectory( ext_ffmpeg )
add_subdirectory( ext_cairo )
add_subdirectory( ext_pango )
add_subdirectory( ext_gdkpixbuf )
add_subdirectory( ext_gtk+ )
add_subdirectory( ext_gavl )
add_subdirectory( ext_frei0r )
add_subdirectory( ext_bigshot )
add_subdirectory( ext_opencv )
add_subdirectory( ext_opus )
add_subdirectory( ext_vidstab )
add_subdirectory( ext_rubberband )
add_subdirectory( ext_mlt )
add_subdirectory( ext_ruby )
add_subdirectory( ext_webp )
add_subdirectory( ext_kdenlive )
ExternalProject_Add(
ext_alsa
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.1.5.tar.bz2
URL_MD5 a2b465c3a5265d8a57f3ff39c6c4fc29
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
ExternalProject_Add(
ext_amf
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git
GIT_TAG master
CONFIGURE_COMMAND rm -rf <SOURCE_DIR>/Thirdparty
BUILD_ALWAYS TRUE
BUILD_IN_SOURCE 1
BUILD_COMMAND mkdir -p ${EXT_INSTALL_DIR}/include/AMF
INSTALL_COMMAND cp -av <SOURCE_DIR>/amf/public/include/. ${EXT_INSTALL_DIR}/include/AMF
)
set(EXT_INSTALL_DIR_applications "${EXT_INSTALL_DIR}")
ExternalProject_Add(
ext_akonadi
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://download.kde.org/stable/applications/18.08.2/src/akonadi-18.08.2.tar.xz
URL_MD5 bff15765460e954105217831f2786dc2
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
DEPENDS ext_sharedmimeinfo ext_boost ext_xslt ext_kcompletion ext_kconfig ext_kconfigwidgets ext_kcoreaddons ext_kdbusaddons ext_ki18n ext_kiconthemes ext_kitemmodels ext_kitemviews ext_kio ext_kwidgetsaddons ext_kwindowsystem ext_kxmlgui ext_kcrash
)
ExternalProject_Add(
ext_kpimtextedit
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://download.kde.org/stable/applications/18.08.2/src/kpimtextedit-18.08.2.tar.xz
URL_MD5 a360356a13ea0ee0f179fa28f267c1d8
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
DEPENDS ext_kcodecs ext_kconfig ext_kconfigwidgets ext_kcoreaddons ext_kemoticons ext_ki18n ext_kiconthemes ext_kio ext_sonnet ext_syntaxhighlighting ext_kwidgetsaddons ext_kxmlgui ext_grantlee
)
ExternalProject_Add(
ext_kidentitymanagement
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://download.kde.org/stable/applications/18.08.2/src/kidentitymanagement-18.08.2.tar.xz
URL_MD5 c7061788d60a167a3ef92cb5fd7a3ddd
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
DEPENDS ext_kcoreaddons ext_kcompletion ext_ktextwidgets ext_kxmlgui ext_kio ext_kconfig ext_kcodecs ext_kiconthemes ext_kpimtextedit
)
ExternalProject_Add(
ext_kcontacts
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://download.kde.org/stable/applications/18.08.2/src/kcontacts-18.08.2.tar.xz
URL_MD5 9686d42582cdf6b2a931d2ae036c1433
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
DEPENDS ext_kcoreaddons ext_ki18n ext_kconfig ext_kcodecs
)
ExternalProject_Add(
ext_libass
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/libass/libass.git
CONFIGURE_COMMAND <SOURCE_DIR>/autogen.sh && <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY}
BUILD_IN_SOURCE 1
BUILD_ALWAYS TRUE
BUILD_COMMAND $(MAKE) clean
COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
ExternalProject_Add(
ext_assuan2
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://www.gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.1.tar.bz2
URL_MD5 4354b7ae296894f232ada226a062d7d7
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
DEPENDS ext_gpgerror
)
ExternalProject_Add(
ext_bigshot
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://bitbucket.org/leo_sutic/bigsh0t.git
GIT_TAG 9533c9caa6b583f8c5f2cba50c4713eec057c371
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
BUILD_IN_SOURCE 1
INSTALL_COMMAND ""
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_eq_mask.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_eq_to_rect.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_rect_to_eq.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_stabilize_360.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_hemi_to_eq.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
COMMAND ${CMAKE_COMMAND} -E copy bigsh0t_transform_360.so ${EXT_INSTALL_DIR}/lib/frei0r-1/
)
ExternalProject_Add(
ext_boost
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://boostorg.jfrog.io/artifactory/main/release/1.68.0/source/boost_1_68_0.tar.bz2
URL_MD5 7fbd1890f571051f2a209681d57d486a
CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.sh --prefix=${EXT_INSTALL_DIR} --with-libraries=system
BUILD_COMMAND <SOURCE_DIR>/b2 -j1 install
INSTALL_COMMAND ""
BUILD_IN_SOURCE 1
)
ExternalProject_Add(
ext_cairo
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://www.cairographics.org/releases/cairo-1.14.10.tar.xz
URL_MD5 146f5f4d0b4439fc3792fd3452b7b12a
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
ExternalProject_Add(
ext_cmake
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://gitlab.kitware.com/cmake/cmake.git
GIT_TAG v3.18.2
CONFIGURE_COMMAND cd <SOURCE_DIR> && ./bootstrap --prefix=${EXT_INSTALL_DIR}
BUILD_COMMAND ${MAKE}
UPDATE_COMMAND ""
BUILD_IN_SOURCE 1
ALWAYS 0
)
# Script to build Exiv2 for digiKam bundle.
#
# SPDX-FileCopyrightText: 2015-2017 Gilles Caulier <caulier dot gilles at gmail dot com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
set(PREFIX_ext_exiv2 "${EXTPREFIX}")
set(Exiv2_Conf -DEXIV2_ENABLE_SHARED=ON
-DEXIV2_ENABLE_XMP=ON
-DEXIV2_ENABLE_LIBXMP=ON
-DEXIV2_ENABLE_PNG=ON
-DEXIV2_ENABLE_NLS=OFF
-DEXIV2_ENABLE_PRINTUCS2=ON
-DEXIV2_ENABLE_LENSDATA=ON
-DEXIV2_ENABLE_COMMERCIAL=OFF
-DEXIV2_ENABLE_BUILD_SAMPLES=OFF
-DEXIV2_ENABLE_BUILD_PO=OFF
-DEXIV2_ENABLE_VIDEO=OFF
-DEXIV2_ENABLE_WEBREADY=OFF
-DEXIV2_ENABLE_CURL=OFF
-DEXIV2_ENABLE_SSH=OFF
)
JoinListAsString("${Exiv2_Conf}" " " BASH_OPTIONS)
if(MINGW)
ExternalProject_Add(ext_exiv2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
# To use official release tarball
URL http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
URL_MD5 5399e3b570d7f9205f0e76d47582da4c
# To use current implementation from SVN
#SVN_REPOSITORY svn://dev.exiv2.org/svn/trunk
CONFIGURE_COMMAND cd <SOURCE_DIR> &&
./bootstrap.mxe ${MXE_BUILDROOT} RelWithDebInfo ${BASH_OPTIONS}
BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE) -j
INSTALL_COMMAND cd <SOURCE_DIR>/build && $(MAKE) install/fast
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
ALWAYS 0
)
elseif(APPLE)
ExternalProject_Add(ext_exiv2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
# To use official release tarball
URL http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
URL_MD5 5399e3b570d7f9205f0e76d47582da4c
# To use current implementation from SVN
#SVN_REPOSITORY svn://dev.exiv2.org/svn/trunk
CONFIGURE_COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
<SOURCE_DIR>/bootstrap.macports ${PREFIX_ext_exiv2} RelWithDebInfo x86_64 ${BASH_OPTIONS}
BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE)
INSTALL_COMMAND cd <SOURCE_DIR>/build && $(MAKE) install/fast
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
ALWAYS 0
)
else() # Linux
ExternalProject_Add(ext_exiv2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
# To use official release tarball
URL http://www.exiv2.org/builds/exiv2-0.26-trunk.tar.gz
URL_MD5 5399e3b570d7f9205f0e76d47582da4c
# To use current implementation from SVN
#SVN_REPOSITORY svn://dev.exiv2.org/svn/trunk
CONFIGURE_COMMAND cd <SOURCE_DIR> &&
$(CMAKE_COMMAND) . -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_exiv2}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
-DICONV_INCLUDE_DIR=${PREFIX_ext_exiv2}/include
${Exiv2_Conf}
${GLOBAL_PROFILE}
BUILD_COMMAND cd <SOURCE_DIR> && $(MAKE)
INSTALL_COMMAND cd <SOURCE_DIR> && $(MAKE) install/fast
UPDATE_COMMAND ""
ALWAYS 0
)
endif()
ExternalProject_Add(
ext_fcitx-qt5
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL https://github.com/fcitx/fcitx-qt5/archive/refs/tags/1.2.5.tar.gz
URL_MD5 5a2aa2ce28d766cdfcd7465699bae996
SOURCE_DIR fcitx-qt5-1.2.5
INSTALL_DIR ${EXT_INSTALL_DIR}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXT_INSTALL_DIR} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DENABLE_LIBRARY=OFF
DEPENDS ext_qt
UPDATE_COMMAND ""
)
ExternalProject_Add(
ext_ffmpeg
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
GIT_REPOSITORY https://anonscm.debian.org/git/pkg-multimedia/ffmpeg.git
# A stupid crlf issue prevents changing branch using normal pipeline, so
# we have a crazy workaround to delete offending file and checkout the wanted branch
UPDATE_COMMAND git checkout debian/7%4.3-3
# PATCH_COMMAND rm <SOURCE_DIR>/tests/ref/fate/sub-scc
GIT_TAG debian/master
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} --extra-ldflags="-L${EXT_INSTALL_DIR}/lib" --extra-cflags="-I${EXT_INSTALL_DIR}/include" --enable-shared --enable-avfilter --enable-gpl --enable-avresample --enable-libx265 --enable-libvpx --enable-libx264 --disable-doc --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-nvenc --enable-vaapi --enable-amf --enable-libass --enable-openssl --enable-nonfree
BUILD_ALWAYS TRUE
BUILD_IN_SOURCE 1
BUILD_COMMAND $(MAKE) clean
COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
SET(PREFIX_ext_fftw3 "${EXTPREFIX}" )
ExternalProject_Add( ext_fftw3
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://www.fftw.org/fftw-3.3.7.tar.gz
URL_MD5 0d5915d7d39b3253c1cc05030d79ac47
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE}
)
SET(PREFIX_ext_fftw3f "${EXTPREFIX}" )
ExternalProject_Add( ext_fftw3f
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://www.fftw.org/fftw-3.3.7.tar.gz
URL_MD5 0d5915d7d39b3253c1cc05030d79ac47
CMAKE_ARGS ${CMAKE_GLOBAL_PROFILE} -DENABLE_FLOAT=ON -DENABLE_THREADS=ON
)
ExternalProject_Add(
ext_fontconfig
DOWNLOAD_DIR ${EXT_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/fontconfig-2.12.0.tar.gz
URL_MD5 d8b056231abcb6257db6dc6d745360b2
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${EXT_INSTALL_DIR} ${AT_HOST} ${AT_SHARED_ONLY}
BUILD_COMMAND $(MAKE)
INSTALL_COMMAND $(MAKE) install
)
# Script to build KF5 Frameworks for digiKam bundle.
#
# SPDX-FileCopyrightText: 2015-2020 Gilles Caulier <caulier dot gilles at gmail dot com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
set(EXTPREFIX_frameworks "${EXTPREFIX}")
function(InstallKF5Component
name
version
argoptions
patch)
if(MINGW)
# Extract MD5 sums of each KF5 components directly from server.
execute_process(COMMAND
wget -q -O - -o /dev/null http://download.kde.org/stable/frameworks/${version}/${name}-${version}.0.tar.xz.mirrorlist
COMMAND
grep "MD5 Hash"
COMMAND
grep -o -P "(?<=<tt>).*(?=</tt>)"
RESULT_VARIABLE
wgetresult
OUTPUT_VARIABLE
md5sm
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT ${wgetresult} MATCHES 0)
message(WARNING "Cannot download MD5 sum for ${name}!")
endif()
message(STATUS "--------------------------------")
message(STATUS "KF5 component : ${name}")
message(STATUS "Component version: ${version}")
message(STATUS "Component MD5 : ${md5sm}")
message(STATUS "Configure options: ${argoptions}")
message(STATUS "Patch to apply : ${patch}")
if(NOT "${patch}" STREQUAL "")
set(patch "${PATCH_COMMAND};-p1;-i;${CMAKE_CURRENT_SOURCE_DIR}/${patch}")
endif()
ExternalProject_Add(ext_${name}
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL file://${EXTERNALS_DOWNLOAD_DIR}/${name}-${version}.0.tar.xz
URL_MD5 ${md5sm}
INSTALL_DIR ${EXTPREFIX_frameworks}
CMAKE_ARGS -DMXE_TOOLCHAIN=${MXE_TOOLCHAIN}
-DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE}
-DCMAKE_COLOR_MAKEFILE=ON
-DCMAKE_INSTALL_PREFIX=${EXTPREFIX_frameworks}
-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON
-DCMAKE_TOOLCHAIN_FILE=${MXE_TOOLCHAIN}
-DCMAKE_FIND_PREFIX_PATH=${CMAKE_PREFIX_PATH}
-DCMAKE_SYSTEM_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_INCLUDE_PATH=${CMAKE_PREFIX_PATH}/include
-DCMAKE_LIBRARY_PATH=${CMAKE_PREFIX_PATH}/lib
-DBUILD_TESTING=OFF
-DZLIB_ROOT=${CMAKE_PREFIX_PATH}
-DINSTALL_ROOT=${MXE_INSTALL_PREFIX}
${GLOBAL_PROFILE}
"${argoptions}"
-Wno-dev
PATCH_COMMAND ${patch}
UPDATE_COMMAND ""
ALWAYS 0
)
ExternalProject_Add_step(ext_${name} before_download
# Note : under MXE, curl is not compiled with https support. We cannot use the tarball as under Linux/MacOS.
COMMAND wget -N http://download.kde.org/stable/frameworks/${version}/${name}-${version}.0.tar.xz -O ${EXTERNALS_DOWNLOAD_DIR}/${name}-${version}.0.tar.xz
DEPENDERS download
)
elseif(APPLE)
# Extract MD5 sums of each KF5 components directly from server.
execute_process(COMMAND
wget -q -O - -o /dev/null http://download.kde.org/stable/frameworks/${version}/${name}-${version}.0.tar.xz.mirrorlist
COMMAND
grep "MD5 Hash"
COMMAND
grep -o "<tt>.*</tt>"
COMMAND
cut -c 5-
COMMAND
rev
COMMAND
cut -c 6-
COMMAND
rev
RESULT_VARIABLE
wgetresult
OUTPUT_VARIABLE
md5sm
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(NOT ${wgetresult} MATCHES 0)
message(WARNING "Cannot download MD5 sum for ${name}!")
endif()
message(STATUS "--------------------------------")
message(STATUS "KF5 component : ${name}")
message(STATUS "Component version: ${version}")
message(STATUS "Component MD5 : ${md5sm}")
message(STATUS "Configure options: ${argoptions}")
message(STATUS "Patch to apply : ${patch}")
if(NOT "${patch}" STREQUAL "")
set(patch "${PATCH_COMMAND};-p1;-i;${CMAKE_CURRENT_SOURCE_DIR}/${patch};&&")
endif()
ExternalProject_Add(ext_${name}
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://download.kde.org/stable/frameworks/${version}/${name}-${version}.0.tar.xz
URL_MD5 ${md5sm}
PATCH_COMMAND ${patch}
cp ${CMAKE_CURRENT_SOURCE_DIR}/../../macports/fixbundledatapath.sh <SOURCE_DIR>/. &&
<SOURCE_DIR>/fixbundledatapath.sh
CONFIGURE_COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/../../../../bootstrap.macports <SOURCE_DIR>/. &&
sed -i '' -e "s/DBUILD_TESTING=ON/DBUILD_TESTING=OFF/g" <SOURCE_DIR>/bootstrap.macports &&
<SOURCE_DIR>/bootstrap.macports ${EXTPREFIX_frameworks} debug x86_64 "${argoptions}"
BUILD_COMMAND cd <SOURCE_DIR>/build && $(MAKE)
INSTALL_COMMAND cd <SOURCE_DIR>/build && make install/fast
BUILD_IN_SOURCE 1
UPDATE_COMMAND ""
ALWAYS 0
)
else() # Linux
# Extract MD5 sums of each KF5 components directly from server.
execute_process(COMMAND
wget -q -O - -o /dev/null http://download.kde.org/stable/frameworks/${version}/${name}-${version}.0.tar.xz.mirrorlist
COMMAND
grep "MD5 Hash"