From ce29aa68c8ae96dd0ac3b399a5091882f5e7656d Mon Sep 17 00:00:00 2001 From: tigro Date: Wed, 25 Dec 2024 18:44:06 +0300 Subject: [PATCH] import gpac-2.4.0-4.el10 --- .gitignore | 2 +- .gpac.metadata | 1 + SOURCES/gpac-ffmpeg6.patch | 22 +++ SOURCES/gpac-fix-library-detection.patch | 48 +++++++ SOURCES/gpac-lto-type-mismatch.patch | 24 ++++ SOURCES/gpac-noopt.patch | 11 ++ gpac.spec => SPECS/gpac.spec | 165 ++++++++++++++--------- sources | 1 - 8 files changed, 208 insertions(+), 66 deletions(-) create mode 100644 .gpac.metadata create mode 100644 SOURCES/gpac-ffmpeg6.patch create mode 100644 SOURCES/gpac-fix-library-detection.patch create mode 100644 SOURCES/gpac-lto-type-mismatch.patch create mode 100644 SOURCES/gpac-noopt.patch rename gpac.spec => SPECS/gpac.spec (79%) delete mode 100644 sources diff --git a/.gitignore b/.gitignore index 054aefa..03ac06c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -gpac-*.tar.gz +SOURCES/gpac-2.4.0.tar.gz diff --git a/.gpac.metadata b/.gpac.metadata new file mode 100644 index 0000000..a4def91 --- /dev/null +++ b/.gpac.metadata @@ -0,0 +1 @@ +de54717fedd5a10735afa80efb6f31da4eddeb34 SOURCES/gpac-2.4.0.tar.gz diff --git a/SOURCES/gpac-ffmpeg6.patch b/SOURCES/gpac-ffmpeg6.patch new file mode 100644 index 0000000..b4874ed --- /dev/null +++ b/SOURCES/gpac-ffmpeg6.patch @@ -0,0 +1,22 @@ +From 8d7cac0bf9f9775cae1d43de7138206758f28b0c Mon Sep 17 00:00:00 2001 +From: jeanlf +Date: Thu, 25 Apr 2024 16:10:14 +0200 +Subject: [PATCH] Fixed #2810 + +--- + src/filters/ff_mx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/filters/ff_mx.c b/src/filters/ff_mx.c +index 6c704dce25..45499b4f5c 100644 +--- a/src/filters/ff_mx.c ++++ b/src/filters/ff_mx.c +@@ -247,7 +247,7 @@ static GF_Err ffmx_init_mux(GF_Filter *filter, GF_FFMuxCtx *ctx) + } + + +-#if (LIBAVFORMAT_VERSION_MAJOR <= 59) ++#if (LIBAVFORMAT_VERSION_MAJOR < 61) + static int ffavio_write_packet(void *opaque, uint8_t *buf, int buf_size) + #else + static int ffavio_write_packet(void *opaque, const uint8_t *buf, int buf_size) diff --git a/SOURCES/gpac-fix-library-detection.patch b/SOURCES/gpac-fix-library-detection.patch new file mode 100644 index 0000000..5b078b7 --- /dev/null +++ b/SOURCES/gpac-fix-library-detection.patch @@ -0,0 +1,48 @@ +From a005fd6eb7a9ede4d3356630cae3d6516c91b73e Mon Sep 17 00:00:00 2001 +From: Ryan Carsten Schmidt +Date: Wed, 1 May 2024 00:05:59 -0500 +Subject: [PATCH] configure: Fix finding xvid by including stddef.h + +The configure test for xvid was failing to find it due to "error: use of +undeclared identifier 'NULL'". Fix by including anytime NULL +is referenced. +--- + configure | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/configure b/configure +index c27f3e3e49..1c27b3af77 100755 +--- a/configure ++++ b/configure +@@ -1591,6 +1591,7 @@ config_package ssl "openssl" "" "$ssl_lflags" "" '#include + #include + #include + #include ++#include + int main( void ) { SSL_CTX_set_options(NULL, SSL_OP_ALL); return 0; }' + + +@@ -1617,6 +1618,7 @@ int main( void ) { opj_create_decompress(CODEC_J2K); return 0; }' + fi + + config_package png "libpng" "" "-lpng -lz" "png" '#include ++#include + int main( void ) { png_struct *png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); return 0; }' + + +@@ -1633,6 +1635,7 @@ int main( void ) { a52_state_t *codec; a52_free(codec); return 0; }' + + + config_package xvid "xvid" "" "-lxvidcore $PTHREAD_LDFLAGS" "" '#include ++#include + int main( void ) { void *codec; xvid_decore(codec, XVID_DEC_DESTROY, NULL, NULL); return 0; }' + + config_package faad "faad2" "" "-lfaad -lm" "" '#include +@@ -1686,6 +1689,7 @@ fi + + + config_package freenect "libfreenect" "" "-lfreenect" "freenect" '#include ++#include + int main( void ) { freenect_context *f_ctx; freenect_init(&f_ctx, NULL); return 0; }' + + diff --git a/SOURCES/gpac-lto-type-mismatch.patch b/SOURCES/gpac-lto-type-mismatch.patch new file mode 100644 index 0000000..5b56e6d --- /dev/null +++ b/SOURCES/gpac-lto-type-mismatch.patch @@ -0,0 +1,24 @@ +diff -up gpac-2.4.0/applications/mp4box/filedump.c.orig gpac-2.4.0/applications/mp4box/filedump.c +--- gpac-2.4.0/applications/mp4box/filedump.c.orig 2024-04-17 19:18:21.000000000 +0200 ++++ gpac-2.4.0/applications/mp4box/filedump.c 2024-06-14 16:56:26.604280609 +0200 +@@ -61,7 +61,7 @@ + #ifndef GPAC_DISABLE_SWF_IMPORT + extern u32 swf_flags; + #endif +-extern Float swf_flatten_angle; ++extern Double swf_flatten_angle; + extern GF_FileType get_file_type_by_ext(char *inName); + extern u32 fs_dump_flags; + extern Bool dump_check_xml; +diff -up gpac-2.4.0/applications/mp4box/fileimport.c.orig gpac-2.4.0/applications/mp4box/fileimport.c +--- gpac-2.4.0/applications/mp4box/fileimport.c.orig 2024-04-17 19:18:21.000000000 +0200 ++++ gpac-2.4.0/applications/mp4box/fileimport.c 2024-06-14 23:22:16.652880898 +0200 +@@ -107,7 +107,7 @@ GF_Err set_file_udta(GF_ISOFile *dest, u + extern u32 swf_flags; + #endif + +-extern Float swf_flatten_angle; ++extern Double swf_flatten_angle; + extern Bool keep_sys_tracks; + extern u32 fs_dump_flags; + diff --git a/SOURCES/gpac-noopt.patch b/SOURCES/gpac-noopt.patch new file mode 100644 index 0000000..814e5f9 --- /dev/null +++ b/SOURCES/gpac-noopt.patch @@ -0,0 +1,11 @@ +--- a/configure 2024-04-17 18:18:21.000000000 +0100 ++++ b/configure 2024-04-28 12:43:47.327538032 +0100 +@@ -1135,7 +1135,7 @@ fi + + #GCC opt + if test "$no_gcc_opt" = "no"; then +- CFLAGS="-O3 $CFLAGS" ++ CFLAGS="$CFLAGS" + else + + #on emscripten+asan, failure to load wasm when build with -00, use -01 diff --git a/gpac.spec b/SPECS/gpac.spec similarity index 79% rename from gpac.spec rename to SPECS/gpac.spec index f6a214c..dedd76c 100644 --- a/gpac.spec +++ b/SPECS/gpac.spec @@ -1,43 +1,31 @@ -# Todo: - Add pkg-config support for libs detection. -# - Add pkg-config support generated form configure for gpac (same as ffmpeg). -# - Make it support swscaler enabled ffmpeg (at least test it - upstream). -# - Submit and import patches upstream. -# - Fix unused-direct-shlib-dependency on libgpac - -#global git 20150924 -#global commit 413cd94f24ebf09668cc90434af81729a01e6306 -#global date 20211104 -#global shortcommit0 %(c=%{commit}; echo ${c:0:7}) - -%if 0%{?el9} -%global _without_jack 1 -%global _without_freenect 1 -%endif +%bcond_with faad2 Name: gpac Summary: MPEG-4 multimedia framework -Version: 2.0.0 -Release: 1%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} -License: LGPLv2+ -URL: http://gpac.sourceforge.net/ +Version: 2.4.0 +Release: 4%{?dist} +License: LGPL-2.0-or-later +URL: https://gpac.io/ Source0: https://github.com/gpac/gpac/archive/v%{version}/gpac-%{version}.tar.gz -#Source0: https://github.com/gpac/gpac/archive/%{commit}/gpac-%{commit}.tar.gz -#Source9: gpac-snapshot.sh -#Debian dependencies provide by gpac -#Build-Depends: debhelper (>= 6), libc6, libc6-dev, libx11-dev (>= 1.3), zlib1g-dev (>= 1), libfreetype6-dev, libjpeg62-dev | libjpeg62-turbo-dev, libpng-dev, libmad0-dev, libfaad-dev, libogg-dev, libvorbis-dev, libtheora-dev, liba52-dev | liba52-0.7.4-dev, libavcodec-dev, libavformat-dev, libavutil-dev, libswscale-dev, libavdevice-dev, libavfilter-dev, libxv-dev, x11proto-video-dev, libgl1-mesa-dev, x11proto-gl-dev, libxvidcore-dev, libssl-dev (>= 0.9.8), libjack-dev (>= 0.118), libasound2-dev (>= 1.0), libpulse-dev (>= 0.9), libsdl-dev (>= 1.2) | libsdl2-dev, ccache -#BuildRequires: ImageMagick -#BuildRequires: SDL-devel + +# drop -O3 from CFLAGS +Patch0: gpac-noopt.patch +Patch1: https://github.com/gpac/gpac/commit/8d7cac0bf9f9775cae1d43de7138206758f28b0c.patch#/gpac-ffmpeg6.patch +Patch2: https://github.com/gpac/gpac/commit/a005fd6eb7a9ede4d3356630cae3d6516c91b73e.patch#/gpac-fix-library-detection.patch +Patch3: https://github.com/gpac/gpac/commit/d9d5a145a5e1dc1aef44def91f99d1ee3f358dfa.patch#/gpac-lto-type-mismatch.patch + BuildRequires: SDL2-devel BuildRequires: a52dec-devel BuildRequires: librsvg2-devel >= 2.5.0 BuildRequires: libGLU-devel BuildRequires: freetype-devel >= 2.1.4 -BuildRequires: faad2-devel +%{?with_faad2:BuildRequires: faad2-devel} BuildRequires: libjpeg-devel BuildRequires: libpng-devel >= 1.2.5 BuildRequires: libmad-devel +BuildRequires: libnghttp2-devel BuildRequires: xvidcore-devel >= 1.0.0 -BuildRequires: ffmpeg-devel +BuildRequires: pkgconfig(libavcodec) pkgconfig(libavdevice) pkgconfig(libavformat) pkgconfig(libavfilter) pkgconfig(libavutil) pkgconfig(libswscale) BuildRequires: libxml2-devel BuildRequires: openssl-devel BuildRequires: openjpeg2-devel @@ -49,16 +37,11 @@ BuildRequires: libtheora-devel BuildRequires: libXt-devel BuildRequires: libXpm-devel BuildRequires: libXv-devel -%{!?_without_jack:BuildRequires: jack-audio-connection-kit-devel} -# Disable optional freenect for i686 multilibs gpac usage -%ifnarch i686 -%{!?_without_freenect:BuildRequires: libfreenect-devel} -%endif +BuildRequires: jack-audio-connection-kit-devel BuildRequires: xmlrpc-c-devel -BuildRequires: doxygen graphviz +BuildRequires: doxygen +BuildRequires: graphviz BuildRequires: gcc-c++ -%{?_with_amr:BuildRequires: amrnb-devel -BuildRequires: amrwb-devel} %description GPAC is a multimedia framework based on the MPEG-4 Systems standard developed @@ -104,34 +87,29 @@ Static library for gpac. %prep %autosetup -p1 -rm -r extra_lib/ +rm -rv extra_lib/ pushd share/doc # Fix encoding warnings -cp -p ipmpx_syntax.bt ipmpx_syntax.bt.origine -iconv -f ISO-8859-1 -t UTF8 ipmpx_syntax.bt.origine > ipmpx_syntax.bt -touch -r ipmpx_syntax.bt.origine ipmpx_syntax.bt -rm -rf share/doc/ipmpx_syntax.bt.origine +iconv -f ISO-8859-1 -t UTF8 ipmpx_syntax.bt > ipmpx_syntax.bt.utf8 +touch -r ipmpx_syntax.bt{,.utf8} +mv ipmpx_syntax.bt{.utf8,} popd -sed -i 's/dh_link/ln -s -r/' Makefile %build %configure \ - --enable-debug \ - --extra-cflags="%{optflags} -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D_GNU_SOURCE=1 $(pkg-config --cflags libavformat)" \ + --extra-cflags="%{optflags} -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -D_GNU_SOURCE=1 $(pkg-config --cflags libavformat)" \ --X11-path=%{_prefix} \ --libdir=%{_lib} \ - --disable-oss-audio \ -%{?_with_amr:--enable-amr} \ - --disable-static \ - --use-js=no \ + --disable-oss \ + --enable-pic \ --verbose #Avoid mess with setup.h cp -p config.h include/gpac -%{make_build} all -%{make_build} sggen +%make_build all +%make_build sggen ## kwizart - build doxygen doc for devel pushd share/doc @@ -139,8 +117,7 @@ doxygen popd %install -%{make_install} install-lib -rm -rf %{buildroot}%{_bindir}/Osmo4 +%make_install install-lib #Install generated sggen binaries #for b in MPEG4 SVG X3D; do @@ -160,31 +137,32 @@ touch -r Changelog %{buildroot}%{_includedir}/gpac/*.h touch -r Changelog %{buildroot}%{_includedir}/gpac/internal/*.h touch -r Changelog %{buildroot}%{_includedir}/gpac/modules/*.h rm %{buildroot}%{_includedir}/gpac/config.h -#rm %{buildroot}%{_includedir}/win32/* -#rm %{buildroot}%{_includedir}/wince/errno.h - - -%ldconfig_scriptlets libs +# do not include in gpac, only here to create doxygen group for doc ordering +rm %{buildroot}%{_includedir}/gpac/00_doxy.h %files %doc Changelog README.md %license COPYING %{_bindir}/gpac -#{_bindir}/DashCast -#{_bindir}/MP42TS %{_bindir}/MP4Box -%{_bindir}/MP4Client %{_bindir}/MPEG4Gen -#{_bindir}/SVGGen %{_bindir}/X3DGen %{_datadir}/gpac/ -%{_mandir}/man1/*.1.* -%{_datadir}/applications/*.desktop +%{_mandir}/man1/gpac-filters.1.* +%{_mandir}/man1/gpac.1.* +%{_mandir}/man1/mp4box.1.* +%{_datadir}/applications/gpac.desktop %{_datadir}/icons/hicolor/*/apps/gpac.png %files libs -%{_libdir}/libgpac.so.* -%{_libdir}/gpac/ +%{_libdir}/libgpac.so.12{,.*} +%dir %{_libdir}/gpac +%{_libdir}/gpac/gm_ft_font.so +%{_libdir}/gpac/gm_jack.so +%{_libdir}/gpac/gm_pulseaudio.so +%{_libdir}/gpac/gm_sdl_out.so +%{_libdir}/gpac/gm_validator.so +%{_libdir}/gpac/gm_x11_out.so %files doc %doc share/doc/html-libgpac/* @@ -200,6 +178,65 @@ rm %{buildroot}%{_includedir}/gpac/config.h %changelog +* Wed Dec 25 2024 Arkady L. Shane - 2.4.0-4 +- Rebuilt for MSVSphere 10 + +* Sun Sep 22 2024 Dominik Mierzejewski - 2.4.0-4 +- rebuilt for FFmpeg 7 + +* Fri Sep 06 2024 Dominik Mierzejewski - 2.4.0-3 +- drop unused build dependency on libfreenect (it's never enabled even if + detected, see https://github.com/gpac/gpac/issues/1494) +- jack support builds fine on EPEL9, too, so drop the conditional +- use upstream URL for accepted patch + +* Fri Jun 14 2024 Dominik Mierzejewski - 2.4.0-2 +- fix LTO type mismatch warning +- backport upstream fix for xvidcore and freenect detection + +* Sun Apr 28 2024 Leigh Scott - 2.4.0-1 +- Update to 2.4.0 + +* Mon Mar 18 2024 Dominik Mierzejewski - 2.2.1-7 +- switch to standard %%bcond_* macros +- build without FAAD2 by default +- use SPDX license identifier +- update URL + +* Tue Mar 12 2024 Dominik Mierzejewski - 2.2.1-6 +- re-enable zlib and nvdec +- fix build with zlib-ng +- fix building nvdec on aarch64 +- fix OSS audio disablement +- enable Nghttp2 support +- list manpages and libraries explicitly +- clean up, avoid using rm -f + +* Sat Feb 03 2024 RPM Fusion Release Engineering - 2.2.1-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Nov 12 2023 Leigh Scott - 2.2.1-4 +- Rebuild for new ffmpeg version + +* Wed Nov 08 2023 Leigh Scott - 2.2.1-3 +- Rebuild for new faad2 version + +* Wed Aug 02 2023 RPM Fusion Release Engineering - 2.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Apr 25 2023 Leigh Scott - 2.2.1-1 +- Update to 2.2.1 + +* Tue Feb 28 2023 Leigh Scott - 2.2.0-2 +- Rebuilt for new ffmpeg + +* Sat Feb 18 2023 Leigh Scott - 2.2.0-1 +- Update to 2.2.0 + +* Sun Aug 07 2022 RPM Fusion Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg + 5.1 + * Sat Feb 26 2022 Leigh Scott - 2.0.0-1 - Update to 2.0.0 diff --git a/sources b/sources deleted file mode 100644 index a3e6693..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -SHA512 (gpac-2.0.0.tar.gz) = e95e6d78167fc306917b3ac89e56ba511bbcb0c825da118f5ba374504499352104b5c1f3ee71e7ec018015b8e302f9b07162d22287ddb21c8564b097d900913f