> On 17 Mar 2021, at 01:49, Haelwenn (lanodan) Monnier <cont...@hacktivis.me> > wrote: > > Gstreamer switched to meson in 1.16.0 and removed autotools support in 1.18.0, > this eclass is an update of gstreamer.eclass. > > [snip]
Thanks for working on this! > +# > +# GStreamer consuming applications should depend on the specific plugins > +# they need as defined in their source code. Usually you can find that > +# out by grepping the source tree for 'factory_make'. If it uses playbin > +# plugin, consider adding media-plugins/gst-plugins-meta dependency, but > +# also list any packages that provide explicitly requested plugins. > + > +inherit eutils multilib meson multilib-minimal toolchain-funcs versionator > xdg-utils Do we need eutils here? > + > +case "${EAPI:-0}" in > + 5|6) > + ;; > + 0|1|2|3|4) > + die "EAPI=\"${EAPI:-0}\" is not supported anymore" > + ;; > + *) > + die "EAPI=\"${EAPI}\" is not supported yet" > + ;; > +esac EAPI 7? > [snip] > + > +# Even though xz-utils are in @system, they must still be added to DEPEND; > see > +# > https://archives.gentoo.org/gentoo-dev/msg_a0d4833eb314d1be5d5802a3b710e0a4.xml > +if [[ ${GST_TARBALL_SUFFIX} == "xz" ]]; then > + DEPEND="${DEPEND} app-arch/xz-utils" > +fi > + BDEPEND in EAPI 7. > [snip] > +DEPEND=" > + >=sys-apps/sed-4 > + >=virtual/pkgconfig-0-r1[${MULTILIB_USEDEP}] > +" > + BDEPEND in EAPI 7. > [snip] > +else > + IUSE="nls" > + DEPEND="${DEPEND} nls? ( >=sys-devel/gettext-0.17 )" BDEPEND in EAPI 7 unless we’re really building against gettext. > > + > +read -d '' __MESON_EXTRACT_TARGET_FILENAME <<"EOF" > +import json > +import sys > + > +with open("meson-info/intro-targets.json", "r") as targets_file: > + data = json.load(targets_file) > + > +for i in range(len(data)): > + target = data[i] > + if target['installed']: > + if sys.argv[1] in target['filename'][0]: > + print(target['filename'][0] + ':' + > target['install_filename'][0]) > +EOF > + It seems kind of odd to me to do this in global scope. > +# @FUNCTION: _gstreamer_get_target_filename > +# @INTERNAL > +# @DESCRIPTION: > +# Extracts build and target filenames from meson-data for given submatch > +_gstreamer_get_target_filename() { > + python -c "${__MESON_EXTRACT_TARGET_FILENAME}" "$@" > +} || die on external commands. We probably want ${EPYTHON} and to use a Python eclass here. > + > +# @FUNCTION: gstreamer_multilib_src_compile > +# @DESCRIPTION: > +# Compiles requested gstreamer plugin. > +gstreamer_multilib_src_compile() { > + local plugin_dir plugin > + > + for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do “${GST_PLUGINS_BUILD_DIR}" > + plugin=$(_gstreamer_get_target_filename > $(gstreamer_get_plugin_dir ${plugin_dir})) > + plugin_path="${plugin%%:*}" > + eninja "${plugin_path/"${BUILD_DIR}/"}" No need for double quoting? > +# @FUNCTION: gstreamer_multilib_src_install_all > +# @DESCRIPTION: > +# Installs documentation for requested gstreamer plugin, and removes .la > +# files. > +gstreamer_multilib_src_install_all() { > + local plugin_dir > + > + for plugin_dir in ${GST_PLUGINS_BUILD_DIR} ; do > + local dir=$(gstreamer_get_plugin_dir ${plugin_dir}) > + [[ -e ${dir}/README ]] && dodoc "${dir}"/README > + done > + > + prune_libtool_files --modules Deprecated in newer EAPIs, let’s do it manually. > +} > -- > 2.26.2 > >
signature.asc
Description: Message signed with OpenPGP