diff options
Diffstat (limited to 'dev-util/open-vcdiff')
-rw-r--r-- | dev-util/open-vcdiff/Manifest | 6 | ||||
-rw-r--r-- | dev-util/open-vcdiff/files/open-vcdiff-0.8.4-gcc6.patch | 223 | ||||
-rw-r--r-- | dev-util/open-vcdiff/metadata.xml | 8 | ||||
-rw-r--r-- | dev-util/open-vcdiff/open-vcdiff-0.8.4-r1.ebuild | 24 |
4 files changed, 261 insertions, 0 deletions
diff --git a/dev-util/open-vcdiff/Manifest b/dev-util/open-vcdiff/Manifest new file mode 100644 index 000000000000..2189785455fd --- /dev/null +++ b/dev-util/open-vcdiff/Manifest @@ -0,0 +1,6 @@ +AUX open-vcdiff-0.8.4-gcc6.patch 8635 SHA256 3a579d96ff41f2e255d774aad435a76d261397a5e24ebb24eb8a3c21b70264a1 SHA512 f4b1ce46832bc279cc5fb421171f5efba64e1e733a1d733b8ed26d6b024e9e2875ab2dfffcecf3b48ab805c3f44ba9da3eb961fd36ebe5fa6beba3642177a368 WHIRLPOOL f698479bd0e4fb5a65a7350fa69cac55ce74c5dcb8c1698b539a1d3cb77ad5a1899f047f99747032a7d101e1911470c7ee17ec636b417b8c0cf44a43a6500e85 +DIST open-vcdiff-0.8.4.tar.gz 780923 SHA256 2b142b1027fb0a62c41347600e01a53fa274dad15445a7da48083c830c3138b3 SHA512 fb9062d6a854c999d04eb68672596583e958c3d1705d58429280cb53dcf381c880b23d7fc9d5277545b4a5f9023435648d7bc87bad10cb30385fb950e5d499bd WHIRLPOOL fbbb26f6aa3773bb06c33085bc1d2f1e2bd74776466864713b06567806eca815f80d72d8872487359ffa99102f8914948d20b37a2b4e3bf502a03ca7de029a8a +EBUILD open-vcdiff-0.8.4-r1.ebuild 510 SHA256 f1f3216173ec9261d2806b6e1d279ecdba3a713354b5d4480f4e262e80ade3fc SHA512 21c85520b16b17158ba09e3d9bc6b97079f5d19c32a946219ee5e3421c09f4b60af3e5adc1b5b4f47e5111551cdf3d0c159b6723862c5d4c8e3b243438ef6aea WHIRLPOOL f4c9966822d27fd7b0a8eb184949eeee70ca9e59554765e6698c7968b380807ceb18cd78cea812eba7dfef249716e7a5e5ed7ba3fa8a3c333e96400b6314cb6d +MISC ChangeLog 3136 SHA256 b7130bd40a29aa18e0ecbf13d58639b048df98132fa0d4ceb20744ed1109e25c SHA512 413acfd0e950783c83788ccffbb7bc7ea081aa58a4fecf4791362ab6f6f588d70510ec6b7ba6dc455a1fb36bacfef8cf5f386282caec7197d2028b87b8617277 WHIRLPOOL 515e175063b44967eaac0bd7146a742ee8968d456fe5c24318e99611781409a48ea0293a5af9cebaad6c64e6d3b6bab22f853840188cfb0ff257f5465c41ae25 +MISC ChangeLog-2015 991 SHA256 8cdf32b8dc6caf763311f18c70a75cab7ef9a8e4230a2a9f5b47ef20bcb09541 SHA512 b3f8907ec5034dd004b6aa46c5c55630a0f4eb9c7b2127a3144e85759d446cfb5d402cfb30c5c856dd72a2f1a985f36d8d57a0a7c8696ab5e75ca7c53e97f2aa WHIRLPOOL 71cbf8a8c3e743f2a9be070a179399af36bd5a41b2aaffa875c217b1d1c102f04a2e2a47f5c51b4fa702a336ca505f21652e1903a68e8e5aa14e5b4ebd8fec0c +MISC metadata.xml 278 SHA256 efc150ef18c43e025a4535e1125dd50de936bb5b1377149e7f203c9f199b7ec5 SHA512 4b637493a5e196c76d1e2f560230f35b24549aa54088d0b718fa91c3ccb8631e6d30c49038bf19265f2fbe25dfd92247827827b576af5841fd061094bcea6f14 WHIRLPOOL 713e4abd80db5a60faead3f53e11b92245fdf372fc4f34de4909029f8a01669298566b7551108c3737ee5ca881a2ae84543a100f09341ae5ece5afa3c23c4554 diff --git a/dev-util/open-vcdiff/files/open-vcdiff-0.8.4-gcc6.patch b/dev-util/open-vcdiff/files/open-vcdiff-0.8.4-gcc6.patch new file mode 100644 index 000000000000..fdba3faa78b2 --- /dev/null +++ b/dev-util/open-vcdiff/files/open-vcdiff-0.8.4-gcc6.patch @@ -0,0 +1,223 @@ +--- a/src/vcdecoder_test.cc ++++ b/src/vcdecoder_test.cc +@@ -23,7 +23,7 @@ + + namespace open_vcdiff { + +-const char VCDiffDecoderTest::kStandardFileHeader[] = { ++const uint8_t VCDiffDecoderTest::kStandardFileHeader[] = { + 0xD6, // 'V' | 0x80 + 0xC3, // 'C' | 0x80 + 0xC4, // 'D' | 0x80 +@@ -31,7 +31,7 @@ + 0x00 // Hdr_Indicator: no custom code table, no compression + }; + +-const char VCDiffDecoderTest::kInterleavedFileHeader[] = { ++const uint8_t VCDiffDecoderTest::kInterleavedFileHeader[] = { + 0xD6, // 'V' | 0x80 + 0xC3, // 'C' | 0x80 + 0xC4, // 'D' | 0x80 +@@ -61,21 +61,22 @@ + } + + void VCDiffDecoderTest::UseStandardFileHeader() { +- delta_file_header_.assign(kStandardFileHeader, ++ delta_file_header_.assign(reinterpret_cast<const char *>(kStandardFileHeader), + sizeof(kStandardFileHeader)); + } + + void VCDiffDecoderTest::UseInterleavedFileHeader() { +- delta_file_header_.assign(kInterleavedFileHeader, +- sizeof(kInterleavedFileHeader)); ++ delta_file_header_.assign( ++ reinterpret_cast<const char *>(kInterleavedFileHeader), ++ sizeof(kInterleavedFileHeader)); + } + + void VCDiffDecoderTest::InitializeDeltaFile() { + delta_file_ = delta_file_header_ + delta_window_header_ + delta_window_body_; + } + +-char VCDiffDecoderTest::GetByteFromStringLength(const char* s, +- int which_byte) { ++uint8_t VCDiffDecoderTest::GetByteFromStringLength(const char* s, ++ int which_byte) { + char varint_buf[VarintBE<int32_t>::kMaxBytes]; + VarintBE<int32_t>::Encode(static_cast<int32_t>(strlen(s)), varint_buf); + return varint_buf[which_byte]; +@@ -101,10 +102,10 @@ + // (0x7FFFFFFF) at the given offset in the delta window. + void VCDiffDecoderTest::WriteMaxVarintAtOffset(int offset, + int bytes_to_replace) { +- static const char kMaxVarint[] = { 0x87, 0xFF, 0xFF, 0xFF, 0x7F }; ++ static const uint8_t kMaxVarint[] = { 0x87, 0xFF, 0xFF, 0xFF, 0x7F }; + delta_file_.replace(delta_file_header_.size() + offset, + bytes_to_replace, +- kMaxVarint, ++ reinterpret_cast<const char*>(kMaxVarint), + sizeof(kMaxVarint)); + } + +@@ -112,10 +113,10 @@ + // in the delta window. + void VCDiffDecoderTest::WriteNegativeVarintAtOffset(int offset, + int bytes_to_replace) { +- static const char kNegativeVarint[] = { 0x88, 0x80, 0x80, 0x80, 0x00 }; ++ static const uint8_t kNegativeVarint[] = { 0x88, 0x80, 0x80, 0x80, 0x00 }; + delta_file_.replace(delta_file_header_.size() + offset, + bytes_to_replace, +- kNegativeVarint, ++ reinterpret_cast<const char*>(kNegativeVarint), + sizeof(kNegativeVarint)); + } + +@@ -123,18 +124,18 @@ + // at the given offset in the delta window. + void VCDiffDecoderTest::WriteInvalidVarintAtOffset(int offset, + int bytes_to_replace) { +- static const char kInvalidVarint[] = { 0x87, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }; ++ static const uint8_t kInvalidVarint[] = { 0x87, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }; + delta_file_.replace(delta_file_header_.size() + offset, + bytes_to_replace, +- kInvalidVarint, ++ reinterpret_cast<const char*>(kInvalidVarint), + sizeof(kInvalidVarint)); + } + + bool VCDiffDecoderTest::FuzzOneByteInDeltaFile() { + static const struct Fuzzer { +- char _and; +- char _or; +- char _xor; ++ uint8_t _and; ++ uint8_t _or; ++ uint8_t _xor; + } fuzzers[] = { + { 0xff, 0x80, 0x00 }, + { 0xff, 0xff, 0x00 }, +@@ -162,7 +163,7 @@ + return false; + } + +-const char VCDiffStandardDecoderTest::kWindowHeader[] = { ++const uint8_t VCDiffStandardDecoderTest::kWindowHeader[] = { + VCD_SOURCE, // Win_Indicator: take source from dictionary + FirstByteOfStringLength(kDictionary), // Source segment size + SecondByteOfStringLength(kDictionary), +@@ -176,7 +177,7 @@ + 0x03 // length of addresses for COPYs + }; + +-const char VCDiffStandardDecoderTest::kWindowBody[] = { ++const uint8_t VCDiffStandardDecoderTest::kWindowBody[] = { + // Data for ADDs: 1st section (length 61) + ' ', 'I', ' ', 'h', 'a', 'v', 'e', ' ', 's', 'a', 'i', 'd', ' ', + 'i', 't', ' ', 't', 'w', 'i', 'c', 'e', ':', '\n', +@@ -216,11 +217,13 @@ + + VCDiffStandardDecoderTest::VCDiffStandardDecoderTest() { + UseStandardFileHeader(); +- delta_window_header_.assign(kWindowHeader, sizeof(kWindowHeader)); +- delta_window_body_.assign(kWindowBody, sizeof(kWindowBody)); ++ delta_window_header_.assign(reinterpret_cast<const char *>(kWindowHeader), ++ sizeof(kWindowHeader)); ++ delta_window_body_.assign(reinterpret_cast<const char *>(kWindowBody), ++ sizeof(kWindowBody)); + } + +-const char VCDiffInterleavedDecoderTest::kWindowHeader[] = { ++const uint8_t VCDiffInterleavedDecoderTest::kWindowHeader[] = { + VCD_SOURCE, // Win_Indicator: take source from dictionary + FirstByteOfStringLength(kDictionary), // Source segment size + SecondByteOfStringLength(kDictionary), +@@ -234,7 +237,7 @@ + 0x00 // length of addresses for COPYs (unused) + }; + +-const char VCDiffInterleavedDecoderTest::kWindowBody[] = { ++const uint8_t VCDiffInterleavedDecoderTest::kWindowBody[] = { + 0x13, // VCD_COPY mode VCD_SELF, size 0 + 0x1C, // Size of COPY (28) + 0x00, // Address of COPY: Start of dictionary +@@ -272,8 +275,10 @@ + + VCDiffInterleavedDecoderTest::VCDiffInterleavedDecoderTest() { + UseInterleavedFileHeader(); +- delta_window_header_.assign(kWindowHeader, sizeof(kWindowHeader)); +- delta_window_body_.assign(kWindowBody, sizeof(kWindowBody)); ++ delta_window_header_.assign(reinterpret_cast<const char *>(kWindowHeader), ++ sizeof(kWindowHeader)); ++ delta_window_body_.assign(reinterpret_cast<const char *>(kWindowBody), ++ sizeof(kWindowBody)); + } + + } // namespace open_vcdiff +--- a/src/vcdecoder_test.h ++++ b/src/vcdecoder_test.h +@@ -16,6 +16,7 @@ + #define OPEN_VCDIFF_VCDECODER_TEST_H_ + + #include "google/vcdecoder.h" ++#include <stdint.h> // utf8_t + #include <string> + #include "checksum.h" + #include "testing.h" +@@ -80,7 +81,7 @@ + // Assuming the length of the given string can be expressed as a VarintBE + // of length N, this function returns the byte at position which_byte, where + // 0 <= which_byte < N. +- static char GetByteFromStringLength(const char* s, int which_byte); ++ static uint8_t GetByteFromStringLength(const char* s, int which_byte); + + // Assuming the length of the given string can be expressed as a one-byte + // VarintBE, this function returns that byte value. +@@ -90,13 +91,13 @@ + + // Assuming the length of the given string can be expressed as a two-byte + // VarintBE, this function returns the first byte of its representation. +- static char FirstByteOfStringLength(const char* s) { ++ static uint8_t FirstByteOfStringLength(const char* s) { + return GetByteFromStringLength(s, 0); + } + + // Assuming the length of the given string can be expressed as a two-byte + // VarintBE, this function returns the second byte of its representation. +- static char SecondByteOfStringLength(const char* s) { ++ static uint8_t SecondByteOfStringLength(const char* s) { + return GetByteFromStringLength(s, 1); + } + +@@ -124,8 +125,8 @@ + private: + // These values should only be accessed via UseStandardFileHeader() and + // UseInterleavedFileHeader(). +- static const char kStandardFileHeader[]; +- static const char kInterleavedFileHeader[]; ++ static const uint8_t kStandardFileHeader[]; ++ static const uint8_t kInterleavedFileHeader[]; + + // These two counters are used by FuzzOneByteInDeltaFile() to iterate through + // different ways to corrupt the delta file. +@@ -141,8 +142,8 @@ + virtual ~VCDiffStandardDecoderTest() {} + + private: +- static const char kWindowHeader[]; +- static const char kWindowBody[]; ++ static const uint8_t kWindowHeader[]; ++ static const uint8_t kWindowBody[]; + }; + + class VCDiffInterleavedDecoderTest : public VCDiffDecoderTest { +@@ -151,8 +152,8 @@ + virtual ~VCDiffInterleavedDecoderTest() {} + + private: +- static const char kWindowHeader[]; +- static const char kWindowBody[]; ++ static const uint8_t kWindowHeader[]; ++ static const uint8_t kWindowBody[]; + }; + + } // namespace open_vcdiff diff --git a/dev-util/open-vcdiff/metadata.xml b/dev-util/open-vcdiff/metadata.xml new file mode 100644 index 000000000000..4d97c1a4a4ec --- /dev/null +++ b/dev-util/open-vcdiff/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <remote-id type="google-code">open-vcdiff</remote-id> + <remote-id type="github">google/open-vcdiff</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-util/open-vcdiff/open-vcdiff-0.8.4-r1.ebuild b/dev-util/open-vcdiff/open-vcdiff-0.8.4-r1.ebuild new file mode 100644 index 000000000000..18324677305e --- /dev/null +++ b/dev-util/open-vcdiff/open-vcdiff-0.8.4-r1.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="An encoder/decoder for the VCDIFF (RFC3284) format" +HOMEPAGE="https://github.com/google/open-vcdiff" +SRC_URI="https://dev.gentoo.org/~floppym/dist/${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0/0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +PATCHES=( "${FILESDIR}"/${P}-gcc6.patch ) + +src_configure() { + econf --disable-static +} + +src_install() { + default + find "${D}" -name '*.la' -delete || die +} |