diff -Nru kid3-3.6.0/buildlibs.sh kid3-3.6.1/buildlibs.sh --- kid3-3.6.0/buildlibs.sh 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/buildlibs.sh 2018-04-18 18:01:00.000000000 +0000 @@ -17,39 +17,144 @@ # When the script has run successfully, the libraries are installed below # /usr/local/ in msys. You can then proceed to the Kid3 build. # -# Building Kid3 needs MinGW, CMake, Qt, xsltproc, html\docbook.xsl, dumpbin. +# Building Kid3 needs MinGW, CMake, Qt, xsltproc, html/docbook.xsl, dumpbin. # Dumpbin is needed for the final packages and can be found in the MS SDK or # MS Visual C++ Express Edition. Set the environment variables in # win32/buildkid3.bat, so that these tools can be found, then start # buildkid3.bat from a Windows command prompt. # # You can also build a Windows version from Linux using the MinGW cross -# compiler. Set compiler="cross-mingw" below. +# compiler. +# COMPILER=cross-mingw QTPREFIX=/path/to/Qt5.6.3-mingw/5.6.3/mingw49_32 ../kid3/buildlibs.sh # -# For Mac: XCode, Qt, html\docbook.xsl. XCode and Qt should be installed at +# For Mac: XCode, Qt, html/docbook.xsl. XCode and Qt should be installed at # the default location, docbook.xsl in # $HOME/docbook-xsl-1.72.0/html/docbook.xsl. # -# To build for Android, set compiler="cross-android". +# You can also build a macOS version from Linux using the osxcross toolchain. +# COMPILER=cross-macos QTPREFIX=/path/to/Qt5.6.3-mac/5.6.3/clang_64 ../kid3/buildlibs.sh +# +# To build for Android, set COMPILER="cross-android". +# +# To build a self-contained Linux package use +# COMPILER=gcc-self-contained QTPREFIX=/path/to/Qt5.6.3-linux/5.6.3/gcc_64 ../kid3/buildlibs.sh +# +# When cross compiling make sure that the host Qt version is not larger than +# the target Qt version, otherwise moc and plugins will fail. To provide +# host Qt binaries of a suitable version, set the QTBINARYDIR environment +# variable. # # The source code for the libraries is downloaded from Debian and Ubuntu # repositories. If the files are no longer available, use a later version, # it should still work. # # buildlibs.sh will download, build and install zlib, libogg, libvorbis, -# flac, id3lib, taglib, ffmpeg, chromaprint. You are then ready to build Kid3 -# from the win32 or macosx directories by starting buildkid3.bat (Windows) or -# buildkid3.sh (Mac). +# flac, id3lib, taglib, ffmpeg, chromaprint, mp4v2. When the libraries +# are built, the Kid3 package can be created using this script with the +# parameter "package". +# +# ../kid3/buildlibs.sh package # Exit if an error occurs set -e +shopt -s extglob thisdir=$(pwd) +srcdir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) kernel=$(uname) test ${kernel:0:5} = "MINGW" && kernel="MINGW" -compiler="gcc" +# Administrative subtasks + +# Changes version and date strings in all known Kid3 files. +if test "$1" = "changeversion"; then + OLDVER=$2 + NEWVER=$3 + if test -z "$OLDVER" || test -z "$NEWVER"; then + echo "Usage: $0 $1 old-version-nr new-version-nr, e.g. $0 $1 0.8 0.9" + exit 1 + fi + + echo "### Change version and date strings" + + DATE=$(LC_TIME=C date) + DATE_R=$(date -R) + DATE_F=$(date +"%F") + DATE_Y=$(date +"%Y") + + OLDMAJOR=$(echo $OLDVER | cut -f 1 -d .) + OLDMINOR=$(echo $OLDVER | cut -f 2 -d .) + OLDPATCH=$(echo $OLDVER | cut -f 3 -d .) + test -z $OLDPATCH && OLDPATCH=0 + + NEWMAJOR=$(echo $NEWVER | cut -f 1 -d .) + NEWMINOR=$(echo $NEWVER | cut -f 2 -d .) + NEWPATCH=$(echo $NEWVER | cut -f 3 -d .) + test -z $NEWPATCH && NEWPATCH=0 + + cd "$srcdir" + sed -i "1 i\ +kid3 (${NEWVER}-0) unstable; urgency=low\n\n * New upstream release.\n\n\ + -- Urs Fleisch ${DATE_R}\n" deb/changelog + sed -i "s/^${OLDVER}<\/releaseinfo>$/${NEWVER}<\/releaseinfo>/; s/^[0-9]\+<\/year>$/${DATE_Y}<\/year>/; s/^[0-9-]\+<\/date>$/${DATE_F}<\/date>/" doc/de/index.docbook + sed -i "s/^${OLDVER}<\/releaseinfo>$/${NEWVER}<\/releaseinfo>/; s/^[0-9]\+<\/year>$/${DATE_Y}<\/year>/; s/^[0-9-]\+<\/date>$/${DATE_F}<\/date>/" doc/en/index.docbook + sed -i "s/PROJECTVERSION=\"${OLDVER}\"/PROJECTVERSION=\"${NEWVER}\"/" po/extract-merge.sh + sed -i "s/Project-Id-Version: Kid3 ${OLDVER}/Project-Id-Version: Kid3 ${NEWVER}/" po/*.po* + sed -i "s/^Version: ${OLDVER}$/Version: ${NEWVER}/; s/^Entered-date: [0-9-]\+$/Entered-date: ${DATE_F}/; s/http:\/\/prdownloads.sourceforge.net\/kid3\/kid3-${OLDVER}.tar.gz?download/http:\/\/prdownloads.sourceforge.net\/kid3\/kid3-${NEWVER}.tar.gz?download/" kid3.lsm + sed -i "s/^Version: ${OLDVER}$/Version: ${NEWVER}/" kid3.spec + sed -i "s/^Copyright 2003-[0-9]\+ Urs Fleisch $/Copyright 2003-${DATE_Y} Urs Fleisch /" deb/copyright + sed -i "1 i\ +${DATE} Urs Fleisch \n\n\t* Release ${NEWVER}\n" ChangeLog + sed -i "s/PROJECT_NUMBER = ${OLDVER}/PROJECT_NUMBER = ${NEWVER}/" Doxyfile + sed -i "s/set(CPACK_PACKAGE_VERSION_MAJOR ${OLDMAJOR})/set(CPACK_PACKAGE_VERSION_MAJOR ${NEWMAJOR})/; s/set(CPACK_PACKAGE_VERSION_MINOR ${OLDMINOR})/set(CPACK_PACKAGE_VERSION_MINOR ${NEWMINOR})/; s/set(CPACK_PACKAGE_VERSION_PATCH ${OLDPATCH})/set(CPACK_PACKAGE_VERSION_PATCH ${NEWPATCH})/; s/set(RELEASE_YEAR [0-9]\+)/set(RELEASE_YEAR ${DATE_Y})/" CMakeLists.txt + if test $OLDVER != $NEWVER; then + OLDCODE=$(sed -n "s/ \+set(QT_ANDROID_APP_VERSION_CODE \([0-9]\+\))/\1/p" CMakeLists.txt) + NEWCODE=$[ $OLDCODE + 1 ] + sed -i "s/\( \+set(QT_ANDROID_APP_VERSION_CODE \)\([0-9]\+\))/\1$NEWCODE)/" CMakeLists.txt + fi + cd - >/dev/null + exit 0 +fi + +if test "$1" = "cleanuppo"; then + echo "### Clean up .po files" + + for f in $srcdir/po/*.po*; do + sed -i "/#, qt-format/ d; /#, kde-format/ d; /^#~ msg/ d" $f + done + exit 0 +fi + +if test "$1" = "makearchive"; then + VERSION=$2 + if test -z "$VERSION"; then + VERSION=$(date +"%Y%m%d") + fi + + DIR=kid3-$VERSION + TGZ=$DIR.tar.gz + if test -e "$TGZ"; then + echo "$TGZ already exists!" + exit 1 + fi + + cd $srcdir + git archive --format=tar --prefix=$DIR/ HEAD | gzip >$thisdir/$TGZ + cd - >/dev/null + exit 0 +fi + +# End of subtasks + + +if test -f CMakeLists.txt; then + echo "Do not run this script from the source directory!" + echo "Start it from a build directory at the same level as the source directory." + exit 1 +fi + +target=${*:-libs package} qt_version=5.6.3 zlib_version=1.2.8 @@ -57,7 +162,7 @@ libogg_version=1.3.2 libogg_patchlevel=1 libvorbis_version=1.3.5 -libvorbis_patchlevel=4.2 +libvorbis_patchlevel=4 ffmpeg_version=3.4.2 ffmpeg_patchlevel=1 #libav_version=11.12 @@ -71,48 +176,108 @@ chromaprint_patchlevel=1 mp4v2_version=2.0.0 mp4v2_patchlevel=6 +openssl_version=1.0.2n + +# Try to find the configuration from an existing build. +if test -z "$COMPILER"; then + if test -f mingw.cmake; then + COMPILER=cross-mingw + QTPREFIX=$(sed -ne '1 s/set(QT_PREFIX \([^)]\+\))/\1/p' mingw.cmake) + elif test -f osxcross.cmake; then + COMPILER=cross-macos + QTPREFIX=$(sed -ne '1 s/set(QT_PREFIX \([^)]\+\))/\1/p' osxcross.cmake) + elif test -d openssl-${openssl_version}; then + COMPILER=cross-android + test -f kid3/CMakeCache.txt && + QTPREFIX=$(sed -ne 's/^QT_QMAKE_EXECUTABLE[^=]*=\(.*\)\/bin\/qmake$/\1/p' kid3/CMakeCache.txt) + elif test -f taglib-${taglib_version}/taglib.sln; then + COMPILER=msvc + elif grep -q "CMAKE_CXX_COMPILER.*g++-4\.8" kid3/CMakeCache.txt 2>/dev/null; then + COMPILER=gcc-self-contained + QTPREFIX=$(sed -ne 's/^QT_QMAKE_EXECUTABLE[^=]*=\(.*\)\/bin\/qmake$/\1/p' kid3/CMakeCache.txt) + elif grep -q "^CMAKE_BUILD_TYPE.*=Debug$" kid3/CMakeCache.txt 2>/dev/null; then + COMPILER=gcc-debug + fi +fi + +compiler=${COMPILER:-gcc} +echo -n "### Building $target with $compiler" +if test -n "$QTPREFIX"; then + echo -n " using $QTPREFIX" +fi +echo "." -FLAC_BUILD_OPTION="--enable-debug" -ID3LIB_BUILD_OPTION="--enable-debug=minimum" -AV_BUILD_OPTION="--enable-debug=1" -CMAKE_BUILD_OPTION="-DCMAKE_BUILD_TYPE=RelWithDebInfo" -# Uncomment for debug build -#FLAC_BUILD_OPTION="--enable-debug" -#ID3LIB_BUILD_OPTION="--enable-debug=yes" -#AV_BUILD_OPTION="--enable-debug=3" -#CMAKE_BUILD_OPTION="-DCMAKE_BUILD_TYPE=Debug" - -# Uncomment for a LINUX_SELF_CONTAINED build -#export CC="gcc-4.8" -#export CXX="g++-4.8" -#export CFLAGS="-O2 -fPIC" -#export CXXFLAGS="-O2 -fPIC" -#AV_BUILD_OPTION="$AV_BUILD_OPTION --enable-pic --extra-ldexeflags=-pie" +if test "$compiler" = "cross-mingw"; then + if test -n "$QTPREFIX" && test -z "${QTPREFIX%%*64?(/)}"; then + cross_host="x86_64-w64-mingw32" + else + cross_host="i686-w64-mingw32" + fi +elif test "$compiler" = "cross-macos"; then + cross_host="x86_64-apple-darwin17" + osxprefix=${OSXPREFIX:-/opt/osxcross/target} +fi + +if [[ $target = *"libs"* ]]; then + +if test "$compiler" = "gcc-debug"; then + export CFLAGS="-fPIC" + export CXXFLAGS="-fPIC" + FLAC_BUILD_OPTION="--enable-debug" + ID3LIB_BUILD_OPTION="--enable-debug=minimum" + AV_BUILD_OPTION="--enable-debug=3 --enable-pic --extra-ldexeflags=-pie" + CMAKE_BUILD_OPTION="-DCMAKE_BUILD_TYPE=Debug" +elif test "$compiler" = "gcc-self-contained"; then + export CC="gcc-4.8" + export CXX="g++-4.8" + export CFLAGS="-O2 -fPIC" + export CXXFLAGS="-O2 -fPIC" + FLAC_BUILD_OPTION="--enable-debug" + ID3LIB_BUILD_OPTION="--enable-debug=minimum" + AV_BUILD_OPTION="--enable-debug=1 --enable-pic --extra-ldexeflags=-pie" + CMAKE_BUILD_OPTION="-DCMAKE_BUILD_TYPE=RelWithDebInfo" +else + FLAC_BUILD_OPTION="--enable-debug" + ID3LIB_BUILD_OPTION="--enable-debug=minimum" + AV_BUILD_OPTION="--enable-debug=1" + CMAKE_BUILD_OPTION="-DCMAKE_BUILD_TYPE=RelWithDebInfo" +fi if ! which cmake >/dev/null; then - echo cmake not found. + echo "cmake not found." return exit 1 fi if test $kernel = "MSYS_NT-6.1"; then -kernel="MINGW" -CONFIGURE_OPTIONS="--build=x86_64-w64-mingw32 --target=i686-w64-mingw32" + kernel="MINGW" + CONFIGURE_OPTIONS="--build=x86_64-w64-mingw32 --target=i686-w64-mingw32" fi if test $kernel = "MINGW"; then -CMAKE_OPTIONS="-G \"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/usr/local" + # Use mingw from Qt + if test -n "$QTPREFIX"; then + test -z "${PATH##$QTPREFIX*}" || PATH=$QTPREFIX/bin:$QTPREFIX/../../Tools/mingw492_32/bin:$QTPREFIX/../../Tools/mingw492_32/opt/bin:$PATH + else + echo "QTPREFIX is not set" + exit 1 + fi + CMAKE_OPTIONS="-G \"MSYS Makefiles\" -DCMAKE_INSTALL_PREFIX=/usr/local" elif test $kernel = "Darwin"; then -CMAKE_OPTIONS="-G \"Unix Makefiles\"" + CMAKE_OPTIONS="-G \"Unix Makefiles\"" fi if test "$compiler" = "cross-mingw"; then -CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=$thisdir/mingw.cmake" - -# Note that Ubuntu i686-w64-mingw32 is incompatible (sjlj) with the mingw (dw2) -# used for the Qt mingw binaries >=4.8.6. -# I am using a custom built cross mingw (--disable-sjlj-exceptions --enable-threads=posix) -cross_host="i686-w64-mingw32" -CONFIGURE_OPTIONS="--host=${cross_host}" + CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=$thisdir/mingw.cmake" + CONFIGURE_OPTIONS="--host=${cross_host}" +elif test "$compiler" = "cross-macos"; then + CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_TOOLCHAIN_FILE=$thisdir/osxcross.cmake -DCMAKE_C_FLAGS=\"-O2 -mmacosx-version-min=10.7\" -DCMAKE_CXX_FLAGS=\"-O2 -mmacosx-version-min=10.7 -fvisibility=hidden -fvisibility-inlines-hidden -stdlib=libc++\" -DCMAKE_EXE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_MODULE_LINKER_FLAGS=-stdlib=libc++ -DCMAKE_SHARED_LINKER_FLAGS=-stdlib=libc++" + CONFIGURE_OPTIONS="--host=${cross_host}" + export CC=x86_64-apple-darwin17-clang + export CXX=x86_64-apple-darwin17-clang++ + export AR=x86_64-apple-darwin17-ar + export CFLAGS="-O2 $ARCH_FLAG -mmacosx-version-min=10.7" + export CXXFLAGS="-O2 $ARCH_FLAG -mmacosx-version-min=10.7 -stdlib=libc++" + export LDFLAGS="$ARCH_FLAG -mmacosx-version-min=10.7 -stdlib=libc++" fi if test $kernel = "MINGW" || test "$compiler" = "cross-mingw"; then @@ -123,8 +288,8 @@ fi if test $kernel = "Darwin"; then -ARCH=$(uname -m) -#ARCH=i386 + ARCH=$(uname -m) + #ARCH=i386 if test "$ARCH" = "i386"; then # To build a 32-bit Mac OS X version of Kid3 use: # cmake -G "Unix Makefiles" -DCMAKE_CXX_FLAGS="-arch i386" -DCMAKE_C_FLAGS="-arch i386" -DCMAKE_EXE_LINKER_FLAGS="-arch i386" -DQT_QMAKE_EXECUTABLE=/usr/local/Trolltech/Qt-${qt_version}-i386/bin/qmake -DCMAKE_BUILD_TYPE=Release -DWITH_FFMPEG=ON -DCMAKE_INSTALL_PREFIX= ../kid3 @@ -150,9 +315,9 @@ fi if which wget >/dev/null; then -DOWNLOAD=wget + DOWNLOAD=wget else -DOWNLOAD="curl -skfLO" + DOWNLOAD="curl -skfLO" fi test -d buildroot || mkdir buildroot @@ -191,90 +356,108 @@ cd source test -f flac_${libflac_version}-${libflac_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/flac/flac_${libflac_version}-${libflac_patchlevel}.debian.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/flac/flac_${libflac_version}-${libflac_patchlevel}.debian.tar.xz test -f flac_${libflac_version}.orig.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/flac/flac_${libflac_version}.orig.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/flac/flac_${libflac_version}.orig.tar.xz test -f id3lib3.8.3_${id3lib_version}-${id3lib_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_${id3lib_version}-${id3lib_patchlevel}.debian.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_${id3lib_version}-${id3lib_patchlevel}.debian.tar.xz test -f id3lib3.8.3_${id3lib_version}.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_${id3lib_version}.orig.tar.gz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/i/id3lib3.8.3/id3lib3.8.3_${id3lib_version}.orig.tar.gz test -f libogg_${libogg_version}-${libogg_patchlevel}.diff.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_${libogg_version}-${libogg_patchlevel}.diff.gz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_${libogg_version}-${libogg_patchlevel}.diff.gz test -f libogg_${libogg_version}.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_${libogg_version}.orig.tar.gz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libo/libogg/libogg_${libogg_version}.orig.tar.gz test -f libvorbis_${libvorbis_version}-${libvorbis_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_${libvorbis_version}-${libvorbis_patchlevel}.debian.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_${libvorbis_version}-${libvorbis_patchlevel}.debian.tar.xz test -f libvorbis_${libvorbis_version}.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_${libvorbis_version}.orig.tar.gz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/libv/libvorbis/libvorbis_${libvorbis_version}.orig.tar.gz test -f taglib-${taglib_version}.tar.gz || -$DOWNLOAD http://taglib.github.io/releases/taglib-${taglib_version}.tar.gz + $DOWNLOAD http://taglib.github.io/releases/taglib-${taglib_version}.tar.gz if test -n "$ZLIB_ROOT_PATH"; then -test -f zlib_${zlib_version}.dfsg-${zlib_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_${zlib_version}.dfsg-${zlib_patchlevel}.debian.tar.xz -test -f zlib_${zlib_version}.dfsg.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_${zlib_version}.dfsg.orig.tar.gz + test -f zlib_${zlib_version}.dfsg-${zlib_patchlevel}.debian.tar.xz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_${zlib_version}.dfsg-${zlib_patchlevel}.debian.tar.xz + test -f zlib_${zlib_version}.dfsg.orig.tar.gz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/z/zlib/zlib_${zlib_version}.dfsg.orig.tar.gz fi if test -n "${ffmpeg_version}"; then -test -f ffmpeg_${ffmpeg_version}.orig.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_${ffmpeg_version}.orig.tar.xz -test -f ffmpeg_${ffmpeg_version}-${ffmpeg_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_${ffmpeg_version}-${ffmpeg_patchlevel}.debian.tar.xz -ffmpeg_dir=ffmpeg-${ffmpeg_version} -else -if test "${libav_version%.*}" = "0.8"; then -test -f libav_${libav_version}.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}.orig.tar.gz -test -f libav_${libav_version}-${libav_patchlevel}.debian.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}-${libav_patchlevel}.debian.tar.gz + test -f ffmpeg_${ffmpeg_version}.orig.tar.xz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_${ffmpeg_version}.orig.tar.xz + test -f ffmpeg_${ffmpeg_version}-${ffmpeg_patchlevel}.debian.tar.xz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/f/ffmpeg/ffmpeg_${ffmpeg_version}-${ffmpeg_patchlevel}.debian.tar.xz + ffmpeg_dir=ffmpeg-${ffmpeg_version} else -test -f libav_${libav_version}.orig.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}.orig.tar.xz -test -f libav_${libav_version}-${libav_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}-${libav_patchlevel}.debian.tar.xz -ffmpeg_dir=libav-${libav_version} -fi + if test "${libav_version%.*}" = "0.8"; then + test -f libav_${libav_version}.orig.tar.gz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}.orig.tar.gz + test -f libav_${libav_version}-${libav_patchlevel}.debian.tar.gz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}-${libav_patchlevel}.debian.tar.gz + else + test -f libav_${libav_version}.orig.tar.xz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}.orig.tar.xz + test -f libav_${libav_version}-${libav_patchlevel}.debian.tar.xz || + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/liba/libav/libav_${libav_version}-${libav_patchlevel}.debian.tar.xz + ffmpeg_dir=libav-${libav_version} + fi fi test -f chromaprint_${chromaprint_version}.orig.tar.gz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/c/chromaprint/chromaprint_${chromaprint_version}.orig.tar.gz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/c/chromaprint/chromaprint_${chromaprint_version}.orig.tar.gz test -f chromaprint_${chromaprint_version}-${chromaprint_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/c/chromaprint/chromaprint_${chromaprint_version}-${chromaprint_patchlevel}.debian.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/c/chromaprint/chromaprint_${chromaprint_version}-${chromaprint_patchlevel}.debian.tar.xz test -f mp4v2_${mp4v2_version}~dfsg0.orig.tar.bz2 || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/m/mp4v2/mp4v2_${mp4v2_version}~dfsg0.orig.tar.bz2 + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/m/mp4v2/mp4v2_${mp4v2_version}~dfsg0.orig.tar.bz2 test -f mp4v2_${mp4v2_version}~dfsg0-${mp4v2_patchlevel}.debian.tar.xz || -$DOWNLOAD http://ftp.de.debian.org/debian/pool/main/m/mp4v2/mp4v2_${mp4v2_version}~dfsg0-${mp4v2_patchlevel}.debian.tar.xz + $DOWNLOAD http://ftp.de.debian.org/debian/pool/main/m/mp4v2/mp4v2_${mp4v2_version}~dfsg0-${mp4v2_patchlevel}.debian.tar.xz if test "$compiler" = "cross-android"; then - openssl_version=1.0.2n # See http://doc.qt.io/qt-5/opensslsupport.html test -f Setenv-android.sh || - $DOWNLOAD https://wiki.openssl.org/images/7/70/Setenv-android.sh + $DOWNLOAD https://wiki.openssl.org/images/7/70/Setenv-android.sh test -f openssl-${openssl_version}.tar.gz || - $DOWNLOAD https://www.openssl.org/source/openssl-${openssl_version}.tar.gz + $DOWNLOAD https://www.openssl.org/source/openssl-${openssl_version}.tar.gz fi # Create patch files -if test "$compiler" = "cross-mingw"; then - for d in $thisdir/qtbase5-dev-tools* /usr/lib/${HOSTTYPE/i686/i386}-linux-gnu/qt5/bin /usr/bin; do - if test -x $d/moc; then - _qt_bin_dir=$d - break - fi - done - for d in /windows/Qt/${qt_version}/mingw* /windows/Qt/Qt${qt_version}/${qt_version}/mingw* $thisdir/Qt*-mingw/${qt_version}/mingw*; do - if test -d $d; then - _qt_prefix=$d - break +if test "$compiler" = "cross-mingw" || test "$compiler" = "cross-macos"; then + if test -n "$QTBINARYDIR"; then + _qt_bin_dir=$QTBINARYDIR + else + for d in $thisdir/qtbase5-dev-tools* /usr/lib/${HOSTTYPE/i686/i386}-linux-gnu/qt5/bin /usr/bin; do + if test -x $d/moc; then + _qt_bin_dir=$d + break + fi + done + fi + if test -n "$QTPREFIX"; then + _qt_prefix=$QTPREFIX + else + if test "$compiler" = "cross-mingw"; then + for d in /windows/Qt/${qt_version}/mingw* /windows/Qt/Qt${qt_version}/${qt_version}/mingw* $thisdir/Qt*-mingw/${qt_version}/mingw*; do + if test -d $d; then + _qt_prefix=$d + break + fi + done + elif test "$compiler" = "cross-macos"; then + for d in $thisdir/Qt*-mac/${qt_version}/clang_64 $HOME/Development/Qt*-mac/${qt_version}/clang_64; do + if test -d $d; then + _qt_prefix=$d + break + fi + done fi - done + fi +fi +if test "$compiler" = "cross-mingw"; then cat >$thisdir/mingw.cmake <$thisdir/osxcross.cmake <fink_flac.patch <<"EOF" + cat >fink_flac.patch <<"EOF" diff -ruN flac-1.2.1/patches/fixrpath.sh flac-1.2.1.new/patches/fixrpath.sh --- flac-1.2.1/patches/fixrpath.sh 1969-12-31 19:00:00.000000000 -0500 +++ flac-1.2.1.new/patches/fixrpath.sh 2008-02-18 10:51:07.000000000 -0500 @@ -386,7 +601,7 @@ EOF test -f flac_1.2.1_size_t_max_patch.diff || -cat >flac_1.2.1_size_t_max_patch.diff <<"EOF" + cat >flac_1.2.1_size_t_max_patch.diff <<"EOF" diff -ru flac-1.2.1.orig/include/share/alloc.h flac-1.2.1/include/share/alloc.h --- flac-1.2.1.orig/include/share/alloc.h Wed Sep 12 06:32:22 2007 +++ flac-1.2.1/include/share/alloc.h Mon Mar 3 18:57:14 2008 @@ -404,7 +619,7 @@ EOF test -f id3lib-3.8.3_mingw.patch || -cat >id3lib-3.8.3_mingw.patch <<"EOF" + cat >id3lib-3.8.3_mingw.patch <<"EOF" diff -ru id3lib-3.8.3.orig/configure.in id3lib-3.8.3/configure.in --- id3lib-3.8.3.orig/configure.in 2012-02-05 13:09:59 +0100 +++ id3lib-3.8.3/configure.in 2012-02-05 13:16:33 +0100 @@ -447,7 +662,7 @@ EOF test -f id3lib-3.8.3_wintempfile.patch || -cat >id3lib-3.8.3_wintempfile.patch <<"EOF" + cat >id3lib-3.8.3_wintempfile.patch <<"EOF" diff -ru id3lib-3.8.3.orig/src/tag_file.cpp id3lib-3.8.3/src/tag_file.cpp --- id3lib-3.8.3.orig/src/tag_file.cpp 2016-06-09 20:54:44.395068889 +0200 +++ id3lib-3.8.3/src/tag_file.cpp 2016-06-09 21:39:35.044411098 +0200 @@ -481,7 +696,7 @@ EOF test -f taglib_bvreplace.patch || -cat >taglib_bvreplace.patch <<"EOF" + cat >taglib_bvreplace.patch <<"EOF" --- taglib-1.9.1/taglib/toolkit/tbytevector.cpp.orig 2013-10-08 17:50:01.000000000 +0200 +++ taglib-1.9.1/taglib/toolkit/tbytevector.cpp 2015-03-17 13:03:45.267093248 +0100 @@ -31,6 +31,7 @@ @@ -585,7 +800,7 @@ EOF test -f taglib_mp4shwm.patch || -cat >taglib_mp4shwm.patch <<"EOF" + cat >taglib_mp4shwm.patch <<"EOF" diff --git a/taglib/mp4/mp4tag.cpp b/taglib/mp4/mp4tag.cpp index a8e2e7d..0c2e5cb 100644 --- a/taglib/mp4/mp4tag.cpp @@ -731,7 +946,7 @@ EOF test -f taglib_CVE-2017-12678.patch || -cat >taglib_CVE-2017-12678.patch <<"EOF" + cat >taglib_CVE-2017-12678.patch <<"EOF" Index: b/taglib/mpeg/id3v2/id3v2framefactory.cpp =================================================================== --- a/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -752,8 +967,55 @@ { EOF +test -f taglib_cmID_purl_egid.patch.patch || + cat >taglib_cmID_purl_egid.patch.patch <<"EOF" +index 11d3cc51..a3636a9d 100644 +--- a/taglib/mp4/mp4tag.cpp ++++ b/taglib/mp4/mp4tag.cpp +@@ -78,7 +78,8 @@ MP4::Tag::Tag(TagLib::File *file, MP4::Atoms *atoms) : + parseInt(atom); + } + else if(atom->name == "tvsn" || atom->name == "tves" || atom->name == "cnID" || +- atom->name == "sfID" || atom->name == "atID" || atom->name == "geID") { ++ atom->name == "sfID" || atom->name == "atID" || atom->name == "geID" || ++ atom->name == "cmID") { + parseUInt(atom); + } + else if(atom->name == "plID") { +@@ -93,6 +94,9 @@ MP4::Tag::Tag(TagLib::File *file, MP4::Atoms *atoms) : + else if(atom->name == "covr") { + parseCovr(atom); + } ++ else if(atom->name == "purl" || atom->name == "egid") { ++ parseText(atom, -1); ++ } + else { + parseText(atom); + } +@@ -480,7 +484,8 @@ MP4::Tag::save() + data.append(renderInt(name.data(String::Latin1), it->second)); + } + else if(name == "tvsn" || name == "tves" || name == "cnID" || +- name == "sfID" || name == "atID" || name == "geID") { ++ name == "sfID" || name == "atID" || name == "geID" || ++ name == "cmID") { + data.append(renderUInt(name.data(String::Latin1), it->second)); + } + else if(name == "plID") { +@@ -492,6 +497,9 @@ MP4::Tag::save() + else if(name == "covr") { + data.append(renderCovr(name.data(String::Latin1), it->second)); + } ++ else if(name == "purl" || name == "egid") { ++ data.append(renderText(name.data(String::Latin1), it->second, TypeImplicit)); ++ } + else if(name.size() == 4){ + data.append(renderText(name.data(String::Latin1), it->second)); + } +EOF + test -f mp4v2_win32.patch || -cat >mp4v2_win32.patch <<"EOF" + cat >mp4v2_win32.patch <<"EOF" diff -ruN mp4v2-2.0.0.orig/GNUmakefile.am mp4v2-2.0.0/GNUmakefile.am --- mp4v2-2.0.0.orig/GNUmakefile.am 2012-05-21 00:11:55.000000000 +0200 +++ mp4v2-2.0.0/GNUmakefile.am 2014-04-14 07:22:35.904963506 +0200 @@ -2030,7 +2292,7 @@ EOF test -f ffmpeg_mingw.patch || -cat >ffmpeg_mingw.patch <<"EOF" + cat >ffmpeg_mingw.patch <<"EOF" From a64839189622f2a4cc3c62168ae5037b6aab6992 Mon Sep 17 00:00:00 2001 From: Tobias Rapp Date: Mon, 29 Aug 2016 15:25:58 +0200 @@ -2055,8 +2317,8 @@ EOF if test "$compiler" = "cross-android"; then -test -f openssl_android.patch || -cat >openssl_android.patch <<"EOF" + test -f openssl_android.patch || + cat >openssl_android.patch <<"EOF" --- Setenv-android.sh 2018-02-10 13:37:18.181017337 +0100 +++ Setenv-android.sh.new 2018-02-10 13:33:11.661974672 +0100 @@ -102,7 +102,7 @@ @@ -2102,181 +2364,191 @@ # Extract and patch sources if test -n "$ZLIB_ROOT_PATH"; then -echo "### Extracting zlib" + if ! test -d zlib-${zlib_version}; then + echo "### Extracting zlib" -if ! test -d zlib-${zlib_version}; then -tar xzf source/zlib_${zlib_version}.dfsg.orig.tar.gz -cd zlib-${zlib_version}/ - -unxz -c ../source/zlib_${zlib_version}.dfsg-${zlib_patchlevel}.debian.tar.xz | tar x || true -echo Can be ignored: Cannot create symlink to debian.series -for f in $(cat debian/patches/debian.series); do patch -p1 1.2.0$libogg_versionwin32/VS2010/libogg.props -cd .. -fi + echo "### Extracting libvorbis" -echo "### Extracting libflac" + tar xzf source/libvorbis_${libvorbis_version}.orig.tar.gz + cd libvorbis-${libvorbis_version}/ + unxz -c ../source/libvorbis_${libvorbis_version}-${libvorbis_patchlevel}.debian.tar.xz | tar x + for f in $(cat debian/patches/series); do patch -p1 1.2.0$libogg_versionwin32/VS2010/libogg.props + cd .. +fi if ! test -d flac-${libflac_version}; then -unxz -c source/flac_${libflac_version}.orig.tar.xz | tar x -cd flac-${libflac_version}/ -unxz -c ../source/flac_${libflac_version}-${libflac_patchlevel}.debian.tar.xz | tar x -for f in $(cat debian/patches/series); do patch -p1 makefile.win32 -cd .. -fi + echo "### Extracting id3lib" -echo "### Extracting taglib" + tar xzf source/id3lib3.8.3_${id3lib_version}.orig.tar.gz + cd id3lib-${id3lib_version}/ + unxz -c ../source/id3lib3.8.3_${id3lib_version}-${id3lib_patchlevel}.debian.tar.xz | tar x + for f in $(cat debian/patches/series); do patch --binary -p1 makefile.win32 + cd .. +fi if ! test -d taglib-${taglib_version}; then -tar xzf source/taglib-${taglib_version}.tar.gz -cd taglib-${taglib_version}/ -taglib_nr=${taglib_version:0:3} -if test $taglib_nr = "1.1"; then - taglib_nr=${taglib_version:0:4} - taglib_nr=${taglib_nr/./} -else - taglib_nr=${taglib_nr/./0} -fi -if test $taglib_nr -ge 108; then - patch -p1 <../source/taglib-msvc.patch -else - sed -i 's/^ADD_SUBDIRECTORY(bindings)/#ADD_SUBDIRECTORY(bindings)/' ./CMakeLists.txt - sed -i 's/^ADD_LIBRARY(tag SHARED/ADD_LIBRARY(tag STATIC/' ./taglib/CMakeLists.txt -fi -if test $taglib_nr -ge 111; then - taglib_static_option=-DBUILD_SHARED_LIBS=OFF -else - taglib_static_option=-DENABLE_STATIC=ON -fi -if test "${taglib_version}" = "1.9.1"; then - patch -p1 <../source/taglib_bvreplace.patch -fi -if test "${taglib_version}" = "1.11.1"; then - patch -p1 <../source/taglib_mp4shwm.patch - patch -p1 <../source/taglib_CVE-2017-12678.patch -fi -cd .. -fi + echo "### Extracting taglib" -echo "### Extracting ffmpeg" + tar xzf source/taglib-${taglib_version}.tar.gz + cd taglib-${taglib_version}/ + taglib_nr=${taglib_version:0:3} + if test $taglib_nr = "1.1"; then + taglib_nr=${taglib_version:0:4} + taglib_nr=${taglib_nr/./} + else + taglib_nr=${taglib_nr/./0} + fi + if test $taglib_nr -ge 108; then + patch -p1 <../source/taglib-msvc.patch + else + sed -i 's/^ADD_SUBDIRECTORY(bindings)/#ADD_SUBDIRECTORY(bindings)/' ./CMakeLists.txt + sed -i 's/^ADD_LIBRARY(tag SHARED/ADD_LIBRARY(tag STATIC/' ./taglib/CMakeLists.txt + fi + if test $taglib_nr -ge 111; then + taglib_static_option=-DBUILD_SHARED_LIBS=OFF + else + taglib_static_option=-DENABLE_STATIC=ON + fi + if test "${taglib_version}" = "1.9.1"; then + patch -p1 <../source/taglib_bvreplace.patch + fi + if test "${taglib_version}" = "1.11.1"; then + patch -p1 <../source/taglib_mp4shwm.patch + patch -p1 <../source/taglib_CVE-2017-12678.patch + patch -p1 <../source/taglib_cmID_purl_egid.patch.patch + fi + cd .. +fi if test -n "${ffmpeg_version}"; then -unxz -c source/ffmpeg_${ffmpeg_version}.orig.tar.xz | tar x || true -cd ffmpeg-${ffmpeg_version}/ -unxz -c ../source/ffmpeg_${ffmpeg_version}-${ffmpeg_patchlevel}.debian.tar.xz | tar x -for f in $(cat debian/patches/series); do patch -p1 kid3/build.sh <kid3/build.sh <config.h -$COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && nmake -f makefile.win32 DEBUG=1" -$COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && nmake -f makefile.win32" -mkdir -p inst/include inst/lib/Debug inst/lib/Release -cp -a include/id3* inst/include -cp id3libd.lib inst/lib/Debug/id3lib.lib -cp id3lib.lib inst/lib/Release/ -cd inst -tar czf ../../bin/id3lib-${id3lib_version}.tgz include lib -cd ../.. -tar xmzf bin/id3lib-${id3lib_version}.tgz -C $BUILDROOT - -echo "### Building taglib" - -cd taglib-${taglib_version}/ -test -f taglib.sln || cmake -G "Visual Studio 11" -DWITH_ASF=ON -DWITH_MP4=ON $taglib_static_option -DCMAKE_INSTALL_PREFIX= -mkdir -p instd -DESTDIR=instd cmake --build . --config Debug --target install -mkdir -p inst -DESTDIR=inst cmake --build . --config Release --target install -mv inst/lib inst/Release -mv instd/lib inst/Debug -mkdir -p inst/lib -mv inst/Debug inst/Release inst/lib/ -rm -rf instd -cd inst -tar czf ../../bin/taglib-${taglib_version}.tgz include lib -cd ../.. -tar xmzf bin/taglib-${taglib_version}.tgz -C $BUILDROOT + cd libogg-${libogg_version}/ + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && msbuild win32\VS2010\libogg_static.sln /p:Configuration=Debug;Platform=Win32" + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && msbuild win32\VS2010\libogg_static.sln /p:Configuration=Release;Platform=Win32" + mkdir -p inst/include/ogg inst/lib/Debug inst/lib/Release + cp win32/VS2010/Win32/Debug/libogg_static.lib inst/lib/Debug/ + cp win32/VS2010/Win32/Release/libogg_static.lib inst/lib/Release/ + cp include/ogg/*.h inst/include/ogg/ + cd inst + tar czf ../../bin/libogg-${libogg_version}.tgz include lib + cd ../.. + tar xmzf bin/libogg-${libogg_version}.tgz $BUILDROOT + fi -else + if test ! -d libvorbis-${libvorbis_version}/inst; then + echo "### Building libvorbis" -if test "$1" = "clean"; then - for d in zlib-${zlib_version} libogg-${libogg_version} \ - libvorbis-${libvorbis_version} flac-${libflac_version} \ - id3lib-${id3lib_version} taglib-${taglib_version} \ - ${ffmpeg_dir} chromaprint-${chromaprint_version} \ - mp4v2-${mp4v2_version}; do - test -d $d/inst && rm -rf $d/inst - done -fi + cd libvorbis-${libvorbis_version}/ + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && msbuild win32\VS2010\vorbis_static.sln /p:Configuration=Debug;Platform=Win32" + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && msbuild win32\VS2010\vorbis_static.sln /p:Configuration=Release;Platform=Win32" + mkdir -p inst/include/vorbis inst/lib/Debug inst/lib/Release + cp win32/VS2010/Win32/Debug/*.lib inst/lib/Debug/ + cp win32/VS2010/Win32/Release/*.lib inst/lib/Release/ + cp include/vorbis/*.h inst/include/vorbis/ + cd inst + tar czf ../../bin/libvorbis-${libvorbis_version}.tgz include lib + cd ../.. + tar xmzf bin/libvorbis-${libvorbis_version}.tgz -C $BUILDROOT + fi -if test -n "$ZLIB_ROOT_PATH" && test ! -d zlib-${zlib_version}/inst; then -echo "### Building zlib" + if test ! -d id3lib-${id3lib_version}/inst; then + echo "### Building id3lib" -cd zlib-${zlib_version}/ -if test $kernel = "MINGW"; then -make -f win32/Makefile.gcc -make install -f win32/Makefile.gcc INCLUDE_PATH=`pwd`/inst/usr/local/include LIBRARY_PATH=`pwd`/inst/usr/local/lib BINARY_PATH=`pwd`/inst/usr/local/bin -elif test "$compiler" = "cross-mingw"; then -make -f win32/Makefile.gcc LOC=-g PREFIX=${cross_host}- -make install -f win32/Makefile.gcc INCLUDE_PATH=`pwd`/inst/usr/local/include LIBRARY_PATH=`pwd`/inst/usr/local/lib BINARY_PATH=`pwd`/inst/usr/local/bin -else -CFLAGS="$CFLAGS -g -O3 -Wall -DNO_FSEEKO" ./configure --static -sed 's/LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)/LIBS=$(STATICLIB)/' Makefile >Makefile.inst -mkdir -p inst/usr/local -make install -f Makefile.inst prefix=`pwd`/inst/usr/local -fi -cd inst -tar czf ../../bin/zlib-${zlib_version}.tgz usr -cd ../.. -tar xmzf bin/zlib-${zlib_version}.tgz -C $BUILDROOT -fi - -if test ! -d libogg-${libogg_version}/inst; then -echo "### Building libogg" - -cd libogg-${libogg_version}/ -test -f Makefile || ./configure --enable-shared=no --enable-static=yes $CONFIGURE_OPTIONS -make -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/libogg-${libogg_version}.tgz usr -cd ../.. -tar xmzf bin/libogg-${libogg_version}.tgz -C $BUILDROOT -fi + cd id3lib-${id3lib_version}/ + test -f config.h || sed 's/^#define CXX_HAS_BUGGY_FOR_LOOPS 1/\/\/#define CXX_HAS_BUGGY_FOR_LOOPS 1/' config.h.win32 >config.h + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && nmake -f makefile.win32 DEBUG=1" + $COMSPEC /c "\"\"%VS110COMNTOOLS%vsvars32.bat\"\" && nmake -f makefile.win32" + mkdir -p inst/include inst/lib/Debug inst/lib/Release + cp -a include/id3* inst/include + cp id3libd.lib inst/lib/Debug/id3lib.lib + cp id3lib.lib inst/lib/Release/ + cd inst + tar czf ../../bin/id3lib-${id3lib_version}.tgz include lib + cd ../.. + tar xmzf bin/id3lib-${id3lib_version}.tgz -C $BUILDROOT + fi -if test ! -d libvorbis-${libvorbis_version}/inst; then -echo "### Building libvorbis" + if test ! -d taglib-${taglib_version}/inst; then + echo "### Building taglib" + + cd taglib-${taglib_version}/ + test -f taglib.sln || cmake -G "Visual Studio 11" -DWITH_ASF=ON -DWITH_MP4=ON $taglib_static_option -DCMAKE_INSTALL_PREFIX= + mkdir -p instd + DESTDIR=instd cmake --build . --config Debug --target install + mkdir -p inst + DESTDIR=inst cmake --build . --config Release --target install + mv inst/lib inst/Release + mv instd/lib inst/Debug + mkdir -p inst/lib + mv inst/Debug inst/Release inst/lib/ + rm -rf instd + cd inst + tar czf ../../bin/taglib-${taglib_version}.tgz include lib + cd ../.. + tar xmzf bin/taglib-${taglib_version}.tgz -C $BUILDROOT + fi -cd libvorbis-${libvorbis_version}/ -if test "$compiler" = "cross-mingw"; then -test -f Makefile || CFLAGS="$CFLAGS -g" PKG_CONFIG= ./configure --enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local $CONFIGURE_OPTIONS else -test -f Makefile || CFLAGS="$CFLAGS -g" ./configure --enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local $CONFIGURE_OPTIONS -fi -make -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/libvorbis-${libvorbis_version}.tgz usr -cd ../.. -tar xmzf bin/libvorbis-${libvorbis_version}.tgz -C $BUILDROOT -fi - -if test ! -d flac-${libflac_version}/inst; then -echo "### Building libflac" - -cd flac-${libflac_version}/ -autoreconf -i -configure_args="--enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin $FLAC_BUILD_OPTION $CONFIGURE_OPTIONS" -if test $kernel = "Darwin"; then - configure_args="$configure_args --disable-asm-optimizations" -fi -test -f Makefile || ./configure $configure_args -# On msys32, an error "changed before entering" occurred, can be fixed by -# modifying /usr/share/perl5/core_perl/File/Path.pm -# my $Need_Stat_Check = !($^O eq 'MSWin32' || $^O eq 'msys'); -make V=1 -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/flac-${libflac_version}.tgz usr -cd ../.. -tar xmzf bin/flac-${libflac_version}.tgz -C $BUILDROOT -fi -if test ! -d id3lib-${id3lib_version}/inst; then -echo "### Building id3lib" + if test "$1" = "clean"; then + for d in zlib-${zlib_version} libogg-${libogg_version} \ + libvorbis-${libvorbis_version} flac-${libflac_version} \ + id3lib-${id3lib_version} taglib-${taglib_version} \ + ${ffmpeg_dir} chromaprint-${chromaprint_version} \ + mp4v2-${mp4v2_version}; do + test -d $d/inst && rm -rf $d/inst + done + fi -cd id3lib-${id3lib_version}/ -if test $kernel = "MINGW" || test "$compiler" = "cross-mingw"; then - sed -i 's/^@ID3_NEEDDEBUG_TRUE@ID3_DEBUG_LIBS = -lcwd -lbfd -liberty$/@ID3_NEEDDEBUG_TRUE@ID3_DEBUG_LIBS =/' examples/Makefile.in -fi -autoconf -configure_args="--enable-shared=no --enable-static=yes $ID3LIB_BUILD_OPTION $CONFIGURE_OPTIONS" -if test $kernel = "MINGW"; then - configure_args="$configure_args --build=mingw32" -fi -test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS="$LDFLAGS -L/usr/local/lib" ./configure $configure_args -SED=sed make -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/id3lib-${id3lib_version}.tgz usr -cd ../.. -tar xmzf bin/id3lib-${id3lib_version}.tgz -C $BUILDROOT -fi - -if test ! -d taglib-${taglib_version}/inst; then -echo "### Building taglib" - -cd taglib-${taglib_version}/ -test -f Makefile || eval cmake -DWITH_ASF=ON -DWITH_MP4=ON -DINCLUDE_DIRECTORIES=/usr/local/include -DLINK_DIRECTORIES=/usr/local/lib $taglib_static_option $TAGLIB_ZLIB_ROOT_OPTION $CMAKE_BUILD_OPTION $CMAKE_OPTIONS -make VERBOSE=1 -mkdir -p inst -make install DESTDIR=`pwd`/inst -fixcmakeinst -cd inst -tar czf ../../bin/taglib-${taglib_version}.tgz usr -cd ../.. -tar xmzf bin/taglib-${taglib_version}.tgz -C $BUILDROOT -fi - -if test ! -d ${ffmpeg_dir}/inst; then -echo "### Building ffmpeg" - -if test "${libav_version%.*}" = "0.8"; then -cd ${ffmpeg_dir} -# configure needs yasm and pr -# On msys, make >= 3.81 is needed. -# Most options taken from -# http://oxygene.sk/lukas/2011/04/minimal-audio-only-ffmpeg-build-with-mingw32/ -# Disable-sse avoids a SEGFAULT under MinGW. -# Later versions (tested with libav-HEAD-5d2be71) do not have -# --enable-ffmpeg and additionally need --disable-mmx --disable-mmxext. -# The two --disable-hwaccel were added for MinGW-builds GCC 4.7.2. -if test "$compiler" = "cross-mingw"; then -sed -i 's/^\(.*-Werror=missing-prototypes\)/#\1/' ./configure -AV_CONFIGURE_OPTIONS="--cross-prefix=${cross_host}- --arch=x86 --target-os=mingw32 --sysinclude=/usr/${cross_host}/include" -fi -AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS $AV_BUILD_OPTION" -./configure \ - --enable-memalign-hack \ - --disable-shared \ - --enable-static \ - --disable-avdevice \ - --disable-avfilter \ - --disable-pthreads \ - --disable-swscale \ - --enable-ffmpeg \ - --disable-network \ - --disable-muxers \ - --disable-demuxers \ - --disable-sse \ - --disable-doc \ - --enable-rdft \ - --enable-demuxer=aac \ - --enable-demuxer=ac3 \ - --enable-demuxer=ape \ - --enable-demuxer=asf \ - --enable-demuxer=flac \ - --enable-demuxer=matroska_audio \ - --enable-demuxer=mp3 \ - --enable-demuxer=mpc \ - --enable-demuxer=mov \ - --enable-demuxer=mpc8 \ - --enable-demuxer=ogg \ - --enable-demuxer=tta \ - --enable-demuxer=wav \ - --enable-demuxer=wv \ - --disable-bsfs \ - --disable-filters \ - --disable-parsers \ - --enable-parser=aac \ - --enable-parser=ac3 \ - --enable-parser=mpegaudio \ - --disable-protocols \ - --enable-protocol=file \ - --disable-indevs \ - --disable-outdevs \ - --disable-encoders \ - --disable-decoders \ - --enable-decoder=aac \ - --enable-decoder=ac3 \ - --enable-decoder=alac \ - --enable-decoder=ape \ - --enable-decoder=flac \ - --enable-decoder=mp1 \ - --enable-decoder=mp2 \ - --enable-decoder=mp3 \ - --enable-decoder=mpc7 \ - --enable-decoder=mpc8 \ - --enable-decoder=tta \ - --enable-decoder=vorbis \ - --enable-decoder=wavpack \ - --enable-decoder=wmav1 \ - --enable-decoder=wmav2 \ - --enable-decoder=pcm_alaw \ - --enable-decoder=pcm_dvd \ - --enable-decoder=pcm_f32be \ - --enable-decoder=pcm_f32le \ - --enable-decoder=pcm_f64be \ - --enable-decoder=pcm_f64le \ - --enable-decoder=pcm_s16be \ - --enable-decoder=pcm_s16le \ - --enable-decoder=pcm_s16le_planar \ - --enable-decoder=pcm_s24be \ - --enable-decoder=pcm_daud \ - --enable-decoder=pcm_s24le \ - --enable-decoder=pcm_s32be \ - --enable-decoder=pcm_s32le \ - --enable-decoder=pcm_s8 \ - --enable-decoder=pcm_u16be \ - --enable-decoder=pcm_u16le \ - --enable-decoder=pcm_u24be \ - --enable-decoder=pcm_u24le \ - --enable-decoder=rawvideo \ - --disable-hwaccel=h264_dxva2 \ - --disable-hwaccel=mpeg2_dxva2 $AV_CONFIGURE_OPTIONS -make -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/${ffmpeg_dir}.tgz usr -cd ../.. -tar xmzf bin/${ffmpeg_dir}.tgz -C $BUILDROOT -else -cd ${ffmpeg_dir} -# configure needs yasm and pr -# On msys, make >= 3.81 is needed. -# Most options taken from -# http://oxygene.sk/lukas/2011/04/minimal-audio-only-ffmpeg-build-with-mingw32/ -# Disable-sse avoids a SEGFAULT under MinGW. -# Later versions (tested with libav-HEAD-5d2be71) do not have -# --enable-ffmpeg and additionally need --disable-mmx --disable-mmxext. -# The two --disable-hwaccel were added for MinGW-builds GCC 4.7.2. -# The --extra-cflags=-march=i486 is to avoid error "Threading is enabled, but -# there is no implementation of atomic operations available", libav bug 471. -if test "$compiler" = "cross-mingw"; then -# mkstemp is not available when building on Windows -sed -i 's/check_func mkstemp/disable mkstemp/' ./configure -sed -i 's/^\(.*-Werror=missing-prototypes\)/#\1/' ./configure -AV_CONFIGURE_OPTIONS="--cross-prefix=${cross_host}- --arch=x86 --target-os=mingw32 --sysinclude=/usr/${cross_host}/include --extra-cflags=-march=i486" -elif test $kernel = "MINGW"; then -AV_CONFIGURE_OPTIONS="--extra-cflags=-march=i486" -if test $(uname) = "MSYS_NT-6.1"; then -AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS --target-os=mingw32" -fi -fi -if ( test $kernel = "Darwin" || test $kernel = "MINGW" ) && test -n "${ffmpeg_version}"; then -AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS --disable-iconv" -fi -AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS $AV_BUILD_OPTION" -./configure \ - --disable-shared \ - --enable-static \ - --disable-avdevice \ - --disable-avfilter \ - --disable-pthreads \ - --disable-swscale \ - --disable-network \ - --disable-muxers \ - --disable-demuxers \ - --disable-sse \ - --disable-doc \ - --enable-rdft \ - --enable-demuxer=aac \ - --enable-demuxer=ac3 \ - --enable-demuxer=ape \ - --enable-demuxer=asf \ - --enable-demuxer=flac \ - --enable-demuxer=matroska_audio \ - --enable-demuxer=mp3 \ - --enable-demuxer=mpc \ - --enable-demuxer=mov \ - --enable-demuxer=mpc8 \ - --enable-demuxer=ogg \ - --enable-demuxer=tta \ - --enable-demuxer=wav \ - --enable-demuxer=wv \ - --disable-bsfs \ - --disable-filters \ - --disable-parsers \ - --enable-parser=aac \ - --enable-parser=ac3 \ - --enable-parser=mpegaudio \ - --disable-protocols \ - --enable-protocol=file \ - --disable-indevs \ - --disable-outdevs \ - --disable-encoders \ - --disable-decoders \ - --enable-decoder=aac \ - --enable-decoder=ac3 \ - --enable-decoder=alac \ - --enable-decoder=ape \ - --enable-decoder=flac \ - --enable-decoder=mp1 \ - --enable-decoder=mp2 \ - --enable-decoder=mp3 \ - --enable-decoder=mpc7 \ - --enable-decoder=mpc8 \ - --enable-decoder=tta \ - --enable-decoder=vorbis \ - --enable-decoder=wavpack \ - --enable-decoder=wmav1 \ - --enable-decoder=wmav2 \ - --enable-decoder=pcm_alaw \ - --enable-decoder=pcm_dvd \ - --enable-decoder=pcm_f32be \ - --enable-decoder=pcm_f32le \ - --enable-decoder=pcm_f64be \ - --enable-decoder=pcm_f64le \ - --enable-decoder=pcm_s16be \ - --enable-decoder=pcm_s16le \ - --enable-decoder=pcm_s16le_planar \ - --enable-decoder=pcm_s24be \ - --enable-decoder=pcm_daud \ - --enable-decoder=pcm_s24le \ - --enable-decoder=pcm_s32be \ - --enable-decoder=pcm_s32le \ - --enable-decoder=pcm_s8 \ - --enable-decoder=pcm_u16be \ - --enable-decoder=pcm_u16le \ - --enable-decoder=pcm_u24be \ - --enable-decoder=pcm_u24le \ - --enable-decoder=rawvideo \ - --disable-videotoolbox \ - --disable-vaapi \ - --disable-vdpau \ - --disable-hwaccel=h264_dxva2 \ - --disable-hwaccel=mpeg2_dxva2 $AV_CONFIGURE_OPTIONS -make V=1 -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/${ffmpeg_dir}.tgz usr -cd ../.. -tar xmzf bin/${ffmpeg_dir}.tgz -C $BUILDROOT -fi -fi - -if test ! -d chromaprint-${chromaprint_version}/inst; then -echo "### Building chromaprint" - -# The zlib library path was added for MinGW-builds GCC 4.7.2. -cd chromaprint-${chromaprint_version}/ -test -f Makefile || eval cmake -DBUILD_SHARED_LIBS=OFF $CHROMAPRINT_ZLIB_OPTION -DFFMPEG_ROOT=$thisdir/$ffmpeg_dir/inst/usr/local $CMAKE_BUILD_OPTION $CMAKE_OPTIONS -make VERBOSE=1 -mkdir -p inst -make install DESTDIR=`pwd`/inst -fixcmakeinst -cd inst -tar czf ../../bin/chromaprint-${chromaprint_version}.tgz usr -cd ../.. -tar xmzf bin/chromaprint-${chromaprint_version}.tgz -C $BUILDROOT -fi - -if test ! -d mp4v2-${mp4v2_version}/inst; then -echo "### Building mp4v2" - -cd mp4v2-${mp4v2_version}/ -if test $kernel = "MINGW" || test "$compiler" = "cross-mingw" || - test $kernel = "Darwin"; then -autoreconf -i -fi -test -f Makefile || CXXFLAGS="$CXXFLAGS -g -O2 -DMP4V2_USE_STATIC_LIB" ./configure --enable-shared=no --enable-static=yes --disable-gch $CONFIGURE_OPTIONS -mkdir -p inst -make install DESTDIR=`pwd`/inst -cd inst -tar czf ../../bin/mp4v2-${mp4v2_version}.tgz usr -cd ../.. -tar xmzf bin/mp4v2-${mp4v2_version}.tgz -C $BUILDROOT -fi + if test -n "$ZLIB_ROOT_PATH" && test ! -d zlib-${zlib_version}/inst; then + echo "### Building zlib" + + cd zlib-${zlib_version}/ + if test $kernel = "MINGW"; then + make -f win32/Makefile.gcc + make install -f win32/Makefile.gcc INCLUDE_PATH=`pwd`/inst/usr/local/include LIBRARY_PATH=`pwd`/inst/usr/local/lib BINARY_PATH=`pwd`/inst/usr/local/bin + elif test "$compiler" = "cross-mingw"; then + make -f win32/Makefile.gcc LOC=-g PREFIX=${cross_host}- + make install -f win32/Makefile.gcc INCLUDE_PATH=`pwd`/inst/usr/local/include LIBRARY_PATH=`pwd`/inst/usr/local/lib BINARY_PATH=`pwd`/inst/usr/local/bin + else + CFLAGS="$CFLAGS -g -O3 -Wall -DNO_FSEEKO" ./configure --static + sed 's/LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)/LIBS=$(STATICLIB)/' Makefile >Makefile.inst + mkdir -p inst/usr/local + make install -f Makefile.inst prefix=`pwd`/inst/usr/local + fi + cd inst + tar czf ../../bin/zlib-${zlib_version}.tgz usr + cd ../.. + tar xmzf bin/zlib-${zlib_version}.tgz -C $BUILDROOT + fi + + if test ! -d libogg-${libogg_version}/inst; then + echo "### Building libogg" + cd libogg-${libogg_version}/ + test -f Makefile || ./configure --enable-shared=no --enable-static=yes $CONFIGURE_OPTIONS + make + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/libogg-${libogg_version}.tgz usr + cd ../.. + tar xmzf bin/libogg-${libogg_version}.tgz -C $BUILDROOT + fi + + if test ! -d libvorbis-${libvorbis_version}/inst; then + echo "### Building libvorbis" + + cd libvorbis-${libvorbis_version}/ + if test "$compiler" = "cross-mingw"; then + test -f Makefile || CFLAGS="$CFLAGS -g" PKG_CONFIG= ./configure --enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local $CONFIGURE_OPTIONS + else + test -f Makefile || CFLAGS="$CFLAGS -g" ./configure --enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local $CONFIGURE_OPTIONS + fi + make + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/libvorbis-${libvorbis_version}.tgz usr + cd ../.. + tar xmzf bin/libvorbis-${libvorbis_version}.tgz -C $BUILDROOT + fi + + if test ! -d flac-${libflac_version}/inst; then + echo "### Building libflac" + + cd flac-${libflac_version}/ + autoreconf -i + configure_args="--enable-shared=no --enable-static=yes --with-ogg=$thisdir/libogg-$libogg_version/inst/usr/local --disable-thorough-tests --disable-doxygen-docs --disable-xmms-plugin $FLAC_BUILD_OPTION $CONFIGURE_OPTIONS" + if test $kernel = "Darwin"; then + configure_args="$configure_args --disable-asm-optimizations" + fi + test -f Makefile || ./configure $configure_args + # On msys32, an error "changed before entering" occurred, can be fixed by + # modifying /usr/share/perl5/core_perl/File/Path.pm + # my $Need_Stat_Check = !($^O eq 'MSWin32' || $^O eq 'msys'); + make V=1 + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/flac-${libflac_version}.tgz usr + cd ../.. + tar xmzf bin/flac-${libflac_version}.tgz -C $BUILDROOT + fi + + if test ! -d id3lib-${id3lib_version}/inst; then + echo "### Building id3lib" + + cd id3lib-${id3lib_version}/ + if test $kernel = "MINGW" || test "$compiler" = "cross-mingw"; then + sed -i 's/^@ID3_NEEDDEBUG_TRUE@ID3_DEBUG_LIBS = -lcwd -lbfd -liberty$/@ID3_NEEDDEBUG_TRUE@ID3_DEBUG_LIBS =/' examples/Makefile.in + fi + autoconf + configure_args="--enable-shared=no --enable-static=yes $ID3LIB_BUILD_OPTION $CONFIGURE_OPTIONS" + if test $kernel = "MINGW"; then + configure_args="$configure_args --build=mingw32" + fi + test -f Makefile || CPPFLAGS=-I/usr/local/include LDFLAGS="$LDFLAGS -L/usr/local/lib" ./configure $configure_args + SED=sed make + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/id3lib-${id3lib_version}.tgz usr + cd ../.. + tar xmzf bin/id3lib-${id3lib_version}.tgz -C $BUILDROOT + fi + + if test ! -d taglib-${taglib_version}/inst; then + echo "### Building taglib" + + cd taglib-${taglib_version}/ + test -f Makefile || eval cmake -DWITH_ASF=ON -DWITH_MP4=ON -DINCLUDE_DIRECTORIES=/usr/local/include -DLINK_DIRECTORIES=/usr/local/lib $taglib_static_option $TAGLIB_ZLIB_ROOT_OPTION $CMAKE_BUILD_OPTION $CMAKE_OPTIONS + make VERBOSE=1 + mkdir -p inst + make install DESTDIR=`pwd`/inst + fixcmakeinst + cd inst + tar czf ../../bin/taglib-${taglib_version}.tgz usr + cd ../.. + tar xmzf bin/taglib-${taglib_version}.tgz -C $BUILDROOT + fi + + if test ! -d ${ffmpeg_dir}/inst; then + echo "### Building ffmpeg" + + if test "${libav_version%.*}" = "0.8"; then + cd ${ffmpeg_dir} + # configure needs yasm and pr + # On msys, make >= 3.81 is needed. + # Most options taken from + # http://oxygene.sk/lukas/2011/04/minimal-audio-only-ffmpeg-build-with-mingw32/ + # Disable-sse avoids a SEGFAULT under MinGW. + # Later versions (tested with libav-HEAD-5d2be71) do not have + # --enable-ffmpeg and additionally need --disable-mmx --disable-mmxext. + # The two --disable-hwaccel were added for MinGW-builds GCC 4.7.2. + if test "$compiler" = "cross-mingw"; then + sed -i 's/^\(.*-Werror=missing-prototypes\)/#\1/' ./configure + AV_CONFIGURE_OPTIONS="--cross-prefix=${cross_host}- --arch=x86 --target-os=mingw32 --sysinclude=/usr/${cross_host}/include" + fi + AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS $AV_BUILD_OPTION" + ./configure \ + --enable-memalign-hack \ + --disable-shared \ + --enable-static \ + --disable-avdevice \ + --disable-avfilter \ + --disable-pthreads \ + --disable-swscale \ + --enable-ffmpeg \ + --disable-network \ + --disable-muxers \ + --disable-demuxers \ + --disable-sse \ + --disable-doc \ + --enable-rdft \ + --enable-demuxer=aac \ + --enable-demuxer=ac3 \ + --enable-demuxer=ape \ + --enable-demuxer=asf \ + --enable-demuxer=flac \ + --enable-demuxer=matroska_audio \ + --enable-demuxer=mp3 \ + --enable-demuxer=mpc \ + --enable-demuxer=mov \ + --enable-demuxer=mpc8 \ + --enable-demuxer=ogg \ + --enable-demuxer=tta \ + --enable-demuxer=wav \ + --enable-demuxer=wv \ + --disable-bsfs \ + --disable-filters \ + --disable-parsers \ + --enable-parser=aac \ + --enable-parser=ac3 \ + --enable-parser=mpegaudio \ + --disable-protocols \ + --enable-protocol=file \ + --disable-indevs \ + --disable-outdevs \ + --disable-encoders \ + --disable-decoders \ + --enable-decoder=aac \ + --enable-decoder=ac3 \ + --enable-decoder=alac \ + --enable-decoder=ape \ + --enable-decoder=flac \ + --enable-decoder=mp1 \ + --enable-decoder=mp2 \ + --enable-decoder=mp3 \ + --enable-decoder=mpc7 \ + --enable-decoder=mpc8 \ + --enable-decoder=tta \ + --enable-decoder=vorbis \ + --enable-decoder=wavpack \ + --enable-decoder=wmav1 \ + --enable-decoder=wmav2 \ + --enable-decoder=pcm_alaw \ + --enable-decoder=pcm_dvd \ + --enable-decoder=pcm_f32be \ + --enable-decoder=pcm_f32le \ + --enable-decoder=pcm_f64be \ + --enable-decoder=pcm_f64le \ + --enable-decoder=pcm_s16be \ + --enable-decoder=pcm_s16le \ + --enable-decoder=pcm_s16le_planar \ + --enable-decoder=pcm_s24be \ + --enable-decoder=pcm_daud \ + --enable-decoder=pcm_s24le \ + --enable-decoder=pcm_s32be \ + --enable-decoder=pcm_s32le \ + --enable-decoder=pcm_s8 \ + --enable-decoder=pcm_u16be \ + --enable-decoder=pcm_u16le \ + --enable-decoder=pcm_u24be \ + --enable-decoder=pcm_u24le \ + --enable-decoder=rawvideo \ + --disable-hwaccel=h264_dxva2 \ + --disable-hwaccel=mpeg2_dxva2 $AV_CONFIGURE_OPTIONS + make + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/${ffmpeg_dir}.tgz usr + cd ../.. + tar xmzf bin/${ffmpeg_dir}.tgz -C $BUILDROOT + else + cd ${ffmpeg_dir} + # configure needs yasm and pr + # On msys, make >= 3.81 is needed. + # Most options taken from + # http://oxygene.sk/lukas/2011/04/minimal-audio-only-ffmpeg-build-with-mingw32/ + # Disable-sse avoids a SEGFAULT under MinGW. + # Later versions (tested with libav-HEAD-5d2be71) do not have + # --enable-ffmpeg and additionally need --disable-mmx --disable-mmxext. + # The two --disable-hwaccel were added for MinGW-builds GCC 4.7.2. + # The --extra-cflags=-march=i486 is to avoid error "Threading is enabled, but + # there is no implementation of atomic operations available", libav bug 471. + if test "$compiler" = "cross-mingw"; then + # mkstemp is not available when building on Windows + sed -i 's/check_func mkstemp/disable mkstemp/' ./configure + sed -i 's/^\(.*-Werror=missing-prototypes\)/#\1/' ./configure + AV_CONFIGURE_OPTIONS="--cross-prefix=${cross_host}- --arch=x86 --target-os=mingw32 --sysinclude=/usr/${cross_host}/include" + if test -n "${cross_host##x86_64*}"; then + AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS --extra-cflags=-march=i486" + fi + elif test $kernel = "MINGW"; then + # mkstemp is not available when building with mingw from Qt + sed -i 's/check_func mkstemp/disable mkstemp/' ./configure + AV_CONFIGURE_OPTIONS="--extra-cflags=-march=i486" + if test $(uname) = "MSYS_NT-6.1"; then + AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS --target-os=mingw32" + fi + elif test "$compiler" = "cross-macos"; then + AV_CONFIGURE_OPTIONS="--disable-iconv --enable-cross-compile --cross-prefix=${cross_host}- --arch=x86 --target-os=darwin --cc=$CC --cxx=$CXX" + fi + if ( test $kernel = "Darwin" || test $kernel = "MINGW" ) && test -n "${ffmpeg_version}"; then + AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS --disable-iconv" + fi + AV_CONFIGURE_OPTIONS="$AV_CONFIGURE_OPTIONS $AV_BUILD_OPTION" + ./configure \ + --disable-shared \ + --enable-static \ + --disable-avdevice \ + --disable-avfilter \ + --disable-pthreads \ + --disable-swscale \ + --disable-network \ + --disable-muxers \ + --disable-demuxers \ + --disable-sse \ + --disable-doc \ + --enable-rdft \ + --enable-demuxer=aac \ + --enable-demuxer=ac3 \ + --enable-demuxer=ape \ + --enable-demuxer=asf \ + --enable-demuxer=flac \ + --enable-demuxer=matroska_audio \ + --enable-demuxer=mp3 \ + --enable-demuxer=mpc \ + --enable-demuxer=mov \ + --enable-demuxer=mpc8 \ + --enable-demuxer=ogg \ + --enable-demuxer=tta \ + --enable-demuxer=wav \ + --enable-demuxer=wv \ + --disable-bsfs \ + --disable-filters \ + --disable-parsers \ + --enable-parser=aac \ + --enable-parser=ac3 \ + --enable-parser=mpegaudio \ + --disable-protocols \ + --enable-protocol=file \ + --disable-indevs \ + --disable-outdevs \ + --disable-encoders \ + --disable-decoders \ + --enable-decoder=aac \ + --enable-decoder=ac3 \ + --enable-decoder=alac \ + --enable-decoder=ape \ + --enable-decoder=flac \ + --enable-decoder=mp1 \ + --enable-decoder=mp2 \ + --enable-decoder=mp3 \ + --enable-decoder=mpc7 \ + --enable-decoder=mpc8 \ + --enable-decoder=tta \ + --enable-decoder=vorbis \ + --enable-decoder=wavpack \ + --enable-decoder=wmav1 \ + --enable-decoder=wmav2 \ + --enable-decoder=pcm_alaw \ + --enable-decoder=pcm_dvd \ + --enable-decoder=pcm_f32be \ + --enable-decoder=pcm_f32le \ + --enable-decoder=pcm_f64be \ + --enable-decoder=pcm_f64le \ + --enable-decoder=pcm_s16be \ + --enable-decoder=pcm_s16le \ + --enable-decoder=pcm_s16le_planar \ + --enable-decoder=pcm_s24be \ + --enable-decoder=pcm_daud \ + --enable-decoder=pcm_s24le \ + --enable-decoder=pcm_s32be \ + --enable-decoder=pcm_s32le \ + --enable-decoder=pcm_s8 \ + --enable-decoder=pcm_u16be \ + --enable-decoder=pcm_u16le \ + --enable-decoder=pcm_u24be \ + --enable-decoder=pcm_u24le \ + --enable-decoder=rawvideo \ + --disable-videotoolbox \ + --disable-vaapi \ + --disable-vdpau \ + --disable-hwaccel=h264_dxva2 \ + --disable-hwaccel=mpeg2_dxva2 $AV_CONFIGURE_OPTIONS + make V=1 + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/${ffmpeg_dir}.tgz usr + cd ../.. + tar xmzf bin/${ffmpeg_dir}.tgz -C $BUILDROOT + fi + fi + + if test ! -d chromaprint-${chromaprint_version}/inst; then + echo "### Building chromaprint" + + # The zlib library path was added for MinGW-builds GCC 4.7.2. + cd chromaprint-${chromaprint_version}/ + test -f Makefile || eval cmake -DBUILD_SHARED_LIBS=OFF $CHROMAPRINT_ZLIB_OPTION -DFFMPEG_ROOT=$thisdir/$ffmpeg_dir/inst/usr/local $CMAKE_BUILD_OPTION $CMAKE_OPTIONS + make VERBOSE=1 + mkdir -p inst + make install DESTDIR=`pwd`/inst + fixcmakeinst + cd inst + tar czf ../../bin/chromaprint-${chromaprint_version}.tgz usr + cd ../.. + tar xmzf bin/chromaprint-${chromaprint_version}.tgz -C $BUILDROOT + fi + + if test ! -d mp4v2-${mp4v2_version}/inst; then + echo "### Building mp4v2" + + cd mp4v2-${mp4v2_version}/ + if test $kernel = "MINGW" || test "$compiler" = "cross-mingw" || + test $kernel = "Darwin"; then + autoreconf -i + fi + test -f Makefile || CXXFLAGS="$CXXFLAGS -g -O2 -DMP4V2_USE_STATIC_LIB" ./configure --enable-shared=no --enable-static=yes --disable-gch $CONFIGURE_OPTIONS + mkdir -p inst + make install DESTDIR=`pwd`/inst + cd inst + tar czf ../../bin/mp4v2-${mp4v2_version}.tgz usr + cd ../.. + tar xmzf bin/mp4v2-${mp4v2_version}.tgz -C $BUILDROOT + fi -echo "### Installing to root directory" -if test $kernel = "Linux"; then - # Static build can be tested from Linux in kid3 directory if ! test -d kid3; then + echo "### Creating kid3 build directory" + mkdir kid3 if test "$compiler" = "cross-mingw"; then cat >kid3/build.sh <kid3/make_package.sh <kid3/build.sh <kid3/build.sh <kid3/build.sh <kid3/build.sh <kid3/build.bat <kid3/run.bat <kid3/build.sh </dev/null + if test -f build.sh && ! test -f Makefile && ! test -f build.ninja; then + ./build.sh + fi + if test "$compiler" = "cross-mingw"; then + ninja + _version=$(grep VERSION config.h | cut -d'"' -f2) + _instdir=kid3-$_version-win32 + test -d $_instdir && rm -rf $_instdir + mkdir -p $_instdir + DESTDIR=$(pwd)/$_instdir ninja install/strip + + _plugin_qt_version=$(grep "Created by.*Qt" src/plugins/musicbrainzimport/moc_musicbrainzimportplugin.cpp) + _plugin_qt_version=${_plugin_qt_version##* \(Qt } + _plugin_qt_version=${_plugin_qt_version%%\)*} + _plugin_qt_version_nr=${_plugin_qt_version//./} + if test $_plugin_qt_version_nr -gt ${qt_version//./}; then + echo "Plugin Qt version $_plugin_qt_version is larger than Qt version $qt_version." + echo "Loading plugins will fail!" + exit 1 + fi + cp -f po/*.qm doc/*/kid3*.html $_instdir + + _qtBinDir=${QTPREFIX}/bin + if test -z "${cross_host##x86_64*}"; then + _gccDll=libgcc_s_seh-1.dll + else + _gccDll=libgcc_s_dw2-1.dll + fi + for f in Qt5Core.dll Qt5Network.dll Qt5Gui.dll Qt5Xml.dll Qt5Widgets.dll Qt5Multimedia.dll Qt5Qml.dll Qt5Quick.dll $_gccDll libstdc++-6.dll libwinpthread-1.dll; do + cp $_qtBinDir/$f $_instdir + done + + _qtTranslationsDir=${QTPREFIX}/translations + for f in po/*.qm; do + l=${f#*_}; + l=${l%.qm}; + test -f $_qtTranslationsDir/qtbase_$l.qm && cp $_qtTranslationsDir/qtbase_$l.qm $_instdir + done + + rm -f $_instdir.zip + 7z a $_instdir.zip $_instdir + elif test "$compiler" = "cross-macos"; then + test -z ${PATH##$osxprefix/*} || PATH=$osxprefix/bin:$osxprefix/SDK/MacOSX10.13.sdk/usr/bin:$PATH + rm -rf inst + DESTDIR=$(pwd)/inst ninja install/strip + ln -s /Applications inst/Applications + genisoimage -V "Kid3" -D -R -apple -no-pad -o uncompressed.dmg inst + _version=$(grep VERSION config.h | cut -d'"' -f2) + dmg dmg uncompressed.dmg kid3-$_version-Darwin.dmg + rm uncompressed.dmg + elif test "$compiler" = "cross-android"; then + if test -f $QTPREFIX/lib/libssl.so && test -f $QTPREFIX/lib/libcrypto.so; then + make apk + _version=$(grep VERSION config.h | cut -d'"' -f2) + cp -a android/bin/QtApp-release-signed.apk kid3-$_version-android.apk + else + echo "You have to copy libssl.so and libcrypto.so to the Qt directory:" + echo "sudo cp -a buildroot/usr/local/lib/lib{ssl,crypto}.so $QTPREFIX/lib/" + fi + elif test "$compiler" = "gcc-self-contained"; then + ninja package + _tgz=(kid3-*-Linux.tar.gz) + test -f "$_tgz" && mv $_tgz ${_tgz%%tar.gz}tgz + else + if test -f build.ninja; then + ninja package + else + make package + fi + fi + popd >/dev/null fi echo "### Built successfully" diff -Nru kid3-3.6.0/ChangeLog kid3-3.6.1/ChangeLog --- kid3-3.6.0/ChangeLog 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/ChangeLog 2018-04-18 18:01:00.000000000 +0000 @@ -1,3 +1,17 @@ +Mon Apr 23 11:26:19 CEST 2018 Urs Fleisch + + * Release 3.6.1 + + * Improved: + + Faster saving when many files are unchanged. + + Do not change file extension when creating file name from tags. + + Support for cross building. + + * Fixed: + + Parsing of xid atom with Mp4v2Metadata plugin. + + Scroll to opened file after sorting file list. + + Avoid recursion when automatically applying format. + Sun Mar 18 16:49:46 CET 2018 Urs Fleisch * Release 3.6.0 diff -Nru kid3-3.6.0/CMakeLists.txt kid3-3.6.1/CMakeLists.txt --- kid3-3.6.0/CMakeLists.txt 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/CMakeLists.txt 2018-04-18 18:01:00.000000000 +0000 @@ -115,7 +115,7 @@ # Version information set(CPACK_PACKAGE_VERSION_MAJOR 3) set(CPACK_PACKAGE_VERSION_MINOR 6) -set(CPACK_PACKAGE_VERSION_PATCH 0) +set(CPACK_PACKAGE_VERSION_PATCH 1) set(KID3_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") set(CPACK_PACKAGE_VERSION ${KID3_VERSION}) #set(CPACK_PACKAGE_VERSION "git20170517") @@ -147,7 +147,7 @@ set(WITH_LIBDIR_DEFAULT ".") set(WITH_PLUGINSDIR_DEFAULT ".") set(QT_ANDROID_APP_VERSION ${KID3_VERSION}) - set(QT_ANDROID_APP_VERSION_CODE 11) + set(QT_ANDROID_APP_VERSION_CODE 12) else (APPLE) set(WITH_DATAROOTDIR_DEFAULT "share") set(WITH_DOCDIR_DEFAULT "share/doc/kid3-qt") @@ -499,14 +499,14 @@ endif (MSVC) if (APPLE) exec_program(sw_vers ARGS -productVersion OUTPUT_VARIABLE _osxVersion) - if (_osxVersion VERSION_LESS "10.10") + if (_osxVersion VERSION_LESS "10.10" AND NOT CMAKE_CXX_COMPILER MATCHES "/osxcross/") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.5") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.5") - else (_osxVersion VERSION_LESS "10.10") + else () set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.7") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mmacosx-version-min=10.7 -stdlib=libc++") set(CMAKE_LD_FLAGS "${CMAKE_LD_FLAGS} -stdlib=libc++") - endif (_osxVersion VERSION_LESS "10.10") + endif () endif (APPLE) add_definitions(${QT_DEFINITIONS} -DHAVE_CONFIG_H=1 -DQT_NO_EXCEPTIONS -DQT_NO_STL) include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${QT_INCLUDES} ${PHONON_INCLUDE_DIR}) diff -Nru kid3-3.6.0/deb/changelog kid3-3.6.1/deb/changelog --- kid3-3.6.0/deb/changelog 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/deb/changelog 2018-04-18 18:01:00.000000000 +0000 @@ -1,3 +1,9 @@ +kid3 (3.6.1-0) unstable; urgency=low + + * New upstream release. + + -- Urs Fleisch Mon, 23 Apr 2018 11:26:19 +0200 + kid3 (3.6.0-0) unstable; urgency=low * New upstream release. diff -Nru kid3-3.6.0/deb/control kid3-3.6.1/deb/control --- kid3-3.6.0/deb/control 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/deb/control 2018-04-18 18:01:00.000000000 +0000 @@ -25,6 +25,7 @@ libflac++-dev, libvorbis-dev, libtag1-dev, + libmp4v2-dev, libchromaprint-dev, libavformat-dev, libavcodec-dev, diff -Nru kid3-3.6.0/deb/rules kid3-3.6.1/deb/rules --- kid3-3.6.0/deb/rules 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/deb/rules 2018-04-18 18:01:00.000000000 +0000 @@ -12,10 +12,10 @@ DEB_HTML_INSTALL_DIR = $(DEB_CMAKE_PREFIX)/share/doc/kde/HTML # KDE 5 BEGIN -BASE_CMAKE_DEFS = -DWITH_QT5=ON -DKDE_INSTALL_BINDIR=$(DEB_CMAKE_PREFIX)/bin -Wno-dev +BASE_CMAKE_DEFS = -DWITH_QT5=ON -DWITH_MP4V2=ON -DKDE_INSTALL_BINDIR=$(DEB_CMAKE_PREFIX)/bin -Wno-dev # KDE 5 END # KDE 4 BEGIN -#BASE_CMAKE_DEFS = -DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \ +#BASE_CMAKE_DEFS = -DWITH_MP4V2=ON -DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \ # -DDATA_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/apps \ # -DHTML_INSTALL_DIR=$(DEB_HTML_INSTALL_DIR) \ # -DKCFG_INSTALL_DIR=$(DEB_CMAKE_PREFIX)/share/kde4/config.kcfg diff -Nru kid3-3.6.0/debian/changelog kid3-3.6.1/debian/changelog --- kid3-3.6.0/debian/changelog 2018-03-27 19:27:06.000000000 +0000 +++ kid3-3.6.1/debian/changelog 2018-04-22 14:32:35.000000000 +0000 @@ -1,8 +1,14 @@ -kid3 (3.6.0-0artful3) artful; urgency=low +kid3 (3.6.1-0artful1) artful; urgency=low * No-change backport to artful. - -- Urs Fleisch Tue, 27 Mar 2018 21:27:06 +0200 + -- Urs Fleisch Sun, 22 Apr 2018 16:32:35 +0200 + +kid3 (3.6.1-0) unstable; urgency=low + + * New upstream release. + + -- Urs Fleisch Mon, 23 Apr 2018 11:26:19 +0200 kid3 (3.6.0-0) unstable; urgency=low diff -Nru kid3-3.6.0/debian/control kid3-3.6.1/debian/control --- kid3-3.6.0/debian/control 2018-03-27 19:27:06.000000000 +0000 +++ kid3-3.6.1/debian/control 2018-04-22 14:32:35.000000000 +0000 @@ -22,7 +22,8 @@ libid3-3.8.3-dev, libflac++-dev, libvorbis-dev, - libtag1-dev, libmp4v2-dev, + libtag1-dev, + libmp4v2-dev, libchromaprint-dev, libavformat-dev, libavcodec-dev, diff -Nru kid3-3.6.0/debian/patches/01-kid3-fix-taglib19.patch kid3-3.6.1/debian/patches/01-kid3-fix-taglib19.patch --- kid3-3.6.0/debian/patches/01-kid3-fix-taglib19.patch 2018-03-27 19:27:05.000000000 +0000 +++ kid3-3.6.1/debian/patches/01-kid3-fix-taglib19.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -From 9e1a254c44d34a9e22f051126161e504e9b6f4c5 Mon Sep 17 00:00:00 2001 -From: Urs Fleisch -Date: Sun, 18 Mar 2018 21:32:59 +0100 -Subject: Fix build with TagLib <= 1.9.1. - - -diff --git a/src/plugins/taglibmetadata/taglibfile.cpp b/src/plugins/taglibmetadata/taglibfile.cpp -index b11451ff..37118520 100644 ---- a/src/plugins/taglibmetadata/taglibfile.cpp -+++ b/src/plugins/taglibmetadata/taglibfile.cpp -@@ -4289,7 +4289,13 @@ static void stripMp4FreeFormName(TagLib::String& name) - static void prefixMp4FreeFormName(TagLib::String& name, - const TagLib::MP4::Tag* mp4Tag) - { -- if (!mp4Tag->contains(name) && !name.startsWith("----") && -+ if ( -+#if TAGLIB_VERSION >= 0x011000 -+ !mp4Tag->contains(name) -+#else -+ !const_cast(mp4Tag)->itemListMap().contains(name) -+#endif -+ && !name.startsWith("----") && - !(name.length() == 4 && - (name[0] == '\251' || (name[0] >= 'a' && name[0] <= 'z')))) { - Frame::Type type; -@@ -4299,12 +4305,29 @@ static void prefixMp4FreeFormName(TagLib::String& name, - if (name[0] == ':') name = name.substr(1); - TagLib::String freeFormName = "----:com.apple.iTunes:" + name; - unsigned int nameLen; -- if (!mp4Tag->contains(freeFormName) && (nameLen = name.length()) > 0) { -+ if ( -+#if TAGLIB_VERSION >= 0x011000 -+ !mp4Tag->contains(freeFormName) -+#else -+ !const_cast(mp4Tag)->itemListMap().contains( -+ freeFormName) -+#endif -+ && (nameLen = name.length()) > 0) { - // Not an iTunes free form name, maybe using another prefix - // (such as "----:com.nullsoft.winamp:"). - // Search for a frame which ends with this name. -+#if TAGLIB_VERSION >= 0x011000 - const TagLib::MP4::ItemMap& items = mp4Tag->itemMap(); -- for (TagLib::MP4::ItemMap::ConstIterator it = items.begin(); -+#else -+ const TagLib::MP4::ItemListMap& items = -+ const_cast(mp4Tag)->itemListMap(); -+#endif -+ for ( -+#if TAGLIB_VERSION >= 0x011000 -+ TagLib::MP4::ItemMap::ConstIterator it = items.begin(); -+#else -+ TagLib::MP4::ItemListMap::ConstIterator it = items.begin(); -+#endif - it != items.end(); - ++it) { - const TagLib::String& key = it->first; diff -Nru kid3-3.6.0/debian/patches/series kid3-3.6.1/debian/patches/series --- kid3-3.6.0/debian/patches/series 2018-03-27 19:27:05.000000000 +0000 +++ kid3-3.6.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -01-kid3-fix-taglib19.patch diff -Nru kid3-3.6.0/debian/rules kid3-3.6.1/debian/rules --- kid3-3.6.0/debian/rules 2018-03-27 19:27:05.000000000 +0000 +++ kid3-3.6.1/debian/rules 2018-04-22 14:32:35.000000000 +0000 @@ -12,7 +12,7 @@ DEB_HTML_INSTALL_DIR = $(DEB_CMAKE_PREFIX)/share/doc/kde/HTML # KDE 5 BEGIN -BASE_CMAKE_DEFS = -DWITH_MP4V2=ON -DWITH_QT5=ON -DKDE_INSTALL_BINDIR=$(DEB_CMAKE_PREFIX)/bin -Wno-dev +BASE_CMAKE_DEFS = -DWITH_QT5=ON -DWITH_MP4V2=ON -DKDE_INSTALL_BINDIR=$(DEB_CMAKE_PREFIX)/bin -Wno-dev # KDE 5 END # KDE 4 BEGIN #BASE_CMAKE_DEFS = -DWITH_MP4V2=ON -DCONFIG_INSTALL_DIR=$(DEB_CONFIG_INSTALL_DIR) \ diff -Nru kid3-3.6.0/doc/de/index.docbook kid3-3.6.1/doc/de/index.docbook --- kid3-3.6.0/doc/de/index.docbook 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/doc/de/index.docbook 2018-04-18 18:01:00.000000000 +0000 @@ -27,8 +27,8 @@ &FDLNotice; -2018-03-18 -3.6.0 +2018-04-23 +3.6.1 diff -Nru kid3-3.6.0/doc/en/index.docbook kid3-3.6.1/doc/en/index.docbook --- kid3-3.6.0/doc/en/index.docbook 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/doc/en/index.docbook 2018-04-18 18:01:00.000000000 +0000 @@ -27,8 +27,8 @@ &FDLNotice; -2018-03-18 -3.6.0 +2018-04-23 +3.6.1 diff -Nru kid3-3.6.0/Doxyfile kid3-3.6.1/Doxyfile --- kid3-3.6.0/Doxyfile 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/Doxyfile 2018-04-18 18:01:00.000000000 +0000 @@ -38,7 +38,7 @@ # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 3.6.0 +PROJECT_NUMBER = 3.6.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff -Nru kid3-3.6.0/kid3.lsm kid3-3.6.1/kid3.lsm --- kid3-3.6.0/kid3.lsm 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/kid3.lsm 2018-04-18 18:01:00.000000000 +0000 @@ -1,7 +1,7 @@ Begin4 Title: Kid3 -- Efficient Audio Tagger -Version: 3.6.0 -Entered-date: 2018-03-18 +Version: 3.6.1 +Entered-date: 2018-04-23 Description: Audio tagger to edit ID3v1.1, ID3v2.3, ID3v2.4, Ogg/Vorbis, Opus, DSF FLAC, MPC, APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV and AIFF tags, multiple files, generate tags from file names @@ -12,7 +12,7 @@ Home-page: http://kid3.sourceforge.net Alternate-site: http://www.kde-apps.org/content/show.php?content=10415 Primary-site: http://www.sourceforge.net/projects/kid3 - http://prdownloads.sourceforge.net/kid3/kid3-3.6.0.tar.gz?download + http://prdownloads.sourceforge.net/kid3/kid3-3.6.1.tar.gz?download Platform: Linux, Windows. Copying-policy: GPL End diff -Nru kid3-3.6.0/kid3.spec kid3-3.6.1/kid3.spec --- kid3-3.6.0/kid3.spec 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/kid3.spec 2018-04-18 18:01:00.000000000 +0000 @@ -6,7 +6,7 @@ License: GPL Group: Applications/Multimedia Summary: Efficient ID3 tag editor -Version: 3.6.0 +Version: 3.6.1 Release: 1%{?dist} URL: http://kid3.sourceforge.net/ Source0: http://downloads.sourceforge.net/kid3/%{name}-%{version}.tar.gz diff -Nru kid3-3.6.0/src/app/qt/CMakeLists.txt kid3-3.6.1/src/app/qt/CMakeLists.txt --- kid3-3.6.0/src/app/qt/CMakeLists.txt 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/app/qt/CMakeLists.txt 2018-04-18 18:01:00.000000000 +0000 @@ -115,6 +115,12 @@ ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) set_target_properties(${KID3_EXECUTABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist) + if (CMAKE_CXX_COMPILER MATCHES "/osxcross/") + # When cross compiling, CPack does not know that is should be APPLE. + install(CODE " + set(APPLE TRUE) + ") + endif () endif (APPLE) install(TARGETS ${KID3_EXECUTABLE} @@ -153,7 +159,8 @@ install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${plugin_dest_dir} FILES_MATCHING PATTERN "*jpeg${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATTERN "*jpeg4${CMAKE_SHARED_LIBRARY_SUFFIX}") + PATTERN "*jpeg4${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATTERN "*.dSYM" EXCLUDE) if (LINUX_SELF_CONTAINED) CHANGE_RPATH("\$ORIGIN/.." "${plugin_dest_dir}/imageformats/libqjpeg${CMAKE_SHARED_LIBRARY_SUFFIX}") @@ -162,10 +169,12 @@ if (APPLE) install(DIRECTORY "${QT_PLUGINS_DIR}/platforms" DESTINATION kid3.app/Contents/MacOS - FILES_MATCHING PATTERN "libqcocoa${CMAKE_SHARED_LIBRARY_SUFFIX}") + FILES_MATCHING PATTERN "libqcocoa${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATTERN "*.dSYM" EXCLUDE) install(DIRECTORY "${QT_PLUGINS_DIR}/mediaservice" DESTINATION ${plugin_dest_dir} - FILES_MATCHING PATTERN "libqavfmediaplayer${CMAKE_SHARED_LIBRARY_SUFFIX}") + FILES_MATCHING PATTERN "libqavfmediaplayer${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATTERN "*.dSYM" EXCLUDE) elseif (WIN32) install(DIRECTORY "${QT_PLUGINS_DIR}/platforms" DESTINATION ${plugin_dest_dir} @@ -190,20 +199,18 @@ DESTINATION ${plugin_dest_dir} FILES_MATCHING PATTERN "*d4${CMAKE_SHARED_LIBRARY_SUFFIX}" EXCLUDE - PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}") + PATTERN "*${CMAKE_SHARED_LIBRARY_SUFFIX}" + PATTERN "*.dSYM" EXCLUDE) endif (HAVE_PHONON) - if (WIN32) - string(REGEX MATCH "(i586-mingw32msvc-g\\+\\+|i686-w64-mingw32-g\\+\\+)" - _crossMingwMatch "${CMAKE_CXX_COMPILER}") - if (_crossMingwMatch) - # Avoid error "/usr/bin/ldd failed: 1" from GetPrerequisites.cmake:800 - # when building a Windows package from Linux with CMake 3.5. - install(CODE " - set(gp_tool DO_NOT_USE) - ") - endif (_crossMingwMatch) - endif (WIN32) + if (CMAKE_CROSSCOMPILING AND NOT APPLE) + # Avoid error "/usr/bin/ldd failed: 1" from GetPrerequisites.cmake:800 + # when cross-packaging, this does not seem to be supported. + # https://public.kitware.com/pipermail/cmake/2012-March/049497.html + install(CODE " + set(gp_tool DO_NOT_USE) + ") + endif (CMAKE_CROSSCOMPILING AND NOT APPLE) # Install and fix up all dependencies of the executable and the plugins. # On Mac OS X only keep the i386 code in the Qt libraries and plugins. @@ -242,7 +249,7 @@ else (NOT HAVE_QT5) # Use reduced size ICU libraries, QTBUG-29828, QTBUG-38259. # A folder with reduced ICU libraries can be copied to the Qt bin directory. - get_target_property(_qtBinDir Qt5::qmake LOCATION) + get_target_property(_qtBinDir Qt5::Core LOCATION) get_filename_component(_qtBinDir ${_qtBinDir} PATH) install(DIRECTORY "${_qtBinDir}/icu_reduced/" DESTINATION ${WITH_BINDIR} OPTIONAL) diff -Nru kid3-3.6.0/src/core/config/guiconfig.cpp kid3-3.6.1/src/core/config/guiconfig.cpp --- kid3-3.6.0/src/core/config/guiconfig.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/core/config/guiconfig.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -94,6 +94,7 @@ ++it, ++i) { config->setValue(QLatin1String("VSplitterSize") + QString::number(i), QVariant(*it)); } + config->setValue(QLatin1String("ConfigWindowGeometry"), QVariant(m_configWindowGeometry)); config->endGroup(); } @@ -157,6 +158,8 @@ break; } } + m_configWindowGeometry = config->value(QLatin1String("ConfigWindowGeometry"), + m_configWindowGeometry).toByteArray(); config->endGroup(); } @@ -263,3 +266,11 @@ emit playOnDoubleClickChanged(m_playOnDoubleClick); } } + +void GuiConfig::setConfigWindowGeometry(const QByteArray& configWindowGeometry) +{ + if (m_configWindowGeometry != configWindowGeometry) { + m_configWindowGeometry = configWindowGeometry; + emit configWindowGeometryChanged(m_configWindowGeometry); + } +} diff -Nru kid3-3.6.0/src/core/config/guiconfig.h kid3-3.6.1/src/core/config/guiconfig.h --- kid3-3.6.0/src/core/config/guiconfig.h 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/core/config/guiconfig.h 2018-04-18 18:01:00.000000000 +0000 @@ -60,6 +60,8 @@ Q_PROPERTY(bool hidePicture READ hidePicture WRITE setHidePicture NOTIFY hidePictureChanged) /** true to play file on double click */ Q_PROPERTY(bool playOnDoubleClick READ playOnDoubleClick WRITE setPlayOnDoubleClick NOTIFY playOnDoubleClickChanged) + /** config window geometry */ + Q_PROPERTY(QByteArray configWindowGeometry READ configWindowGeometry WRITE setConfigWindowGeometry NOTIFY configWindowGeometryChanged) public: /** @@ -164,6 +166,12 @@ /** Set if play file on double click is enabled. */ void setPlayOnDoubleClick(bool playOnDoubleClick); + /** Get config window geometry. */ + QByteArray configWindowGeometry() const { return m_configWindowGeometry; } + + /** Set import window geometry. */ + void setConfigWindowGeometry(const QByteArray& configWindowGeometry); + signals: /** Emitted when @a fileListSortColumn changed. */ void fileListSortColumnChanged(int fileListSortColumn); @@ -204,6 +212,9 @@ /** Emitted when @a playOnDoubleClick changed. */ void playOnDoubleClickChanged(bool playOnDoubleClick); + /** Emitted when @a configWindowGeometry changed. */ + void configWindowGeometryChanged(const QByteArray& configWindowGeometry); + private: friend GuiConfig& StoredConfig::instance(); @@ -215,6 +226,7 @@ QList m_dirListVisibleColumns; QList m_splitterSizes; QList m_vSplitterSizes; + QByteArray m_configWindowGeometry; bool m_autoHideTags; bool m_hideFile; bool m_hideTag[Frame::Tag_NumValues]; diff -Nru kid3-3.6.0/src/core/model/kid3application.cpp kid3-3.6.1/src/core/model/kid3application.cpp --- kid3-3.6.0/src/core/model/kid3application.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/core/model/kid3application.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -37,7 +37,7 @@ #include #include #if defined Q_OS_MAC && QT_VERSION >= 0x050200 -#include +#include #endif #include #if QT_VERSION >= 0x050000 && defined Q_OS_ANDROID @@ -957,7 +957,8 @@ while (it.hasNext()) { TaggedFile* taggedFile = it.next(); bool renamed = false; - if (!taggedFile->writeTags(false, &renamed, + if (taggedFile->isChanged() && + !taggedFile->writeTags(false, &renamed, FileConfig::instance().preserveTime())) { QString errorMsg = taggedFile->getAbsFilename(); errorFiles.push_back(errorMsg); diff -Nru kid3-3.6.0/src/core/tags/trackdata.cpp kid3-3.6.1/src/core/tags/trackdata.cpp --- kid3-3.6.0/src/core/tags/trackdata.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/core/tags/trackdata.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -394,7 +394,7 @@ str.remove(0, sepPos + 1); } // add extension to str - str += getFileExtension(); + str += getFileExtension(true); } TrackDataFormatReplacer fmt(*this, str); @@ -419,9 +419,12 @@ /** * Get file extension including the dot. * + * @param preferFromFilename true to prefer extension from current filename + * over default extension for file type + * * @return file extension, e.g. ".mp3". */ -QString TrackData::getFileExtension() const +QString TrackData::getFileExtension(bool preferFromFilename) const { QString fileExtension; QString absFilename; @@ -429,12 +432,13 @@ fileExtension = taggedFile->getFileExtension(); absFilename = taggedFile->getAbsFilename(); } - if (!fileExtension.isEmpty()) { - return fileExtension; - } else { + if (preferFromFilename || fileExtension.isEmpty()) { int dotPos = absFilename.lastIndexOf(QLatin1Char('.')); - return dotPos != -1 ? absFilename.mid(dotPos) : QString(); + if (dotPos != -1) { + return absFilename.mid(dotPos); + } } + return fileExtension; } /** diff -Nru kid3-3.6.0/src/core/tags/trackdata.h kid3-3.6.1/src/core/tags/trackdata.h --- kid3-3.6.0/src/core/tags/trackdata.h 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/core/tags/trackdata.h 2018-04-18 18:01:00.000000000 +0000 @@ -78,9 +78,12 @@ /** * Get file extension including the dot. * + * @param preferFromFilename true to prefer extension from current filename + * over default extension for file type + * * @return file extension, e.g. ".mp3". */ - QString getFileExtension() const; + QString getFileExtension(bool preferFromFilename = false) const; /** * Get the total number of tracks in the directory. diff -Nru kid3-3.6.0/src/gui/dialogs/configdialogpages.cpp kid3-3.6.1/src/gui/dialogs/configdialogpages.cpp --- kid3-3.6.0/src/gui/dialogs/configdialogpages.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/gui/dialogs/configdialogpages.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -693,6 +693,12 @@ } m_enabledPluginsModel->setStringList(importPlugins); m_enabledPluginsModel->setBitMask(importPluginsMask); + + if (!guiCfg.configWindowGeometry().isEmpty()) { + if (QWidget* configDialog = qobject_cast(parent())) { + configDialog->restoreGeometry(guiCfg.configWindowGeometry()); + } + } } /** @@ -796,4 +802,8 @@ } } importCfg.setDisabledPlugins(disabledPlugins); + + if (QWidget* configDialog = qobject_cast(parent())) { + guiCfg.setConfigWindowGeometry(configDialog->saveGeometry()); + } } diff -Nru kid3-3.6.0/src/gui/forms/kid3form.cpp kid3-3.6.1/src/gui/forms/kid3form.cpp --- kid3-3.6.0/src/gui/forms/kid3form.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/gui/forms/kid3form.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -237,7 +237,7 @@ fileLayout->addWidget(m_nameLabel, 0, 0); m_nameLineEdit = new QLineEdit(m_fileWidget); - connect(m_nameLineEdit, SIGNAL(textChanged(QString)), this, + connect(m_nameLineEdit, SIGNAL(textEdited(QString)), this, SLOT(nameLineEditChanged(QString))); fileLayout->addWidget(m_nameLineEdit, 0, 1, 1, 4); m_fileLabel->setBuddy(m_nameLineEdit); @@ -574,7 +574,7 @@ if (str != txt) { int curPos = le->cursorPosition(); le->setText(str); - le->setCursorPosition(curPos); + le->setCursorPosition(curPos + str.length() - txt.length()); } } } @@ -726,6 +726,7 @@ foreach (int column, guiCfg.fileListVisibleColumns()) { m_fileListBox->resizeColumnToContents(column); } + m_fileListBox->scrollTo(m_fileListBox->currentIndex()); } /** diff -Nru kid3-3.6.0/src/gui/widgets/frameitemdelegate.cpp kid3-3.6.1/src/gui/widgets/frameitemdelegate.cpp --- kid3-3.6.0/src/gui/widgets/frameitemdelegate.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/gui/widgets/frameitemdelegate.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -327,7 +327,7 @@ if (str != txt) { int curPos = le->cursorPosition(); le->setText(str); - le->setCursorPosition(curPos); + le->setCursorPosition(curPos + str.length() - txt.length()); } } } @@ -374,7 +374,7 @@ type == Frame::FT_Artist || type == Frame::FT_Album)) { if (lineEdit) { if (TagFormatConfig::instance().formatWhileEditing()) { - connect(lineEdit, SIGNAL(textChanged(QString)), + connect(lineEdit, SIGNAL(textEdited(QString)), this, SLOT(formatTextIfEnabled(QString))); } lineEdit->setMaxLength(type == Frame::FT_Comment ? 28 : 30); @@ -382,7 +382,7 @@ } else { if (lineEdit) { if (TagFormatConfig::instance().formatWhileEditing()) { - connect(lineEdit, SIGNAL(textChanged(QString)), + connect(lineEdit, SIGNAL(textEdited(QString)), this, SLOT(formatTextIfEnabled(QString))); } if (TagFormatConfig::instance().enableValidation()) { diff -Nru kid3-3.6.0/src/plugins/id3libmetadata/CMakeLists.txt kid3-3.6.1/src/plugins/id3libmetadata/CMakeLists.txt --- kid3-3.6.0/src/plugins/id3libmetadata/CMakeLists.txt 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/plugins/id3libmetadata/CMakeLists.txt 2018-04-18 18:01:00.000000000 +0000 @@ -10,14 +10,13 @@ endif (NOT MSVC) if (WIN32) set(ID3LIB_DEFINITIONS -DID3LIB_LINKOPTION=1) - string(REGEX MATCH "(i586-mingw32msvc-g\\+\\+|i686-w64-mingw32-g\\+\\+)" _crossMingwMatch "${CMAKE_CXX_COMPILER}") - if (NOT _crossMingwMatch) + if (NOT CMAKE_CROSSCOMPILING) set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv) # libiconv-2.dll is at the same place where the compiler is, C:\msys64\mingw32\bin get_filename_component(_mingw_bin_dir ${CMAKE_C_COMPILER} DIRECTORY) install(FILES "${_mingw_bin_dir}/libiconv-2.dll" - DESTINATION ${WITH_BINDIR}) - endif (NOT _crossMingwMatch) + DESTINATION ${WITH_BINDIR} OPTIONAL) + endif (NOT CMAKE_CROSSCOMPILING) elseif (APPLE) set(ID3LIB_LIBRARIES ${ID3LIB_LIBRARIES} -liconv) endif (WIN32) diff -Nru kid3-3.6.0/src/plugins/kid3qml/CMakeLists.txt kid3-3.6.1/src/plugins/kid3qml/CMakeLists.txt --- kid3-3.6.0/src/plugins/kid3qml/CMakeLists.txt 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/plugins/kid3qml/CMakeLists.txt 2018-04-18 18:01:00.000000000 +0000 @@ -118,9 +118,11 @@ install(DIRECTORY "${QT_QML_DIR}/QtQuick.2" DESTINATION "${WITH_PLUGINSDIR}/imports" FILES_MATCHING PATTERN "*plugin${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATTERN "qmldir") + PATTERN "qmldir" + PATTERN "*.dSYM" EXCLUDE) install(DIRECTORY "${QT_QML_DIR}/QtQuick/Layouts" DESTINATION "${WITH_PLUGINSDIR}/imports/QtQuick" FILES_MATCHING PATTERN "*plugin${CMAKE_SHARED_LIBRARY_SUFFIX}" - PATTERN "qmldir") + PATTERN "qmldir" + PATTERN "*.dSYM" EXCLUDE) endif () diff -Nru kid3-3.6.0/src/plugins/mp4v2metadata/m4afile.cpp kid3-3.6.1/src/plugins/mp4v2metadata/m4afile.cpp --- kid3-3.6.0/src/plugins/mp4v2metadata/m4afile.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/plugins/mp4v2metadata/m4afile.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -347,7 +347,7 @@ } else if (std::strcmp(name, "tvsn") == 0 || std::strcmp(name, "tves") == 0 || std::strcmp(name, "sfID") == 0 || std::strcmp(name, "cnID") == 0 || std::strcmp(name, "atID") == 0 || std::strcmp(name, "geID") == 0 || - std::strcmp(name, "cmID") == 0 || std::strcmp(name, "xid ") == 0) { + std::strcmp(name, "cmID") == 0) { if (size >= 4) { uint val = value[3] + (value[2] << 8) + (value[1] << 16) + (value[0] << 24); diff -Nru kid3-3.6.0/src/plugins/taglibmetadata/CMakeLists.txt kid3-3.6.1/src/plugins/taglibmetadata/CMakeLists.txt --- kid3-3.6.0/src/plugins/taglibmetadata/CMakeLists.txt 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/plugins/taglibmetadata/CMakeLists.txt 2018-04-18 18:01:00.000000000 +0000 @@ -1,7 +1,7 @@ set(TAGLIB_LIBRARIES) set(TAGLIB_CFLAGS) if(WITH_TAGLIB) - if (WIN32) + if (WIN32 OR CMAKE_CXX_COMPILER MATCHES "/osxcross/") find_library(TAGLIB_LIBRARIES NAMES tag) find_path(TAGLIB_INCLUDE_DIR taglib/taglib.h) if (TAGLIB_LIBRARIES AND TAGLIB_INCLUDE_DIR) @@ -10,7 +10,7 @@ message(STATUS "TagLib found: ${TAGLIB_LIBRARIES}") set(TAGLIB_LIBRARIES ${TAGLIB_LIBRARIES} ${ZLIB_LIBRARIES}) endif (TAGLIB_LIBRARIES AND TAGLIB_INCLUDE_DIR) - else (WIN32) + else () find_program(TAGLIBCONFIG_EXECUTABLE NAMES taglib-config PATHS /usr/bin /usr/local/bin ${BIN_INSTALL_DIR}) if(TAGLIBCONFIG_EXECUTABLE) exec_program(${TAGLIBCONFIG_EXECUTABLE} ARGS --libs RETURN_VALUE _return_VALUE OUTPUT_VARIABLE TAGLIB_LIBRARIES) @@ -24,7 +24,7 @@ endif(NOT ${TAGLIB_VERSION} VERSION_LESS 1.4) endif(TAGLIB_LIBRARIES AND TAGLIB_CFLAGS AND TAGLIB_VERSION) endif(TAGLIBCONFIG_EXECUTABLE) - endif (WIN32) + endif () if (NOT HAVE_TAGLIB) message(FATAL_ERROR "Could not find Taglib") endif (NOT HAVE_TAGLIB) diff -Nru kid3-3.6.0/src/plugins/taglibmetadata/taglibfile.cpp kid3-3.6.1/src/plugins/taglibmetadata/taglibfile.cpp --- kid3-3.6.0/src/plugins/taglibmetadata/taglibfile.cpp 2018-03-18 16:43:16.000000000 +0000 +++ kid3-3.6.1/src/plugins/taglibmetadata/taglibfile.cpp 2018-04-18 18:01:00.000000000 +0000 @@ -4151,6 +4151,11 @@ { "plID", Frame::FT_Other, MVT_LongLong }, { "geID", Frame::FT_Other, MVT_UInt }, { "ownr", Frame::FT_Other, MVT_String }, +#ifdef TAGLIB_WITH_MP4_SHWM + { "purl", Frame::FT_Other, MVT_String }, + { "egid", Frame::FT_Other, MVT_String }, + { "cmID", Frame::FT_Other, MVT_UInt }, +#endif { "xid ", Frame::FT_Other, MVT_String }, #if TAGLIB_VERSION >= 0x010602 { "covr", Frame::FT_Picture, MVT_CoverArt }, @@ -4289,7 +4294,13 @@ static void prefixMp4FreeFormName(TagLib::String& name, const TagLib::MP4::Tag* mp4Tag) { - if (!mp4Tag->contains(name) && !name.startsWith("----") && + if ( +#if TAGLIB_VERSION >= 0x011000 + !mp4Tag->contains(name) +#else + !const_cast(mp4Tag)->itemListMap().contains(name) +#endif + && !name.startsWith("----") && !(name.length() == 4 && (name[0] == '\251' || (name[0] >= 'a' && name[0] <= 'z')))) { Frame::Type type; @@ -4299,12 +4310,29 @@ if (name[0] == ':') name = name.substr(1); TagLib::String freeFormName = "----:com.apple.iTunes:" + name; unsigned int nameLen; - if (!mp4Tag->contains(freeFormName) && (nameLen = name.length()) > 0) { + if ( +#if TAGLIB_VERSION >= 0x011000 + !mp4Tag->contains(freeFormName) +#else + !const_cast(mp4Tag)->itemListMap().contains( + freeFormName) +#endif + && (nameLen = name.length()) > 0) { // Not an iTunes free form name, maybe using another prefix // (such as "----:com.nullsoft.winamp:"). // Search for a frame which ends with this name. +#if TAGLIB_VERSION >= 0x011000 const TagLib::MP4::ItemMap& items = mp4Tag->itemMap(); - for (TagLib::MP4::ItemMap::ConstIterator it = items.begin(); +#else + const TagLib::MP4::ItemListMap& items = + const_cast(mp4Tag)->itemListMap(); +#endif + for ( +#if TAGLIB_VERSION >= 0x011000 + TagLib::MP4::ItemMap::ConstIterator it = items.begin(); +#else + TagLib::MP4::ItemListMap::ConstIterator it = items.begin(); +#endif it != items.end(); ++it) { const TagLib::String& key = it->first;