[gstreamer] enable builds on more platforms (#27050)

* gstreamer fix build on linux

* v db

* let ci actually build more platforms.

* move qtmultimedia on baseline

* gstreamer osx
This commit is contained in:
Alexander Neumann 2022-10-03 23:07:49 +02:00 committed by GitHub
parent fc2959942a
commit 779ce74ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 69 additions and 16 deletions

View File

@ -29,6 +29,15 @@ if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(REMOVE ${DBG_BINS} ${REL_BINS})
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Move plugin pkg-config files
file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/*")
file(COPY ${pc_files} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
file(GLOB pc_files_dbg "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/*")
file(COPY ${pc_files_dbg} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/"
"${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/")
endif()
vcpkg_fixup_pkgconfig()
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

View File

@ -1,7 +1,7 @@
{
"name": "gst-rtsp-server",
"version": "1.19.2",
"port-version": 1,
"port-version": 2,
"description": "gst-rtsp-server is a library on top of GStreamer for building an RTSP server",
"dependencies": [
"gstreamer",

View File

@ -2,14 +2,13 @@ diff --git a/meson.build b/meson.build
index bed8c4e..772809e 100644
--- a/meson.build
+++ b/meson.build
@@ -435,8 +435,9 @@ if cc.has_header('execinfo.h')
@@ -435,8 +435,8 @@ if cc.has_header('execinfo.h')
endif
endif
+build_system = build_machine.system()
gst_debug = get_option('gst_debug')
-if not gst_debug
+if not gst_debug and build_system != 'windows'
+if not gst_debug and cc.has_argument('-Wno-unused')
add_project_arguments(['-Wno-unused'], language: 'c')
endif

View File

@ -49,7 +49,7 @@ vcpkg_from_github(
REF 1.19.2
SHA512 70dcd4a36d3bd35f680eaa3c980842fbb57f55f17d1453c6a95640709b1b33a263689bf54caa367154267d281e5474686fedaa980de24094de91886a57b6547a
HEAD_REF master
PATCHES ${PLUGIN_UGLY_PATCHES} fix-clang-cl-ugly.patch
PATCHES ${PLUGIN_UGLY_PATCHES} fix-clang-cl-ugly.patch remove_x264_define.patch
)
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org
@ -290,9 +290,12 @@ vcpkg_install_meson()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/KHR"
"${CURRENT_PACKAGES_DIR}/include/GL"
)
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h"
"${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gl/gstglconfig.h"
)
if(NOT VCPKG_TARGET_IS_LINUX)
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/include/gst/gl/gstglconfig.h"
"${CURRENT_PACKAGES_DIR}/include/gstreamer-1.0/gst/gl/gstglconfig.h"
)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/debug/libexec"
"${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/include"
@ -301,6 +304,14 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share"
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Move plugin pkg-config files
file(GLOB pc_files "${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/*")
file(COPY ${pc_files} DESTINATION "${CURRENT_PACKAGES_DIR}/lib/pkgconfig")
file(GLOB pc_files_dbg "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/*")
file(COPY ${pc_files_dbg} DESTINATION "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/lib/gstreamer-1.0/pkgconfig/"
"${CURRENT_PACKAGES_DIR}/lib/gstreamer-1.0/pkgconfig/")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin"
"${CURRENT_PACKAGES_DIR}/bin"
)

View File

@ -0,0 +1,18 @@
diff --git a/ext/x264/gstx264enc.h b/ext/x264/gstx264enc.h
index 6cbfc5c3d..ba7845b20 100644
--- a/ext/x264/gstx264enc.h
+++ b/ext/x264/gstx264enc.h
@@ -31,13 +31,6 @@
#include <stdint.h>
#endif
-/* The x264.h header says this isn't needed with MinGW, but sometimes the
- * compiler is unable to correctly do the pointer indirection for us, which
- * leads to a segfault when you try to dereference any const values provided
- * by x264.dll. See: https://bugzilla.gnome.org/show_bug.cgi?id=779249 */
-#if defined(_WIN32) && !defined(X264_API_IMPORTS)
-# define X264_API_IMPORTS
-#endif
#include <x264.h>
G_BEGIN_DECLS

View File

@ -1,11 +1,11 @@
{
"name": "gstreamer",
"version": "1.19.2",
"port-version": 8,
"port-version": 9,
"description": "GStreamer open-source multimedia framework core library",
"homepage": "https://gstreamer.freedesktop.org/",
"license": "LGPL-2.0-only",
"supports": "!linux & !uwp",
"supports": "!uwp",
"dependencies": [
{
"name": "cairo",

View File

@ -127,6 +127,7 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic" AND VCPKG_TARGET_IS_WINDOWS AND NOT
if (NOT VCPKG_BUILD_TYPE)
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/libx264.dll.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/libx264.lib")
endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/x264.h" "#ifdef X264_API_IMPORTS" "#if 1")
elseif(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/x264.h" "defined(U_STATIC_IMPLEMENTATION)" "1")
file(REMOVE_RECURSE

View File

@ -1,7 +1,7 @@
{
"name": "x264",
"version": "0.164.3095",
"port-version": 1,
"port-version": 2,
"description": "x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC compression format",
"homepage": "https://www.videolan.org/developers/x264.html",
"license": "GPL-2.0-or-later",

View File

@ -310,8 +310,6 @@ gmmlib:x64-windows-static-md=fail
gmmlib:x64-windows-static=fail
gmmlib:x64-windows=fail
gmmlib:x86-windows=fail
gstreamer:x64-windows-static=fail
gstreamer:x64-windows-static-md=fail
google-cloud-cpp:arm-uwp=fail
google-cloud-cpp:x64-uwp=fail
gperftools:arm64-windows=fail
@ -872,6 +870,8 @@ qt5-canvas3d:x64-windows-static-md=skip
qt5-canvas3d:x86-windows=skip
# Missing system libraries
qt5-wayland:x64-osx=fail
# qtmultimedia needs an EGL fix
qtmultimedia:x64-linux=fail
qtwayland:x64-osx=fail
qtwayland:arm64-osx=fail
# Post build checks fail

View File

@ -2770,11 +2770,11 @@
},
"gst-rtsp-server": {
"baseline": "1.19.2",
"port-version": 1
"port-version": 2
},
"gstreamer": {
"baseline": "1.19.2",
"port-version": 8
"port-version": 9
},
"gtest": {
"baseline": "1.12.1",
@ -7894,7 +7894,7 @@
},
"x264": {
"baseline": "0.164.3095",
"port-version": 1
"port-version": 2
},
"x265": {
"baseline": "3.4",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "e6c0f43ea29f3c58c4ea82529d5a33aac49982d5",
"version": "1.19.2",
"port-version": 2
},
{
"git-tree": "d769d57cd8c5c732146992a174266c11e7ef52ec",
"version": "1.19.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "50b3345068815cb82022b680689ddfee0395e6de",
"version": "1.19.2",
"port-version": 9
},
{
"git-tree": "34e4471f1313a9d9ce220e461dde37a331c5bf47",
"version": "1.19.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "4ff53c90cd7222ae9d3e8dc579c1d198715585c2",
"version": "0.164.3095",
"port-version": 2
},
{
"git-tree": "16be87b659ccfeaba052e561f3f0a8b1b927c5d0",
"version": "0.164.3095",