aboutsummaryrefslogtreecommitdiff
path: root/textproc
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2009-12-03 08:40:30 +0000
committerPav Lucistnik <pav@FreeBSD.org>2009-12-03 08:40:30 +0000
commit4ca227ced22475efcb94660edefe6038fec3b62b (patch)
tree39edee29b16b26fe1fb2c771d5e2cb3c2783e4da /textproc
parent42b71828b827c24d10ca7553dc8ddebfd3c5be89 (diff)
downloadports-4ca227ced22475efcb94660edefe6038fec3b62b.tar.gz
ports-4ca227ced22475efcb94660edefe6038fec3b62b.zip
Notes
Diffstat (limited to 'textproc')
-rw-r--r--textproc/pear-Spreadsheet_Excel_Writer/Makefile10
-rw-r--r--textproc/pear-Spreadsheet_Excel_Writer/distinfo6
-rw-r--r--textproc/pear-Spreadsheet_Excel_Writer/files/patch-biff8_utf8199
3 files changed, 8 insertions, 207 deletions
diff --git a/textproc/pear-Spreadsheet_Excel_Writer/Makefile b/textproc/pear-Spreadsheet_Excel_Writer/Makefile
index b07e0d3d79b2..9536566f0576 100644
--- a/textproc/pear-Spreadsheet_Excel_Writer/Makefile
+++ b/textproc/pear-Spreadsheet_Excel_Writer/Makefile
@@ -6,8 +6,7 @@
#
PORTNAME= Spreadsheet_Excel_Writer
-PORTVERSION= 0.9.1
-PORTREVISION= 1
+PORTVERSION= 0.9.2
CATEGORIES= textproc www pear
MAINTAINER= pav@FreeBSD.org
@@ -17,9 +16,10 @@ BUILD_DEPENDS= ${PEARDIR}/OLE/OLE.php:${PORTSDIR}/devel/pear-OLE \
${PEARDIR}/PEAR.php:${PORTSDIR}/devel/pear
RUN_DEPENDS= ${BUILD_DEPENDS}
-CATEGORY= Spreadsheet/Excel
-FILES= Writer.php Writer/BIFFwriter.php Writer/Format.php Writer/Parser.php \
- Writer/Validator.php Writer/Workbook.php Writer/Worksheet.php
+FILES= Spreadsheet/Excel/Writer.php Spreadsheet/Excel/Writer/BIFFwriter.php \
+ Spreadsheet/Excel/Writer/Format.php Spreadsheet/Excel/Writer/Parser.php \
+ Spreadsheet/Excel/Writer/Validator.php Spreadsheet/Excel/Writer/Workbook.php \
+ Spreadsheet/Excel/Writer/Worksheet.php
.include <bsd.port.pre.mk>
.include "${PORTSDIR}/devel/pear/bsd.pear.mk"
diff --git a/textproc/pear-Spreadsheet_Excel_Writer/distinfo b/textproc/pear-Spreadsheet_Excel_Writer/distinfo
index 93e581b52a39..9955964db84f 100644
--- a/textproc/pear-Spreadsheet_Excel_Writer/distinfo
+++ b/textproc/pear-Spreadsheet_Excel_Writer/distinfo
@@ -1,3 +1,3 @@
-MD5 (PEAR/Spreadsheet_Excel_Writer-0.9.1.tgz) = 2239fe9a52eb4b6fb69c23c47e887c28
-SHA256 (PEAR/Spreadsheet_Excel_Writer-0.9.1.tgz) = 680247cae764800da9a1471dff0f55204029d66328096002c7ac36ec7d7ab144
-SIZE (PEAR/Spreadsheet_Excel_Writer-0.9.1.tgz) = 55037
+MD5 (PEAR/Spreadsheet_Excel_Writer-0.9.2.tgz) = 15691145ca8ac71ccd501a38892ee64a
+SHA256 (PEAR/Spreadsheet_Excel_Writer-0.9.2.tgz) = 2e10ee3b0b4f4b150e0bc31a705d4f85acb9bf4d76a780e44fbbfa812dc57dfd
+SIZE (PEAR/Spreadsheet_Excel_Writer-0.9.2.tgz) = 57629
diff --git a/textproc/pear-Spreadsheet_Excel_Writer/files/patch-biff8_utf8 b/textproc/pear-Spreadsheet_Excel_Writer/files/patch-biff8_utf8
deleted file mode 100644
index 8d5bba011bd2..000000000000
--- a/textproc/pear-Spreadsheet_Excel_Writer/files/patch-biff8_utf8
+++ /dev/null
@@ -1,199 +0,0 @@
---- Writer/Workbook.php.orig 2005-11-08 05:32:52.000000000 +0200
-+++ Writer/Workbook.php 2009-11-22 23:14:33.000000000 +0200
-@@ -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
-- }
-- return $total_offset;
-+
-+ $tmp_block_sizes = array();
-+ $tmp_block_sizes = $this->_block_sizes;
-+
-+ $length = 12;
-+ if (!empty($tmp_block_sizes)) {
-+ $length += array_shift($tmp_block_sizes); # SST
-+ }
-+ while (!empty($tmp_block_sizes)) {
-+ $length += 4 + array_shift($tmp_block_sizes); # CONTINUEs
-+ }
-+
-+ return $length;
- }
-
- /**
-@@ -1421,9 +1454,31 @@
- 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 +1486,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 +1524,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 +1558,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 +1578,8 @@
- // 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);