From e388b62680ec0881b875cd03724b988a171df35b Mon Sep 17 00:00:00 2001 From: Andrew Benson Date: Mon, 1 Aug 2022 19:15:45 -0500 Subject: [PATCH] mixxx: update to 2.3.3. --- srcpkgs/mixxx/patches/fix-musl.patch | 101 +++++++++++++++++++++++++++ srcpkgs/mixxx/template | 49 +++---------- 2 files changed, 111 insertions(+), 39 deletions(-) create mode 100644 srcpkgs/mixxx/patches/fix-musl.patch diff --git a/srcpkgs/mixxx/patches/fix-musl.patch b/srcpkgs/mixxx/patches/fix-musl.patch new file mode 100644 index 000000000000..ba93de072180 --- /dev/null +++ b/srcpkgs/mixxx/patches/fix-musl.patch @@ -0,0 +1,101 @@ +--- a/src/sources/soundsourcem4a.h ++++ b/src/sources/soundsourcem4a.h +@@ -58,10 +58,10 @@ + MP4Duration m_framesPerSampleBlock; + MP4SampleId m_maxSampleBlockId; + +- u_int8_t* m_pMP4ESConfigBuffer{}; +- u_int32_t m_sizeofMP4ESConfigBuffer; ++ uint8_t* m_pMP4ESConfigBuffer{}; ++ uint32_t m_sizeofMP4ESConfigBuffer; + +- typedef std::vector InputBuffer; ++ typedef std::vector InputBuffer; + InputBuffer m_inputBuffer; + InputBuffer::size_type m_inputBufferLength; + InputBuffer::size_type m_inputBufferOffset; +--- a/src/sources/soundsourcem4a.cpp ++++ b/src/sources/soundsourcem4a.cpp +@@ -36,7 +36,7 @@ + constexpr SINT kNumberOfPrefetchFrames = 2112; + + // The TrackId is a 1-based index of the tracks in an MP4 file +-constexpr u_int32_t kMinTrackId = 1; ++constexpr uint32_t kMinTrackId = 1; + + // http://www.iis.fraunhofer.de/content/dam/iis/de/doc/ame/wp/FraunhoferIIS_Application-Bulletin_AAC-Transport-Formats.pdf + // Footnote 13: "The usual frame length for AAC-LC is 1024 samples, but a 960 sample version +@@ -52,9 +52,9 @@ + // https://github.com/sannies/mp4parser/blob/master/isoparser/src/main/java/org/mp4parser/boxes/iso14496/part1/objectdescriptors/DecoderConfigDescriptor.java + // http://mutagen-specs.readthedocs.io/en/latest/mp4/ + // http://perso.telecom-paristech.fr/~dufourd/mpeg-4/tools.html +-constexpr u_int32_t kMaxSampleBlockInputSizeLimit = (u_int32_t(1) << 24) - 1; ++constexpr uint32_t kMaxSampleBlockInputSizeLimit = (uint32_t(1) << 24) - 1; + +-inline u_int32_t getMaxTrackId(MP4FileHandle hFile) { ++inline uint32_t getMaxTrackId(MP4FileHandle hFile) { + // The maximum TrackId equals the number of all tracks + // in an MP4 file. We pass nullptr and 0 as arguments + // to avoid any type/subtype filtering at this point! +@@ -76,8 +76,8 @@ + // Searches for the first audio track in the MP4 file that + // suits our needs. + MP4TrackId findFirstAudioTrackId(MP4FileHandle hFile, const QString& fileName) { +- const u_int32_t maxTrackId = getMaxTrackId(hFile); +- for (u_int32_t trackId = kMinTrackId; trackId <= maxTrackId; ++trackId) { ++ const uint32_t maxTrackId = getMaxTrackId(hFile); ++ for (uint32_t trackId = kMinTrackId; trackId <= maxTrackId; ++trackId) { + const char* trackType = MP4GetTrackType(hFile, trackId); + if (!isValidTrackType(trackType)) { + kLogger.warning() << "Unsupported track type" +@@ -102,10 +102,10 @@ + << fileName; + continue; + } +- const u_int8_t audioType = MP4GetTrackEsdsObjectTypeId(hFile, trackId); ++ const uint8_t audioType = MP4GetTrackEsdsObjectTypeId(hFile, trackId); + if (MP4_IS_AAC_AUDIO_TYPE(audioType)) { + if (MP4_MPEG4_AUDIO_TYPE == audioType) { +- const u_int8_t mpeg4AudioType = ++ const uint8_t mpeg4AudioType = + MP4GetTrackAudioMpeg4Type(hFile, trackId); + if (MP4_IS_MPEG4_AAC_AUDIO_TYPE(mpeg4AudioType)) { + return trackId; +@@ -151,7 +151,7 @@ + constexpr size_t kMinADTSHeaderLength = 7; + + size_t getADTSHeaderLength( +- const u_int8_t* pInputBuffer, ++ const uint8_t* pInputBuffer, + size_t sizeofInputBuffer) { + // The size of the raw data block must be strictly greater than + // the size of only ADTS header alone, i.e. additional sample +@@ -178,7 +178,7 @@ + } + + inline bool startsWithADTSHeader( +- const u_int8_t* pInputBuffer, ++ const uint8_t* pInputBuffer, + size_t sizeofInputBuffer) { + return 0 < getADTSHeaderLength(pInputBuffer, sizeofInputBuffer); + } +@@ -282,7 +282,7 @@ + + // Determine the maximum input size (in bytes) of a + // sample block for the selected track. +- const u_int32_t maxSampleBlockInputSize = MP4GetTrackMaxSampleSize(m_hFile, ++ const uint32_t maxSampleBlockInputSize = MP4GetTrackMaxSampleSize(m_hFile, + m_trackId); + if (maxSampleBlockInputSize == 0) { + kLogger.warning() << "Failed to read MP4 DecoderConfigDescriptor.bufferSizeDB:" +@@ -627,8 +627,8 @@ + // Fill input buffer from file + if (isValidSampleBlockId(m_curSampleBlockId)) { + // Read data for next sample block into input buffer +- u_int8_t* pInputBuffer = m_inputBuffer.data(); +- u_int32_t inputBufferLength = m_inputBuffer.size(); // in/out parameter ++ uint8_t* pInputBuffer = m_inputBuffer.data(); ++ uint32_t inputBufferLength = m_inputBuffer.size(); // in/out parameter + if (!MP4ReadSample(m_hFile, + m_trackId, + m_curSampleBlockId, diff --git a/srcpkgs/mixxx/template b/srcpkgs/mixxx/template index e5912b482fa1..232b7050c709 100644 --- a/srcpkgs/mixxx/template +++ b/srcpkgs/mixxx/template @@ -1,51 +1,22 @@ # Template file for 'mixxx' pkgname=mixxx -version=2.2.4 -revision=13 -wrksrc="mixxx-release-${version}" -build_style=scons -hostmakedepends="pkg-config protobuf" +version=2.3.3 +revision=1 +build_style=cmake +configure_args="-DCMAKE_BUILD_TYPE=Release" +hostmakedepends="pkg-config protobuf qt5-devel" makedepends="chromaprint-devel faad2-devel ffmpeg-devel fftw-devel glu-devel libid3tag-devel libmad-devel libmp4v2-devel libshout-devel libusb-devel opusfile-devel portaudio-devel portmidi-devel protobuf-devel qt5-script-devel qt5-svg-devel qt5-xmlpatterns-devel rubberband-devel taglib-devel upower-devel vamp-plugin-sdk-devel lv2 lilv-devel qt5-x11extras-devel hidapi-devel - libtheora-devel speex-devel soundtouch-devel" + libtheora-devel speex-devel soundtouch-devel lame-devel qt5-plugin-mysql + qt5-plugin-odbc qt5-plugin-pgsql qt5-plugin-sqlite qt5-plugin-tds + qtkeychain-qt5-devel" depends="qt5-plugin-sqlite" short_desc="Open source digital DJing software that allows mixing music" maintainer="Enno Boland " license="GPL-2.0-or-later" homepage="https://www.mixxx.org" -distfiles="https://github.com/mixxxdj/mixxx/archive/release-${version}.tar.gz" -checksum=9372b43d5ec882845b4fe2350ef50dabb3f1e0cc029f182b0ed8aa4f4f3b2afa -_scons_args="shoutcast=1 faad=1 tuned=0 prefix=/usr qt5=1 qtdir=/usr/include/qt5" - -nocross=https://build.voidlinux.org/builders/armv7l_builder/builds/7882/steps/shell_3/logs/stdio - -do_build() { - case "$XBPS_TARGET_MACHINE" in - *-musl) find plugins -type f -exec sed -i "{}" \ - -e "s;u_int8_t;uint8_t;g" -e "s;u_int32_t;uint32_t;g" \; - ;; - esac - if [ "${XBPS_TARGET_MACHINE%-musl}" = "i686" ]; then - export CFLAGS+=" -msse" - export CXXFLAGS+=" -msse" - fi - sed -i \ - -e 's/branch_name = .*/branch_name = "mixxx"/' \ - -e 's/vcs_revision = .*/vcs_revision = "'$version'"/' \ - src/SConscript - - sed -i -e 's/vamp-plugin-sdk/vamp-sdk/g' build/features.py vamp-plugins/SConscript - - MAKEFLAGS="${makejobs}" scons ${makejobs} ${_scons_args} -} - -do_install() { - if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then - export CFLAGS+=" -msse" - export CXXFLAGS+=" -msse" - fi - scons ${_scons_args} install_root=${DESTDIR}/usr install -} +distfiles="https://github.com/mixxxdj/mixxx/archive/${version}.tar.gz" +checksum=8e3a5a545175982336bb07c81a3839897a007c43689b93641242db662f6beb9c