build: remove gst-indent as a subproject
gst-indent is now installable with pip. Remove it as a subproject and update the documentation. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8402>
This commit is contained in:
parent
d0ab931628
commit
bc5e1eeb16
@ -9,7 +9,7 @@ variables:
|
||||
|
||||
DEBIAN_TAG: '2025-01-11.0'
|
||||
|
||||
CHECKS_TAG: '2025-01-22.0'
|
||||
CHECKS_TAG: '2025-02-04.0'
|
||||
|
||||
ABI_CHECK_TAG: '2025-01-29.0'
|
||||
|
||||
|
@ -18,45 +18,12 @@ apt install -y dotnet-sdk-7.0
|
||||
dotnet tool install --global dotnet-format
|
||||
ln -s ~/.dotnet/tools/dotnet-format /usr/local/bin/dotnet-format
|
||||
|
||||
# Build and install gst-indent-1.0
|
||||
# Install build dependencies
|
||||
echo "deb-src http://deb.debian.org/debian/ bookworm main" >> /etc/apt/sources.list
|
||||
apt update
|
||||
|
||||
apt-get install --assume-yes devscripts build-essential dpkg-dev wget meson ninja-build pkg-config libssl-dev
|
||||
|
||||
apt-get build-dep --assume-yes indent
|
||||
|
||||
git clone https://gitlab.freedesktop.org/gstreamer/gst-indent.git
|
||||
cd gst-indent
|
||||
|
||||
meson setup --prefix=/usr _build
|
||||
meson install -C _build
|
||||
|
||||
# Try it
|
||||
wget -O gstbayer2rgb.c "https://gitlab.freedesktop.org/gstreamer/gstreamer/-/raw/main/subprojects/gst-plugins-bad/gst/bayer/gstbayer2rgb.c?inline=false"
|
||||
|
||||
for i in 1 2; do
|
||||
gst-indent-1.0 \
|
||||
--braces-on-if-line \
|
||||
--case-brace-indentation0 \
|
||||
--case-indentation2 \
|
||||
--braces-after-struct-decl-line \
|
||||
--line-length80 \
|
||||
--no-tabs \
|
||||
--cuddle-else \
|
||||
--dont-line-up-parentheses \
|
||||
--continuation-indentation4 \
|
||||
--honour-newlines \
|
||||
--tab-size8 \
|
||||
--indent-level2 \
|
||||
--leave-preprocessor-space \
|
||||
gstbayer2rgb.c
|
||||
done;
|
||||
|
||||
# Clean up gst-indent
|
||||
cd ..
|
||||
rm -rf gst-indent
|
||||
|
||||
export PIP_BREAK_SYSTEM_PACKAGES=1
|
||||
# Install pre-commit
|
||||
python3 -m pip install --upgrade pip
|
||||
|
@ -322,14 +322,6 @@ def get_subprocess_env(options, gst_version):
|
||||
prepend_env_var(env, "PKG_CONFIG_PATH", os.path.join(PREFIX_DIR, 'lib', 'pkgconfig'),
|
||||
options.sysroot)
|
||||
|
||||
# gst-indent-1.0
|
||||
prepend_env_var(env, "PATH", os.path.join(options.builddir, 'subprojects',
|
||||
'gst-indent', 'src'),
|
||||
options.sysroot)
|
||||
# gst-indent (FIXME: remove or move into gst-indent module)
|
||||
prepend_env_var(env, "PATH", os.path.join(SCRIPTDIR, 'scripts'),
|
||||
options.sysroot)
|
||||
|
||||
# tools: gst-launch-1.0, gst-inspect-1.0
|
||||
prepend_env_var(env, "PATH", os.path.join(options.builddir, 'subprojects',
|
||||
'gstreamer', 'tools'),
|
||||
|
@ -686,8 +686,6 @@ if dotnet_format.found()
|
||||
)
|
||||
endif
|
||||
|
||||
indent = find_program('gst-indent-1.0', native: true, required: get_option('gst-indent').allowed())
|
||||
|
||||
summary({
|
||||
'gstreamer-full library': building_full,
|
||||
'gstreamer-full target type': get_option('gst-full-target-type'),
|
||||
|
@ -45,7 +45,6 @@ option('gst-full-target-type', type : 'combo', value : 'shared_library', choices
|
||||
option('orc-source', type: 'combo', choices: ['system', 'subproject', 'auto'], value: 'subproject')
|
||||
option('build-tools-source', type: 'combo', choices: ['system', 'subproject'], value: 'subproject')
|
||||
option('virtme_kernel_image', type: 'string', value: '', description: 'Path to a Linux kernel image to be used for virtme testing')
|
||||
option('gst-indent', type: 'feature', value: 'auto', description: 'Whether to build the gst-indent tool')
|
||||
|
||||
# License-related feature options
|
||||
option('gpl', type: 'feature', value: 'disabled',
|
||||
|
@ -427,8 +427,8 @@ In the simplest case, you might be able to get away with just doing a `git pull
|
||||
#### Coding Style
|
||||
|
||||
Try to stick to the GStreamer indentation and coding style. There is an
|
||||
application called [`gst-indent-1.0`][gst-indent] which should be available
|
||||
in a GStreamer development environment and which you can run over your `.c` or
|
||||
application called [`gst-indent-1.0`][gst-indent] that can be installed
|
||||
with `pip install gst-indent`. You can run it over your `.c` or
|
||||
`.cpp` files if you want your code auto-indented before making the patch.
|
||||
|
||||
Please do _not_ run `gst-indent-1.0` on header files, our header file
|
||||
@ -439,13 +439,6 @@ checks if your commit conforms to the required style. You can bypass that local
|
||||
indentation check hook by using `git commit -n`, but it will still be checked
|
||||
again later on the CI when you submit your changes through GitLab for merging.
|
||||
|
||||
If `gst-indent-1.0` is not found on your system at setup time, it will be
|
||||
supplied from the Meson wrap in the main project; you must build GStreamer
|
||||
once, and that will make `gst-indent-1.0` available to the developer
|
||||
environment.
|
||||
|
||||
We are working on making this less hasslesome.
|
||||
|
||||
Compiler requirements:
|
||||
- we are targetting the C99 compiler and preprocesser feature subset
|
||||
supported by gcc 5.4, clang and vs2017. Newer features can be
|
||||
|
@ -120,9 +120,9 @@ Rust source files (.rs files) are indented with the standard `rustfmt`.
|
||||
|
||||
One way to make sure you are following our coding style is to run your code
|
||||
(remember, only the `*.c` files, not the headers) through the `gst-indent-1.0`
|
||||
tool, which should be available in the uninstalled GStreamer development
|
||||
environment from version 1.23.1 onwards. Alternatively you can also get the
|
||||
tool from the [gst-indent repository](https://gitlab.freedesktop.org/gstreamer/gst-indent/)
|
||||
tool, which can be installed with `pip install gst-indent`.
|
||||
Alternatively you can also get the tool from the
|
||||
[gst-indent repository](https://gitlab.freedesktop.org/gstreamer/gst-indent/)
|
||||
and build it yourself.
|
||||
|
||||
The easiest way to get the indenting right is probably to develop against a git
|
||||
|
@ -1,8 +0,0 @@
|
||||
[wrap-git]
|
||||
directory=gst-indent
|
||||
url=https://gitlab.freedesktop.org/gstreamer/gst-indent.git
|
||||
push-url=git@gitlab.freedesktop.org:gstreamer/gst-indent.git
|
||||
revision=main
|
||||
|
||||
[provide]
|
||||
program_names = gst-indent-1.0
|
Loading…
x
Reference in New Issue
Block a user