forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-util/apitrace: 8.0 version bump, EAPI-7, unbundle brotli
Getting rid of deprecated dev-qt/qtwebkit:5 dependency. Package-Manager: Portage-2.3.65, Repoman-2.3.12 Signed-off-by: Andreas Sturmlechner <[email protected]>
- Loading branch information
Showing
6 changed files
with
413 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
DIST apitrace-7.1.tar.gz 2343156 BLAKE2B ab450535a585d476726b0bb3fbb8f85f930dafd883419ac9a575ca0b487890b26d39baee920c5f4c29b929bce13450643bc27d7f5d269aa60c044dca9975bcce SHA512 b4ebe4eb0b16770a156cffe7cccccff2166634bee7b147d124c78c6e5b37e2ef5f0cb78d30ab7df9a489f25234073023c8bbee67e2b6c59aacfcf4e5ff2ceb84 | ||
DIST apitrace-8.0.tar.gz 3601109 BLAKE2B f3e8f7ff93ef4866370e791fa7768ca0445bd8f62a7d26f203bade7fec7aab475115ea2820b351fbc974697160b49a0c0628fb01ca9afa248b3e31ab7b75d4fc SHA512 1bd8ed4468fde17fbdc43bdd50508e6c7662ddf79b6d34aa222ee69cd033aeedcdc3a8c2fc4e88ba85bf13f7e7c516a83dc158b11f0e4dd67d2ec65ad10cef2c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Copyright 1999-2019 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
PYTHON_COMPAT=( python2_7 ) | ||
inherit cmake-multilib python-single-r1 | ||
|
||
DESCRIPTION="Tool for tracing, analyzing, and debugging graphics APIs" | ||
HOMEPAGE="https://github.com/apitrace/apitrace" | ||
SRC_URI="https://github.com/${PN}/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="MIT !system-snappy? ( BSD CC-BY-3.0 CC-BY-4.0 public-domain )" #bundled snappy | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~arm ~x86" | ||
IUSE="+cli egl qt5 system-snappy" | ||
|
||
REQUIRED_USE="${PYTHON_REQUIRED_USE}" | ||
|
||
DEPEND="${PYTHON_DEPS} | ||
app-arch/brotli:= | ||
media-libs/libpng:0= | ||
media-libs/mesa[egl?,${MULTILIB_USEDEP}] | ||
sys-libs/zlib[${MULTILIB_USEDEP}] | ||
sys-process/procps:= | ||
x11-libs/libX11 | ||
egl? ( | ||
>=media-libs/mesa-8.0[gles1,gles2] | ||
media-libs/waffle[egl] | ||
) | ||
qt5? ( | ||
dev-qt/qtcore:5 | ||
dev-qt/qtgui:5[-gles2] | ||
dev-qt/qtnetwork:5 | ||
dev-qt/qtwidgets:5[-gles2] | ||
) | ||
system-snappy? ( >=app-arch/snappy-1.1.1[${MULTILIB_USEDEP}] ) | ||
" | ||
RDEPEND="${DEPEND}" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-disable-multiarch.patch | ||
"${FILESDIR}"/${P}-glxtrace-only.patch | ||
"${FILESDIR}"/${P}-docs-install.patch | ||
"${FILESDIR}"/${P}-brotli-unbundle.patch | ||
) | ||
|
||
src_prepare() { | ||
cmake-utils_src_prepare | ||
|
||
# The apitrace code grubs around in the internal zlib structures. | ||
# We have to extract this header and clean it up to keep that working. | ||
# Do not be surprised if a zlib upgrade breaks things ... | ||
rm -rf thirdparty/{brotli,getopt,less,libpng,zlib,dxerr,directxtex,devcon} || die | ||
if use system-snappy ; then | ||
rm -rf thirdparty/snappy || die | ||
fi | ||
} | ||
|
||
src_configure() { | ||
my_configure() { | ||
local mycmakeargs=( | ||
-DDOC_INSTALL_DIR="${EPREFIX}"/usr/share/doc/${PF} | ||
-DENABLE_EGL=$(usex egl) | ||
-DENABLE_STATIC_SNAPPY=$(usex !system-snappy) | ||
) | ||
if multilib_is_native_abi ; then | ||
mycmakeargs+=( | ||
-DENABLE_CLI=$(usex cli) | ||
-DENABLE_GUI=$(usex qt5) | ||
) | ||
else | ||
mycmakeargs+=( | ||
-DBUILD_LIB_ONLY=ON | ||
-DENABLE_CLI=OFF | ||
-DENABLE_GUI=OFF | ||
) | ||
fi | ||
cmake-utils_src_configure | ||
} | ||
|
||
multilib_parallel_foreach_abi my_configure | ||
} | ||
|
||
src_install() { | ||
cmake-multilib_src_install | ||
|
||
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so | ||
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1 | ||
dosym glxtrace.so /usr/$(get_libdir)/${PN}/wrappers/libGL.so.1.2 | ||
|
||
rm docs/INSTALL.markdown || die | ||
dodoc docs/* README.markdown | ||
|
||
exeinto /usr/$(get_libdir)/${PN}/scripts | ||
doexe $(find scripts -type f -executable) | ||
} |
159 changes: 159 additions & 0 deletions
159
dev-util/apitrace/files/apitrace-8.0-brotli-unbundle.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
From b0f5a220c41af013da3362e5c9751b593b22754a Mon Sep 17 00:00:00 2001 | ||
From: Andreas Sturmlechner <[email protected]> | ||
Date: Mon, 29 Apr 2019 21:08:02 +0200 | ||
Subject: [PATCH 1/2] Import FindBrotliDec.cmake and FindBrotliEnc.cmake from | ||
Igalia S.L. | ||
|
||
MIT License, which fits well. | ||
|
||
Signed-off-by: Andreas Sturmlechner <[email protected]> | ||
--- | ||
cmake/FindBrotliDec.cmake | 35 +++++++++++++++++++++++++++++++++++ | ||
cmake/FindBrotliEnc.cmake | 35 +++++++++++++++++++++++++++++++++++ | ||
2 files changed, 70 insertions(+) | ||
create mode 100644 cmake/FindBrotliDec.cmake | ||
create mode 100644 cmake/FindBrotliEnc.cmake | ||
|
||
diff --git a/cmake/FindBrotliDec.cmake b/cmake/FindBrotliDec.cmake | ||
new file mode 100644 | ||
index 00000000..abb06f44 | ||
--- /dev/null | ||
+++ b/cmake/FindBrotliDec.cmake | ||
@@ -0,0 +1,35 @@ | ||
+# Copyright 2017 Igalia S.L. All Rights Reserved. | ||
+# | ||
+# Distributed under MIT license. | ||
+# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT | ||
+ | ||
+# Try to find BrotliDec. Once done, this will define | ||
+# | ||
+# BROTLIDEC_FOUND - system has BrotliDec. | ||
+# BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories | ||
+# BROTLIDEC_LIBRARIES - link these to use BrotliDec. | ||
+ | ||
+find_package(PkgConfig) | ||
+ | ||
+pkg_check_modules(PC_BROTLIDEC libbrotlidec) | ||
+ | ||
+find_path(BROTLIDEC_INCLUDE_DIRS | ||
+ NAMES brotli/decode.h | ||
+ HINTS ${PC_BROTLIDEC_INCLUDEDIR} | ||
+) | ||
+ | ||
+find_library(BROTLIDEC_LIBRARIES | ||
+ NAMES brotlidec | ||
+ HINTS ${PC_BROTLIDEC_LIBDIR} | ||
+) | ||
+ | ||
+include(FindPackageHandleStandardArgs) | ||
+find_package_handle_standard_args(BrotliDec | ||
+ REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES | ||
+ FOUND_VAR BROTLIDEC_FOUND | ||
+ VERSION_VAR PC_BROTLIDEC_VERSION) | ||
+ | ||
+mark_as_advanced( | ||
+ BROTLIDEC_INCLUDE_DIRS | ||
+ BROTLIDEC_LIBRARIES | ||
+) | ||
diff --git a/cmake/FindBrotliEnc.cmake b/cmake/FindBrotliEnc.cmake | ||
new file mode 100644 | ||
index 00000000..4be347db | ||
--- /dev/null | ||
+++ b/cmake/FindBrotliEnc.cmake | ||
@@ -0,0 +1,35 @@ | ||
+# Copyright 2017 Igalia S.L. All Rights Reserved. | ||
+# | ||
+# Distributed under MIT license. | ||
+# See file LICENSE for detail or copy at https://opensource.org/licenses/MIT | ||
+ | ||
+# Try to find BrotliEnc. Once done, this will define | ||
+# | ||
+# BROTLIENC_FOUND - system has BrotliEnc. | ||
+# BROTLIENC_INCLUDE_DIRS - the BrotliEnc include directories | ||
+# BROTLIENC_LIBRARIES - link these to use BrotliEnc. | ||
+ | ||
+find_package(PkgConfig) | ||
+ | ||
+pkg_check_modules(PC_BROTLIENC libbrotlienc) | ||
+ | ||
+find_path(BROTLIENC_INCLUDE_DIRS | ||
+ NAMES brotli/encode.h | ||
+ HINTS ${PC_BROTLIENC_INCLUDEDIR} | ||
+) | ||
+ | ||
+find_library(BROTLIENC_LIBRARIES | ||
+ NAMES brotlienc | ||
+ HINTS ${PC_BROTLIENC_LIBDIR} | ||
+) | ||
+ | ||
+include(FindPackageHandleStandardArgs) | ||
+find_package_handle_standard_args(BrotliEnc | ||
+ REQUIRED_VARS BROTLIENC_INCLUDE_DIRS BROTLIENC_LIBRARIES | ||
+ FOUND_VAR BROTLIENC_FOUND | ||
+ VERSION_VAR PC_BROTLIENC_VERSION) | ||
+ | ||
+mark_as_advanced( | ||
+ BROTLIENC_INCLUDE_DIRS | ||
+ BROTLIENC_LIBRARIES | ||
+) | ||
-- | ||
2.21.0 | ||
|
||
|
||
From cd3486343001d6a47e4a468caa425ef835012463 Mon Sep 17 00:00:00 2001 | ||
From: Andreas Sturmlechner <[email protected]> | ||
Date: Mon, 29 Apr 2019 21:11:57 +0200 | ||
Subject: [PATCH 2/2] Find system brotli instead of bundled | ||
|
||
Signed-off-by: Andreas Sturmlechner <[email protected]> | ||
--- | ||
CMakeLists.txt | 5 +++-- | ||
cli/CMakeLists.txt | 2 +- | ||
lib/trace/CMakeLists.txt | 2 +- | ||
3 files changed, 5 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index bc988e95..6a62b3b7 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -483,8 +483,9 @@ if (ENABLE_STATIC_SNAPPY OR NOT SNAPPY_FOUND) | ||
endif () | ||
include_directories (${SNAPPY_INCLUDE_DIRS}) | ||
|
||
-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/brotli/c/include) | ||
-add_subdirectory (thirdparty/brotli) | ||
+find_package(BrotliDec REQUIRED) | ||
+find_package(BrotliEnc REQUIRED) | ||
+include_directories (${BROTLIDEC_INCLUDE_DIRS} ${BROTLIENC_INCLUDE_DIRS}) | ||
|
||
if (NOT WIN32 AND NOT ENABLE_STATIC_EXE) | ||
# zlib 1.2.4-1.2.5 made it impossible to read the last block of incomplete | ||
diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt | ||
index a0189202..16428c63 100644 | ||
--- a/cli/CMakeLists.txt | ||
+++ b/cli/CMakeLists.txt | ||
@@ -39,7 +39,7 @@ add_executable (apitrace | ||
|
||
target_link_libraries (apitrace | ||
common | ||
- brotli_dec brotli_enc brotli_common | ||
+ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} | ||
${ZLIB_LIBRARIES} | ||
${SNAPPY_LIBRARIES} | ||
${GETOPT_LIBRARIES} | ||
diff --git a/lib/trace/CMakeLists.txt b/lib/trace/CMakeLists.txt | ||
index c68bd00f..ce2e469e 100644 | ||
--- a/lib/trace/CMakeLists.txt | ||
+++ b/lib/trace/CMakeLists.txt | ||
@@ -31,7 +31,7 @@ target_link_libraries (common | ||
guids | ||
highlight | ||
os | ||
- brotli_dec brotli_common | ||
+ ${BROTLIDEC_LIBRARIES} ${BROTLIENC_LIBRARIES} | ||
) | ||
|
||
add_gtest (trace_parser_flags_test trace_parser_flags_test.cpp) | ||
-- | ||
2.21.0 | ||
|
53 changes: 53 additions & 0 deletions
53
dev-util/apitrace/files/apitrace-8.0-disable-multiarch.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
From 849289703b1c8ef1461d0d0f6a5465e20f3c0932 Mon Sep 17 00:00:00 2001 | ||
From: Mike Frysinger <[email protected]> | ||
Date: Mon, 29 Apr 2019 20:32:04 +0200 | ||
Subject: [PATCH 1/3] Use CMAKE_INSTALL_LIBDIR for LIB_INSTALL_DIR | ||
|
||
Respect the libdir cmake already set up for us instead of using | ||
debian-specific multiarch paths. | ||
|
||
Patch was rebased multiple times from 4.0 to 8.0 now. | ||
|
||
Signed-off-by: Andreas Sturmlechner <[email protected]> | ||
--- | ||
CMakeLists.txt | 17 ++--------------- | ||
1 file changed, 2 insertions(+), 15 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 34b55554..36879db6 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -429,15 +429,6 @@ endif () | ||
############################################################################## | ||
# Installation directories | ||
|
||
-if (CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||
- # Debian multiarch support | ||
- execute_process(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH | ||
- OUTPUT_VARIABLE ARCH_SUBDIR | ||
- ERROR_QUIET | ||
- OUTPUT_STRIP_TRAILING_WHITESPACE | ||
- ) | ||
-endif() | ||
- | ||
if (WIN32 OR APPLE) | ||
# On Windows/MacOSX, applications are usually installed on a directory of | ||
# their own | ||
@@ -446,12 +437,8 @@ if (WIN32 OR APPLE) | ||
set (LIB_ARCH_INSTALL_DIR lib) | ||
else () | ||
set (DOC_DEFAULT_INSTALL_DIR share/doc/${CMAKE_PROJECT_NAME}) | ||
- set (LIB_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) | ||
- if (ARCH_SUBDIR) | ||
- set (LIB_ARCH_INSTALL_DIR lib/${ARCH_SUBDIR}/${CMAKE_PROJECT_NAME}) | ||
- else () | ||
- set (LIB_ARCH_INSTALL_DIR lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}) | ||
- endif () | ||
+ set (LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${CMAKE_PROJECT_NAME}) | ||
+ set (LIB_ARCH_INSTALL_DIR ${LIB_INSTALL_DIR}) | ||
endif () | ||
|
||
# Allow customization of the doc installation dir (Slackware uses different | ||
-- | ||
2.21.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
From 17864ae1e14362d56bbd7dd75149e094a4716bc6 Mon Sep 17 00:00:00 2001 | ||
From: Michael Weber <[email protected]> | ||
Date: Mon, 29 Apr 2019 20:56:28 +0200 | ||
Subject: [PATCH 3/3] Disable doc files installation by build system | ||
|
||
Patch was rebased from 7.1 on top of 8.0. | ||
|
||
Signed-off-by: Andreas Sturmlechner <[email protected]> | ||
--- | ||
CMakeLists.txt | 14 -------------- | ||
thirdparty/snappy/CMakeLists.txt | 5 ----- | ||
2 files changed, 19 deletions(-) | ||
|
||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 6466cd8a..84fd0ae1 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -604,20 +604,6 @@ endif () | ||
############################################################################## | ||
# Packaging | ||
|
||
-install ( | ||
- FILES | ||
- README.markdown | ||
- docs/BUGS.markdown | ||
- docs/NEWS.markdown | ||
- docs/USAGE.markdown | ||
- DESTINATION ${DOC_INSTALL_DIR} | ||
-) | ||
-install ( | ||
- FILES LICENSE | ||
- DESTINATION ${DOC_INSTALL_DIR} | ||
- RENAME LICENSE.txt | ||
-) | ||
- | ||
set (CPACK_PACKAGE_VERSION_MAJOR "8") | ||
set (CPACK_PACKAGE_VERSION_MINOR "0") | ||
|
||
diff --git a/thirdparty/snappy/CMakeLists.txt b/thirdparty/snappy/CMakeLists.txt | ||
index 84ecbac8..f732dbc0 100644 | ||
--- a/thirdparty/snappy/CMakeLists.txt | ||
+++ b/thirdparty/snappy/CMakeLists.txt | ||
@@ -26,8 +26,3 @@ add_convenience_library (snappy_bundled EXCLUDE_FROM_ALL | ||
snappy-stubs-public.h | ||
) | ||
|
||
-install ( | ||
- FILES COPYING | ||
- DESTINATION ${DOC_INSTALL_DIR} | ||
- RENAME LICENSE-snappy.txt | ||
-) | ||
-- | ||
2.21.0 | ||
|
Oops, something went wrong.