1################################################################################ 2# 3# gst1-python 4# 5################################################################################ 6 7GST1_PYTHON_VERSION = 1.22.0 8GST1_PYTHON_SOURCE = gst-python-$(GST1_PYTHON_VERSION).tar.xz 9GST1_PYTHON_SITE = https://gstreamer.freedesktop.org/src/gst-python 10GST1_PYTHON_INSTALL_STAGING = YES 11GST1_PYTHON_LICENSE_FILES = COPYING 12GST1_PYTHON_LICENSE = LGPL-2.1+ 13 14GST1_PYTHON_DEPENDENCIES = \ 15 gst1-plugins-base \ 16 gstreamer1 \ 17 python-gobject 18 19# A sysconfigdata_name must be manually specified or the resulting .so 20# will have a x86_64 prefix, which causes "from gi.repository import Gst" 21# to fail. A pythonpath must be specified or the host python path will be 22# used resulting in a "not a valid python" error. 23GST1_PYTHON_CONF_ENV += \ 24 _PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \ 25 PYTHONPATH=$(PYTHON3_PATH) 26 27# Due to the CONF_ENV options, libpython-dir must be set manually 28# or else the error: "Python dynamic library path could not be determined" 29# occurs. We set the libpython-dir to /usr/lib as this path is hard-coded 30# into the resulting .so file as /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so. 31# Because we provide PYTHONPATH=$(PYTHON3_PATH) above, the logic in the meson 32# file uses the above python path to determine if /usr/lib/ has the proper .so 33# file. Because Buildroot provides the appropriate paths, the meson file finds 34# the correct .so file, and the resulting compiled library has the appropriate 35# path of /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so 36GST1_PYTHON_CONF_OPTS += \ 37 -Dlibpython-dir=/usr/lib/ 38 39$(eval $(meson-package)) 40