mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-18 13:25:56 +00:00
oss-fuzz: update for autotools removal
This commit is contained in:
parent
f3aedd930d
commit
0c315875be
1 changed files with 33 additions and 9 deletions
|
@ -20,6 +20,10 @@
|
||||||
# Prefix where we will temporarily install everything
|
# Prefix where we will temporarily install everything
|
||||||
PREFIX=$WORK/prefix
|
PREFIX=$WORK/prefix
|
||||||
mkdir -p $PREFIX
|
mkdir -p $PREFIX
|
||||||
|
# always try getting the arguments for static compilation/linking
|
||||||
|
# Fixes GModule not being picked when gstreamer-1.0.pc is looked up by meson
|
||||||
|
# more or less https://github.com/mesonbuild/meson/pull/6629
|
||||||
|
export PKG_CONFIG="`which pkg-config` --static"
|
||||||
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
|
||||||
export PATH=$PREFIX/bin:$PATH
|
export PATH=$PREFIX/bin:$PATH
|
||||||
|
|
||||||
|
@ -31,14 +35,27 @@ echo "CFLAGS : " $CFLAGS
|
||||||
echo "CXXFLAGS : " $CXXFLAGS
|
echo "CXXFLAGS : " $CXXFLAGS
|
||||||
PLUGIN_DIR=$PREFIX/lib/gstreamer-1.0
|
PLUGIN_DIR=$PREFIX/lib/gstreamer-1.0
|
||||||
|
|
||||||
|
rm -rf $WORK/*
|
||||||
|
|
||||||
# Switch to work directory
|
# Switch to work directory
|
||||||
cd $WORK
|
cd $WORK
|
||||||
|
|
||||||
# 1) BUILD GLIB AND GSTREAMER
|
# 1) BUILD GLIB AND GSTREAMER
|
||||||
# Note: we build glib ourselves so that we get proper malloc/free backtraces
|
# Note: we build glib ourselves so that we get proper malloc/free backtraces
|
||||||
tar xvJf $SRC/glib-2.54.2.tar.xz
|
tar xvJf $SRC/glib-2.64.2.tar.xz
|
||||||
cd glib-2.54.2
|
cd glib-2.64.2
|
||||||
./configure --prefix=$PREFIX --enable-static --disable-shared --disable-libmount --with-pcre=internal && make -j$(nproc) && make install
|
# options taken from glib's oss-fuzz build definition
|
||||||
|
meson \
|
||||||
|
--prefix=$PREFIX \
|
||||||
|
--libdir=lib \
|
||||||
|
--default-library=static \
|
||||||
|
-Db_lundef=false \
|
||||||
|
-Doss_fuzz=enabled \
|
||||||
|
-Dlibmount=disabled \
|
||||||
|
-Dinternal_pcre=true \
|
||||||
|
_builddir
|
||||||
|
ninja -C _builddir
|
||||||
|
ninja -C _builddir install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Note: We don't use/build orc since it still seems to be problematic
|
# Note: We don't use/build orc since it still seems to be problematic
|
||||||
|
@ -49,11 +66,18 @@ for i in gstreamer gst-plugins-base;
|
||||||
do
|
do
|
||||||
mkdir -p $i
|
mkdir -p $i
|
||||||
cd $i
|
cd $i
|
||||||
$SRC/$i/autogen.sh --prefix=$PREFIX --disable-shared --enable-static --disable-examples \
|
meson \
|
||||||
--disable-gtk-doc --disable-introspection --enable-static-plugins \
|
--prefix=$PREFIX \
|
||||||
--disable-gst-tracer-hooks --disable-registry
|
--libdir=lib \
|
||||||
make -j$(nproc)
|
--default-library=static \
|
||||||
make install
|
-Db_lundef=false \
|
||||||
|
-Ddoc=disabled \
|
||||||
|
-Dexamples=disabled \
|
||||||
|
-Dintrospection=disabled \
|
||||||
|
-Dtracer_hooks=false \
|
||||||
|
-Dregistry=false _builddir $SRC/$i
|
||||||
|
ninja -C _builddir
|
||||||
|
ninja -C _builddir install
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -77,7 +101,7 @@ PREDEPS_LDFLAGS="-Wl,-Bdynamic -ldl -lm -pthread -lrt -lpthread"
|
||||||
# These are the basic .pc dependencies required to build any of the fuzzing targets
|
# These are the basic .pc dependencies required to build any of the fuzzing targets
|
||||||
# That is : glib, gstreamer core and gst-app
|
# That is : glib, gstreamer core and gst-app
|
||||||
# The extra target-specific dependencies are to be specified later
|
# The extra target-specific dependencies are to be specified later
|
||||||
COMMON_DEPS="glib-2.0 gstreamer-1.0 gstreamer-app-1.0"
|
COMMON_DEPS="glib-2.0 gio-2.0 gstreamer-1.0 gstreamer-app-1.0"
|
||||||
|
|
||||||
# For each target, defined the following:
|
# For each target, defined the following:
|
||||||
# TARGET_DEPS : Extra .pc dependencies for the target (in addition to $COMMON_DEPS)
|
# TARGET_DEPS : Extra .pc dependencies for the target (in addition to $COMMON_DEPS)
|
||||||
|
|
Loading…
Reference in a new issue