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