* [ptxdist] [PATCH 3/4] python-mako: new package
2015-06-08 10:05 [ptxdist] [PATCH 1/4] python: install python2 symlink Lucas Stach
2015-06-08 10:05 ` [ptxdist] [PATCH 2/4] host-python-six: new package Lucas Stach
@ 2015-06-08 10:05 ` Lucas Stach
2015-06-08 10:06 ` [ptxdist] [PATCH 4/4] piglit: " Lucas Stach
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2015-06-08 10:05 UTC (permalink / raw)
To: ptxdist
Mako is a template library written in Python. It provides a
familiar, non-XML syntax which compiles into Python modules
for maximum performance.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
rules/python-mako.in | 11 +++++++
rules/python-mako.make | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
create mode 100644 rules/python-mako.in
create mode 100644 rules/python-mako.make
diff --git a/rules/python-mako.in b/rules/python-mako.in
new file mode 100644
index 000000000000..bec88ccb4b96
--- /dev/null
+++ b/rules/python-mako.in
@@ -0,0 +1,11 @@
+## SECTION=python
+
+config PYTHON_MAKO
+ tristate
+ prompt "python-mako"
+ select PYTHON
+ select HOST_PYTHON_SETUPTOOLS
+ help
+ Mako is a template library written in Python. It provides a
+ familiar, non-XML syntax which compiles into Python modules
+ for maximum performance.
diff --git a/rules/python-mako.make b/rules/python-mako.make
new file mode 100644
index 000000000000..baef87d194de
--- /dev/null
+++ b/rules/python-mako.make
@@ -0,0 +1,83 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Lucas Stach <l.stach@pengutronix.de>
+#
+# 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_PYTHON_MAKO) += python-mako
+
+#
+# Paths and names
+#
+PYTHON_MAKO_VERSION := 1.0.1
+PYTHON_MAKO_MD5 := 9f0aafd177b039ef67b90ea350497a54
+PYTHON_MAKO := Mako-$(PYTHON_MAKO_VERSION)
+PYTHON_MAKO_SUFFIX := tar.gz
+PYTHON_MAKO_URL := https://pypi.python.org/packages/source/M/Mako/$(PYTHON_MAKO).$(PYTHON_MAKO_SUFFIX)
+PYTHON_MAKO_SOURCE := $(SRCDIR)/$(PYTHON_MAKO).$(PYTHON_MAKO_SUFFIX)
+PYTHON_MAKO_DIR := $(BUILDDIR)/$(PYTHON_MAKO)
+PYTHON_MAKO_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PYTHON_MAKO_CONF_TOOL := NO
+PYTHON_MAKO_CONF_PATH := PATH=$(CROSS_PATH)
+PYTHON_MAKO_MAKE_ENV := $(CROSS_ENV)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-mako.compile:
+ @$(call targetinfo)
+ cd $(PYTHON_MAKO_DIR) && \
+ $(PYTHON_MAKO_PATH) $(PYTHON_MAKO_MAKE_ENV) \
+ $(CROSS_PYTHON) setup.py build
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/python-mako.install:
+ @$(call targetinfo)
+ cd $(PYTHON_MAKO_DIR) && \
+ $(PYTHON_MAKO_PATH) $(PYTHON_MAKO_MAKE_ENV) \
+ python$(PYTHON_MAJORMINOR) setup.py install --root=$(PYTHON_MAKO_PKGDIR) --prefix=/usr
+ @$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+PYTHON_MAKO_PYTHON_PATH = /usr/lib/python$(PYTHON_MAJORMINOR)/site-packages/mako
+
+$(STATEDIR)/python-mako.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, python-mako)
+ @$(call install_fixup, python-mako,PRIORITY,optional)
+ @$(call install_fixup, python-mako,SECTION,base)
+ @$(call install_fixup, python-mako,AUTHOR,"Lucas Stach <l.stach@pengutronix.de>")
+ @$(call install_fixup, python-mako,DESCRIPTION,missing)
+
+ @cd "$(PYTHON_MAKO_PKGDIR)$(PYTHON_MAKO_PYTHON_PATH)" && \
+ find -type d -o -type f -name "*.py" -printf '%P\n' | while read fn; do \
+ $(call install_copy, python-mako, 0, 0, 0644, -, \
+ $(PYTHON_MAKO_PYTHON_PATH)/$$fn); \
+ done
+
+ @$(call install_finish, python-mako)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.1.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH 4/4] piglit: new package
2015-06-08 10:05 [ptxdist] [PATCH 1/4] python: install python2 symlink Lucas Stach
2015-06-08 10:05 ` [ptxdist] [PATCH 2/4] host-python-six: new package Lucas Stach
2015-06-08 10:05 ` [ptxdist] [PATCH 3/4] python-mako: " Lucas Stach
@ 2015-06-08 10:06 ` Lucas Stach
2 siblings, 0 replies; 4+ messages in thread
From: Lucas Stach @ 2015-06-08 10:06 UTC (permalink / raw)
To: ptxdist
Piglit is the opensource OpenGL/OpenCL test suite. Currently
only OpenCL tests are working. OpenGL needs some more work, but this
should be a solid foundation for future work.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
.../0001-refine-dependency-checks.patch | 51 ++++++++++++++++++
...on-t-pass-NULL-ptr-to-initial-strtok-call.patch | 39 ++++++++++++++
patches/piglit-6ed55113338ebebe/series | 5 ++
rules/piglit.in | 43 +++++++++++++++
rules/piglit.make | 63 ++++++++++++++++++++++
5 files changed, 201 insertions(+)
create mode 100644 patches/piglit-6ed55113338ebebe/0001-refine-dependency-checks.patch
create mode 100644 patches/piglit-6ed55113338ebebe/0002-cl-tests-don-t-pass-NULL-ptr-to-initial-strtok-call.patch
create mode 100644 patches/piglit-6ed55113338ebebe/series
create mode 100644 rules/piglit.in
create mode 100644 rules/piglit.make
diff --git a/patches/piglit-6ed55113338ebebe/0001-refine-dependency-checks.patch b/patches/piglit-6ed55113338ebebe/0001-refine-dependency-checks.patch
new file mode 100644
index 000000000000..3ce9e901279c
--- /dev/null
+++ b/patches/piglit-6ed55113338ebebe/0001-refine-dependency-checks.patch
@@ -0,0 +1,51 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Wed, 3 Jun 2015 16:47:50 +0200
+Subject: [PATCH] refine dependency checks
+
+Allows to build OpenCL tests without the need for python-numpy and
+libwaffle or GLUT.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ CMakeLists.txt | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 2208dc73b46a..1159c4bf28b4 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -48,6 +48,8 @@ else()
+ option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
+ endif()
+
++if(PIGLIT_BUILD_GL_TESTS OR PIGLIT_BUILD_GLES1_TESTS OR
++ PIGLIT_BUILD_GLES2_TESTS OR PIGLIT_BUILD_GLES3_TESTS)
+ if(PIGLIT_USE_WAFFLE)
+ if (NOT WIN32)
+ pkg_check_modules(Waffle REQUIRED waffle-1)
+@@ -104,6 +106,8 @@ else()
+ message(FATAL_ERROR "GLUT library not found")
+ endif()
+ endif(PIGLIT_USE_WAFFLE)
++endif(PIGLIT_BUILD_GL_TESTS OR PIGLIT_BUILD_GLES1_TESTS OR
++ PIGLIT_BUILD_GLES2_TESTS OR PIGLIT_BUILD_GLES3_TESTS)
+
+ if(PIGLIT_BUILD_GLES1_TESTS AND NOT PIGLIT_USE_WAFFLE)
+ message(FATAL_ERROR "Option PIGLIT_BUILD_GLES1_TESTS requires PIGLIT_USE_WAFFLE")
+@@ -195,10 +199,15 @@ IF(PIGLIT_BUILD_GLX_TESTS)
+ ENDIF()
+
+ find_package(PythonInterp 2.7 REQUIRED)
+-find_package(PythonNumpy 1.6.2 REQUIRED)
+ find_package(PythonMako 0.8.0 REQUIRED)
+ find_package(PythonSix 1.4.0 REQUIRED)
+
++if(PIGLIT_BUILD_GL_TESTS OR PIGLIT_BUILD_GLES1_TESTS OR
++ PIGLIT_BUILD_GLES2_TESTS OR PIGLIT_BUILD_GLES3_TESTS)
++ find_package(PythonNumpy 1.6.2 REQUIRED)
++endif(PIGLIT_BUILD_GL_TESTS OR PIGLIT_BUILD_GLES1_TESTS OR
++ PIGLIT_BUILD_GLES2_TESTS OR PIGLIT_BUILD_GLES3_TESTS)
++
+ # Default to compiling with debug information (`gcc -g`):
+ if(NOT CMAKE_BUILD_TYPE)
+ SET(CMAKE_BUILD_TYPE Debug CACHE STRING
diff --git a/patches/piglit-6ed55113338ebebe/0002-cl-tests-don-t-pass-NULL-ptr-to-initial-strtok-call.patch b/patches/piglit-6ed55113338ebebe/0002-cl-tests-don-t-pass-NULL-ptr-to-initial-strtok-call.patch
new file mode 100644
index 000000000000..6268e445ed6d
--- /dev/null
+++ b/patches/piglit-6ed55113338ebebe/0002-cl-tests-don-t-pass-NULL-ptr-to-initial-strtok-call.patch
@@ -0,0 +1,39 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Wed, 3 Jun 2015 16:49:07 +0200
+Subject: [PATCH] cl-tests: don't pass NULL ptr to initial strtok call
+
+If the test doesn't require specific extensions a NULL ptr is
+passed to the initial call of strtok(). Apparently this works on
+x86, but crashes on ARM. The documentation does not really say
+what the expected behavior is, but bailing out in this case fixes
+the segfault and allows the tests to run.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ tests/util/piglit-framework-cl.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/tests/util/piglit-framework-cl.c b/tests/util/piglit-framework-cl.c
+index 9a7efef1d93b..9dc73c7e3508 100644
+--- a/tests/util/piglit-framework-cl.c
++++ b/tests/util/piglit-framework-cl.c
+@@ -86,6 +86,9 @@ bool check_platform_extensions(cl_platform_id platform_id, char* extensions)
+ {
+ char* pch;
+
++ if (!extensions)
++ return true;
++
+ pch = strtok(extensions, " ");
+ while(pch != NULL) {
+ if( strlen(pch) > 0
+@@ -108,6 +111,9 @@ bool check_device_extensions(cl_device_id device_id, char* extensions)
+ {
+ char* pch;
+
++ if (!extensions)
++ return true;
++
+ pch = strtok(extensions, " ");
+ while(pch != NULL) {
+ if( strlen(pch) > 0
diff --git a/patches/piglit-6ed55113338ebebe/series b/patches/piglit-6ed55113338ebebe/series
new file mode 100644
index 000000000000..260ecedb3dcc
--- /dev/null
+++ b/patches/piglit-6ed55113338ebebe/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-refine-dependency-checks.patch
+0002-cl-tests-don-t-pass-NULL-ptr-to-initial-strtok-call.patch
+# 510c99d0cb02d3d3f3c258d3f615804e - git-ptx-patches magic
diff --git a/rules/piglit.in b/rules/piglit.in
new file mode 100644
index 000000000000..70842d68637a
--- /dev/null
+++ b/rules/piglit.in
@@ -0,0 +1,43 @@
+## SECTION=test_suites
+
+menuconfig PIGLIT
+ tristate
+ prompt "piglit"
+ select HOST_CMAKE
+ select HOST_PYTHON
+ select HOST_PYTHON_SIX
+ select HOST_PYTHON_SETUPTOOLS
+ select PYTHON
+ select PYTHON_MAKO
+ help
+ Piglit is the opensource OpenGL/OpenCL test suite.
+
+if PIGLIT
+
+# OpenGL tests need some more dependencies sorted out
+
+config PIGLIT_TESTS_OPENGL
+ bool
+ prompt "build OpenGL tests"
+ depends on BROKEN
+
+config PIGLIT_TESTS_OPENGLES1
+ bool
+ prompt "build OpenGL ES1 tests"
+ depends on BROKEN
+
+config PIGLIT_TESTS_OPENGLES2
+ bool
+ prompt "build OpenGL ES2 tests"
+ depends on BROKEN
+
+config PIGLIT_TESTS_OPENGLES3
+ bool
+ prompt "build OpenGL ES3 tests"
+ depends on BROKEN
+
+config PIGLIT_TESTS_OPENCL
+ bool
+ prompt "build OpenCL tests"
+
+endif
diff --git a/rules/piglit.make b/rules/piglit.make
new file mode 100644
index 000000000000..f522d59da88e
--- /dev/null
+++ b/rules/piglit.make
@@ -0,0 +1,63 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2015 by Lucas Stach <l.stach@pengutronix.de>
+#
+# 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_PIGLIT) += piglit
+
+#
+# Paths and names
+#
+PIGLIT_VERSION := 6ed55113338ebebe
+PIGLIT_MD5 := c72ae684ba39f00db039f76818489b48
+PIGLIT := piglit-$(PIGLIT_VERSION)
+PIGLIT_SUFFIX := tar.xz
+PIGLIT_URL := http://anongit.freedesktop.org/git/piglit.git;tag=$(PIGLIT_VERSION)
+PIGLIT_SOURCE := $(SRCDIR)/$(PIGLIT).$(PIGLIT_SUFFIX)
+PIGLIT_DIR := $(BUILDDIR)/$(PIGLIT)
+PIGLIT_LICENSE := unknown
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+PIGLIT_BUILD_OOT := NO
+PIGLIT_CONF_TOOL := cmake
+
+PIGLIT_CONF_OPT := $(CROSS_CMAKE_USR) \
+ -DPIGLIT_USE_WAFFLE=0 \
+ -DPIGLIT_BUILD_GL_TESTS=$(call ptx/ifdef, PTXCONF_PIGLIT_TESTS_OPENGL,1,0) \
+ -DPIGLIT_BUILD_GLES1_TESTS=$(call ptx/ifdef, PTXCONF_PIGLIT_TESTS_OPENGLES1,1,0) \
+ -DPIGLIT_BUILD_GLES2_TESTS=$(call ptx/ifdef, PTXCONF_PIGLIT_TESTS_OPENGLES2,1,0) \
+ -DPIGLIT_BUILD_GLES3_TESTS=$(call ptx/ifdef, PTXCONF_PIGLIT_TESTS_OPENGLES3,1,0) \
+ -DPIGLIT_BUILD_CL_TESTS=$(call ptx/ifdef, PTXCONF_PIGLIT_TESTS_OPENCL,1,0)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/piglit.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, piglit)
+ @$(call install_fixup, piglit,PRIORITY,optional)
+ @$(call install_fixup, piglit,SECTION,base)
+ @$(call install_fixup, piglit,AUTHOR,"Lucas Stach <l.stach@pengutronix.de>")
+ @$(call install_fixup, piglit,DESCRIPTION,missing)
+
+ @$(call install_copy, piglit, 0, 0, 755, -, /usr/bin/piglit)
+ @$(call install_tree, piglit, 0, 0, -, /usr/lib/piglit)
+
+ @$(call install_finish, piglit)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.1.4
--
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread