Re: [ptxdist] [PATCH v4] kmscube: add new package

2017-03-20 Thread Michael Olbrich
On Mon, Mar 20, 2017 at 12:12:30PM +0100, Juergen Borleis wrote:
> On Monday 20 March 2017 12:00:57 Markus Niebel wrote:
> > [...]
> > +config KMSCUBE
> > +   bool
> > +   prompt "kmscube"
> > +   select MESALIB
> > +   select LIBDRM
> > +   help
> > + kmscube is an application to test kms/drm drivers.
> > [...]
> > 
> > +# Prepare 
> > +#
> > 
> > + 
> > +KMSCUBE_CPPFLAGS   += \
> > +   -I$(KERNEL_HEADERS_INCLUDE_DIR)
> 
> If you need the kernel headers, then you also need a "select KERNEL_HEADER"
> in your 'kmscube.in' file.

No, please don't. It really depends on the toolchain version. And the
kernel header package is explicitly built early so it can be enabled for
old toolchains.
What we should do is move the kernel headers kconfig option to the
platformconfig.

Michael

-- 
Pengutronix e.K.   | |
Industrial Linux Solutions | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0|
Amtsgericht Hildesheim, HRA 2686   | Fax:   +49-5121-206917- |

___
ptxdist mailing list
ptxdist@pengutronix.de

Re: [ptxdist] [PATCH v4] kmscube: add new package

2017-03-20 Thread Juergen Borleis
Hi Markus,

On Monday 20 March 2017 12:00:57 Markus Niebel wrote:
> [...]
> +config KMSCUBE
> + bool
> + prompt "kmscube"
> + select MESALIB
> + select LIBDRM
> + help
> +   kmscube is an application to test kms/drm drivers.
> [...]
> 
> +# Prepare 
> +#
> 
> + 
> +KMSCUBE_CPPFLAGS += \
> + -I$(KERNEL_HEADERS_INCLUDE_DIR)

If you need the kernel headers, then you also need a "select KERNEL_HEADER"
in your 'kmscube.in' file.

jb

-- 
Pengutronix e.K.                            | Juergen Borleis             |
Industrial Linux Solutions                  | http://www.pengutronix.de/  |

___
ptxdist mailing list
ptxdist@pengutronix.de

[ptxdist] [PATCH v4] kmscube: add new package

2017-03-20 Thread Markus Niebel
From: Markus Niebel 

Signed-off-by: Markus Niebel 
---
 .../0001-force-autogen-to-look-for-stdc.patch  | 29 ++
 patches/kmscube-2017-03-13-g803bac5/autogen.sh |  1 +
 patches/kmscube-2017-03-13-g803bac5/series |  2 +
 rules/kmscube.in   |  9 
 rules/kmscube.make | 61 ++
 5 files changed, 102 insertions(+)
 create mode 100644 
patches/kmscube-2017-03-13-g803bac5/0001-force-autogen-to-look-for-stdc.patch
 create mode 12 patches/kmscube-2017-03-13-g803bac5/autogen.sh
 create mode 100644 patches/kmscube-2017-03-13-g803bac5/series
 create mode 100644 rules/kmscube.in
 create mode 100644 rules/kmscube.make

diff --git 
a/patches/kmscube-2017-03-13-g803bac5/0001-force-autogen-to-look-for-stdc.patch 
b/patches/kmscube-2017-03-13-g803bac5/0001-force-autogen-to-look-for-stdc.patch
new file mode 100644
index 000..3aa1cb8
--- /dev/null
changes since v3:

- add help output as suggested
- silence targetinstall (really)

changes since v2:

- handle as single patch, part of original series was applied
- cleanup as suggested
- use version notation as suggested
- fix dependency as suggested
- silence targetinstall
- use new upstream version (needs on patch less)

+++ 
b/patches/kmscube-2017-03-13-g803bac5/0001-force-autogen-to-look-for-stdc.patch
@@ -0,0 +1,29 @@
+From 3690585109ca98669a9faeadd0c5ecbe1e24dbe0 Mon Sep 17 00:00:00 2001
+From: Markus Niebel 
+Date: Thu, 2 Mar 2017 17:17:20 +0100
+Subject: [PATCH 1/2] force autogen to look for stdc
+
+needed since sources using constructs needing stdc99
+
+Signed-off-by: Markus Niebel 
+---
+ configure.ac | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 4441d2d..2b456d4 100644
+--- a/configure.ac
 b/configure.ac
+@@ -36,6 +36,9 @@ AM_MAINTAINER_MODE
+ # Enable quiet compiles on automake 1.11.
+ m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+ 
++AC_PROG_CC
++AC_PROG_CC_STDC
++
+ # Initialize libtool
+ AC_PROG_LIBTOOL
+ 
+-- 
+1.9.1
+
diff --git a/patches/kmscube-2017-03-13-g803bac5/autogen.sh 
b/patches/kmscube-2017-03-13-g803bac5/autogen.sh
new file mode 12
index 000..9f8a4cb
--- /dev/null
+++ b/patches/kmscube-2017-03-13-g803bac5/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/kmscube-2017-03-13-g803bac5/series 
b/patches/kmscube-2017-03-13-g803bac5/series
new file mode 100644
index 000..a88c1eb
--- /dev/null
+++ b/patches/kmscube-2017-03-13-g803bac5/series
@@ -0,0 +1,2 @@
+0001-force-autogen-to-look-for-stdc.patch
+# 0002-fix-headers.patch
diff --git a/rules/kmscube.in b/rules/kmscube.in
new file mode 100644
index 000..a5b52a5
--- /dev/null
+++ b/rules/kmscube.in
@@ -0,0 +1,9 @@
+## SECTION=multimedia_libs
+
+config KMSCUBE
+   bool
+   prompt "kmscube"
+   select MESALIB
+   select LIBDRM
+   help
+ kmscube is an application to test kms/drm drivers.
diff --git a/rules/kmscube.make b/rules/kmscube.make
new file mode 100644
index 000..5e559e2
--- /dev/null
+++ b/rules/kmscube.make
@@ -0,0 +1,61 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Markus Niebel 
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_KMSCUBE) += kmscube
+
+#
+# Paths and names
+#
+# No tags: use a fake descriptive commit-ish to include the date
+KMSCUBE_VERSION:= 2017-03-13-g803bac5
+KMSCUBE:= kmscube-$(KMSCUBE_VERSION)
+KMSCUBE_MD5:= 781a59ab2d1d245e99a49df7c3dc1876
+KMSCUBE_URL:= 
git://anongit.freedesktop.org/mesa/kmscube;tag=$(KMSCUBE_VERSION)
+KMSCUBE_SUFFIX := tar.gz
+KMSCUBE_SOURCE := $(SRCDIR)/$(KMSCUBE).$(KMSCUBE_SUFFIX)
+KMSCUBE_DIR:= $(BUILDDIR)/$(KMSCUBE)
+
+KMSCUBE_LICENSE:= BSD
+
+# 
+# Prepare
+# 
+
+KMSCUBE_CPPFLAGS   += \
+   -I$(KERNEL_HEADERS_INCLUDE_DIR)
+
+#
+# autoconf
+#
+KMSCUBE_CONF_TOOL  := autoconf
+
+# 
+# Target-Install
+# 
+
+$(STATEDIR)/kmscube.targetinstall:
+   @$(call targetinfo)
+
+   @$(call install_init, kmscube)
+   @$(call install_fixup, kmscube, PRIORITY, optional)
+   @$(call install_fixup, kmscube, SECTION, base)
+   @$(call install_fixup, kmscube, AUTHOR, "Markus Niebel 
")
+   @$(call install_fixup, kmscube, DESCRIPTION, missing)
+
+   @$(call install_copy, kmscube, 0, 0,