libv4l.mk 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ################################################################################
  2. #
  3. # libv4l
  4. #
  5. ################################################################################
  6. LIBV4L_VERSION = 1.12.5
  7. LIBV4L_SOURCE = v4l-utils-$(LIBV4L_VERSION).tar.bz2
  8. LIBV4L_SITE = http://linuxtv.org/downloads/v4l-utils
  9. LIBV4L_INSTALL_STAGING = YES
  10. LIBV4L_DEPENDENCIES = host-pkgconf
  11. LIBV4L_CONF_OPTS = --disable-doxygen-doc
  12. # below patches requires autoreconf:
  13. # 0004-configure.ac-clarify-configure-summary.patch
  14. # 0005-configure.ac-revisit-v4l2-ctl-compliance-using-libv4.patch
  15. # 0006-configure.ac-revisit-disable-libv4l-to-disable-dyn-l.patch
  16. # 0007-configure.ac-add-disable-libv4l-option.patch
  17. # 0008-configure.ac-fix-build-of-v4l-utils-on-uclinux.patch
  18. # 0009-configure.ac-add-USE_LIBV4L-to-summary.patch
  19. # 0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch
  20. # 0011-configure.ac-drop-disable-libv4l-disable-plugin-supp.patch
  21. LIBV4L_AUTORECONF = YES
  22. # host-gettext needed for autoreconf to work
  23. LIBV4L_DEPENDENCIES += host-gettext
  24. # fix uclibc-ng configure/compile
  25. LIBV4L_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
  26. # v4l-utils components have different licences, see v4l-utils.spec for details
  27. LIBV4L_LICENSE = GPL-2.0+ (utilities), LGPL-2.1+ (libraries)
  28. LIBV4L_LICENSE_FILES = COPYING COPYING.libv4l lib/libv4l1/libv4l1-kernelcode-license.txt
  29. ifeq ($(BR2_PACKAGE_ALSA_LIB),y)
  30. LIBV4L_DEPENDENCIES += alsa-lib
  31. endif
  32. ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
  33. LIBV4L_DEPENDENCIES += argp-standalone
  34. LIBV4L_LIBS += -largp
  35. endif
  36. LIBV4L_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBICONV),libiconv)
  37. ifeq ($(BR2_PACKAGE_JPEG),y)
  38. LIBV4L_DEPENDENCIES += jpeg
  39. LIBV4L_CONF_OPTS += --with-jpeg
  40. else
  41. LIBV4L_CONF_OPTS += --without-jpeg
  42. endif
  43. ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
  44. LIBV4L_DEPENDENCIES += libgl
  45. endif
  46. ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
  47. LIBV4L_DEPENDENCIES += udev
  48. endif
  49. ifeq ($(BR2_PACKAGE_LIBGLU),y)
  50. LIBV4L_DEPENDENCIES += libglu
  51. endif
  52. ifeq ($(BR2_PACKAGE_LIBV4L_UTILS),y)
  53. LIBV4L_CONF_OPTS += --enable-v4l-utils
  54. LIBV4L_DEPENDENCIES += $(TARGET_NLS_DEPENDENCIES)
  55. ifeq ($(BR2_PACKAGE_QT5BASE)$(BR2_PACKAGE_QT5BASE_GUI)$(BR2_PACKAGE_QT5BASE_WIDGETS),yyy)
  56. LIBV4L_CONF_OPTS += --enable-qv4l2
  57. LIBV4L_DEPENDENCIES += qt5base
  58. # protect against host version detection of moc-qt5/rcc-qt5/uic-qt5
  59. LIBV4L_CONF_ENV += \
  60. ac_cv_prog_MOC=$(HOST_DIR)/bin/moc \
  61. ac_cv_prog_RCC=$(HOST_DIR)/bin/rcc \
  62. ac_cv_prog_UIC=$(HOST_DIR)/bin/uic
  63. # qt5 needs c++11 (since qt-5.7)
  64. ifeq ($(BR2_PACKAGE_QT5_VERSION_LATEST),y)
  65. LIBV4L_CONF_ENV += CXXFLAGS="$(TARGET_CXXFLAGS) -std=c++11"
  66. endif
  67. else ifeq ($(BR2_PACKAGE_QT_OPENGL_GL_DESKTOP),y)
  68. LIBV4L_CONF_OPTS += --enable-qv4l2
  69. LIBV4L_DEPENDENCIES += qt
  70. else
  71. LIBV4L_CONF_OPTS += --disable-qv4l2
  72. endif
  73. else
  74. LIBV4L_CONF_OPTS += --disable-v4l-utils
  75. endif
  76. LIBV4L_CONF_ENV += LIBS="$(LIBV4L_LIBS)"
  77. $(eval $(autotools-package))