Open KeithThorneLIGO opened 1 year ago
PRs welcome to add the host dependency and the appropriate flags.
@hmaarrfk
Below is a successful recipe for 1.24.x, building all types (base, good, bad, ugly, libav, python, also including rs) of possible plugins of which a dependency exists in conda-forge, or fallback subprojects have been incorporated (this might be a good idea, looking for your opinion).
The X11 dependencies are excess and have only been added for personal reasons. The additional required dependencies are: xorg-libxdamage, xorg-libxfixes, xorg-libxext, xorg-libxtst, xorg-libxi, in addition to the original dependencies in the recipes.
https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-good/sys/ximage/meson.build https://gitlab.freedesktop.org/gstreamer/gstreamer/-/blob/main/subprojects/gst-plugins-base/sys/meson.build
While only tested in Linux, the plugins themselves should generally work out for Windows and OSX as well. I will investigate at a later time, need to first handle my own projects.
{% set name = "gstreamer-selkies" %}
{% set version = "1.24.2" %}
{% set python = "3.12" %}
{% set ffmpeg = ">=6.1.*" %}
{% set posix = 'm2-' if win else '' %}
package:
name: "{{ name|lower }}"
version: "{{ version }}"
source:
url: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/archive/{{ version }}/gstreamer-{{ version }}.tar.gz
about:
home: https://gstreamer.freedesktop.org
summary: GStreamer build for Selkies including GPL (Ugly) plugins
license: GPL-2.0-or-later
doc_url: https://gstreamer.freedesktop.org/documentation/
dev_url: https://gitlab.freedesktop.org/gstreamer/gstreamer
build:
skip: true # [win or osx]
outputs:
- name: "{{ name|lower }}"
type: conda_v2
build:
run_exports:
- {{ pin_compatible('gstreamer', max_pin='x.x') }}
- {{ pin_compatible('gst-plugins-base', max_pin='x.x') }}
- {{ pin_compatible('gst-plugins-good', max_pin='x.x') }}
- {{ pin_compatible('gst-plugins-ugly', max_pin='x.x') }}
- {{ pin_compatible('gst-plugins-bad', max_pin='x.x') }}
- {{ pin_compatible('gst-libav', max_pin='x.x') }}
- {{ pin_compatible('gst-python', max_pin='x.x') }}
- {{ pin_compatible('gstreamer-orc', max_pin='x.x') }}
requirements:
build:
- sysroot_linux-64 2.17 # [linux64]
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('rust') }}
- cargo-c
- python {{ python }}
- cross-python_{{ target_platform }} {{ python }} # [build_platform != target_platform]
- pkg-config
- autoconf
- automake
- binutils
- {{ posix }}bison
- file
- {{ posix }}flex
- ca-certificates
- curl
- git
- git-lfs
- gmp
- gobject-introspection
- gsl
- bzip2
- cmake
- libcap
- libiconv
- libtool
- libsoup
- libgcrypt
- libvulkan-loader
- libvulkan-headers
- nasm
- valgrind
- yasm
- meson
- ninja
- tomli
- perl
- openssl
- zlib
- glew
- glfw
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-libegl-devel') }} # [linux]
- {{ cdt('mesa-libgbm') }} # [linux]
- {{ cdt('libdrm-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libglvnd-devel') }} # [linux]
- {{ cdt('libglvnd-glx') }} # [linux]
- {{ cdt('libglvnd-egl') }} # [linux]
- {{ cdt('libglvnd-gles') }} # [linux]
- {{ cdt('libglvnd-opengl') }} # [linux]
- {{ cdt('libxshmfence-devel') }} # [linux]
- {{ cdt('kernel-headers') }} # [linux]
- {{ cdt('mesa-khr-devel') }} # [linux]
- {{ cdt('libselinux-devel') }} # [linux]
host:
- python {{ python }}
- ffmpeg {{ ffmpeg }}
- abseil-cpp
- ascii-art
- libass
- bash-completion
- curl
- libcurl
- libdrm
- libva
- libusb
- elfutils
- gettext
- libunwind
- nettle
- openssl
- libgraphene
- libiconv
- libxml2
- flite-dev
- glib
- glib-networking
- gnutls
- gdk-pixbuf
- gtk2
- gtk3
- librsvg
- imath
- cairo
- pango
- pygobject
- popt
- setuptools
- srt
- zlib
- libffi
- libtool
- openexr
- openjpeg
- libjpeg-turbo
- libcap
- libxslt
- bzip2
- libdc1394
- libde265
- libwebp
- libvpx
- openh264
- x264
- x265
- aom
- dav1d
- rav1e
- svt-av1
- srt
- lcms2
- libflac
- libogg
- libopus
- libsndfile
- libtheora
- libvorbis
- mpg123
- lame
- libpng
- libudev # [linux]
- jack # [linux]
- pthread-stubs # [linux]
- pulseaudio-client # [linux]
- alsa-lib # [linux]
- mesalib # [linux]
- xcb-proto # [linux]
- libxcb # [linux]
- xorg-kbproto # [linux]
- libxkbcommon # [linux]
- libxkbfile # [linux]
- xorg-libxcursor # [linux]
- xorg-damageproto # [linux]
- xorg-libxdamage # [linux]
- xorg-libxft # [linux]
- xorg-videoproto # [linux]
- xorg-libxxf86vm # [linux]
- xorg-xf86vidmodeproto # [linux]
- xorg-libxau # [linux]
- xorg-libxdmcp # [linux]
- xorg-compositeproto # [linux]
- xorg-libxcomposite # [linux]
- xorg-fixesproto # [linux]
- xorg-libxfixes # [linux]
- xorg-fontsproto # [linux]
- xorg-xf86bigfontproto # [linux]
- xorg-font-util # [linux]
- xorg-libxres # [linux]
- xorg-glproto # [linux]
- xorg-libice # [linux]
- xorg-xextproto # [linux]
- xorg-libxext # [linux]
- xorg-libxmu # [linux]
- xorg-randrproto # [linux]
- xorg-libxrandr # [linux]
- xorg-renderproto # [linux]
- xorg-libxrender # [linux]
- xorg-libsm # [linux]
- xorg-libxtst # [linux]
- xorg-libxt # [linux]
- xorg-inputproto # [linux]
- xorg-libxi # [linux]
- xorg-presentproto # [linux]
- xorg-libxpm # [linux]
- xorg-xineramaproto # [linux]
- xorg-libxinerama # [linux]
- xorg-xproto # [linux]
- xorg-libx11 # [linux]
- expat # [linux]
- wayland-protocols # [linux]
- wayland # [linux]
- fluidsynth
- opencv
- onnxruntime
- speex # [linux]
- m2w64-speex # [win]
- libqrencode
- zbar # [linux or osx]
run:
- python {{ python }}
- pygobject
- libgraphene
- {{ pin_compatible('glib') }}
- {{ cdt('xorg-x11-server-xvfb') }} # [linux]
- pulseaudio # [linux]
- pulseaudio-client # [linux]
- xcb-proto # [linux]
- libxcb # [linux]
- xorg-kbproto # [linux]
- libxkbcommon # [linux]
- libxkbfile # [linux]
- xorg-libxcursor # [linux]
- xorg-damageproto # [linux]
- xorg-libxdamage # [linux]
- xorg-libxft # [linux]
- xorg-videoproto # [linux]
- xorg-libxxf86vm # [linux]
- xorg-xf86vidmodeproto # [linux]
- xorg-libxau # [linux]
- xorg-libxdmcp # [linux]
- xorg-compositeproto # [linux]
- xorg-libxcomposite # [linux]
- xorg-fixesproto # [linux]
- xorg-libxfixes # [linux]
- xorg-fontsproto # [linux]
- xorg-xf86bigfontproto # [linux]
- xorg-font-util # [linux]
- xorg-libxres # [linux]
- xorg-glproto # [linux]
- xorg-libice # [linux]
- xorg-xextproto # [linux]
- xorg-libxext # [linux]
- xorg-libxmu # [linux]
- xorg-randrproto # [linux]
- xorg-libxrandr # [linux]
- xorg-renderproto # [linux]
- xorg-libxrender # [linux]
- xorg-libsm # [linux]
- xorg-libxtst # [linux]
- xorg-libxt # [linux]
- xorg-inputproto # [linux]
- xorg-libxi # [linux]
- xorg-presentproto # [linux]
- xorg-libxpm # [linux]
- xorg-xineramaproto # [linux]
- xorg-libxinerama # [linux]
- xorg-xproto # [linux]
- xorg-libx11 # [linux]
- expat # [linux]
- wayland-protocols # [linux]
- wayland # [linux]
#!/bin/bash -ex
mkdir -pm755 build
pushd build
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${PREFIX}/lib/pkgconfig:${BUILD_PREFIX}/lib/pkgconfig"
EXTRA_FLAGS=""
if [ "${CONDA_BUILD_CROSS_COMPILATION}" = "1" ]; then
# Use Meson cross-file flag to enable cross compilation
EXTRA_FLAGS="--cross-file ${BUILD_PREFIX}/meson_cross_file.txt"
fi
export PKG_CONFIG="$(which pkg-config)"
meson setup --buildtype=release --prefix="${PREFIX}" -Dlibdir="${PREFIX}/lib" -Dpython=enabled -Dgst-python:libpython-dir="${PREFIX}/lib" -Dgstreamer:ptp-helper-permissions=none -Dintrospection=enabled -Dorc=enabled -Dwebrtc=enabled -Dgst-plugins-bad:webrtcdsp=enabled -Drtsp_server=enabled -Dtls=enabled -Dlibnice=enabled -Dtools=enabled -Drs=enabled -Dgpl=enabled -Dbad=enabled -Dugly=enabled -Dlibav=enabled -Dgst-plugins-base:alsa=enabled -Dgst-plugins-base:gl=enabled -Dgst-plugins-base:opus=enabled -Dgst-plugins-good:pulse=enabled -Dgst-plugins-good:jack=enabled -Dgst-plugins-good:ximagesrc=enabled -Dgst-plugins-good:ximagesrc-xshm=enabled -Dgst-plugins-good:ximagesrc-xfixes=enabled -Dgst-plugins-good:ximagesrc-xdamage=enabled -Dgst-plugins-good:ximagesrc-navigation=enabled -Dgst-plugins-good:vpx=enabled -Dgst-plugins-bad:qsv=enabled -Dgst-plugins-bad:va=enabled -Dgst-plugins-bad:nvcodec=enabled -Dgst-plugins-good:v4l2=enabled -Dgst-plugins-bad:v4l2codecs=enabled -Dgst-plugins-bad:openh264=enabled -Dgst-plugins-ugly:x264=enabled -Dgst-plugins-bad:x265=enabled -Dgst-plugins-bad:aom=enabled -Dgst-plugins-bad:svtav1=enabled -Dgst-plugins-rs:rav1e=enabled -Dgst-plugins-rs:sodium=disabled -Dqt5=disabled -Dqt6=disabled -Ddoc=disabled -Ddevtools=disabled -Dexamples=disabled -Dgst-examples=disabled -Dnls=disabled -Dtests=disabled ${EXTRA_FLAGS} ..
ninja
meson install
rm -rf "${PREFIX}/share/gdb"
rm -rf "${PREFIX}/share/gstreamer-1.0/gdb"
popd
cdt_name: # [linux]
- cos7 # [linux]
Excited to review the PR!
Things will be much easier if #125 is merged by when I take this. @hmaarrfk
Solution to issue cannot be found in the documentation.
Issue
The gst-plugins-base package is supposed to have Pango and related items, like clockoverlay. This is clearly detailed in the gst-plugins-base sub-project in gstreamer gst-plugins-base repo. However, it appears the process uploaded this to conda-forge is not building it with the Pango dependency, so the clockoverlay, etc are not there
(cds) keith.thorne@cr81:~$ gst-inspect-1.0 clockoverlay No such element or plugin 'clockoverlay'
Using native packages for the same from Fedora (also Debian) it is there keith.thorne@cr81:~$ gst-inspect-1.0 clockoverlay Factory Details: Rank none (0) Long-name Clock overlay Klass Filter/Editor/Video Description Overlays the current clock time on a video stream Author Tim-Philipp Müller tim@centricular.net Plugin Details: Name pango Description Pango-based text rendering and overlay Filename /usr/lib64/gstreamer-1.0/libgstpango.so Version 1.14.4 License LGPL Source module gst-plugins-base Source release date 2018-10-02 Binary package Fedora GStreamer-plugins-base package Origin URL http://download.fedoraproject.org/
At present, I find no way to get these plugins from conda-forge
Installed packages
Environment info