* add missing files

This commit is contained in:
Alexander Baldeck 2023-01-13 14:19:11 +01:00
parent bd578f7877
commit a072ea246c
27 changed files with 1035 additions and 70 deletions

View File

@ -3,7 +3,7 @@
# Contributor: Jan de Groot <jgc@archlinux.org>
pkgname=appstream-glib
pkgver=0.8.1
pkgver=0.8.2
pkgrel=1
pkgdesc="Objects and methods for reading and writing AppStream metadata"
url="https://people.freedesktop.org/~hughsient/appstream-glib/"
@ -15,7 +15,7 @@ provides=(appdata-tools libappstream-glib.so)
conflicts=(appdata-tools)
replaces=(appdata-tools)
options=(debug)
_commit=28c985bec286385504c5303a8f29eab4082f5afd # tags/appstream_glib_0_8_1^0
_commit=02c8ad3b66075d9b2c9094dff816cd44839a4b45 # tags/appstream_glib_0_8_2^0
source=("git+https://github.com/hughsie/appstream-glib#commit=$_commit")
sha256sums=('SKIP')

View File

@ -3,7 +3,7 @@
# Contributor: Guillaume Horel <guillaume.horel@gmail.com>
pkgname=arrow
pkgver=9.0.0
pkgver=10.0.1
pkgrel=2
pkgdesc="Columnar in-memory analytics layer for big data."
arch=(x86_64 powerpc64le powerpc riscv64)
@ -15,26 +15,13 @@ depends=(apache-orc boost-libs brotli bzip2 double-conversion c-ares gflags
provides=(parquet-cpp)
conflicts=(parquet-cpp)
makedepends=(boost cmake flatbuffers gmock python-numpy git clang)
options=(!ccache !distcc)
source=(https://archive.apache.org/dist/${pkgname}/${pkgname}-${pkgver}/apache-${pkgname}-${pkgver}.tar.gz{,.asc}
git+https://github.com/apache/parquet-testing.git
git+https://github.com/apache/arrow-testing.git
xsimd-9.patch
${pkgname}-riscv.patch::https://patch-diff.githubusercontent.com/raw/apache/arrow/pull/13902.patch)
sha256sums=('a9a033f0a3490289998f458680d19579cf07911717ba65afde6cb80070f7a9b5'
'SKIP'
'SKIP'
'SKIP'
'1b2beeeaf0683a244e58a1aa830fb75e74bf1a8f78ed6fe273779d4210f2aa50'
'8c2e51998cdef1daf2ef70258c201fd2f891a3abeacb1068ff8ee8f21bb86fa1')
validpgpkeys=(265F80AB84FE03127E14F01125BCCA5220D84079 # Krisztian Szucs (apache) <szucs.krisztian@gmail.com>
08D3564B7C6A9CAFBFF6A66791D18FCF079F8007) # Kouhei Sutou <kou@cozmixng.org>
prepare() {
cd apache-${pkgname}-${pkgver}
patch -Np1 -i ${srcdir}/xsimd-9.patch
patch -Np1 -i ${srcdir}/${pkgname}-riscv.patch
}
git+https://github.com/apache/arrow-testing.git)
b2sums=('3ee82372635d90b05c1e7c9d846c52a923ba181e177959aa6be2603ab06e93415cf8e21cf194816e1c1eed83eb5a926e1414fb8930e525c208e46a6687601939'
'SKIP'
'SKIP'
'SKIP')
build(){
case "${CARCH}" in
@ -69,6 +56,7 @@ build(){
-DARROW_PLASMA=ON \
-DARROW_PYTHON=ON \
-DARROW_TENSORFLOW=ON \
-DARROW_SIMD_LEVEL=AVX2 \
-DARROW_USE_GLOG=ON \
-DARROW_WITH_BROTLI=ON \
-DARROW_WITH_BZ2=ON \
@ -76,7 +64,7 @@ build(){
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_ZLIB=ON \
-DARROW_WITH_ZSTD=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON ${_cmake_options}
-DPARQUET_REQUIRE_ENCRYPTION=ON ${_cmake_options[@]}
make -C build
}

View File

@ -12,7 +12,7 @@
pkgname=('boost' 'boost-libs')
pkgver=1.80.0
pkgrel=3
pkgrel=3.1
_srcname=boost_${pkgver//./_}
pkgdesc="Free peer-reviewed portable C++ source libraries"
arch=(x86_64 powerpc64le powerpc riscv64)

550
chromaprint/8ccad693.patch Normal file
View File

@ -0,0 +1,550 @@
From 8ccad6937177b1b92e40ab8f4447ea27bac009a7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= <lalinsky@gmail.com>
Date: Fri, 4 Nov 2022 21:47:38 +0100
Subject: [PATCH] Use FFmpeg 5.x (#120)
* Use FFmpeg 5.1.2 for CI builds
* Build on Ubuntu 20.04
* Upgrade code to FFmpeg 5.x APIs
* Only set FFmpeg include dirs if building tools
* No longer needed
* Use ubuntu 20.04
---
.github/workflows/build.yml | 6 +-
CMakeLists.txt | 16 --
package/build.sh | 4 +-
src/audio/ffmpeg_audio_processor.h | 2 -
src/audio/ffmpeg_audio_processor_avresample.h | 72 -------
src/audio/ffmpeg_audio_processor_swresample.h | 18 +-
src/audio/ffmpeg_audio_reader.h | 197 +++++++++---------
tests/CMakeLists.txt | 6 +
8 files changed, 122 insertions(+), 199 deletions(-)
delete mode 100644 src/audio/ffmpeg_audio_processor_avresample.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f8d6a32..4da2405 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,9 +84,6 @@ find_package(FFmpeg)
if(FFMPEG_LIBRARIES)
cmake_push_check_state(RESET)
set(CMAKE_REQUIRED_LIBRARIES ${FFMPEG_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} -lm)
- check_function_exists(av_packet_unref HAVE_AV_PACKET_UNREF)
- check_function_exists(av_frame_alloc HAVE_AV_FRAME_ALLOC)
- check_function_exists(av_frame_free HAVE_AV_FRAME_FREE)
cmake_pop_check_state()
endif()
@@ -163,14 +160,11 @@ message(STATUS "Using ${FFT_LIB} for FFT calculations")
if(NOT AUDIO_PROCESSOR_LIB)
if(FFMPEG_LIBSWRESAMPLE_FOUND)
set(AUDIO_PROCESSOR_LIB "swresample")
- elseif(FFMPEG_LIBAVRESAMPLE_FOUND)
- set(AUDIO_PROCESSOR_LIB "avresample")
endif()
endif()
if(AUDIO_PROCESSOR_LIB STREQUAL "swresample")
if(FFMPEG_LIBSWRESAMPLE_FOUND)
- set(USE_AVRESAMPLE OFF)
set(USE_SWRESAMPLE ON)
set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBSWRESAMPLE_LIBRARIES})
set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBSWRESAMPLE_INCLUDE_DIRS})
@@ -178,16 +172,6 @@ if(AUDIO_PROCESSOR_LIB STREQUAL "swresample")
message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found")
endif()
message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion")
-elseif(AUDIO_PROCESSOR_LIB STREQUAL "avresample")
- if(FFMPEG_LIBAVRESAMPLE_FOUND)
- set(USE_AVRESAMPLE ON)
- set(USE_SWRESAMPLE OFF)
- set(AUDIO_PROCESSOR_LIBRARIES ${FFMPEG_LIBAVRESAMPLE_LIBRARIES})
- set(AUDIO_PROCESSOR_INCLUDE_DIRS ${FFMPEG_LIBAVRESAMPLE_INCLUDE_DIRS})
- else()
- message(FATAL_ERROR "Selected ${AUDIO_PROCESSOR_LIB} for audio processing, but the library is not found")
- endif()
- message(STATUS "Using ${AUDIO_PROCESSOR_LIB} for audio conversion")
else()
message(STATUS "Building without audio conversion support, please install FFmpeg with libswresample")
endif()
diff --git a/src/audio/ffmpeg_audio_processor.h b/src/audio/ffmpeg_audio_processor.h
index 7628fc7..39f4f6d 100644
--- a/src/audio/ffmpeg_audio_processor.h
+++ b/src/audio/ffmpeg_audio_processor.h
@@ -10,8 +10,6 @@
#if defined(USE_SWRESAMPLE)
#include "audio/ffmpeg_audio_processor_swresample.h"
-#elif defined(USE_AVRESAMPLE)
-#include "audio/ffmpeg_audio_processor_avresample.h"
#else
#error "no audio processing library"
#endif
diff --git a/src/audio/ffmpeg_audio_processor_avresample.h b/src/audio/ffmpeg_audio_processor_avresample.h
deleted file mode 100644
index bd85f92..0000000
--- a/src/audio/ffmpeg_audio_processor_avresample.h
+++ /dev/null
@@ -1,72 +0,0 @@
-// Copyright (C) 2016 Lukas Lalinsky
-// Distributed under the MIT license, see the LICENSE file for details.
-
-#ifndef CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_
-#define CHROMAPRINT_AUDIO_FFMPEG_AUDIO_PROCESSOR_AVRESAMPLE_H_
-
-extern "C" {
-#include <libavresample/avresample.h>
-}
-
-namespace chromaprint {
-
-class FFmpegAudioProcessor {
-public:
- FFmpegAudioProcessor() {
- m_resample_ctx = avresample_alloc_context();
- }
-
- ~FFmpegAudioProcessor() {
- avresample_free(&m_resample_ctx);
- }
-
- void SetCompatibleMode() {
- av_opt_set_int(m_resample_ctx, "filter_size", 16, 0);
- av_opt_set_int(m_resample_ctx, "phase_shift", 8, 0);
- av_opt_set_int(m_resample_ctx, "linear_interp", 1, 0);
- av_opt_set_double(m_resample_ctx, "cutoff", 0.8, 0);
- }
-
- void SetInputChannelLayout(int64_t channel_layout) {
- av_opt_set_int(m_resample_ctx, "in_channel_layout", channel_layout, 0);
- }
-
- void SetInputSampleFormat(AVSampleFormat sample_format) {
- av_opt_set_int(m_resample_ctx, "in_sample_fmt", sample_format, 0);
- }
-
- void SetInputSampleRate(int sample_rate) {
- av_opt_set_int(m_resample_ctx, "in_sample_rate", sample_rate, 0);
- }
-
- void SetOutputChannelLayout(int64_t channel_layout) {
- av_opt_set_int(m_resample_ctx, "out_channel_layout", channel_layout, 0);
- }
-
- void SetOutputSampleFormat(AVSampleFormat sample_format) {
- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_format, 0);
- }
-
- void SetOutputSampleRate(int sample_rate) {
- av_opt_set_int(m_resample_ctx, "out_sample_fmt", sample_rate, 0);
- }
-
- int Init() {
- return avresample_open(m_resample_ctx);
- }
-
- int Convert(uint8_t **out, int out_count, const uint8_t **in, int in_count) {
- return avresample_convert(m_resample_ctx, out, 0, out_count, (uint8_t **) in, 0, in_count);
- }
-
- int Flush(uint8_t **out, int out_count) {
- return avresample_read(m_resample_ctx, out, out_count);
- }
-
-private:
- AVAudioResampleContext *m_resample_ctx = nullptr;
-};
-
-}; // namespace chromaprint
-
-#endif
diff --git a/src/audio/ffmpeg_audio_processor_swresample.h b/src/audio/ffmpeg_audio_processor_swresample.h
index b86266b..b1d4bea 100644
--- a/src/audio/ffmpeg_audio_processor_swresample.h
+++ b/src/audio/ffmpeg_audio_processor_swresample.h
@@ -28,30 +28,28 @@ class FFmpegAudioProcessor {
av_opt_set_double(m_swr_ctx, "cutoff", 0.8, 0);
}
- void SetInputChannelLayout(int64_t channel_layout) {
- av_opt_set_int(m_swr_ctx, "icl", channel_layout, 0);
- av_opt_set_int(m_swr_ctx, "ich", av_get_channel_layout_nb_channels(channel_layout), 0);
+ void SetInputChannelLayout(AVChannelLayout *channel_layout) {
+ av_opt_set_int(m_swr_ctx, "in_channel_layout", channel_layout->u.mask, 0);
}
void SetInputSampleFormat(AVSampleFormat sample_format) {
- av_opt_set_int(m_swr_ctx, "isf", sample_format, 0);
+ av_opt_set_sample_fmt(m_swr_ctx, "in_sample_fmt", sample_format, 0);
}
void SetInputSampleRate(int sample_rate) {
- av_opt_set_int(m_swr_ctx, "isr", sample_rate, 0);
+ av_opt_set_int(m_swr_ctx, "in_sample_rate", sample_rate, 0);
}
- void SetOutputChannelLayout(int64_t channel_layout) {
- av_opt_set_int(m_swr_ctx, "ocl", channel_layout, 0);
- av_opt_set_int(m_swr_ctx, "och", av_get_channel_layout_nb_channels(channel_layout), 0);
+ void SetOutputChannelLayout(AVChannelLayout *channel_layout) {
+ av_opt_set_int(m_swr_ctx, "out_channel_layout", channel_layout->u.mask, 0);
}
void SetOutputSampleFormat(AVSampleFormat sample_format) {
- av_opt_set_int(m_swr_ctx, "osf", sample_format, 0);
+ av_opt_set_sample_fmt(m_swr_ctx, "out_sample_fmt", sample_format, 0);
}
void SetOutputSampleRate(int sample_rate) {
- av_opt_set_int(m_swr_ctx, "osr", sample_rate, 0);
+ av_opt_set_int(m_swr_ctx, "out_sample_rate", sample_rate, 0);
}
int Init() {
diff --git a/src/audio/ffmpeg_audio_reader.h b/src/audio/ffmpeg_audio_reader.h
index 5550164..1c6b346 100644
--- a/src/audio/ffmpeg_audio_reader.h
+++ b/src/audio/ffmpeg_audio_reader.h
@@ -62,7 +62,7 @@ class FFmpegAudioReader {
bool Read(const int16_t **data, size_t *size);
bool IsOpen() const { return m_opened; }
- bool IsFinished() const { return m_finished && !m_got_frame; }
+ bool IsFinished() const { return !m_has_more_packets && !m_has_more_frames; }
std::string GetError() const { return m_error; }
int GetErrorCode() const { return m_error_code; }
@@ -74,20 +74,19 @@ class FFmpegAudioReader {
uint8_t *m_convert_buffer[1] = { nullptr };
int m_convert_buffer_nb_samples = 0;
- AVInputFormat *m_input_fmt = nullptr;
+ const AVInputFormat *m_input_fmt = nullptr;
AVDictionary *m_input_opts = nullptr;
AVFormatContext *m_format_ctx = nullptr;
AVCodecContext *m_codec_ctx = nullptr;
- AVFrame *m_frame = nullptr;
int m_stream_index = -1;
std::string m_error;
int m_error_code = 0;
- bool m_finished = false;
bool m_opened = false;
- int m_got_frame = 0;
- AVPacket m_packet;
- AVPacket m_packet0;
+ bool m_has_more_packets = true;
+ bool m_has_more_frames = true;
+ AVPacket *m_packet = nullptr;
+ AVFrame *m_frame = nullptr;
int m_output_sample_rate = 0;
int m_output_channels = 0;
@@ -98,19 +97,12 @@ class FFmpegAudioReader {
inline FFmpegAudioReader::FFmpegAudioReader() {
av_log_set_level(AV_LOG_QUIET);
-
- av_init_packet(&m_packet);
- m_packet.data = nullptr;
- m_packet.size = 0;
-
- m_packet0 = m_packet;
}
inline FFmpegAudioReader::~FFmpegAudioReader() {
Close();
av_dict_free(&m_input_opts);
av_freep(&m_convert_buffer[0]);
- av_packet_unref(&m_packet0);
}
inline bool FFmpegAudioReader::SetInputFormat(const char *name) {
@@ -135,11 +127,10 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
Close();
- av_init_packet(&m_packet);
- m_packet.data = nullptr;
- m_packet.size = 0;
-
- m_packet0 = m_packet;
+ m_packet = av_packet_alloc();
+ if (!m_packet) {
+ return false;
+ }
ret = avformat_open_input(&m_format_ctx, file_name.c_str(), m_input_fmt, &m_input_opts);
if (ret < 0) {
@@ -153,26 +144,31 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
return false;
}
- AVCodec *codec;
+ const AVCodec *codec;
ret = av_find_best_stream(m_format_ctx, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0);
if (ret < 0) {
SetError("Could not find any audio stream in the file", ret);
return false;
}
m_stream_index = ret;
+ auto stream = m_format_ctx->streams[m_stream_index];
- m_codec_ctx = m_format_ctx->streams[m_stream_index]->codec;
+ m_codec_ctx = avcodec_alloc_context3(codec);
m_codec_ctx->request_sample_fmt = AV_SAMPLE_FMT_S16;
+ ret = avcodec_parameters_to_context(m_codec_ctx, stream->codecpar);
+ if (ret < 0) {
+ SetError("Could not copy the stream parameters", ret);
+ return false;
+ }
+
ret = avcodec_open2(m_codec_ctx, codec, nullptr);
if (ret < 0) {
SetError("Could not open the codec", ret);
return false;
}
- if (!m_codec_ctx->channel_layout) {
- m_codec_ctx->channel_layout = av_get_default_channel_layout(m_codec_ctx->channels);
- }
+ av_dump_format(m_format_ctx, 0, "foo", 0);
m_frame = av_frame_alloc();
if (!m_frame) {
@@ -183,19 +179,23 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
m_output_sample_rate = m_codec_ctx->sample_rate;
}
- if (!m_output_channels) {
- m_output_channels = m_codec_ctx->channels;
+ AVChannelLayout output_channel_layout;
+ if (m_output_channels) {
+ av_channel_layout_default(&output_channel_layout, m_output_channels);
+ } else {
+ m_output_channels = m_codec_ctx->ch_layout.nb_channels;
+ av_channel_layout_default(&output_channel_layout, m_output_channels);
}
- if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) {
+ if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16 || m_codec_ctx->ch_layout.nb_channels != m_output_channels || m_codec_ctx->sample_rate != m_output_sample_rate) {
m_converter.reset(new FFmpegAudioProcessor());
m_converter->SetCompatibleMode();
m_converter->SetInputSampleFormat(m_codec_ctx->sample_fmt);
m_converter->SetInputSampleRate(m_codec_ctx->sample_rate);
- m_converter->SetInputChannelLayout(m_codec_ctx->channel_layout);
+ m_converter->SetInputChannelLayout(&(m_codec_ctx->ch_layout));
m_converter->SetOutputSampleFormat(AV_SAMPLE_FMT_S16);
m_converter->SetOutputSampleRate(m_output_sample_rate);
- m_converter->SetOutputChannelLayout(av_get_default_channel_layout(m_output_channels));
+ m_converter->SetOutputChannelLayout(&output_channel_layout);
auto ret = m_converter->Init();
if (ret != 0) {
SetError("Could not create an audio converter instance", ret);
@@ -203,10 +203,11 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
}
}
+ av_channel_layout_uninit(&output_channel_layout);
+
m_opened = true;
- m_finished = false;
- m_got_frame = 0;
- m_nb_packets = 0;
+ m_has_more_packets = true;
+ m_has_more_frames = true;
m_decode_error = 0;
return true;
@@ -214,6 +215,7 @@ inline bool FFmpegAudioReader::Open(const std::string &file_name) {
inline void FFmpegAudioReader::Close() {
av_frame_free(&m_frame);
+ av_packet_free(&m_packet);
m_stream_index = -1;
@@ -252,91 +254,98 @@ inline bool FFmpegAudioReader::Read(const int16_t **data, size_t *size) {
return false;
}
+ *data = nullptr;
+ *size = 0;
+
int ret;
+ bool needs_packet = false;
while (true) {
- while (m_packet.size <= 0) {
- av_packet_unref(&m_packet0);
- av_init_packet(&m_packet);
- m_packet.data = nullptr;
- m_packet.size = 0;
- ret = av_read_frame(m_format_ctx, &m_packet);
+ while (needs_packet && m_packet->size == 0) {
+ ret = av_read_frame(m_format_ctx, m_packet);
if (ret < 0) {
if (ret == AVERROR_EOF) {
- m_finished = true;
+ needs_packet = false;
+ m_has_more_packets = false;
break;
- } else {
+ }
+ SetError("Error reading from the audio source", ret);
+ return false;
+ }
+ if (m_packet->stream_index == m_stream_index) {
+ needs_packet = false;
+ } else {
+ av_packet_unref(m_packet);
+ }
+ }
+
+ if (m_packet->size != 0) {
+ ret = avcodec_send_packet(m_codec_ctx, m_packet);
+ if (ret < 0) {
+ if (ret != AVERROR(EAGAIN)) {
SetError("Error reading from the audio source", ret);
return false;
}
- }
- m_packet0 = m_packet;
- if (m_packet.stream_index != m_stream_index) {
- m_packet.data = nullptr;
- m_packet.size = 0;
} else {
- m_nb_packets++;
+ av_packet_unref(m_packet);
}
}
- ret = avcodec_decode_audio4(m_codec_ctx, m_frame, &m_got_frame, &m_packet);
+ ret = avcodec_receive_frame(m_codec_ctx, m_frame);
if (ret < 0) {
- if (m_decode_error) {
- SetError("Error decoding audio frame", m_decode_error);
- return false;
+ if (ret == AVERROR_EOF) {
+ m_has_more_frames = false;
+ } else if (ret == AVERROR(EAGAIN)) {
+ if (m_has_more_packets) {
+ needs_packet = true;
+ continue;
+ } else {
+ m_has_more_frames = false;
+ }
}
- m_decode_error = ret;
- m_packet.data = nullptr;
- m_packet.size = 0;
- continue;
+ SetError("Error decoding the audio source", ret);
+ return false;
}
- break;
- }
-
- m_decode_error = 0;
-
- const int decoded = std::min(ret, m_packet.size);
- m_packet.data += decoded;
- m_packet.size -= decoded;
-
- if (m_got_frame) {
- if (m_converter) {
- if (m_frame->nb_samples > m_convert_buffer_nb_samples) {
- int linsize;
- av_freep(&m_convert_buffer[0]);
- m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples);
- ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1);
- if (ret < 0) {
- SetError("Couldn't allocate audio converter buffer", ret);
+ if (m_frame->nb_samples > 0) {
+ if (m_converter) {
+ if (m_frame->nb_samples > m_convert_buffer_nb_samples) {
+ int linsize;
+ av_freep(&m_convert_buffer[0]);
+ m_convert_buffer_nb_samples = std::max(1024 * 8, m_frame->nb_samples);
+ ret = av_samples_alloc(m_convert_buffer, &linsize, m_codec_ctx->ch_layout.nb_channels, m_convert_buffer_nb_samples, AV_SAMPLE_FMT_S16, 1);
+ if (ret < 0) {
+ SetError("Couldn't allocate audio converter buffer", ret);
+ return false;
+ }
+ }
+ auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples);
+ if (nb_samples < 0) {
+ SetError("Couldn't convert audio", ret);
return false;
}
- }
- auto nb_samples = m_converter->Convert(m_convert_buffer, m_convert_buffer_nb_samples, (const uint8_t **) m_frame->data, m_frame->nb_samples);
- if (nb_samples < 0) {
- SetError("Couldn't convert audio", ret);
- return false;
- }
- *data = (const int16_t *) m_convert_buffer[0];
- *size = nb_samples;
- } else {
- *data = (const int16_t *) m_frame->data[0];
- *size = m_frame->nb_samples;
- }
- } else {
- if (m_finished && m_converter) {
- auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples);
- if (nb_samples < 0) {
- SetError("Couldn't convert audio", ret);
- return false;
- } else if (nb_samples > 0) {
- m_got_frame = 1;
*data = (const int16_t *) m_convert_buffer[0];
*size = nb_samples;
+ } else {
+ *data = (const int16_t *) m_frame->data[0];
+ *size = m_frame->nb_samples;
+ }
+ } else {
+ if (m_converter) {
+ if (IsFinished()) {
+ auto nb_samples = m_converter->Flush(m_convert_buffer, m_convert_buffer_nb_samples);
+ if (nb_samples < 0) {
+ SetError("Couldn't convert audio", ret);
+ return false;
+ } else if (nb_samples > 0) {
+ *data = (const int16_t *) m_convert_buffer[0];
+ *size = nb_samples;
+ }
+ }
}
}
- }
- return true;
+ return true;
+ }
}
inline void FFmpegAudioReader::SetError(const char *message, int errnum) {
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a2b517b..123e643 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -38,6 +38,12 @@ set(SRCS
if(BUILD_TOOLS)
set(SRCS ${SRCS} ../src/audio/ffmpeg_audio_reader_test.cpp)
+ include_directories(
+ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS}
+ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS}
+ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS}
+ ${AUDIO_PROCESSOR_INCLUDE_DIRS}
+ )
link_libraries(fpcalc_libs)
endif()

View File

@ -0,0 +1,89 @@
From 2ba4e83e61617daee70f98fcdd76cb8bc3d6ac38 Mon Sep 17 00:00:00 2001
From: serge-sans-paille <sguelton@redhat.com>
Date: Sat, 18 Jun 2022 13:48:41 +0200
Subject: [PATCH] [clang] Enforce instantiation of constexpr template functions
during non-constexpr evaluation
Otherwise these functions are not instantiated and we end up with an undefined
symbol.
Fix #55560
Differential Revision: https://reviews.llvm.org/D128119
(cherry picked from commit da6a14b91ad999327b41a9040577273591e4ad1d)
---
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 5 +++--
.../CodeGenCXX/constexpr-late-instantiation.cpp | 17 +++++++++++++++++
.../SemaCXX/constexpr-late-instantiation.cpp | 15 +++++++++++++++
3 files changed, 35 insertions(+), 2 deletions(-)
create mode 100644 clang/test/CodeGenCXX/constexpr-late-instantiation.cpp
create mode 100644 clang/test/SemaCXX/constexpr-late-instantiation.cpp
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 467372c71496..293782822e83 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -4826,7 +4826,8 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
/*Complain*/DefinitionRequired)) {
if (DefinitionRequired)
Function->setInvalidDecl();
- else if (TSK == TSK_ExplicitInstantiationDefinition) {
+ else if (TSK == TSK_ExplicitInstantiationDefinition ||
+ (Function->isConstexpr() && !Recursive)) {
// Try again at the end of the translation unit (at which point a
// definition will be required).
assert(!Recursive);
@@ -4841,7 +4842,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
Diag(PatternDecl->getLocation(), diag::note_forward_template_decl);
if (getLangOpts().CPlusPlus11)
Diag(PointOfInstantiation, diag::note_inst_declaration_hint)
- << Function;
+ << Function;
}
}
diff --git a/clang/test/CodeGenCXX/constexpr-late-instantiation.cpp b/clang/test/CodeGenCXX/constexpr-late-instantiation.cpp
new file mode 100644
index 000000000000..1c8eef73f2dd
--- /dev/null
+++ b/clang/test/CodeGenCXX/constexpr-late-instantiation.cpp
@@ -0,0 +1,17 @@
+// Make sure foo is instantiated and we don't get a link error
+// RUN: %clang_cc1 -S -emit-llvm -triple %itanium_abi_triple %s -o- | FileCheck %s
+
+template <typename T>
+constexpr T foo(T a);
+
+// CHECK-LABEL: define {{.*}} @main
+int main() {
+ // CHECK: call {{.*}} @_Z3fooIiET_S0_
+ int k = foo<int>(5);
+}
+// CHECK: }
+
+template <typename T>
+constexpr T foo(T a) {
+ return a;
+}
diff --git a/clang/test/SemaCXX/constexpr-late-instantiation.cpp b/clang/test/SemaCXX/constexpr-late-instantiation.cpp
new file mode 100644
index 000000000000..ec8e071217c1
--- /dev/null
+++ b/clang/test/SemaCXX/constexpr-late-instantiation.cpp
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 %s -fsyntax-only -verify
+
+template <typename T>
+constexpr T foo(T a); // expected-note {{declared here}}
+
+int main() {
+ int k = foo<int>(5); // Ok
+ constexpr int j = // expected-error {{constexpr variable 'j' must be initialized by a constant expression}}
+ foo<int>(5); // expected-note {{undefined function 'foo<int>' cannot be used in a constant expression}}
+}
+
+template <typename T>
+constexpr T foo(T a) {
+ return a;
+}

View File

@ -6,7 +6,7 @@
pkgname=ffmpeg
pkgver=5.1.2
pkgrel=1
pkgrel=1.1
epoch=2
pkgdesc='Complete solution to record, convert and stream audio and video'
arch=(x86_64 powerpc64le powerpc riscv64)

View File

@ -0,0 +1,68 @@
diff '--color=auto' -rupN fmt.orig/doc/build.py fmt/doc/build.py
--- fmt.orig/doc/build.py 2022-11-06 10:33:24.090111201 +0100
+++ fmt/doc/build.py 2022-11-06 10:59:30.089304304 +0100
@@ -6,34 +6,6 @@ from subprocess import check_call, Calle
versions = ['1.0.0', '1.1.0', '2.0.0', '3.0.2', '4.0.0', '4.1.0', '5.0.0', '5.1.0', '5.2.0', '5.2.1', '5.3.0', '6.0.0', '6.1.0', '6.1.1', '6.1.2', '6.2.0', '6.2.1', '7.0.0', '7.0.1', '7.0.2', '7.0.3', '7.1.0', '7.1.1', '7.1.2', '7.1.3', '8.0.0', '8.0.1', '8.1.0', '8.1.1', '9.0.0', '9.1.0']
-class Pip:
- def __init__(self, venv_dir):
- self.path = os.path.join(venv_dir, 'bin', 'pip')
-
- def install(self, package, commit=None):
- "Install package using pip."
- if commit:
- package = 'git+https://github.com/{0}.git@{1}'.format(package, commit)
- print('Installing {0}'.format(package))
- check_call([self.path, 'install', package])
-
-def create_build_env(venv_dir='virtualenv'):
- # Create virtualenv.
- if not os.path.exists(venv_dir):
- check_call(['python3', '-m', 'venv', venv_dir])
- # Install Sphinx and Breathe. Require the exact version of Sphinx which is
- # compatible with Breathe.
- pip = Pip(venv_dir)
- pip.install('wheel')
- pip.install('six')
- # See: https://github.com/sphinx-doc/sphinx/issues/9777
- pip.install('docutils==0.17.1')
- # Jinja2 >= 3.1 incompatible with sphinx 3.3.0
- # See: https://github.com/sphinx-doc/sphinx/issues/10291
- pip.install('Jinja2<3.1')
- pip.install('sphinx-doc/sphinx', 'v3.3.0')
- pip.install('michaeljones/breathe', 'v4.25.0')
-
def build_docs(version='dev', **kwargs):
doc_dir = kwargs.get('doc_dir', os.path.dirname(os.path.realpath(__file__)))
work_dir = kwargs.get('work_dir', '.')
@@ -99,13 +71,14 @@ def build_docs(version='dev', **kwargs):
html_dir = os.path.join(work_dir, 'html')
main_versions = reversed(versions[-3:])
- check_call([os.path.join(work_dir, 'virtualenv', 'bin', 'sphinx-build'),
+ check_call(['sphinx-build',
'-Dbreathe_projects.format=' + os.path.abspath(doxyxml_dir),
'-Dversion=' + version, '-Drelease=' + version,
'-Aversion=' + version, '-Aversions=' + ','.join(main_versions),
'-b', 'html', doc_dir, html_dir])
try:
- check_call(['lessc', '--verbose', '--clean-css',
+ check_call(['npm', 'install', 'less', 'less-plugin-clean-css'])
+ check_call(['npx', 'lessc', '--verbose', '--clean-css',
'--include-path=' + os.path.join(doc_dir, 'bootstrap'),
os.path.join(doc_dir, 'fmt.less'),
os.path.join(html_dir, '_static', 'fmt.css')])
@@ -118,5 +91,4 @@ def build_docs(version='dev', **kwargs):
return html_dir
if __name__ == '__main__':
- create_build_env()
build_docs(sys.argv[1])
diff '--color=auto' -rupN fmt.orig/.git/FETCH_HEAD fmt/.git/FETCH_HEAD
--- fmt.orig/.git/FETCH_HEAD 1970-01-01 01:00:00.000000000 +0100
+++ fmt/.git/FETCH_HEAD 2022-11-06 10:42:25.065548317 +0100
@@ -0,0 +1,3 @@
+fc07217d85e6dcec52878807d6bbd89a9d9156a5 branch 'master' of https://github.com/fmtlib/fmt
+3e8d2c57f3aee665e4672cd4e3fbf69cc2ebff2d not-for-merge branch '4.x' of https://github.com/fmtlib/fmt
+48f76dbb5211e9731b7f8aa19209ba86a1b8df23 not-for-merge branch 'text' of https://github.com/fmtlib/fmt

31
gdb/readline8.patch Normal file
View File

@ -0,0 +1,31 @@
commit 1add37b567a7dee39d99f37b37802034c3fce9c4
Author: Andreas Schwab <schwab@linux-m68k.org>
Date: Sun Mar 20 14:01:54 2022 +0100
Add support for readline 8.2
In readline 8.2 the type of rl_completer_word_break_characters changed to
include const.
diff --git a/gdb/completer.c b/gdb/completer.c
index d3900ae2014..a51c16ac7f8 100644
--- a/gdb/completer.c
+++ b/gdb/completer.c
@@ -36,7 +36,7 @@
calling a hook instead so we eliminate the CLI dependency. */
#include "gdbcmd.h"
-/* Needed for rl_completer_word_break_characters() and for
+/* Needed for rl_completer_word_break_characters and for
rl_filename_completion_function. */
#include "readline/readline.h"
@@ -2011,7 +2011,7 @@ gdb_completion_word_break_characters_throw ()
rl_basic_quote_characters = NULL;
}
- return rl_completer_word_break_characters;
+ return (char *) rl_completer_word_break_characters;
}
char *

View File

@ -0,0 +1,37 @@
From f5de3401b974ce103ffd93af8f9d43505a04aaf9 Mon Sep 17 00:00:00 2001
From: Damian Kurek <starfire24680@gmail.com>
Date: Thu, 7 Jul 2022 03:39:16 +0000
Subject: [PATCH] Fix NULL dereference when duplicating string argument
poptGetArg can return NULL if there are no additional arguments, which
makes strdup dereference NULL on strlen
---
gptcl.cc | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gptcl.cc b/gptcl.cc
index 0d578eb..ab95239 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = strdup((char*) poptGetArg(poptCon));
- poptResetContext(poptCon);
+ device = (char*) poptGetArg(poptCon);
if (device != NULL) {
+ device = strdup(device);
+ poptResetContext(poptCon);
JustLooking(); // reset as necessary
BeQuiet(); // Tell called functions to be less verbose & interactive
if (LoadPartitions((string) device)) {
@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
cerr << "Error encountered; not saving changes.\n";
retval = 4;
} // if
+ free(device);
} // if (device != NULL)
poptFreeContext(poptCon);
return retval;

37
gptfdisk/popt-1.19.patch Normal file
View File

@ -0,0 +1,37 @@
From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d Mon Sep 17 00:00:00 2001
From: Rod Smith <rodsmith@rodsbooks.com>
Date: Fri, 15 Apr 2022 18:10:14 -0400
Subject: [PATCH] Fix failure & crash of sgdisk when compiled with latest popt
(commit 740; presumably eventually release 1.19)
---
gptcl.cc | 2 +-
support.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gptcl.cc b/gptcl.cc
index 34c9421..0d578eb 100644
--- a/gptcl.cc
+++ b/gptcl.cc
@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) {
} // while
// Assume first non-option argument is the device filename....
- device = (char*) poptGetArg(poptCon);
+ device = strdup((char*) poptGetArg(poptCon));
poptResetContext(poptCon);
if (device != NULL) {
diff --git a/support.h b/support.h
index 8ba9ad1..f91f1bc 100644
--- a/support.h
+++ b/support.h
@@ -8,7 +8,7 @@
#include <stdlib.h>
#include <string>
-#define GPTFDISK_VERSION "1.0.9"
+#define GPTFDISK_VERSION "1.0.9.1"
#if defined (__FreeBSD__) || defined (__FreeBSD_kernel__) || defined (__APPLE__)
// Darwin (Mac OS) & FreeBSD: disk IOCTLs are different, and there is no lseek64

View File

@ -1,31 +1,24 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>
pkgname=guile
pkgver=2.2.7
pkgrel=3.2
pkgver=3.0.8
pkgrel=3
pkgdesc='Portable, embeddable Scheme implementation written in C'
url='https://www.gnu.org/software/guile/'
arch=(x86_64 powerpc64le powerpc riscv64)
license=(GPL)
depends=(gmp libltdl ncurses texinfo libunistring gc libffi)
depends=(gmp ncurses libunistring gc libffi libxcrypt)
makedepends=(texinfo)
source=(https://ftp.gnu.org/pub/gnu/$pkgname/$pkgname-$pkgver.tar.gz{,.sig})
validpgpkeys=('3CE464558A84FDC69DB40CFB090B11993D9AEBB5' # Ludovic Courtès <ludo@gnu.org>
'FF478FB264DE32EC296725A3DDC0F5358812F8F2' # Andy Wingo
'4FD4D288D445934E0A14F9A5A8803732E4436885') # Andy Wingo <wingo@pobox.com>"
sha256sums=('44b4c5fbbe257ccdebea18420212c9b3e90c3c86a54920d8554039fc6769a007'
sha256sums=('f25ae0c26e911af1b5005292d4f56621879f74d6958b30741cf67d8b6feb2016'
'SKIP')
prepare() {
cd $pkgname-$pkgver
sed -e '/test-out-of-memory/d' -i test-suite/standalone/Makefile.am # Disable test known to fail https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=966301
autoreconf -if
rm -rf prebuilt/32-bit-big-endian
}
build() {
cd $pkgname-$pkgver
./configure --prefix=/usr \
@ -42,5 +35,5 @@ check() {
package() {
make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
rm "$pkgdir"/usr/lib/libguile-2.?.so.*-gdb.scm
rm "$pkgdir"/usr/lib/libguile-3.?.so.*-gdb.scm
}

View File

@ -0,0 +1,61 @@
From: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Date: Sat, 9 Jul 2016 12:31:10 +0200
Subject: blowfish_endianess
---
src/runtime/kwalletd/backend/blowfish.cc | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
--- a/src/runtime/kwalletd/backend/blowfish.cc
+++ b/src/runtime/kwalletd/backend/blowfish.cc
@@ -21,10 +21,7 @@
// DO NOT INCLUDE THIS. IT BREAKS KWALLET.
// We need to live with -Wundef until someone really figures out the problem.
-//#include <QtCore/qglobal.h> // for Q_BYTE_ORDER and friends
-// Workaround for -Wundef
-#define Q_BIG_ENDIAN 1
-#define Q_BYTE_ORDER Q_BIG_ENDIAN
+#include <QtCore/qglobal.h> // for Q_BYTE_ORDER and friends
BlowFish::BlowFish()
{
@@ -126,7 +123,7 @@ bool BlowFish::setKey(void *key, int bit
return init();
}
// clang-format off
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
#define shuffle(x) do { \
uint32_t r = x; \
x = (r & 0xff000000) >> 24; \
@@ -146,12 +143,12 @@ int BlowFish::encrypt(void *block, int l
}
for (int i = 0; i < len / _blksz; i++) {
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
shuffle(*d);
shuffle(*(d + 1));
#endif
encipher(d, d + 1);
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
shuffle(*d);
shuffle(*(d + 1));
#endif
@@ -170,12 +167,12 @@ int BlowFish::decrypt(void *block, int l
}
for (int i = 0; i < len / _blksz; i++) {
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
shuffle(*d);
shuffle(*(d + 1));
#endif
decipher(d, d + 1);
-#if Q_BYTE_ORDER == Q_BIG_ENDIAN
+#if Q_BYTE_ORDER == Q_LITTLE_ENDIAN
shuffle(*d);
shuffle(*(d + 1));
#endif

View File

@ -0,0 +1,29 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Wed, 9 Nov 2022 08:00:19 +0000
Subject: [PATCH] gschema: Remove path from eap schema
This one needs to be relocatable, otherwise creating a new VPN
connection will fail with:
settings object created with schema 'org.gnome.nm-applet.eap'
and path '/org/gnome/nm-applet/eap/<uuid>/',
but path '/org/gnome/nm-applet/eap/' is specified by schema
Fixes: https://bugs.archlinux.org/task/76490
---
org.gnome.nm-applet.eap.gschema.xml.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/org.gnome.nm-applet.eap.gschema.xml.in b/org.gnome.nm-applet.eap.gschema.xml.in
index 0fc3ca9f1f61..f4a56ea672cd 100644
--- a/org.gnome.nm-applet.eap.gschema.xml.in
+++ b/org.gnome.nm-applet.eap.gschema.xml.in
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<schemalist>
- <schema id="org.gnome.nm-applet.eap" path="/org/gnome/nm-applet/eap/" gettext-domain="nm-applet">
+ <schema id="org.gnome.nm-applet.eap" gettext-domain="nm-applet">
<key name="ignore-ca-cert" type="b">
<default>false</default>
<summary>Ignore CA certificate</summary>

View File

@ -3,8 +3,8 @@
pkgbase=libnma
pkgname=(libnma-common libnma libnma-gtk4)
pkgver=1.10.2
pkgrel=2
pkgver=1.10.4
pkgrel=3
pkgdesc="NetworkManager GUI client library"
url="https://gitlab.gnome.org/GNOME/libnma"
arch=(x86_64 powerpc64le powerpc riscv64)
@ -24,13 +24,13 @@ makedepends=(
vala
)
options=(debug)
_commit=0b0295005cdf10bfb3e38c02509750fcc8416956 # tags/1.10.2
_commit=ec11ca120a3f323e51566076bc3827d686b30e43 # tags/1.10.4^0
source=(
"git+https://gitlab.gnome.org/GNOME/libnma.git#commit=$_commit"
0001-build-unbreak-build-with-gcr-3.92.patch
0001-gschema-Remove-path-from-eap-schema.patch
)
sha256sums=('SKIP'
'73092ed103dce40cf2d15cb7361ea9cbfc3a47a9058525b6bacb1b6b15417ef0')
'794f612a95936ed67891c1231526950e098af38afa5c4a65dffff4f228a261f3')
pkgver() {
cd libnma
@ -40,8 +40,8 @@ pkgver() {
prepare() {
cd libnma
# Support gcr-4
git apply -3 ../0001-build-unbreak-build-with-gcr-3.92.patch
# https://bugs.archlinux.org/task/76490
git apply -3 ../0001-gschema-Remove-path-from-eap-schema.patch
}
build() {
@ -92,6 +92,10 @@ package_libnma-common() {
_pick gtk4 usr/lib/girepository-1.0/NMA4-*
_pick gtk4 usr/share/gir-1.0/NMA4-*
_pick gtk4 usr/share/vala/vapi/libnma-gtk4.*
# Moved to network-manager-applet 1.30.0
# https://bugs.archlinux.org/task/76489
rm usr/share/glib-2.0/schemas/org.gnome.nm-applet.gschema.xml
}
package_libnma() {

View File

@ -3,7 +3,7 @@
pkgname=libopenmpt
pkgver=0.6.6
pkgrel=2
pkgrel=2.1
pkgdesc="A library to render tracker music to a PCM audio stream"
arch=(x86_64 powerpc64le powerpc riscv64)
url="https://lib.openmpt.org/libopenmpt/"

73
librest/30.patch Normal file
View File

@ -0,0 +1,73 @@
From fbad64abe28a96f591a30e3a5d3189c10172a414 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 30 Aug 2022 10:03:57 -0700
Subject: [PATCH 1/2] rest_proxy_call_sync: bail out if no payload
goa-daemon is crashing on suspend/resume with a traceback that
points here: it calls rest_proxy_call_sync, that calls
_rest_proxy_send_message, assumes it gets a `payload` back,
and calls `finish_call` with it. However, it's not actually
guaranteed that `_rest_proxy_send_message` will return a payload
(a `GBytes`). There are three ways it can return `NULL` instead:
if it's passed a wrong proxy or message, or - when built against
libsoup3 - if there is an error sending the message (it passes
through the return value of `soup_session_send_and_read`, and
that's documented to be `NULL` on error).
If `payload` comes back `NULL`, let's just return `FALSE`, like
we do if there's a problem with the call or message.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
rest/rest-proxy-call.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rest/rest-proxy-call.c b/rest/rest-proxy-call.c
index 851b397..07b8b49 100644
--- a/rest/rest-proxy-call.c
+++ b/rest/rest-proxy-call.c
@@ -1428,6 +1428,8 @@ rest_proxy_call_sync (RestProxyCall *call,
return FALSE;
payload = _rest_proxy_send_message (priv->proxy, message, priv->cancellable, error_out);
+ if (!payload)
+ return FALSE;
ret = finish_call (call, message, payload, error_out);
--
GitLab
From 8049048a0f7d52b3f4101c7123797fed099d4cc8 Mon Sep 17 00:00:00 2001
From: Adam Williamson <awilliam@redhat.com>
Date: Tue, 30 Aug 2022 10:59:01 -0700
Subject: [PATCH 2/2] Handle some potential problems in parsing oauth2 access
tokens
It's possible for `_rest_proxy_send_message` to return `NULL`,
which would mean the `payload` here would be `NULL`. If so,
we're not going to be able to do anything, so we should just
bail out.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
---
rest/rest-oauth2-proxy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/rest/rest-oauth2-proxy.c b/rest/rest-oauth2-proxy.c
index 9511f97..7d5780d 100644
--- a/rest/rest-oauth2-proxy.c
+++ b/rest/rest-oauth2-proxy.c
@@ -70,6 +70,8 @@ rest_oauth2_proxy_parse_access_token (RestOAuth2Proxy *self,
gint created_at;
g_return_if_fail (REST_IS_OAUTH2_PROXY (self));
+ if (!payload)
+ return;
data = g_bytes_get_data (payload, &size);
--
GitLab

View File

@ -53,7 +53,7 @@ prepare() {
git submodule init
git config --local submodule.gnulib.url "$srcdir/gnulib"
git config --local submodule.gl-mod/bootstrap.url "$srcdir/gnulib-bootstrap"
git submodule update
git -c protocol.file.allow=always submodule update
./bootstrap
}

View File

@ -4,14 +4,14 @@
pkgname=('llvm' 'llvm-libs')
pkgver=14.0.6
pkgrel=3
pkgrel=4
arch=(x86_64 powerpc64le powerpc riscv64)
url="https://llvm.org/"
license=('custom:Apache 2.0 with LLVM Exception')
makedepends=('cmake' 'ninja' 'libffi' 'libedit' 'ncurses' 'libxml2'
'python-setuptools' 'python-psutil' 'python-sphinx'
'python-recommonmark')
options=('staticlibs' '!lto') # Getting thousands of test failures with LTO
options=('staticlibs' 'debug' '!lto') # Getting thousands of test failures with LTO
_source_base=https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver
source=($_source_base/llvm-$pkgver.src.tar.xz{,.sig}
llvm-coroutines-ubsan.patch
@ -33,6 +33,10 @@ prepare() {
build() {
cd llvm-$pkgver.src/build
# Build only minimal debug info to reduce size
CFLAGS=${CFLAGS/-g /-g1 }
CXXFLAGS=${CXXFLAGS/-g /-g1 }
local cmake_args=(
-G Ninja
-DCMAKE_BUILD_TYPE=Release

View File

@ -5,7 +5,7 @@
pkgname=make
pkgver=4.3
pkgrel=5
pkgrel=5.1
pkgdesc="GNU make utility to maintain groups of programs"
arch=(x86_64 powerpc64le powerpc riscv64)
url="https://www.gnu.org/software/make"

View File

@ -4,7 +4,7 @@
pkgbase=modemmanager
pkgname=(modemmanager libmm-glib)
pkgver=1.18.12
pkgver=1.20.2
pkgrel=1
pkgdesc="Mobile broadband modem management service"
url="https://www.freedesktop.org/wiki/Software/ModemManager/"
@ -15,7 +15,7 @@ depends=(systemd libgudev polkit ppp libqmi libmbim
makedepends=(gtk-doc gobject-introspection vala meson git bash-completion)
checkdepends=(python-gobject python-dbus)
options=(debug)
_commit=c234bd55c9d9618c1478b5e80aaf4b8f965be181 # tags/1.18.12^0
_commit=638c2275df9700efe8fa33be1697fa99a906d929 # tags/1.20.2^0
source=("git+https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git#commit=$_commit")
sha256sums=('SKIP')
@ -81,4 +81,4 @@ package_libmm-glib() {
mv libmm/* "$pkgdir"
}
# vim:set sw=2 et:
# vim:set sw=2 sts=-1 et:

View File

@ -6,7 +6,7 @@
pkgbase=mplayer
pkgname=('mplayer' 'mencoder')
pkgver=38359
pkgver=38407
pkgrel=1
pkgdesc='Media player for Linux'
url='http://www.mplayerhq.hu/'
@ -15,7 +15,7 @@ license=('GPL')
makedepends=('xorgproto' 'libxxf86vm' 'libmad' 'libxinerama' 'libmng' 'libxss'
'smbclient' 'aalib' 'jack' 'libcaca' 'faac' 'faad2' 'lirc' 'libxv'
'libxvmc' 'enca' 'libdca' 'a52dec' 'libvpx' 'unzip' 'mesa'
'live-media' 'git' 'mpg123' 'ladspa' 'libcdio' 'zlib'
'git' 'mpg123' 'ladspa' 'libcdio' 'zlib'
'libcdio-paranoia' 'subversion' 'x264' 'libx264.so' 'rtmpdump'
'libdvdcss' 'libdvdread' 'libdvdnav' 'ffmpeg' 'giflib' 'libgif.so'
'libbs2b' 'fribidi' 'opus' 'libvorbis' 'libvorbis.so' 'gsm'
@ -66,7 +66,6 @@ build() {
--confdir=/etc/mplayer \
--extra-cflags="${CFLAGS} ${CPPFLAGS}" \
--extra-ldflags="${LDFLAGS}"
[[ "${CARCH}" = "i686" ]] && sed 's|-march=i486|-march=i686|g' -i config.mak
make
}

View File

@ -1,8 +1,8 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
#Maintainer : Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=openvdb
pkgver=10.0.0
pkgrel=1.1
pkgver=10.0.1
pkgrel=1
pkgdesc='A large suite of tools for the efficient storage and manipulation of sparse volumetric data discretized on three-dimensional grids'
url='https://github.com/dreamworksanimation/openvdb'
arch=(x86_64 powerpc64le powerpc riscv64)
@ -14,14 +14,15 @@ optdepends=('glfw: for tools'
'python-numpy: python module')
options=(!distcc)
source=("$pkgname-$pkgver.tar.gz::https://github.com/dreamworksanimation/openvdb/archive/v${pkgver}.tar.gz")
sha512sums=('108f3ac1a4a8669dfb118b56668437da18cf09e5c7e1c5b1eb0f05caa997be4360c564f264669475cf408fad24f445a90865055d192bf53c6db524c56efa1c89')
sha512sums=('361cef8932b69b19ee94c47fe78f665a1acabfabc3f45ff9f490e830f73ff092c42f56ce698677476a8ccf062c89e3e4dc6d4c550aa6842438cbd4d404ee83bb')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
BUILD_DOCS=ON
case "${CARCH}" in
powerpc|riscv64) CXXFLAGS+=' -latomic'; BUILD_DOCS=OFF ;;
powerpc) CXXFLAGS+=' -latomic'; BUILD_DOCS=OFF ;;
riscv64) CXXFLAGS+=' -latomic'; BUILD_DOCS=OFF; MAKEFLAGS='-j1' ;;
esac
cmake \
@ -34,7 +35,7 @@ build() {
-DOPENVDB_BUILD_DOCS=${BUILD_DOCS} \
-DOPENVDB_BUILD_UNITTESTS=OFF
ninja -C build
ninja ${MAKEFLAGS} -C build
}
package() {

View File

@ -1,7 +1,7 @@
# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Sven-Hendrik Haase <svenstaro@archlinux.org>
pkgname=openxr
pkgver=1.0.25
pkgver=1.0.26
pkgrel=1
pkgdesc='An open standard for virtual reality and augmented reality platforms and devices'
arch=(x86_64 powerpc64le powerpc riscv64)
@ -12,7 +12,7 @@ license=('APACHE')
source=("https://github.com/KhronosGroup/OpenXR-SDK-Source/releases/download/release-${pkgver}/OpenXR-SDK-Source-release-${pkgver}.tar.gz"{,.asc}
fix-gcc11.patch)
validpgpkeys=(F029455EAB70F520FF4A03BD7F534CD56F00321E)
sha512sums=('5576b51385fb70fdc043157adfe795d0907e7de56446f2717ee6129a9e5fadc914fbfce60c11c747531d42dda1b607b2a0ea5e4542b4a0d892b19c28a2cb5473'
sha512sums=('cab949f3b75596257fe57f03778f96fe5de258d93b40abbb0c2b3c2fec6523743c9a852a04bfb8cf5ca7b5c673bbd54dea4bcff79f39392668a4d1775f1840aa'
'SKIP'
'783726fb48dc4551dfec0da2f28049d73afe66d237db54f0914b5156b8a45c9d5edf2f9a4b97a8adbbbfa1157c07cd418dbd4d53252f2feb49e9420fde0b0840')

View File

@ -7,7 +7,7 @@
pkgname=portaudio
pkgver=19.7.0
pkgrel=1
pkgrel=1.1
epoch=1
pkgdesc='A free, cross-platform, open source, audio I/O library.'
arch=(x86_64 powerpc64le powerpc riscv64)

View File

@ -5,7 +5,7 @@
pkgname=signon-ui
pkgver=0.17+20171022
pkgrel=3
pkgrel=3.1
_commit=4368bb77d9d1abc2978af514225ba4a42c29a646
pkgdesc='UI component responsible for handling the user interactions which can happen during the login process of an online account'
arch=(x86_64 powerpc64le powerpc riscv64)
@ -16,6 +16,7 @@ depends_powerpc=(qt5-webkit)
depends_riscv64=(qt5-webkit)
depends_powerpc64le=(qt5-webengine)
depends_x86_64=(qt5-webengine)
makedepends=(git)
# when no qt5-webengine is available revert to before it was mandated
case "${CARCH}" in

View File

@ -2,7 +2,7 @@
# Maintainer: Anatol Pomozov <anatol@archlinux.org>
pkgname=virglrenderer
pkgver=0.9.1
pkgver=0.10.3
pkgrel=1
pkgdesc='A virtual 3D GPU library, that allows the guest operating system to use the host GPU to accelerate 3D rendering'
arch=(x86_64 powerpc64le powerpc riscv64)
@ -13,7 +13,7 @@ makedepends=(python meson ninja)
checkdepends=(check)
_tag=virglrenderer-$pkgver
source=(virglrenderer-$pkgver.tar.bz2::https://gitlab.freedesktop.org/virgl/virglrenderer/-/archive/$_tag/virglrenderer-$_tag.tar.bz2)
sha256sums=('860cc3f0f1a448542a812b6e13909824eb3140b7b3283d068e9640487d50e6c0')
sha256sums=('b8a1f13e128033083713519e4c936bc9df0afe76109f1f2bd5e077b8c13a2d44')
build() {
cd virglrenderer-$_tag

View File

@ -4,7 +4,7 @@
pkgbase=vte3
pkgname=(vte-common vte3 vte4 vte-docs)
pkgver=0.70.1
pkgver=0.70.2
pkgrel=1
pkgdesc="Virtual Terminal Emulator widget"
url="https://wiki.gnome.org/Apps/Terminal/VTE"
@ -25,7 +25,7 @@ makedepends=(
vala
)
options=(debug !lto)
_commit=5bf476f1d7283bc805ac8ae6abe94f81ffd7be05 # tags/0.70.1^0
_commit=bfabb63d2f8d0f9846dc0a0a7d768d8bf6da3531 # tags/0.70.2^0
source=("git+https://gitlab.gnome.org/GNOME/vte.git#commit=$_commit")
sha256sums=('SKIP')