gst1-python.mk 1.6 KB

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