diff --git a/.gitignore b/.gitignore index d4b3035..cdd8f2d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /5.0.tar.gz /6.0.tar.gz /6.1.tar.gz +/7.0.tar.gz diff --git a/apitrace-6.0_gzguts.patch b/apitrace-6.0_gzguts.patch deleted file mode 100644 index 804b0eb..0000000 --- a/apitrace-6.0_gzguts.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff -rupN apitrace-5.0/common/trace_file_zlib.cpp apitrace-5.0-new/common/trace_file_zlib.cpp ---- apitrace-5.0/common/trace_file_zlib.cpp 2014-05-03 00:22:02.000000000 +0200 -+++ apitrace-5.0-new/common/trace_file_zlib.cpp 2014-05-13 18:31:56.866095617 +0200 -@@ -31,7 +31,6 @@ - #include - - #include --#include - - // for lseek - #ifdef _WIN32 -@@ -44,7 +43,7 @@ - #include "os.hpp" - - #include -- -+#include - - using namespace trace; - -@@ -70,6 +69,7 @@ protected: - private: - gzFile m_gzFile; - double m_endOffset; -+ int raw_fd; - }; - - ZLibFile::ZLibFile(const std::string &filename, -@@ -86,18 +86,23 @@ ZLibFile::~ZLibFile() - - bool ZLibFile::rawOpen(const std::string &filename, File::Mode mode) - { -- m_gzFile = gzopen(filename.c_str(), -- (mode == File::Write) ? "wb" : "rb"); -+ FILE *file = fopen(filename.c_str(), -+ (mode == File::Write) ? "wb" : "rb") ; -+ if (file == NULL) -+ return false; -+ -+ raw_fd = fileno(file); -+ m_gzFile = gzdopen(raw_fd, -+ (mode == File::Write) ? "wb" : "rb"); - - if (mode == File::Read && m_gzFile) { - //XXX: unfortunately zlib doesn't support - // SEEK_END or we could've done: - //m_endOffset = gzseek(m_gzFile, 0, SEEK_END); - //gzrewind(m_gzFile); -- gz_state *state = (gz_state *)m_gzFile; -- off_t loc = lseek(state->fd, 0, SEEK_CUR); -- m_endOffset = lseek(state->fd, 0, SEEK_END); -- lseek(state->fd, loc, SEEK_SET); -+ off_t loc = lseek(raw_fd, 0, SEEK_CUR); -+ m_endOffset = lseek(raw_fd, 0, SEEK_END); -+ lseek(raw_fd, loc, SEEK_SET); - } - - return m_gzFile != NULL; -@@ -149,8 +154,7 @@ bool ZLibFile::rawSkip(size_t) - - int ZLibFile::rawPercentRead() - { -- gz_state *state = (gz_state *)m_gzFile; -- return int(100 * (lseek(state->fd, 0, SEEK_CUR) / m_endOffset)); -+ return 100 * (lseek(raw_fd, 0, SEEK_CUR) / m_endOffset); - } - - diff --git a/apitrace-6.1_unbundle.patch b/apitrace-6.1_unbundle.patch deleted file mode 100644 index 75177ce..0000000 --- a/apitrace-6.1_unbundle.patch +++ /dev/null @@ -1,64 +0,0 @@ -diff -rupN apitrace-6.1/CMakeLists.txt apitrace-6.1-new/CMakeLists.txt ---- apitrace-6.1/CMakeLists.txt 2015-01-09 00:46:25.000000000 +0100 -+++ apitrace-6.1-new/CMakeLists.txt 2015-03-02 23:21:04.423253595 +0100 -@@ -309,42 +309,19 @@ set (SCRIPTS_INSTALL_DIR ${LIB_INSTALL_D - set (WRAPPER_INSTALL_DIR ${LIB_ARCH_INSTALL_DIR}/wrappers) - - --############################################################################## --# Bundled dependencies --# --# We always use the bundled zlib, libpng, and snappy sources: --# - on Windows to make it easy to deploy the wrappers DLLs --# - on unices to prevent symbol collisions when tracing applications that link --# against other versions of these libraries -- --set (ZLIB_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/zlib) --set (ZLIB_LIBRARIES z_bundled) --add_subdirectory (thirdparty/zlib) -- -+find_package (ZLIB REQUIRED) - include_directories (${ZLIB_INCLUDE_DIRS}) - --set (SNAPPY_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/snappy) --set (SNAPPY_LIBRARIES snappy_bundled) --add_subdirectory (thirdparty/snappy) -- -+set (SNAPPY_INCLUDE_DIRS "") -+set (SNAPPY_LIBRARIES -lsnappy) - include_directories (${SNAPPY_INCLUDE_DIRS}) - - set (PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libpng) - set (PNG_DEFINITIONS "") - set (PNG_LIBRARIES png_bundled) - --add_subdirectory (thirdparty/libpng) -- --if (MSVC) -- add_subdirectory (thirdparty/getopt) -- include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/getopt) -- set (GETOPT_LIBRARIES getopt_bundled) --endif () -- --if (WIN32) -- add_subdirectory (thirdparty/directxtex) -- add_subdirectory (thirdparty/devcon) --endif () -+find_package (PNG REQUIRED) -+include_directories (${PNG_INCLUDE_DIR}) - - if (CMAKE_EXECUTABLE_FORMAT STREQUAL "ELF") - add_subdirectory (thirdparty/libbacktrace) -@@ -364,10 +341,8 @@ set (MD5_LIBRARIES md5_bundled) - if (QT4_FOUND) - add_definitions (-DQJSON_EXPORT=) - add_subdirectory (thirdparty/qjson) -- set (QJSON_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty) -- set (QJSON_LIBRARY_DIRS) -- set (QJSON_LIBRARIES qjson_bundled) -- set (QJSON_FOUND TRUE) -+ find_package (QJSON REQUIRED) -+ include_directories (${QJSON_INCLUDE_DIRS}) - endif () - - # We use bundled headers for all Khronos APIs, to guarantee support for both diff --git a/apitrace-7.0_gtest.patch b/apitrace-7.0_gtest.patch new file mode 100644 index 0000000..41ba148 --- /dev/null +++ b/apitrace-7.0_gtest.patch @@ -0,0 +1,16 @@ +diff -rupN apitrace-7.0/CMakeLists.txt apitrace-7.0-new/CMakeLists.txt +--- apitrace-7.0/CMakeLists.txt 2015-07-22 20:16:33.000000000 +0200 ++++ apitrace-7.0-new/CMakeLists.txt 2015-07-23 10:34:14.374969715 +0200 +@@ -464,12 +464,6 @@ set (MD5_LIBRARIES md5_bundled) + # also avoids missing/inconsistent declarations in system headers. + include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/khronos) + +-# We use non-standard C++ flags, so we can't just use GTest's CMakeLists.txt +-include_directories (${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gtest/include) +-add_library (gtest ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gtest/src/gtest-all.cc) +-set_property (TARGET gtest APPEND PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/gtest) +-target_link_libraries (gtest ${CMAKE_THREAD_LIBS_INIT}) +- + enable_testing () + add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND}) + diff --git a/apitrace.spec b/apitrace.spec index e27d762..27e2a0c 100644 --- a/apitrace.spec +++ b/apitrace.spec @@ -2,8 +2,8 @@ %define __filter_GLIBC_PRIVATE 1 Name: apitrace -Version: 6.1 -Release: 5%{?dist} +Version: 7.0 +Release: 1%{?dist} Summary: Tools for tracing OpenGL License: MIT @@ -12,19 +12,18 @@ Source0: https://github.com/apitrace/apitrace/archive/%{version}.tar.gz Source1: qapitrace.desktop Source2: qapitrace.appdata.xml -# Don't bundle libraries, except libbacktrace -Patch0: apitrace-6.1_unbundle.patch -# Remove gzguts.h requirement (needed for Patch0) -Patch1: apitrace-6.0_gzguts.patch +# Unbundle gtest +Patch0: apitrace-7.0_gtest.patch BuildRequires: cmake -BuildRequires: qtwebkit-devel +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtwebkit-devel BuildRequires: python2-devel BuildRequires: libpng-devel BuildRequires: snappy-devel -BuildRequires: qjson-devel BuildRequires: desktop-file-utils BuildRequires: libappstream-glib +BuildRequires: gtest-devel Requires: %{name}-libs%{_isa} = %{version}-%{release} # scripts/snapdiff.py @@ -63,7 +62,6 @@ This package contains qapitrace, the Graphical frontend for apitrace. %prep %setup -q -n %{name}-%{version} %patch0 -p1 -%patch1 -p1 # Remove bundled libraries, except khronos headers and libbacktrace rm -rf `ls -1 thirdparty | grep -Ev "(khronos|md5|libbacktrace)"` @@ -97,6 +95,10 @@ install -Dpm 0644 %{SOURCE2} %{buildroot}%{_datadir}/appdata/qapitrace.appdata.x chmod 0644 %{buildroot}%{_libdir}/%{name}/scripts/highlight.py +%check +make check + + %post gui /usr/bin/update-desktop-database &> /dev/null || : @@ -107,7 +109,7 @@ chmod 0644 %{buildroot}%{_libdir}/%{name}/scripts/highlight.py %files %license LICENSE -%doc README.markdown NEWS.markdown TODO.markdown BUGS.markdown +%doc README.markdown docs/* %{_bindir}/apitrace %{_bindir}/eglretrace %{_bindir}/glretrace @@ -123,6 +125,9 @@ chmod 0644 %{buildroot}%{_libdir}/%{name}/scripts/highlight.py %changelog +* Thu Jul 23 2015 Sandro Mani - 7.0-1 +- Update to 7.0 + * Wed Jun 17 2015 Fedora Release Engineering - 6.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild diff --git a/sources b/sources index 74c1ab0..51c05c8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -b1ede292d6e18da7f8041b82d86e3e6b 6.1.tar.gz +3c0b3ebae4fda123c0bffcd6eb61d161 7.0.tar.gz