import ports/graphics/piglit, from Thomas Frohwein, ok landry@
Piglit is a collection of automated tests for OpenGL and OpenCL implementations. The goal of Piglit is to help improve the quality of open source OpenGL and OpenCL drivers by providing developers with a simple means to perform regression tests. The original tests have been taken from - Glean ( http://glean.sf.net/ ) and - Mesa ( http://www.mesa3d.org/ )
This commit is contained in:
parent
427c4eb8e0
commit
920e7ffe95
44
graphics/piglit/Makefile
Normal file
44
graphics/piglit/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
COMMENT = automated OpenGL and OpenCL testsuite
|
||||
|
||||
DISTNAME = piglit-20180108
|
||||
|
||||
GH_ACCOUNT = mesa3d
|
||||
GH_PROJECT = piglit
|
||||
GH_COMMIT = 8eefd87ed7a7be9b181bbe7d12a6f6c54921d522
|
||||
|
||||
CATEGORIES = graphics
|
||||
|
||||
# 3Dlabs: redistribution and use permitted, no comment on selling
|
||||
# Intel CUSTOM LICENSE - no limitation to use, distribute, or sell
|
||||
# MIT GPLv2+ GPLv3 LGPL20
|
||||
PERMIT_PACKAGE_CDROM = No comment on selling by 3Dlabs license
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} EGL GL X11 Xrender c drm drm_intel
|
||||
WANTLIB += m xcb xcb-dri2 z
|
||||
WANTLIB += png waffle-1
|
||||
|
||||
MODULES = devel/cmake \
|
||||
lang/python
|
||||
|
||||
MODPY_VERSION = ${MODPY_DEFAULT_VERSION_2}
|
||||
|
||||
BUILD_DEPENDS = www/py-mako \
|
||||
graphics/waffle \
|
||||
devel/py-six
|
||||
|
||||
LIB_DEPENDS = graphics/waffle \
|
||||
graphics/png
|
||||
|
||||
CONFIGURE_ARGS = -DPIGLIT_BUILD_CL_TESTS:BOOL=OFF \
|
||||
-DCMAKE_POLICY_DEFAULT_CMP0056:STRING=NEW
|
||||
CONFIGURE_ENV = CFLAGS="-I${X11BASE}/include"
|
||||
|
||||
NO_TEST = Yes
|
||||
|
||||
post-install:
|
||||
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${PREFIX}/lib/piglit
|
||||
|
||||
.include <bsd.port.mk>
|
2
graphics/piglit/distinfo
Normal file
2
graphics/piglit/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
SHA256 (piglit-20180108-8eefd87e.tar.gz) = Kz4FlqLeJOmY0losbbMCzM5m7S1rR07RMkeO543mcgY=
|
||||
SIZE (piglit-20180108-8eefd87e.tar.gz) = 23990930
|
62
graphics/piglit/patches/patch-CMakeLists_txt
Normal file
62
graphics/piglit/patches/patch-CMakeLists_txt
Normal file
@ -0,0 +1,62 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
From FreeBSD
|
||||
include same flags for OpenBSD
|
||||
|
||||
Index: CMakeLists.txt
|
||||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -33,7 +33,7 @@ if(X11_FOUND)
|
||||
add_definitions(-DPIGLIT_HAS_X11)
|
||||
endif()
|
||||
|
||||
-if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
+if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
set(PIGLIT_BUILD_GLES_TESTS_DEFAULT ON)
|
||||
else()
|
||||
set(PIGLIT_BUILD_GLES_TESTS_DEFAULT OFF)
|
||||
@@ -49,7 +49,7 @@ if(PIGLIT_BUILD_GL_TESTS)
|
||||
find_package(OpenGL REQUIRED)
|
||||
endif()
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" ON)
|
||||
else()
|
||||
option(PIGLIT_USE_WAFFLE "Use Waffle in place of GLUT" OFF)
|
||||
@@ -128,7 +128,7 @@ if(PIGLIT_BUILD_CL_TESTS)
|
||||
find_package(OpenCL REQUIRED)
|
||||
endif(PIGLIT_BUILD_CL_TESTS)
|
||||
|
||||
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
if(X11_FOUND AND OPENGL_gl_LIBRARY)
|
||||
# Assume the system has GLX. In the future, systems may exist
|
||||
# with libGL and libX11 but no GLX, but that world hasn't
|
||||
@@ -222,8 +222,6 @@ IF(PIGLIT_BUILD_GLX_TESTS)
|
||||
pkg_check_modules(GLPROTO REQUIRED glproto)
|
||||
ENDIF()
|
||||
|
||||
-set(Python_ADDITIONAL_VERSIONS
|
||||
- 3.6 3.5 3.4 3.3 2.7)
|
||||
find_package(PythonInterp REQUIRED)
|
||||
find_package(PythonSix 1.5.2 REQUIRED)
|
||||
find_package(PythonNumpy 1.7.0 REQUIRED)
|
||||
@@ -382,7 +380,7 @@ endif()
|
||||
|
||||
check_c_source_compiles(
|
||||
"
|
||||
- #define _POSIX_C_SOURCE 199309L
|
||||
+ #define _POSIX_C_SOURCE 200112L
|
||||
#include <time.h>
|
||||
int main() { return clock_gettime(CLOCK_MONOTONIC, NULL); }
|
||||
"
|
||||
@@ -426,7 +424,7 @@ if(HAVE_LIBCACA)
|
||||
endif(HAVE_LIBCACA)
|
||||
endif(GBM_FOUND)
|
||||
|
||||
-if(PIGLIT_USE_WAFFLE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
+if(PIGLIT_USE_WAFFLE AND ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
pkg_check_modules(EGL egl>=11.0)
|
||||
endif()
|
||||
|
13
graphics/piglit/patches/patch-piglit
Normal file
13
graphics/piglit/patches/patch-piglit
Normal file
@ -0,0 +1,13 @@
|
||||
$OpenBSD: patch-piglit,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
from FreeBSD; set to python2
|
||||
|
||||
Index: piglit
|
||||
--- piglit.orig
|
||||
+++ piglit
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python3
|
||||
+#!/usr/bin/env python2
|
||||
|
||||
# Copyright (c) 2014 Intel Corporation
|
||||
|
24
graphics/piglit/patches/patch-tests_egl_CMakeLists_gl_txt
Normal file
24
graphics/piglit/patches/patch-tests_egl_CMakeLists_gl_txt
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-tests_egl_CMakeLists_gl_txt,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
account for OpenBSD
|
||||
|
||||
Index: tests/egl/CMakeLists.gl.txt
|
||||
--- tests/egl/CMakeLists.gl.txt.orig
|
||||
+++ tests/egl/CMakeLists.gl.txt
|
||||
@@ -10,7 +10,7 @@ link_libraries (
|
||||
${OPENGL_gl_LIBRARY}
|
||||
)
|
||||
|
||||
-IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
piglit_add_executable (egl-nok-swap-region egl-util.c egl-nok-swap-region.c)
|
||||
target_link_libraries(egl-nok-swap-region pthread ${X11_X11_LIB})
|
||||
piglit_add_executable (egl-nok-texture-from-pixmap egl-util.c egl-nok-texture-from-pixmap.c)
|
||||
@@ -33,6 +33,6 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
target_link_libraries(egl-invalid-attr pthread)
|
||||
piglit_add_executable (egl-context-priority egl-context-priority.c)
|
||||
target_link_libraries(egl-context-priority pthread)
|
||||
-ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
|
||||
# vim: ft=cmake:
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-tests_spec_oes_geometry_shader_sso_validation_user-defined-gs-input-in-block_shader_test,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
from FreeBSD
|
||||
|
||||
Index: tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test
|
||||
--- tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test.orig
|
||||
+++ tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-in-block.shader_test
|
||||
@@ -1,5 +1,5 @@
|
||||
[require]
|
||||
-GL ES >= 3.1
|
||||
+GL ES >= 3.0
|
||||
GLSL ES >= 3.10
|
||||
GL_OES_geometry_shader
|
||||
SSO ENABLED
|
||||
@@ -67,4 +67,4 @@ void main()
|
||||
|
||||
[test]
|
||||
draw rect -1 -1 2 2
|
||||
-probe all rgba 0.0 1.0 0.0 1.0
|
||||
\ No newline at end of file
|
||||
+probe all rgba 0.0 1.0 0.0 1.0
|
@ -0,0 +1,21 @@
|
||||
$OpenBSD: patch-tests_spec_oes_geometry_shader_sso_validation_user-defined-gs-input-not-in-block_shader_test,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
from FreeBSD
|
||||
|
||||
Index: tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test
|
||||
--- tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test.orig
|
||||
+++ tests/spec/oes_geometry_shader/sso_validation/user-defined-gs-input-not-in-block.shader_test
|
||||
@@ -1,5 +1,5 @@
|
||||
[require]
|
||||
-GL ES >= 3.1
|
||||
+GL ES >= 3.0
|
||||
GLSL ES >= 3.10
|
||||
GL_OES_geometry_shader
|
||||
SSO ENABLED
|
||||
@@ -62,4 +62,4 @@ void main()
|
||||
|
||||
[test]
|
||||
draw rect -1 -1 2 2
|
||||
-probe all rgba 0.0 1.0 0.0 1.0
|
||||
\ No newline at end of file
|
||||
+probe all rgba 0.0 1.0 0.0 1.0
|
24
graphics/piglit/patches/patch-tests_util_CMakeLists_txt
Normal file
24
graphics/piglit/patches/patch-tests_util_CMakeLists_txt
Normal file
@ -0,0 +1,24 @@
|
||||
$OpenBSD: patch-tests_util_CMakeLists_txt,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
account for OpenBSD
|
||||
|
||||
Index: tests/util/CMakeLists.txt
|
||||
--- tests/util/CMakeLists.txt.orig
|
||||
+++ tests/util/CMakeLists.txt
|
||||
@@ -119,7 +119,7 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
# One needs to have at least one hardware driver present, otherwise
|
||||
# there is no point compiling just the dispatcher.
|
||||
if(PIGLIT_BUILD_DMA_BUF_TESTS)
|
||||
@@ -158,6 +158,6 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
list(APPEND UTIL_GL_LIBS ${WAYLAND_LIBRARIES})
|
||||
endif()
|
||||
|
||||
-endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
+endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
||||
|
||||
piglit_include_target_api()
|
17
graphics/piglit/patches/patch-tests_util_piglit-util_h
Normal file
17
graphics/piglit/patches/patch-tests_util_piglit-util_h
Normal file
@ -0,0 +1,17 @@
|
||||
$OpenBSD: patch-tests_util_piglit-util_h,v 1.1.1.1 2018/01/14 21:49:14 sthen Exp $
|
||||
|
||||
attempt to fix error of
|
||||
"cannot initialize variable of type 'char *'
|
||||
with an rvalue type const char *
|
||||
|
||||
Index: tests/util/piglit-util.h
|
||||
--- tests/util/piglit-util.h.orig
|
||||
+++ tests/util/piglit-util.h
|
||||
@@ -30,6 +30,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#include "config.h"
|
||||
+#include <string.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
10
graphics/piglit/pkg/DESCR
Normal file
10
graphics/piglit/pkg/DESCR
Normal file
@ -0,0 +1,10 @@
|
||||
Piglit is a collection of automated tests for OpenGL and OpenCL
|
||||
implementations.
|
||||
|
||||
The goal of Piglit is to help improve the quality of open source
|
||||
OpenGL and OpenCL drivers by providing developers with a simple means to
|
||||
perform regression tests.
|
||||
|
||||
The original tests have been taken from
|
||||
- Glean ( http://glean.sf.net/ ) and
|
||||
- Mesa ( http://www.mesa3d.org/ )
|
50247
graphics/piglit/pkg/PLIST
Normal file
50247
graphics/piglit/pkg/PLIST
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user