gst1-python.mk 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ################################################################################
  2. #
  3. # gst1-python
  4. #
  5. ################################################################################
  6. GST1_PYTHON_VERSION = 1.16.2
  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. gstreamer1 \
  14. python-gobject
  15. # A sysconfigdata_name must be manually specified or the resulting .so
  16. # will have a x86_64 prefix, which causes "from gi.repository import Gst"
  17. # to fail. A pythonpath must be specified or the host python path will be
  18. # used resulting in a "not a valid python" error.
  19. GST1_PYTHON_CONF_ENV += \
  20. _PYTHON_SYSCONFIGDATA_NAME=$(PKG_PYTHON_SYSCONFIGDATA_NAME) \
  21. PYTHONPATH=$(PYTHON3_PATH)
  22. # Due to the CONF_ENV options, libpython-dir must be set manually
  23. # or else the error: "Python dynamic library path could not be determined"
  24. # occurs. We set the libpython-dir to /usr/lib as this path is hard-coded
  25. # into the resulting .so file as /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so.
  26. # Because we provide PYTHONPATH=$(PYTHON3_PATH) above, the logic in the meson
  27. # file uses the above python path to determine if /usr/lib/ has the proper .so
  28. # file. Because Buildroot provides the appropriate paths, the meson file finds
  29. # the correct .so file, and the resulting compiled library has the appropriate
  30. # path of /usr/lib/python3.$(PYTHON3_VERSION_MAJOR).so
  31. GST1_PYTHON_CONF_OPTS += \
  32. -Dlibpython-dir=/usr/lib/
  33. $(eval $(meson-package))