summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHubert Jarosz2016-08-15 20:59:58 +0200
committerHubert Jarosz2016-08-15 20:59:58 +0200
commitc014a2a2473648976418e5269aca08c55991f819 (patch)
tree86f29b184fc2560bed1baad46c93d385d4b4c8e8
parent1611b0c6724b1971b1bf967e44fa4869e8559f8a (diff)
downloadaur-c014a2a2473648976418e5269aca08c55991f819.tar.gz
backport patch for no needing vim
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD11
-rw-r--r--no-vim-patch.diff212
3 files changed, 223 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 5412c6ae28e..fc1d884eedc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,14 @@
# Generated by mksrcinfo v8
-# Mon Aug 8 12:37:30 UTC 2016
+# Mon Aug 15 18:59:26 UTC 2016
pkgbase = renderdoc
pkgdesc = OpenGL and Vulkan debugging tool
pkgver = 0.30
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/baldurk/renderdoc
arch = i686
arch = x86_64
license = MIT
makedepends = cmake
- makedepends = vim
depends = qt5-x11extras
depends = libx11
depends = libxcb
@@ -20,9 +19,11 @@ pkgbase = renderdoc
source = https://github.com/baldurk/renderdoc/archive/v0.30.tar.gz
source = renderdoc.desktop
source = patch.diff
+ source = no-vim-patch.diff
sha384sums = c852283b5124ca53193f898fde5b4089db745231fae4a7ebed824e84f34aa659d3508b8074f99ac7db1e3587c3fbbba3
sha384sums = 965214960726d34efd08d82a879c75e20e49769e5d7c7d996b570f2754f4688a7331267e0a0e2c54dea1eea3c1ad9e38
sha384sums = d1bbd8906e0a1c458e4d8a3efb393f2a12854ebb7f5d31e72e2307586efb2628b61a06e66dd3016e7e683f83e9452e60
+ sha384sums = e5cf06ebde7862c2cadd026968c21e9790a453446d47068b0e14aebb57824f41062b1c2b54d741c719ec9f41c8fceb1e
pkgname = renderdoc
diff --git a/PKGBUILD b/PKGBUILD
index a59f1a883b0..440e2260e9e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,22 +2,25 @@
pkgname=renderdoc
pkgver=0.30
-pkgrel=3
+pkgrel=4
pkgdesc="OpenGL and Vulkan debugging tool"
arch=(i686 x86_64)
url="https://github.com/baldurk/renderdoc"
license=("MIT")
-makedepends=("cmake" "vim")
+makedepends=("cmake")
depends=("qt5-x11extras" "libx11" "libxcb" "xcb-util-keysyms" "mesa" "mesa-libgl" "qt5-base")
source=("https://github.com/baldurk/renderdoc/archive/v$pkgver.tar.gz"
"$pkgname.desktop"
- "patch.diff")
+ "patch.diff"
+ "no-vim-patch.diff")
sha384sums=("c852283b5124ca53193f898fde5b4089db745231fae4a7ebed824e84f34aa659d3508b8074f99ac7db1e3587c3fbbba3"
"965214960726d34efd08d82a879c75e20e49769e5d7c7d996b570f2754f4688a7331267e0a0e2c54dea1eea3c1ad9e38"
- "d1bbd8906e0a1c458e4d8a3efb393f2a12854ebb7f5d31e72e2307586efb2628b61a06e66dd3016e7e683f83e9452e60")
+ "d1bbd8906e0a1c458e4d8a3efb393f2a12854ebb7f5d31e72e2307586efb2628b61a06e66dd3016e7e683f83e9452e60"
+ "e5cf06ebde7862c2cadd026968c21e9790a453446d47068b0e14aebb57824f41062b1c2b54d741c719ec9f41c8fceb1e")
prepare() {
patch -d "$pkgname-$pkgver" -i "../patch.diff" -p1
+ patch -d "$pkgname-$pkgver" -i "../no-vim-patch.diff" -p1
}
build() {
diff --git a/no-vim-patch.diff b/no-vim-patch.diff
new file mode 100644
index 00000000000..ebc2efba8ed
--- /dev/null
+++ b/no-vim-patch.diff
@@ -0,0 +1,212 @@
+diff --git a/LICENSE.md b/LICENSE.md
+index 42798d5..8f391b1 100644
+--- a/LICENSE.md
++++ b/LICENSE.md
+@@ -94,3 +94,7 @@ RenderDoc also uses several external libraries and components which include thei
+ - [cmdline](https://github.com/tanakh/cmdline)
+ distributed under the New BSD License (3 Clause).
+ Copyright 2009, Hideyuki Tanaka
++
++- [include-bin](https://github.com/Marqin/include-bin)
++ distributed under the zlib license.
++ Copyright 2016, Hubert Jarosz
+diff --git a/installer/LICENSE.rtf b/installer/LICENSE.rtf
+index 8eb2407..27d8643 100644
+Binary files a/installer/LICENSE.rtf and b/installer/LICENSE.rtf differ
+diff --git a/renderdoc/3rdparty/include-bin/LICENSE b/renderdoc/3rdparty/include-bin/LICENSE
+new file mode 100644
+index 0000000..57c464a
+--- /dev/null
++++ b/renderdoc/3rdparty/include-bin/LICENSE
+@@ -0,0 +1,17 @@
++Copyright (c) 2016 Hubert Jarosz
++
++This software is provided 'as-is', without any express or implied
++warranty. In no event will the authors be held liable for any damages
++arising from the use of this software.
++
++Permission is granted to anyone to use this software for any purpose,
++including commercial applications, and to alter it and redistribute it
++freely, subject to the following restrictions:
++
++1. The origin of this software must not be misrepresented; you must not
++ claim that you wrote the original software. If you use this software
++ in a product, an acknowledgement in the product documentation would be
++ appreciated but is not required.
++2. Altered source versions must be plainly marked as such, and must not be
++ misrepresented as being the original software.
++3. This notice may not be removed or altered from any source distribution.
+diff --git a/renderdoc/3rdparty/include-bin/README.md b/renderdoc/3rdparty/include-bin/README.md
+new file mode 100644
+index 0000000..24b0623
+--- /dev/null
++++ b/renderdoc/3rdparty/include-bin/README.md
+@@ -0,0 +1,43 @@
++# include-bin
++
++C++ program that generates C arrays from binary data.
++It's output is similar to `xxd -i`.
++
++Extra features:
++
++* uses sanitized input filename for variable names
++* output lines are shorter than 79 characters
++
++
++## Compilation
++Just compile main.cpp with your favourite C++ compiler. This code is
++compatible even with C++98 standard.
++
++`g++ -O2 ./main.cpp -o include-bin`
++
++## Usage
++
++```bash
++./include-bin [infile [outfile]]
++```
++If there is no outfile argument it will print on stdout. If there is also no
++infile argument it will read from stdin. In latter case array name will be
++"data".
++
++Example:
++```bash
++sh-3.2$ hexdump te-st.txt
++0000000 17 18 19 20 11 10 12 56 41 00 00 d0 d0 11 25 ff
++0000010 ff 00 ff 00
++0000014
++sh-3.2$ ./include-bin te-st.txt out.c
++sh-3.2$ cat out.c
++unsigned char te_st_txt[] = {
++ 0x17, 0x18, 0x19, 0x20, 0x11, 0x10, 0x12, 0x56, 0x41, 0x00, 0x00, 0xd0,
++ 0xd0, 0x11, 0x25, 0xff, 0xff, 0x00, 0xff, 0x00
++};
++unsigned int te_st_txt_len = 20;
++```
++
++## License
++This program is under [zlib license](https://en.wikipedia.org/wiki/Zlib_License).
+diff --git a/renderdoc/3rdparty/include-bin/main.cpp b/renderdoc/3rdparty/include-bin/main.cpp
+new file mode 100644
+index 0000000..02b3540
+--- /dev/null
++++ b/renderdoc/3rdparty/include-bin/main.cpp
+@@ -0,0 +1,96 @@
++/*
++ Copyright (c) 2016 Hubert Jarosz
++
++ This software is provided 'as-is', without any express or implied
++ warranty. In no event will the authors be held liable for any damages
++ arising from the use of this software.
++
++ Permission is granted to anyone to use this software for any purpose,
++ including commercial applications, and to alter it and redistribute it
++ freely, subject to the following restrictions:
++
++ 1. The origin of this software must not be misrepresented; you must not
++ claim that you wrote the original software. If you use this software
++ in a product, an acknowledgement in the product documentation would be
++ appreciated but is not required.
++ 2. Altered source versions must be plainly marked as such, and must not be
++ misrepresented as being the original software.
++ 3. This notice may not be removed or altered from any source distribution.
++*/
++
++#include <iostream>
++#include <fstream>
++#include <string>
++#include <sstream>
++#include <iomanip>
++#include <algorithm>
++
++char sanitize_char( char ch ) {
++ if( ('A' <= ch && ch <= 'Z') ||
++ ('a' <= ch && ch <= 'z') ||
++ ('0' <= ch && ch <= '9') ) {
++ return ch;
++ }
++ return '_';
++}
++
++std::string sanitize( std::string s ) {
++ if( s.length() == 0 ) {
++ return "data";
++ }
++
++ std::transform( s.begin(), s.end(), s.begin(), sanitize_char );
++ if( '0' <= s[0] && s[0] <= '9' ) {
++ s = "_" + s;
++ }
++
++ return s;
++}
++
++void include_bin( std::istream& in, std::ostream& out, std::string name ) {
++ int b = 0, count = 0;
++ name = sanitize(name);
++
++ out << "unsigned char " << name << "[] = {\n ";
++
++ while( (b = in.get()) != std::istream::traits_type::eof() ) {
++ std::stringstream stream;
++ stream << std::setfill('0') << std::setw(2) << std::hex << b;
++ if( count > 0 ) {
++ if( count%12 == 0 ) {
++ out << ",\n ";
++ } else {
++ out << ", ";
++ }
++ }
++ out << "0x" << stream.str();
++ count++;
++ }
++
++ out << "\n};\nunsigned int " << name << "_len = " << count << ";\n";
++ out << std::flush;
++}
++
++int main( int argc, char* argv[] ) {
++
++ if( argc < 1 || argc > 3 ) {
++ std::cerr << "Usage: include-bin [infile [outfile]]" << argc << std::endl;
++ return 1;
++ }
++
++ if( argc > 1 ) {
++ std::ifstream fin( argv[1], std::ios_base::binary );
++ if( argc > 2 ) {
++ std::ofstream fout( argv[2] );
++ include_bin( fin, fout, std::string(argv[1]) );
++ fout.close();
++ } else {
++ include_bin( fin, std::cout, std::string(argv[1]) );
++ }
++ fin.close();
++ } else {
++ include_bin( std::cin, std::cout, "data" );
++ }
++
++ return 0;
++}
+diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
+index 0a9a0d6..1f8680f 100644
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -221,6 +221,8 @@ set(data
+ set(data_objects)
+
+ if(UNIX)
++ add_executable(include-bin 3rdparty/include-bin/main.cpp)
++
+ foreach(res ${data})
+ set(in ${res})
+ set(working_dir ${CMAKE_CURRENT_SOURCE_DIR})
+@@ -230,7 +232,8 @@ if(UNIX)
+ add_custom_command(OUTPUT ${out_src}
+ WORKING_DIRECTORY ${working_dir}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${out_src_dir}
+- COMMAND xxd -i ${in} ${out_src}
++ COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin ${in} ${out_src}
++ DEPENDS include-bin
+ DEPENDS ${res})
+
+ list(APPEND data_objects ${out_src})