All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] kmsxx: new package
@ 2016-05-09  8:38 Maxime Ripard
  2016-06-02  7:17 ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2016-05-09  8:38 UTC (permalink / raw)
  To: buildroot

KMS++ is a suite of library and test tools to interact with KMS drivers in
the linux kernel.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Changes from v2:
  - Added support for the python bindings
  - Added extra dependencies (gcc 4.8, libstdc++ installation)

 package/Config.in       |  1 +
 package/kmsxx/Config.in | 32 ++++++++++++++++++++++++++++
 package/kmsxx/kmsxx.mk  | 55 +++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 88 insertions(+)
 create mode 100644 package/kmsxx/Config.in
 create mode 100644 package/kmsxx/kmsxx.mk

diff --git a/package/Config.in b/package/Config.in
index 529ad3364994..4bb60ead530b 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -867,6 +867,7 @@ menu "Graphics"
 	source "package/imlib2/Config.in"
 	source "package/jasper/Config.in"
 	source "package/jpeg/Config.in"
+	source "package/kmsxx/Config.in"
 	source "package/lcms2/Config.in"
 	source "package/lesstif/Config.in"
 	source "package/libart/Config.in"
diff --git a/package/kmsxx/Config.in b/package/kmsxx/Config.in
new file mode 100644
index 000000000000..748f65342f3d
--- /dev/null
+++ b/package/kmsxx/Config.in
@@ -0,0 +1,32 @@
+config BR2_PACKAGE_KMSXX
+	bool "kmsxx"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
+	depends on BR2_INSTALL_LIBSTDCPP
+	depends on BR2_TOOLCHAIN_HAS_THREADS # libpthread-stubs
+	select BR2_PACKAGE_LIBDRM
+	help
+	  libkms++ is a C++11 library for kernel mode setting.
+
+	  Also included are simple test tools for KMS and python wrapper for
+	  libkms++.
+
+	  https://github.com/tomba/kmsxx
+
+if BR2_PACKAGE_KMSXX
+
+config BR2_PACKAGE_KMSXX_INSTALL_TESTS
+	bool "Install test programs"
+	help
+	  This option allows to install the kmsxx test programs.
+
+config BR2_PACKAGE_KMSXX_BINDINGS_PYTHON
+	bool "Install Python bindings"
+	depends on BR2_PACKAGE_PYTHON3
+	help
+	  Install the python bindings
+
+endif
+
+comment "kmsxx needs a toolchain w/ threads"
+        depends on !BR2_TOOLCHAIN_HAS_THREADS
+
diff --git a/package/kmsxx/kmsxx.mk b/package/kmsxx/kmsxx.mk
new file mode 100644
index 000000000000..218a2a5e710a
--- /dev/null
+++ b/package/kmsxx/kmsxx.mk
@@ -0,0 +1,55 @@
+################################################################################
+#
+# kmsxx
+#
+################################################################################
+
+KMSXX_VERSION = bef0109aa93971dd6cc6040661dc6494533e6bee
+KMSXX_SITE = $(call github,tomba,kmsxx,$(KMSXX_VERSION))
+KMSXX_LICENSE = MPLv2.0
+KMSXX_LICENSE_FILES = LICENSE
+
+KMSXX_DEPENDENCIES += libdrm
+
+ifeq ($(BR2_PACKAGE_KMSXX_BINDINGS_PYTHON),y)
+KMSXX_DEPENDENCIES += python3 host-swig
+KMSXX_CONF_OPTS += -DLIBKMS_ENABLE_PYTHON=ON
+
+define KMSXX_INSTALL_TARGET_BINDINGS
+	$(INSTALL) -D -m 0755 $(@D)/py/_pykms.so \
+		$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/_pykms.so
+	$(INSTALL) -D -m 0755 $(@D)/py/pykms.py \
+		$(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/site-packages/pykms.py
+endef
+else
+KMSXX_CONF_OPTS += -DLIBKMS_ENABLE_PYTHON=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_KMSXX_INSTALL_TESTS),y)
+define KMSXX_INSTALL_TARGET_TESTS
+	$(INSTALL) -D -m 0755 $(@D)/tests/db \
+		$(TARGET_DIR)/usr/bin/db
+	$(INSTALL) -D -m 0755 $(@D)/tests/fbtestpat \
+		$(TARGET_DIR)/usr/bin/fbtestpat
+	$(INSTALL) -D -m 0755 $(@D)/tests/kmscapture \
+		$(TARGET_DIR)/usr/bin/kmscapture
+	$(INSTALL) -D -m 0755 $(@D)/tests/kmsprint \
+		$(TARGET_DIR)/usr/bin/kmsprint
+	$(INSTALL) -D -m 0755 $(@D)/tests/kmsview \
+		$(TARGET_DIR)/usr/bin/kmsview
+	$(INSTALL) -D -m 0755 $(@D)/tests/testpat \
+		$(TARGET_DIR)/usr/bin/testpat
+endef
+endif
+
+define KMSXX_INSTALL_TARGET_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/libkms++/libkms++.so \
+		$(TARGET_DIR)/usr/lib/libkms++.so
+	$(INSTALL) -D -m 0755 $(@D)/libkmstest/libkmstest.so \
+		$(TARGET_DIR)/usr/lib/libkmstest.so
+
+	$(KMSXX_INSTALL_TARGET_TESTS)
+	$(KMSXX_INSTALL_TARGET_BINDINGS)
+endef
+
+$(eval $(cmake-package))
-- 
2.8.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
  2016-05-09  8:38 [Buildroot] [PATCH v2] kmsxx: new package Maxime Ripard
@ 2016-06-02  7:17 ` Maxime Ripard
  2016-06-08 10:11   ` Yegor Yefremov
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2016-06-02  7:17 UTC (permalink / raw)
  To: buildroot

On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
> KMS++ is a suite of library and test tools to interact with KMS drivers in
> the linux kernel.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Ping?

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160602/9a38a1bf/attachment.asc>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
  2016-06-02  7:17 ` Maxime Ripard
@ 2016-06-08 10:11   ` Yegor Yefremov
       [not found]     ` <91587869.72Lxhe2Mek@avalon>
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2016-06-08 10:11 UTC (permalink / raw)
  To: buildroot

Hi Maxime ,

On Thu, Jun 2, 2016 at 9:17 AM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
>> KMS++ is a suite of library and test tools to interact with KMS drivers in
>> the linux kernel.
>>
>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>
> Ping?

What about removing Python bindings config option and just check if
Python 3 is activated in *.mk file? See package/libcec/libcec.mk for
reference.

Though libdrm already requires host-pkgconf, should this dependency
appear in kms.mk?

I've looked at CMakeLIsts.txt in master branch of the project and I
cannot see swig invocation. They just seem to compile some cpp files
in py folder.

Could also ask project maintainers to add some cpack stuff?

Yegor

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
       [not found]     ` <91587869.72Lxhe2Mek@avalon>
@ 2016-06-08 10:27       ` Yegor Yefremov
       [not found]         ` <146541087.IVqEMkkuFm@avalon>
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2016-06-08 10:27 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 8, 2016 at 12:18 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Yegor,
>
> On Wednesday 08 Jun 2016 12:11:10 Yegor Yefremov wrote:
>> On Thu, Jun 2, 2016 at 9:17 AM, Maxime Ripard wrote:
>> > On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
>> >> KMS++ is a suite of library and test tools to interact with KMS drivers
>> >> in the linux kernel.
>> >>
>> >> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> >
>> > Ping?
>>
>> What about removing Python bindings config option and just check if
>> Python 3 is activated in *.mk file? See package/libcec/libcec.mk for
>> reference.
>>
>> Though libdrm already requires host-pkgconf, should this dependency
>> appear in kms.mk?
>>
>> I've looked at CMakeLIsts.txt in master branch of the project and I
>> cannot see swig invocation. They just seem to compile some cpp files
>> in py folder.
>
> The dependency on swig got removed recently, they now use pybind11.

In other words we need https://pypi.python.org/pypi/pybind11 as a host package?

Yegor

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
       [not found]         ` <146541087.IVqEMkkuFm@avalon>
@ 2016-06-08 14:19           ` Yegor Yefremov
  2016-06-08 14:34             ` Yegor Yefremov
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2016-06-08 14:19 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 8, 2016 at 4:16 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Yegor,
>
> On Wednesday 08 Jun 2016 12:27:21 Yegor Yefremov wrote:
>> On Wed, Jun 8, 2016 at 12:18 PM, Laurent Pinchart wrote:
>> > On Wednesday 08 Jun 2016 12:11:10 Yegor Yefremov wrote:
>> >> On Thu, Jun 2, 2016 at 9:17 AM, Maxime Ripard wrote:
>> >>> On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
>> >>>> KMS++ is a suite of library and test tools to interact with KMS
>> >>>> drivers in the linux kernel.
>> >>>>
>> >>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>> >>>
>> >>> Ping?
>> >>
>> >> What about removing Python bindings config option and just check if
>> >> Python 3 is activated in *.mk file? See package/libcec/libcec.mk for
>> >> reference.
>> >>
>> >> Though libdrm already requires host-pkgconf, should this dependency
>> >> appear in kms.mk?
>> >>
>> >> I've looked at CMakeLIsts.txt in master branch of the project and I
>> >> cannot see swig invocation. They just seem to compile some cpp files
>> >> in py folder.
>> >
>> > The dependency on swig got removed recently, they now use pybind11.
>>
>> In other words we need https://pypi.python.org/pypi/pybind11 as a host
>> package?
>
> I don't think so, kmsxx includes pybind11 as a submodule.

I mean for the future. And if pybind11 would also supply pybin11.pc,
then CMake could even automatically find it.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
  2016-06-08 14:19           ` Yegor Yefremov
@ 2016-06-08 14:34             ` Yegor Yefremov
  2016-06-08 19:04               ` Maxime Ripard
  0 siblings, 1 reply; 8+ messages in thread
From: Yegor Yefremov @ 2016-06-08 14:34 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 8, 2016 at 4:19 PM, Yegor Yefremov
<yegorslists@googlemail.com> wrote:
> On Wed, Jun 8, 2016 at 4:16 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>> Hi Yegor,
>>
>> On Wednesday 08 Jun 2016 12:27:21 Yegor Yefremov wrote:
>>> On Wed, Jun 8, 2016 at 12:18 PM, Laurent Pinchart wrote:
>>> > On Wednesday 08 Jun 2016 12:11:10 Yegor Yefremov wrote:
>>> >> On Thu, Jun 2, 2016 at 9:17 AM, Maxime Ripard wrote:
>>> >>> On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
>>> >>>> KMS++ is a suite of library and test tools to interact with KMS
>>> >>>> drivers in the linux kernel.
>>> >>>>
>>> >>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
>>> >>>
>>> >>> Ping?
>>> >>
>>> >> What about removing Python bindings config option and just check if
>>> >> Python 3 is activated in *.mk file? See package/libcec/libcec.mk for
>>> >> reference.
>>> >>
>>> >> Though libdrm already requires host-pkgconf, should this dependency
>>> >> appear in kms.mk?
>>> >>
>>> >> I've looked at CMakeLIsts.txt in master branch of the project and I
>>> >> cannot see swig invocation. They just seem to compile some cpp files
>>> >> in py folder.
>>> >
>>> > The dependency on swig got removed recently, they now use pybind11.
>>>
>>> In other words we need https://pypi.python.org/pypi/pybind11 as a host
>>> package?
>>
>> I don't think so, kmsxx includes pybind11 as a submodule.
>
> I mean for the future. And if pybind11 would also supply pybin11.pc,
> then CMake could even automatically find it.

As to pkg-config support it won't happen any time soon :-(

https://github.com/pybind/pybind11/issues/230

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
  2016-06-08 14:34             ` Yegor Yefremov
@ 2016-06-08 19:04               ` Maxime Ripard
  2016-06-08 19:57                 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Maxime Ripard @ 2016-06-08 19:04 UTC (permalink / raw)
  To: buildroot

On Wed, Jun 08, 2016 at 04:34:10PM +0200, Yegor Yefremov wrote:
> On Wed, Jun 8, 2016 at 4:19 PM, Yegor Yefremov
> <yegorslists@googlemail.com> wrote:
> > On Wed, Jun 8, 2016 at 4:16 PM, Laurent Pinchart
> > <laurent.pinchart@ideasonboard.com> wrote:
> >> Hi Yegor,
> >>
> >> On Wednesday 08 Jun 2016 12:27:21 Yegor Yefremov wrote:
> >>> On Wed, Jun 8, 2016 at 12:18 PM, Laurent Pinchart wrote:
> >>> > On Wednesday 08 Jun 2016 12:11:10 Yegor Yefremov wrote:
> >>> >> On Thu, Jun 2, 2016 at 9:17 AM, Maxime Ripard wrote:
> >>> >>> On Mon, May 09, 2016 at 10:38:55AM +0200, Maxime Ripard wrote:
> >>> >>>> KMS++ is a suite of library and test tools to interact with KMS
> >>> >>>> drivers in the linux kernel.
> >>> >>>>
> >>> >>>> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> >>> >>>
> >>> >>> Ping?
> >>> >>
> >>> >> What about removing Python bindings config option and just check if
> >>> >> Python 3 is activated in *.mk file? See package/libcec/libcec.mk for
> >>> >> reference.
> >>> >>
> >>> >> Though libdrm already requires host-pkgconf, should this dependency
> >>> >> appear in kms.mk?
> >>> >>
> >>> >> I've looked at CMakeLIsts.txt in master branch of the project and I
> >>> >> cannot see swig invocation. They just seem to compile some cpp files
> >>> >> in py folder.
> >>> >
> >>> > The dependency on swig got removed recently, they now use pybind11.
> >>>
> >>> In other words we need https://pypi.python.org/pypi/pybind11 as a host
> >>> package?
> >>
> >> I don't think so, kmsxx includes pybind11 as a submodule.
> >
> > I mean for the future. And if pybind11 would also supply pybin11.pc,
> > then CMake could even automatically find it.
> 
> As to pkg-config support it won't happen any time soon :-(
> 
> https://github.com/pybind/pybind11/issues/230

Honestly, I don't care at all about the python bindings.

I'll remove support for that in the v3, and if anyone is ever
interested in adding support for it, he'll work on it (and things will
have settled down hopefully)

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160608/dec3d75f/attachment.asc>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Buildroot] [PATCH v2] kmsxx: new package
  2016-06-08 19:04               ` Maxime Ripard
@ 2016-06-08 19:57                 ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-06-08 19:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 8 Jun 2016 21:04:24 +0200, Maxime Ripard wrote:

> Honestly, I don't care at all about the python bindings.
> 
> I'll remove support for that in the v3, and if anyone is ever
> interested in adding support for it, he'll work on it (and things will
> have settled down hopefully)

FWIW: I discussed this topic with Maxime today. I very much prefer
having a basic kmsxx package merged, with the features that Maxime
uses/needs, rather than waiting endlessly to resolve all the Python
bindings issues. So let's merge a simpler version of kmsxx that doesn't
have the Python bindings, and when someone is interested enough to have
the Python bindings, this someone can submit follow-up patches.

So, yes, Maxime: please send a simpler version of the patch.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-06-08 19:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09  8:38 [Buildroot] [PATCH v2] kmsxx: new package Maxime Ripard
2016-06-02  7:17 ` Maxime Ripard
2016-06-08 10:11   ` Yegor Yefremov
     [not found]     ` <91587869.72Lxhe2Mek@avalon>
2016-06-08 10:27       ` Yegor Yefremov
     [not found]         ` <146541087.IVqEMkkuFm@avalon>
2016-06-08 14:19           ` Yegor Yefremov
2016-06-08 14:34             ` Yegor Yefremov
2016-06-08 19:04               ` Maxime Ripard
2016-06-08 19:57                 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.