diff --git a/gegl/.signature b/gegl/.signature index fb4bf1cf9..accda5ba4 100644 --- a/gegl/.signature +++ b/gegl/.signature @@ -1,5 +1,7 @@ untrusted comment: verify with /etc/ports/contrib.pub -RWSagIOpLGJF37arjp6tUp0SBdGAGVZv1YNl3be3NcEhGTFuwtjWrb6zKNhDWH9HqSmuTSsjdDZFj5jkObjqPGB4Vdy/x6AVpQA= -SHA256 (Pkgfile) = 26476ea13fed10c59faf2002f2e750d6238bcaf7dfa5b0e095cbac6269746f14 +RWSagIOpLGJF3xrwEryoCm2Mn2ae5NQcBO3td9ZYmnZmSQJX+UvzISIbFWOyUQeRTT88/Aa2yn+d4hSkzn7g7KI5aJsQq0uWtAE= +SHA256 (Pkgfile) = e2f1161901f2a808f8673320560912cd9f253dd4708051018ff85e1ad323109f SHA256 (.footprint) = 4014563416df46c6f961d3e3bdbd33ef655435e8ee1adb4f03f95f0adec7253d SHA256 (gegl-0.4.48.tar.xz) = 418c26d94be8805d7d98f6de0c6825ca26bd74fcacb6c188da47533d9ee28247 +SHA256 (66de8124f496617eee8e6b5c68138a00343882db.patch) = d558ee613e17a9174a34346610b50206e86a53b008021ee4b2f35fcc191d1d60 +SHA256 (298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch) = bc65623e3895131b469e2861f71d1bc575733febd139b877abf5f96475308151 diff --git a/gegl/298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch b/gegl/298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch new file mode 100644 index 000000000..c9cd688bb --- /dev/null +++ b/gegl/298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch @@ -0,0 +1,30 @@ +From 298b6a2afb87b4b5b15c6e715967b57534cd0af0 Mon Sep 17 00:00:00 2001 +From: Lukas Oberhuber +Date: Sat, 4 May 2024 23:54:25 +0000 +Subject: [PATCH] ff-save: Fix 66de8124 + +--- + operations/external/ff-save.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c +index ffa5d8bee..0dd9f96cd 100644 +--- a/operations/external/ff-save.c ++++ b/operations/external/ff-save.c +@@ -470,8 +470,13 @@ static void encode_audio_fragments (Priv *p, AVFormatContext *oc, AVStream *st, + { + float left = 0, right = 0; + get_sample_data (p, i + p->audio_read_pos, &left, &right); ++#if LIBAVCODEC_VERSION_MAJOR < 61 ++ ((int32_t*)frame->data[0])[c->channels*i+0] = left * (1<<31); ++ ((int32_t*)frame->data[0])[c->channels*i+1] = right * (1<<31); ++#else + ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<31); + ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<31); ++#endif + } + break; + case AV_SAMPLE_FMT_S32P: +-- +GitLab + diff --git a/gegl/66de8124f496617eee8e6b5c68138a00343882db.patch b/gegl/66de8124f496617eee8e6b5c68138a00343882db.patch new file mode 100644 index 000000000..650e386c2 --- /dev/null +++ b/gegl/66de8124f496617eee8e6b5c68138a00343882db.patch @@ -0,0 +1,113 @@ +From 66de8124f496617eee8e6b5c68138a00343882db Mon Sep 17 00:00:00 2001 +From: Joe Locash <@jlocash2> +Date: Sat, 4 May 2024 17:08:04 +0200 +Subject: [PATCH] ff-load, ff-save: fix build with FFmpeg 7 + +Fixing issue #371 +--- + operations/external/ff-load.c | 8 ++++++++ + operations/external/ff-save.c | 24 ++++++++++++++++++++++-- + 2 files changed, 30 insertions(+), 2 deletions(-) + +diff --git a/operations/external/ff-load.c b/operations/external/ff-load.c +index 6b96fdfdd..dc24a6d59 100644 +--- a/operations/external/ff-load.c ++++ b/operations/external/ff-load.c +@@ -250,7 +250,11 @@ decode_audio (GeglOperation *operation, + while (samples_left) + { + int sample_count = samples_left; ++#if LIBAVCODEC_VERSION_MAJOR < 61 + int channels = MIN(p->audio_stream->codecpar->channels, GEGL_MAX_AUDIO_CHANNELS); ++#else ++ int channels = MIN(p->audio_stream->codecpar->ch_layout.nb_channels, GEGL_MAX_AUDIO_CHANNELS); ++#endif + GeglAudioFragment *af = gegl_audio_fragment_new (o->audio_sample_rate, channels, + AV_CH_LAYOUT_STEREO, samples_left); + //); +@@ -553,7 +557,11 @@ prepare (GeglOperation *operation) + else + { + o->audio_sample_rate = p->audio_stream->codecpar->sample_rate; ++#if LIBAVCODEC_VERSION_MAJOR < 61 + o->audio_channels = MIN(p->audio_stream->codecpar->channels, GEGL_MAX_AUDIO_CHANNELS); ++#else ++ o->audio_channels = MIN(p->audio_stream->codecpar->ch_layout.nb_channels, GEGL_MAX_AUDIO_CHANNELS); ++#endif + } + } + +diff --git a/operations/external/ff-save.c b/operations/external/ff-save.c +index 9196b34aa..ffa5d8bee 100644 +--- a/operations/external/ff-save.c ++++ b/operations/external/ff-save.c +@@ -315,8 +315,13 @@ add_audio_stream (GeglProperties *o, AVFormatContext * oc, int codec_id) + } + cp->sample_rate = o->audio_sample_rate; + ++#if LIBAVCODEC_VERSION_MAJOR < 61 + cp->channel_layout = AV_CH_LAYOUT_STEREO; + cp->channels = 2; ++#else ++ cp->ch_layout.u.mask = AV_CH_LAYOUT_STEREO; ++ cp->ch_layout.nb_channels = 2; ++#endif + + return st; + } +@@ -392,8 +397,13 @@ static AVFrame *alloc_audio_frame(AVCodecContext *c, int nb_samples) + + frame->format = c->sample_fmt; + ++#if LIBAVCODEC_VERSION_MAJOR < 61 + frame->channel_layout = c->channel_layout; + frame->channels = c->channels; ++#else ++ frame->ch_layout = c->ch_layout; ++ frame->ch_layout.nb_channels = c->ch_layout.nb_channels; ++#endif + frame->sample_rate = c->sample_rate; + frame->nb_samples = nb_samples; + +@@ -423,8 +433,13 @@ static void encode_audio_fragments (Priv *p, AVFormatContext *oc, AVStream *st, + { + float left = 0, right = 0; + get_sample_data (p, i + p->audio_read_pos, &left, &right); ++#if LIBAVCODEC_VERSION_MAJOR < 61 + ((float*)frame->data[0])[c->channels*i+0] = left; + ((float*)frame->data[0])[c->channels*i+1] = right; ++#else ++ ((float*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left; ++ ((float*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right; ++#endif + } + break; + case AV_SAMPLE_FMT_FLTP: +@@ -441,8 +456,13 @@ static void encode_audio_fragments (Priv *p, AVFormatContext *oc, AVStream *st, + { + float left = 0, right = 0; + get_sample_data (p, i + p->audio_read_pos, &left, &right); ++#if LIBAVCODEC_VERSION_MAJOR < 61 + ((int16_t*)frame->data[0])[c->channels*i+0] = left * (1<<15); + ((int16_t*)frame->data[0])[c->channels*i+1] = right * (1<<15); ++#else ++ ((int16_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<15); ++ ((int16_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<15); ++#endif + } + break; + case AV_SAMPLE_FMT_S32: +@@ -450,8 +470,8 @@ static void encode_audio_fragments (Priv *p, AVFormatContext *oc, AVStream *st, + { + float left = 0, right = 0; + get_sample_data (p, i + p->audio_read_pos, &left, &right); +- ((int32_t*)frame->data[0])[c->channels*i+0] = left * (1<<31); +- ((int32_t*)frame->data[0])[c->channels*i+1] = right * (1<<31); ++ ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+0] = left * (1<<31); ++ ((int32_t*)frame->data[0])[c->ch_layout.nb_channels*i+1] = right * (1<<31); + } + break; + case AV_SAMPLE_FMT_S32P: +-- +GitLab + diff --git a/gegl/Pkgfile b/gegl/Pkgfile index 94f64f87a..8cae9c50d 100644 --- a/gegl/Pkgfile +++ b/gegl/Pkgfile @@ -6,12 +6,17 @@ name=gegl version=0.4.48 -release=1 -source=(https://download.gimp.org/pub/$name/${version%.*}/$name-$version.tar.xz) +release=2 +source=(https://download.gimp.org/pub/$name/${version%.*}/$name-$version.tar.xz + 66de8124f496617eee8e6b5c68138a00343882db.patch + 298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch) build() { ls /usr/include/poppler/glib/poppler.h || (printf '\e[1;31m%-6s\e[m\n' "rebuild poppler with glib support, you need it for ${name}. Quitting.." ; exit 1) + patch -Np1 -d $name-$version -i $SRC/66de8124f496617eee8e6b5c68138a00343882db.patch + patch -Np1 -d $name-$version -i $SRC/298b6a2afb87b4b5b15c6e715967b57534cd0af0.patch + prt-get isinst ffmpeg && export PKG_CONFIG_PATH='/usr/lib/ffmpeg4/pkgconfig' prt-get isinst vala || PKGMK_GEGL+=' -D vapigen=disabled'