package/kmsxx: bump version to 5489056 and convert to meson build
- remove 0001-fix-compiler-errors-with-gcc-10.patch (upstream) - remove 0002-added-include-string-to-card.h-to-follow-gcc10-porti.patch (upstream) - convert to meson - add patch to use system fmt instead of git submodule (fixes configure 'ERROR: Include dir ext/fmt/include does not exist.') - add patch to use system pybind11 instead of git submodule (fixes configure 'ERROR: Include dir ext/pybind11/include does not exist.') - add patch to use python only if pykms is enabled (fixes configure 'ERROR: Dependency "pybind11" not found, tried pkgconfig') - add optional libevdev dependency (needed for utils/kmstouch) - update LICENSE file hash (replaced short copyright notice and link to http://mozilla.org/MPL/2.0/ with complete license text) - lift toolchain headers requirement to at least 4.11 (include linux/dma-buf.h) Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
eefebfe5df
commit
4146241624
@@ -1,35 +0,0 @@
|
|||||||
From aa54634ce7cbbfc844de945e73a9f34cdcb9bb12 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Trompeter <christoph@zen.fritz.box>
|
|
||||||
Date: Fri, 15 May 2020 15:20:47 +0200
|
|
||||||
Subject: [PATCH] fix compiler errors with gcc 10
|
|
||||||
|
|
||||||
[Retrieved from:
|
|
||||||
https://github.com/tomba/kmsxx/commit/aa54634ce7cbbfc844de945e73a9f34cdcb9bb12]
|
|
||||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
---
|
|
||||||
kms++/inc/kms++/pixelformats.h | 1 +
|
|
||||||
kms++util/src/opts.cpp | 1 +
|
|
||||||
2 files changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/kms++/inc/kms++/pixelformats.h b/kms++/inc/kms++/pixelformats.h
|
|
||||||
index 784717d..4e73d5d 100644
|
|
||||||
--- a/kms++/inc/kms++/pixelformats.h
|
|
||||||
+++ b/kms++/inc/kms++/pixelformats.h
|
|
||||||
@@ -2,6 +2,7 @@
|
|
||||||
|
|
||||||
#include <cstdint>
|
|
||||||
#include <string>
|
|
||||||
+#include <stdexcept>
|
|
||||||
|
|
||||||
namespace kms
|
|
||||||
{
|
|
||||||
diff --git a/kms++util/src/opts.cpp b/kms++util/src/opts.cpp
|
|
||||||
index afef452..5a14b84 100644
|
|
||||||
--- a/kms++util/src/opts.cpp
|
|
||||||
+++ b/kms++util/src/opts.cpp
|
|
||||||
@@ -1,4 +1,5 @@
|
|
||||||
#include <algorithm>
|
|
||||||
+#include <stdexcept>
|
|
||||||
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
46
package/kmsxx/0001-meson-add-use-system-fmt-option.patch
Normal file
46
package/kmsxx/0001-meson-add-use-system-fmt-option.patch
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
From 61db7d5520f50564da8f2c9ac952eadb31f70727 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
Date: Sun, 29 Nov 2020 11:13:41 +0100
|
||||||
|
Subject: [PATCH] meson: add use-system-fmt option
|
||||||
|
|
||||||
|
[Upstream: https://github.com/tomba/kmsxx/pull/60]
|
||||||
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
---
|
||||||
|
meson.build | 10 +++++++---
|
||||||
|
meson_options.txt | 2 ++
|
||||||
|
2 files changed, 9 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 9652009..29080f4 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -31,9 +31,13 @@ endif
|
||||||
|
|
||||||
|
add_global_link_arguments(link_arguments, language : 'cpp')
|
||||||
|
|
||||||
|
-libfmt_includes = include_directories('ext/fmt/include')
|
||||||
|
-libfmt_dep = declare_dependency(include_directories : libfmt_includes,
|
||||||
|
- compile_args : '-DFMT_HEADER_ONLY')
|
||||||
|
+if get_option('use-system-fmt')
|
||||||
|
+ libfmt_dep = dependency('fmt')
|
||||||
|
+else
|
||||||
|
+ libfmt_includes = include_directories('ext/fmt/include')
|
||||||
|
+ libfmt_dep = declare_dependency(include_directories : libfmt_includes,
|
||||||
|
+ compile_args : '-DFMT_HEADER_ONLY')
|
||||||
|
+endif
|
||||||
|
|
||||||
|
pybind11_includes = include_directories('ext/pybind11/include')
|
||||||
|
pybind11_dep = declare_dependency(include_directories : pybind11_includes)
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index cd854ab..48176a8 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -3,3 +3,5 @@ option('pykms', type : 'feature', value : 'auto')
|
||||||
|
option('omap', type : 'feature', value : 'auto')
|
||||||
|
option('static-libc', type : 'boolean', value : false)
|
||||||
|
option('utils', type : 'boolean', value : true)
|
||||||
|
+
|
||||||
|
+option('use-system-fmt', type : 'boolean', value : false)
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
From b53f9d383c9189a897c44cd88a8fc1b871fdc8a2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tobias Off <sebastianoff@web.de>
|
|
||||||
Date: Thu, 8 Oct 2020 22:37:55 +0200
|
|
||||||
Subject: [PATCH] added #include <string> to card.h to follow gcc10 porting
|
|
||||||
guide
|
|
||||||
|
|
||||||
[Retrieved (and backported) from:
|
|
||||||
https://github.com/tomba/kmsxx/commit/b53f9d383c9189a897c44cd88a8fc1b871fdc8a2]
|
|
||||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
|
||||||
---
|
|
||||||
kms++/inc/kms++/card.h | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/kms++/inc/kms++/card.h b/kms++/inc/kms++/card.h
|
|
||||||
index 0a7eaaf..f60b184 100644
|
|
||||||
--- a/kms++/inc/kms++/card.h
|
|
||||||
+++ b/kms++/inc/kms++/card.h
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
#include <cstdint>
|
|
||||||
#include <vector>
|
|
||||||
#include <map>
|
|
||||||
+#include <string>
|
|
||||||
|
|
||||||
#include "decls.h"
|
|
||||||
#include "pipeline.h"
|
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
From 27f15549ce67194e4152c57db2b762b7a443b4c7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
Date: Sun, 29 Nov 2020 11:14:41 +0100
|
||||||
|
Subject: [PATCH] meson: add use-system-pybind11 option
|
||||||
|
|
||||||
|
[Upstream: https://github.com/tomba/kmsxx/pull/60]
|
||||||
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
---
|
||||||
|
meson.build | 8 ++++++--
|
||||||
|
meson_options.txt | 1 +
|
||||||
|
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 29080f4..4b3e7c3 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -39,8 +39,12 @@ else
|
||||||
|
compile_args : '-DFMT_HEADER_ONLY')
|
||||||
|
endif
|
||||||
|
|
||||||
|
-pybind11_includes = include_directories('ext/pybind11/include')
|
||||||
|
-pybind11_dep = declare_dependency(include_directories : pybind11_includes)
|
||||||
|
+if get_option('use-system-pybind11')
|
||||||
|
+ pybind11_dep = dependency('pybind11')
|
||||||
|
+else
|
||||||
|
+ pybind11_includes = include_directories('ext/pybind11/include')
|
||||||
|
+ pybind11_dep = declare_dependency(include_directories : pybind11_includes)
|
||||||
|
+endif
|
||||||
|
|
||||||
|
libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
|
||||||
|
|
||||||
|
diff --git a/meson_options.txt b/meson_options.txt
|
||||||
|
index 48176a8..095c6f2 100644
|
||||||
|
--- a/meson_options.txt
|
||||||
|
+++ b/meson_options.txt
|
||||||
|
@@ -5,3 +5,4 @@ option('static-libc', type : 'boolean', value : false)
|
||||||
|
option('utils', type : 'boolean', value : true)
|
||||||
|
|
||||||
|
option('use-system-fmt', type : 'boolean', value : false)
|
||||||
|
+option('use-system-pybind11', type : 'boolean', value : false)
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
From 0ef36b2e22c2ac0331b3096b7adc69fb08044048 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
Date: Sun, 29 Nov 2020 11:37:26 +0100
|
||||||
|
Subject: [PATCH] meson: only build py in case pykms is enabled
|
||||||
|
|
||||||
|
[Upstream: https://github.com/tomba/kmsxx/pull/60]
|
||||||
|
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||||
|
---
|
||||||
|
meson.build | 16 ++++++++++------
|
||||||
|
1 file changed, 10 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 4b3e7c3..1810b17 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -39,11 +39,13 @@ else
|
||||||
|
compile_args : '-DFMT_HEADER_ONLY')
|
||||||
|
endif
|
||||||
|
|
||||||
|
-if get_option('use-system-pybind11')
|
||||||
|
- pybind11_dep = dependency('pybind11')
|
||||||
|
-else
|
||||||
|
- pybind11_includes = include_directories('ext/pybind11/include')
|
||||||
|
- pybind11_dep = declare_dependency(include_directories : pybind11_includes)
|
||||||
|
+if get_option('pykms').enabled()
|
||||||
|
+ if get_option('use-system-pybind11')
|
||||||
|
+ pybind11_dep = dependency('pybind11')
|
||||||
|
+ else
|
||||||
|
+ pybind11_includes = include_directories('ext/pybind11/include')
|
||||||
|
+ pybind11_dep = declare_dependency(include_directories : pybind11_includes)
|
||||||
|
+ endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
libdrmomap_dep = dependency('libdrm_omap', required : get_option('omap'))
|
||||||
|
@@ -55,7 +57,9 @@ if get_option('utils')
|
||||||
|
subdir('utils')
|
||||||
|
endif
|
||||||
|
|
||||||
|
-subdir('py')
|
||||||
|
+if get_option('pykms').enabled()
|
||||||
|
+ subdir('py')
|
||||||
|
+endif
|
||||||
|
|
||||||
|
if get_option('kmscube')
|
||||||
|
subdir('kmscube')
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
config BR2_PACKAGE_KMSXX
|
config BR2_PACKAGE_KMSXX
|
||||||
bool "kms++"
|
bool "kms++"
|
||||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
|
||||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
|
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 # linux/dma-buf.h
|
||||||
depends on BR2_INSTALL_LIBSTDCPP
|
depends on BR2_INSTALL_LIBSTDCPP
|
||||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
|
depends on BR2_TOOLCHAIN_HAS_THREADS # libdrm
|
||||||
|
select BR2_PACKAGE_FMT
|
||||||
select BR2_PACKAGE_LIBDRM
|
select BR2_PACKAGE_LIBDRM
|
||||||
help
|
help
|
||||||
libkms++ is a C++11 library for kernel mode setting.
|
libkms++ is a C++11 library for kernel mode setting.
|
||||||
@@ -21,6 +22,6 @@ config BR2_PACKAGE_KMSXX_INSTALL_TESTS
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
comment "kms++ needs a toolchain w/ threads, C++, gcc >= 4.8, headers >= 3.8"
|
comment "kms++ needs a toolchain w/ threads, C++, gcc >= 4.8, headers >= 4.11"
|
||||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
|
depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_INSTALL_LIBSTDCPP || \
|
||||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_8
|
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
# Locally calculated
|
# Locally calculated
|
||||||
sha256 28892e50c1d1c83fddff9ec683e3bdbd465f5032d0014ceeab43563b813807e1 kmsxx-cb0786049f960f2bd383617151b01318e02e9ff9.tar.gz
|
sha256 4a682328b03c28ff1f6cfcafc48d30c3feb5ef98ed07e5dd3bbd9e6a1d4a47cc kmsxx-548905611c130ea9d31929a0caf7a198d8bac462.tar.gz
|
||||||
sha256 022b4d51da34a380d74dc24eea8e2c4e1a4c8776a52171f8d9e941cf56daf888 LICENSE
|
sha256 fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85 LICENSE
|
||||||
|
|||||||
@@ -4,62 +4,46 @@
|
|||||||
#
|
#
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
KMSXX_VERSION = cb0786049f960f2bd383617151b01318e02e9ff9
|
KMSXX_VERSION = 548905611c130ea9d31929a0caf7a198d8bac462
|
||||||
KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
|
KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
|
||||||
KMSXX_LICENSE = MPL-2.0
|
KMSXX_LICENSE = MPL-2.0
|
||||||
KMSXX_LICENSE_FILES = LICENSE
|
KMSXX_LICENSE_FILES = LICENSE
|
||||||
KMSXX_INSTALL_STAGING = YES
|
KMSXX_INSTALL_STAGING = YES
|
||||||
KMSXX_DEPENDENCIES = libdrm host-pkgconf
|
KMSXX_DEPENDENCIES = fmt libdrm host-pkgconf
|
||||||
KMSXX_CONF_OPTS = -DKMSXX_ENABLE_PYTHON=OFF
|
KMSXX_CONF_OPTS = \
|
||||||
|
-Dkmscube=false \
|
||||||
|
-Dpykms=disabled \
|
||||||
|
-Domap=disabled \
|
||||||
|
-Duse-system-fmt=true \
|
||||||
|
-Duse-system-pybind11=true
|
||||||
|
|
||||||
KMSXX_CXXFLAGS = $(TARGET_CXXFLAGS)
|
ifeq ($(BR2_STATIC_LIBS),y)
|
||||||
|
KMSXX_CONF_OPTS += -Dstatic-libc=true
|
||||||
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
else
|
||||||
KMSXX_CXXFLAGS += -O0
|
KMSXX_CONF_OPTS += -Dstatic-libc=false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KMSXX_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(KMSXX_CXXFLAGS)"
|
ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
|
||||||
|
KMSXX_CXXFLAGS += $(TARGET_CXXFLAGS) -O0
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
|
ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
|
||||||
KMSXX_TESTS = \
|
KMSXX_CONF_OPTS += -Dutils=true
|
||||||
fbtest kmsblank kmscapture \
|
# extra handling for some utils not installed by default
|
||||||
kmsprint kmstest kmsview wbcap \
|
KMSXX_EXTRA_UTILS = kmsview kmscapture omap-wbcap omap-wbm2m
|
||||||
wbm2m
|
ifeq ($(BR2_PACKAGE_LIBEVDEV),y)
|
||||||
|
KMSXX_DEPENDENCIES += libevdev
|
||||||
define KMSXX_INSTALL_TARGET_TESTS
|
KMSXX_EXTRA_UTILS += kmstouch
|
||||||
$(foreach t,$(KMSXX_TESTS),\
|
endif
|
||||||
$(INSTALL) -D -m 0755 $(@D)/bin/$(t) \
|
define KMSXX_INSTALL_EXTRA_UTILS
|
||||||
|
$(foreach t,$(KMSXX_EXTRA_UTILS),\
|
||||||
|
$(INSTALL) -D -m 0755 $(@D)/build/utils/$(t) \
|
||||||
$(TARGET_DIR)/usr/bin/$(t)
|
$(TARGET_DIR)/usr/bin/$(t)
|
||||||
)
|
)
|
||||||
endef
|
endef
|
||||||
|
KMSXX_POST_INSTALL_TARGET_HOOKS += KMSXX_INSTALL_EXTRA_UTILS
|
||||||
|
else
|
||||||
|
KMSXX_CONF_OPTS += -Dutils=false
|
||||||
endif
|
endif
|
||||||
|
|
||||||
KMSXX_LIBS = kms++ kms++util
|
$(eval $(meson-package))
|
||||||
|
|
||||||
define KMSXX_INSTALL_TARGET_CMDS
|
|
||||||
$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),
|
|
||||||
$(foreach l,$(KMSXX_LIBS),\
|
|
||||||
$(INSTALL) -D -m 0755 $(@D)/lib/lib$(l).so \
|
|
||||||
$(TARGET_DIR)/usr/lib/lib$(l).so
|
|
||||||
)
|
|
||||||
)
|
|
||||||
$(KMSXX_INSTALL_TARGET_TESTS)
|
|
||||||
endef
|
|
||||||
|
|
||||||
# kmsxx only builds shared or static libraries, so when
|
|
||||||
# BR2_SHARED_STATIC_LIBS=y, we don't have any static library to
|
|
||||||
# install
|
|
||||||
define KMSXX_INSTALL_STAGING_CMDS
|
|
||||||
$(foreach l,$(KMSXX_LIBS),\
|
|
||||||
$(if $(BR2_SHARED_LIBS)$(BR2_SHARED_STATIC_LIBS),
|
|
||||||
$(INSTALL) -D -m 0755 $(@D)/lib/lib$(l).so \
|
|
||||||
$(STAGING_DIR)/usr/lib/lib$(l).so)
|
|
||||||
$(if $(BR2_STATIC_LIBS),
|
|
||||||
$(INSTALL) -D -m 0755 $(@D)/lib/lib$(l).a \
|
|
||||||
$(STAGING_DIR)/usr/lib/lib$(l).a)
|
|
||||||
mkdir -p $(STAGING_DIR)/usr/include/$(l)
|
|
||||||
cp -dpfr $(@D)/$(l)/inc/$(l)/* $(STAGING_DIR)/usr/include/$(l)/
|
|
||||||
)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(cmake-package))
|
|
||||||
|
|||||||
Reference in New Issue
Block a user