# $NetBSD: Makefile.common,v 1.38 2022/07/18 15:40:56 wiz Exp $

DISTNAME=	gst-plugins-ugly-1.20.3
MASTER_SITES=	https://gstreamer.freedesktop.org/src/gst-plugins-ugly/
EXTRACT_SUFX=	.tar.xz

MAINTAINER=	pkgsrc-users@NetBSD.org
HOMEPAGE=	https://gstreamer.freedesktop.org/
LICENSE=	gnu-gpl-v2

USE_LANGUAGES=	c c++

USE_TOOLS+=	pkg-config xgettext

DISTINFO_FILE=	${.CURDIR}/../../multimedia/gst-plugins1-ugly/distinfo
PATCHDIR=	${.CURDIR}/../../multimedia/gst-plugins1-ugly/patches

PKGCONFIG_OVERRIDE=		output/pkgconfig/*.pc
PKGCONFIG_OVERRIDE_STAGE=	pre-install

PYTHON_VERSIONS_INCOMPATIBLE=	27
PYTHON_FOR_BUILD_ONLY=		tool

# grep '^option' meson_options.txt | grep feature | \
# sed -e "s/',.*//g" -e "s/option('//g" | \
# xargs printf 'GST_PLUGINS_SET+=\t%s\n'
GST_PLUGINS_SET+=	x264_libraries
GST_PLUGINS_SET+=	asfdemux
GST_PLUGINS_SET+=	dvdlpcmdec
GST_PLUGINS_SET+=	dvdsub
GST_PLUGINS_SET+=	realmedia
GST_PLUGINS_SET+=	xingmux
GST_PLUGINS_SET+=	a52dec
GST_PLUGINS_SET+=	amrnb
GST_PLUGINS_SET+=	amrwbdec
GST_PLUGINS_SET+=	cdio
GST_PLUGINS_SET+=	dvdread
GST_PLUGINS_SET+=	mpeg2dec
GST_PLUGINS_SET+=	sidplay
GST_PLUGINS_SET+=	x264
GST_PLUGINS_SET+=	nls
GST_PLUGINS_SET+=	orc
GST_PLUGINS_SET+=	tests

.for i in ${GST_PLUGINS_SET}
.  if !empty(GST_PLUGINS:M${i})
MESON_ARGS+=	-D${i}=enabled
.  else
MESON_ARGS+=	-D${i}=disabled
.  endif
.endfor

.include "../../devel/meson/build.mk"
.include "../../lang/python/tool.mk"
.include "../../multimedia/gst-plugins1-base/buildlink3.mk"
BUILDLINK_API_DEPENDS.gstreamer1+=	gstreamer1>=1.20.0
.include "../../multimedia/gstreamer1/buildlink3.mk"
