apitrace: new recipe (#1456)

This commit is contained in:
miqlas
2017-07-21 01:40:06 +02:00
committed by waddlesplash
parent 4a9fb062f1
commit 35f18a4d1c
2 changed files with 147 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
SUMMARY="Tools for tracing OpenGL, Direct3D, and other graphics APIs"
DESCRIPTION="apitrace consists of a set of tools to:
* trace OpenGL, OpenGL ES, Direct3D, and DirectDraw APIs calls to a file;
* replay OpenGL and OpenGL ES calls from a file;
* inspect OpenGL state at any call while retracing;
* visualize and edit trace files."
HOMEPAGE="https://github.com/apitrace/apitrace/"
COPYRIGHT="2007-2012 VMware, Inc.
2011 Intel Corporation
2011 LunarG, Inc.
2011 Zack Rusin
2011-2012 Jose Fonseca"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/apitrace/apitrace/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="2103386d747d34f3d6fb1d01fde9078a45ad2e9976afab3a7489c95b08dde0a2"
PATCHES="apitrace-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
apitrace$secondaryArchSuffix = $portVersion
cmd:apitrace$secondaryArchSuffix = $portVersion
cmd:qapitrace$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libQt5WebKitWidgets$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libsnappy$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libpng16$secondaryArchSuffix
devel:libQt5WebKitWidgets$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libsnappy$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python
"
BUILD()
{
mkdir -p haiku_build && cd haiku_build
cmake .. \
-DCMAKE_INSTALL_PREFIX=$prefix
make $jobArgs
}
INSTALL()
{
cd haiku_build
make install
mkdir -p $docDir
mv $prefix/share/doc/* $docDir/
rm -rf $prefix/share
}

View File

@@ -0,0 +1,79 @@
From 955cae18677bf1d02902eced99830e6eef551161 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 21 Jun 2017 10:30:59 +0200
Subject: Build fix: stdint.h
diff --git a/thirdparty/libbacktrace/CMakeLists.txt b/thirdparty/libbacktrace/CMakeLists.txt
index 0241572..64a8bd8 100644
--- a/thirdparty/libbacktrace/CMakeLists.txt
+++ b/thirdparty/libbacktrace/CMakeLists.txt
@@ -123,6 +123,8 @@ if (NOT HAVE_DWARF_H AND NOT HAVE_LIBDWARF_DWARF_H)
message (STATUS "libdwarf not found. Disabling Backtrace support.")
endif ()
+check_include_file (stdint.h HAVE_STDINT_H)
+
configure_file (backtrace-supported.h.in backtrace-supported.h)
configure_file (config.h.in.cmake config.h)
diff --git a/thirdparty/libbacktrace/config.h.in.cmake b/thirdparty/libbacktrace/config.h.in.cmake
index 4ac1326..36e25d4 100644
--- a/thirdparty/libbacktrace/config.h.in.cmake
+++ b/thirdparty/libbacktrace/config.h.in.cmake
@@ -22,3 +22,6 @@
/* Define to 1 if dwarf.h is in the libdwarf folder */
#cmakedefine HAVE_LIBDWARF_DWARF_H 1
+
+/* Define to 1 if stdint.h available */
+#cmakedefine HAVE_STDINT_H 1
--
2.12.2
From bfefb456f7b24ffbfb5fee604d3ae28b800792bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Wed, 21 Jun 2017 10:32:08 +0200
Subject: Apitrace: platform support
diff --git a/thirdparty/khronos/EGL/eglplatform.h b/thirdparty/khronos/EGL/eglplatform.h
index 203f08c..8fffd45 100644
--- a/thirdparty/khronos/EGL/eglplatform.h
+++ b/thirdparty/khronos/EGL/eglplatform.h
@@ -103,7 +103,7 @@ typedef struct ANativeWindow* EGLNativeWindowType;
typedef struct egl_native_pixmap_t* EGLNativePixmapType;
typedef void* EGLNativeDisplayType;
-#elif defined(__APPLE__) || defined(__QNXNTO__)
+#elif defined(__APPLE__) || defined(__QNXNTO__) || defined(__HAIKU__)
typedef void *EGLNativeDisplayType;
typedef void *EGLNativePixmapType;
--
2.12.2
From 5e8c29fbb566a67d9a9c72755977f52a2244d6cc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 9 Jul 2017 22:38:37 +0200
Subject: stdint.h patch, part 2.
diff --git a/thirdparty/libbacktrace/backtrace.h b/thirdparty/libbacktrace/backtrace.h
index da16e3d..92fd35a 100644
--- a/thirdparty/libbacktrace/backtrace.h
+++ b/thirdparty/libbacktrace/backtrace.h
@@ -33,6 +33,8 @@ POSSIBILITY OF SUCH DAMAGE. */
#ifndef BACKTRACE_H
#define BACKTRACE_H
+#include "config.h"
+
#include <stddef.h>
#include <stdio.h>
--
2.12.2