meson: add gstreamer 1.0 as a subproject

This commit is contained in:
Stéphane Cerveau 2022-03-29 11:39:14 +02:00
parent bb38972aea
commit 14a872fb89
7 changed files with 34 additions and 12 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/target
*.log
src/config.rs
subprojects/*/

View file

@ -11,11 +11,11 @@ MESON_BUILD_ROOT=sys.argv[1]
MESON_SOURCE_ROOT=sys.argv[2]
CARGO_TARGET_DIR = os.path.join (MESON_BUILD_ROOT, "target")
env["CARGO_TARGET_DIR"] = CARGO_TARGET_DIR
CARGO_HOME = os.path.join (CARGO_TARGET_DIR, "cargo-home")
env["CARGO_HOME"] = CARGO_HOME
env["CARGO_HOME"] = os.path.join (CARGO_TARGET_DIR, "cargo-home")
OUTPUT=sys.argv[3]
BUILDTYPE=sys.argv[4]
APP_BIN=sys.argv[5]
env["PKG_CONFIG_PATH"] = os.path.join(MESON_BUILD_ROOT, "meson-uninstalled") + os.pathsep + env.get("PKG_CONFIG_PATH",'')
if BUILDTYPE == "release":

View file

@ -4,7 +4,7 @@ HOMEBREW_NO_INSTALL_CLEANUP=1
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install gtk4 gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good
brew install pkg-config gtk4
brew install npm

View file

@ -6,7 +6,7 @@ test_ok() {
if [ $? != 0 ]; then
exit 1
fi
}
# depenency library:
@ -20,10 +20,24 @@ VERSION="$(date +%y%m%d)"
export VERSION
echo "VERSION=$VERSION"
GSTREAMER_OPTS="
-Dforce_fallback_for=gstreamer-1.0,libffi,pcre2 \
-Dgstreamer-1.0:libav=disabled \
-Dgstreamer-1.0:examples=disabled \
-Dgstreamer-1.0:introspection=disabled \
-Dgstreamer-1.0:rtsp_server=disabled \
-Dgstreamer-1.0:devtools=disabled \
-Dgst-plugins-base:tests=disabled \
-Dgstreamer-1.0:tests=disabled \
-Dgst-plugins-bad:openexr=disabled -Dgstreamer-1.0:gst-examples=disabled \
-Dorc:gtk_doc=disabled \
-Dgstreamer-1.0:python=disabled"
# rebuild app release version
rm -rf "${TARGETDIR}"
test_ok meson --prefix=$TARGETDIR --buildtype=release ${BUILD_DIR}
test_ok ninja -C "${PROJECTDIR}/${BUILD_DIR}" install
test_ok meson --prefix=$TARGETDIR --buildtype=release ${BUILD_DIR} ${GSTREAMER_OPTS}
test_ok ninja -C ${BUILD_DIR} install
# copy app data files to target dir
@ -55,7 +69,7 @@ function lib_dependency_copy
else
cp -n $lib $folder
fi
fi
fi
done
}

View file

@ -14,13 +14,13 @@ current_date = run_command(python3, '-c', 'import datetime; print(datetime.datet
i18n = import('i18n')
host_system = host_machine.system()
dependency('gstreamer-1.0', version: '>= 1.22', fallback: ['gstreamer-1.0'])
dependency('gstreamer-base-1.0', version: '>= 1.22', fallback: ['gstreamer-1.0'])
dependency('gstreamer-video-1.0', version: '>= 1.12', fallback: ['gstreamer-1.0'])
dependency('glib-2.0', version: '>= 2.66')
dependency('gio-2.0', version: '>= 2.66')
dependency('gtk4', version: '>= 4.0.0')
dependency('gstreamer-1.0', version: '>= 1.18')
dependency('gstreamer-base-1.0', version: '>= 1.18')
dependency('gstreamer-plugins-base-1.0', version: '>= 1.18')
dependency('gstreamer-plugins-bad-1.0', version: '>= 1.18')
find_program('cargo', required: true)
find_program('glib-compile-resources', required: true)

View file

@ -33,7 +33,6 @@ rust_sources = files(
'logger.rs',
'macros.rs',
'main.rs',
'settings.rs',
)

View file

@ -0,0 +1,8 @@
[wrap-git]
directory=gstreamer-1.0
url=https://gitlab.freedesktop.org/gstreamer/gstreamer.git
push-url=git@gitlab.freedesktop.org:gstreamer/gstreamer.git
revision=main
[provide]
dependency_names = gstreamer-1.0, gstreamer-base-1.0, gstreamer-sys-1.0, gstreamer-plugins-bad-1.0, gstreamer-video-1.0