summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-php/PEAR-Spreadsheet_Excel_Writer
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-php/PEAR-Spreadsheet_Excel_Writer')
-rw-r--r--dev-php/PEAR-Spreadsheet_Excel_Writer/Manifest1
-rw-r--r--dev-php/PEAR-Spreadsheet_Excel_Writer/PEAR-Spreadsheet_Excel_Writer-0.9.3.ebuild15
-rw-r--r--dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch199
-rw-r--r--dev-php/PEAR-Spreadsheet_Excel_Writer/metadata.xml5
4 files changed, 220 insertions, 0 deletions
diff --git a/dev-php/PEAR-Spreadsheet_Excel_Writer/Manifest b/dev-php/PEAR-Spreadsheet_Excel_Writer/Manifest
new file mode 100644
index 000000000000..966382517685
--- /dev/null
+++ b/dev-php/PEAR-Spreadsheet_Excel_Writer/Manifest
@@ -0,0 +1 @@
+DIST Spreadsheet_Excel_Writer-0.9.3.tgz 57258 SHA256 b708b9f594f358996a9d7ad32fa15fa5e6a12359f097e2bfa28a1ed50b4532f7 SHA512 6337fe5e7f75e00c5698df1d530684ab8756f1865c98ce9708035fa45eb64943d433dd6d8906a7146417f733053e3702094aa94a70343f990574425882a490e4 WHIRLPOOL 4fe7347d1806350d9c3eadc44590ec5112d790067410fbe431c7c82febcb274121117e0a997702617d6eb94ec9df013d5c7971bdb3a0fb7ea920d62814e0d792
diff --git a/dev-php/PEAR-Spreadsheet_Excel_Writer/PEAR-Spreadsheet_Excel_Writer-0.9.3.ebuild b/dev-php/PEAR-Spreadsheet_Excel_Writer/PEAR-Spreadsheet_Excel_Writer-0.9.3.ebuild
new file mode 100644
index 000000000000..91bc57f1dfc1
--- /dev/null
+++ b/dev-php/PEAR-Spreadsheet_Excel_Writer/PEAR-Spreadsheet_Excel_Writer-0.9.3.ebuild
@@ -0,0 +1,15 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit php-pear-r1
+
+DESCRIPTION="Package for generating Excel spreadsheets"
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86"
+RDEPEND="dev-lang/php[iconv]
+ >=dev-php/PEAR-OLE-0.5-r1"
+IUSE=""
diff --git a/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch b/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch
new file mode 100644
index 000000000000..d21d15dbc18d
--- /dev/null
+++ b/dev-php/PEAR-Spreadsheet_Excel_Writer/files/PEAR-Spreadsheet_Excel_Writer-0.9.1-utf8.patch
@@ -0,0 +1,199 @@
+http://pear.php.net/bugs/bug.php?id=1572
+http://bugs.gentoo.org/show_bug.cgi?id=199675
+--- Writer/Workbook.php_orig 2007-11-19 13:58:36.000000000 +0100
++++ Writer/Workbook.php 2007-11-19 18:10:42.000000000 +0100
+@@ -1311,9 +1311,10 @@
+ 8228 : Maximum Excel97 block size
+ -4 : Length of block header
+ -8 : Length of additional SST header information
+- = 8216
++ -8 : Arbitrary number to keep within _add_continue() limit
++ = 8208
+ */
+- $continue_limit = 8216;
++ $continue_limit = 8208;
+ $block_length = 0;
+ $written = 0;
+ $this->_block_sizes = array();
+@@ -1321,6 +1322,9 @@
+
+ foreach (array_keys($this->_str_table) as $string) {
+ $string_length = strlen($string);
++ $headerinfo = unpack("vlength/Cencoding", $string);
++ $encoding = $headerinfo["encoding"];
++ $split_string = 0;
+
+ // Block length is the total length of the strings that will be
+ // written out in a single SST or CONTINUE block.
+@@ -1347,16 +1351,39 @@
+ boundaries. Therefore, in some cases we need to reduce the
+ amount of available
+ */
++ $align = 0;
++
++ // Only applies to Unicode strings
++ if ($encoding == 1) {
++ // Min string + header size -1
++ $header_length = 4;
++
++ if ($space_remaining > $header_length) {
++ // String contains 3 byte header => split on odd boundary
++ if (!$split_string && $space_remaining % 2 != 1) {
++ $space_remaining--;
++ $align = 1;
++ }
++ // Split section without header => split on even boundary
++ else if ($split_string && $space_remaining % 2 == 1) {
++ $space_remaining--;
++ $align = 1;
++ }
++
++ $split_string = 1;
++ }
++ }
++
+
+ if ($space_remaining > $header_length) {
+ // Write as much as possible of the string in the current block
+ $written += $space_remaining;
+
+ // Reduce the current block length by the amount written
+- $block_length -= $continue_limit - $continue;
++ $block_length -= $continue_limit - $continue - $align;
+
+ // Store the max size for this block
+- $this->_block_sizes[] = $continue_limit;
++ $this->_block_sizes[] = $continue_limit - $align;
+
+ // If the current string was split then the next CONTINUE block
+ // should have the string continue flag (grbit) set unless the
+@@ -1398,13 +1425,19 @@
+ This length is required to set the offsets in the BOUNDSHEET records since
+ they must be written before the SST records
+ */
+- $total_offset = array_sum($this->_block_sizes);
+- // SST information
+- $total_offset += 8;
+- if (!empty($this->_block_sizes)) {
+- $total_offset += (count($this->_block_sizes)) * 4; // add CONTINUE headers
++
++ $tmp_block_sizes = array();
++ $tmp_block_sizes = $this->_block_sizes;
++
++ $length = 12;
++ if (!empty($tmp_block_sizes)) {
++ $length += array_shift($tmp_block_sizes); // SST information
+ }
+- return $total_offset;
++ while (!empty($tmp_block_sizes)) {
++ $length += 4 + array_shift($tmp_block_sizes); // add CONTINUE headers
++ }
++
++ return $length;
+ }
+
+ /**
+@@ -1421,9 +1454,30 @@
+ function _storeSharedStringsTable()
+ {
+ $record = 0x00fc; // Record identifier
++ $length = 0x0008; // Number of bytes to follow
++ $total = 0x0000;
++
++ // Iterate through the strings to calculate the CONTINUE block sizes
++ $continue_limit = 8208;
++ $block_length = 0;
++ $written = 0;
++ $continue = 0;
++
+ // sizes are upside down
+- $this->_block_sizes = array_reverse($this->_block_sizes);
+- $length = array_pop($this->_block_sizes) + 8; // First block size plus SST information
++ $tmp_block_sizes = $this->_block_sizes;
++// $tmp_block_sizes = array_reverse($this->_block_sizes);
++
++ // The SST record is required even if it contains no strings. Thus we will
++ // always have a length
++ //
++ if (!empty($tmp_block_sizes)) {
++ $length = 8 + array_shift($tmp_block_sizes);
++ } else {
++ // No strings
++ $length = 8;
++ }
++
++
+
+ // Write the SST block header information
+ $header = pack("vv", $record, $length);
+@@ -1431,18 +1485,14 @@
+ $this->_append($header . $data);
+
+
+- // Iterate through the strings to calculate the CONTINUE block sizes
+- $continue_limit = 8216;
+- $block_length = 0;
+- $written = 0;
+- $continue = 0;
+
+
+ /* TODO: not good for performance */
+ foreach (array_keys($this->_str_table) as $string) {
+
+ $string_length = strlen($string);
+- $encoding = 0; // assume there are no Unicode strings
++ $headerinfo = unpack("vlength/Cencoding", $string);
++ $encoding = $headerinfo["encoding"];
+ $split_string = 0;
+
+ // Block length is the total length of the strings that will be
+@@ -1473,6 +1523,30 @@
+
+ // Unicode data should only be split on char (2 byte) boundaries.
+ // Therefore, in some cases we need to reduce the amount of available
++ // space by 1 byte to ensure the correct alignment.
++ $align = 0;
++
++ // Only applies to Unicode strings
++ if ($encoding == 1) {
++ // Min string + header size -1
++ $header_length = 4;
++
++ if ($space_remaining > $header_length) {
++ // String contains 3 byte header => split on odd boundary
++ if (!$split_string && $space_remaining % 2 != 1) {
++ $space_remaining--;
++ $align = 1;
++ }
++ // Split section without header => split on even boundary
++ else if ($split_string && $space_remaining % 2 == 1) {
++ $space_remaining--;
++ $align = 1;
++ }
++
++ $split_string = 1;
++ }
++ }
++
+
+ if ($space_remaining > $header_length) {
+ // Write as much as possible of the string in the current block
+@@ -1483,7 +1557,7 @@
+ $string = substr($string, $space_remaining);
+
+ // Reduce the current block length by the amount written
+- $block_length -= $continue_limit - $continue;
++ $block_length -= $continue_limit - $continue - $align;
+
+ // If the current string was split then the next CONTINUE block
+ // should have the string continue flag (grbit) set unless the
+@@ -1503,7 +1577,7 @@
+ // Write the CONTINUE block header
+ if (!empty($this->_block_sizes)) {
+ $record = 0x003C;
+- $length = array_pop($this->_block_sizes);
++ $length = array_shift($tmp_block_sizes);
+ $header = pack('vv', $record, $length);
+ if ($continue) {
+ $header .= pack('C', $encoding);
+
diff --git a/dev-php/PEAR-Spreadsheet_Excel_Writer/metadata.xml b/dev-php/PEAR-Spreadsheet_Excel_Writer/metadata.xml
new file mode 100644
index 000000000000..40dbb4c4bbaf
--- /dev/null
+++ b/dev-php/PEAR-Spreadsheet_Excel_Writer/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>php</herd>
+</pkgmetadata>