htmldoc_remote_compile_wrapper 0.9 → 0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 79b0a0040d8df27019a7943391b891d62fc7bf34
4
- data.tar.gz: 30d0762d3ad30b453f9ffaed108997fc791e95c5
3
+ metadata.gz: 5b7ec44d60a5aac4ea4a4b15f3e8c377bbfb15a0
4
+ data.tar.gz: a66970f208e139c8c9408e9d9c7f4c568ddd719b
5
5
  SHA512:
6
- metadata.gz: 5ecaf9bff982560eb73ea562771c021de6d4261b17aa5d4276dd963637a0cae17910d5a75c4347aad3a46413c7b699add4cf955fd0f6b8317cb5ede3e13bab63
7
- data.tar.gz: 897027039b4279f578b703c94ec117c1d5c7502ffc8cab9f2f278c1de8142e3ad4939059f191849703a88eff4ae8f230e27b49c52973b89e9922b81b1c20fdb9
6
+ metadata.gz: 069fba55cac74ba07a549d6e6dcbfc7d5876684a02765b9a3a39fd7fbc57ad257cd3cbc42f7b93cf7f3db0180f904fb9344fba925308f8625ed8858507e1f388
7
+ data.tar.gz: 1d5964be2eac5223050497d3597926b5d116f60758f0b0289fa7013671199970bc3d01d86e593f3bbca0c223235636ee92d293f246830f75cd9612bfe169b3db
data/ext/extconf.rb CHANGED
@@ -3,16 +3,19 @@ require 'mkmf'
3
3
  root = File.expand_path('../..', __FILE__)
4
4
  src_dir = File.join(root, 'src')
5
5
  bin_dir = File.join(root, 'bin')
6
- tgz_filename = "htmldoc-1.8.28-source.tar.gz"
6
+ tgz_filename = "htmldoc-1.8.27-source.tar.gz"
7
7
  tgz_file = File.join(src_dir, tgz_filename)
8
- patch_filename = "htmldoc-1.8.28.patch"
8
+ # Fixes building with libpng-1.5, from upstream svn r1668 via Fedora
9
+ # Remove at version 1.8.28. cf. https://github.com/mxcl/homebrew/issues/15915
10
+ patch_filename = "htmldoc-1.8.27-libpng15.patch"
11
+ patch_file = File.join(src_dir, patch_filename)
9
12
 
10
13
  Dir.chdir(src_dir) do
11
14
  puts "===> Changing to directory: #{src_dir}"
12
15
  puts "===> Extracting #{tgz_filename}"
13
16
  system "tar xzf #{tgz_filename} --strip-components=1"
14
17
  puts "===> Patching"
15
- system "patch -p1 <#{patch_filename}"
18
+ system "patch -p0 <#{patch_filename}"
16
19
  puts "===> Configuring with prefix: #{root}"
17
20
  system "./configure --prefix=#{root}"
18
21
  puts "===> Building..."
@@ -12,5 +12,5 @@ Gem::Specification.new do |gem|
12
12
  gem.extensions = ['ext/extconf.rb']
13
13
  gem.name = "htmldoc_remote_compile_wrapper"
14
14
  gem.require_paths = ["lib"]
15
- gem.version = "0.9"
15
+ gem.version = "0.10"
16
16
  end
@@ -0,0 +1,150 @@
1
+ Original http://pkgs.fedoraproject.org/cgit/htmldoc.git/plain/htmldoc-1.8.27-libpng15.patch?h=f18
2
+
3
+ From upstream 1.8 branch svn r1668
4
+
5
+ The previous libpng-1.5 conversion patch here caused corrupt PNG output
6
+ on 64 bit. e.g. http://answerpot.com/showthread.php?3662601-PNG+Rendering+Problems
7
+
8
+ The upstream version (below) works well.
9
+
10
+ Index: htmldoc/image.cxx
11
+ ===================================================================
12
+ --- htmldoc/image.cxx.orig
13
+ +++ htmldoc/image.cxx
14
+ @@ -3,23 +3,11 @@
15
+ *
16
+ * Image handling routines for HTMLDOC, a HTML document processing program.
17
+ *
18
+ - * Copyright 1997-2005 by Easy Software Products.
19
+ + * Copyright 2011 by Michael R Sweet.
20
+ + * Copyright 1997-2010 by Easy Software Products. All rights reserved.
21
+ *
22
+ - * These coded instructions, statements, and computer programs are the
23
+ - * property of Easy Software Products and are protected by Federal
24
+ - * copyright law. Distribution and use rights are outlined in the file
25
+ - * "COPYING.txt" which should have been included with this file. If this
26
+ - * file is missing or damaged please contact Easy Software Products
27
+ - * at:
28
+ - *
29
+ - * Attn: ESP Licensing Information
30
+ - * Easy Software Products
31
+ - * 44141 Airport View Drive, Suite 204
32
+ - * Hollywood, Maryland 20636-3142 USA
33
+ - *
34
+ - * Voice: (301) 373-9600
35
+ - * EMail: info@easysw.com
36
+ - * WWW: http://www.easysw.com
37
+ + * This program is free software. Distribution and use rights are outlined in
38
+ + * the file "COPYING.txt".
39
+ *
40
+ * Contents:
41
+ *
42
+ @@ -1499,7 +1487,7 @@ image_load_png(image_t *img, /* I - Imag
43
+
44
+ rows = NULL;
45
+
46
+ - if (setjmp(pp->jmpbuf))
47
+ + if (setjmp(png_jmpbuf(pp)))
48
+ {
49
+ progress_error(HD_ERROR_BAD_FORMAT, "PNG file contains errors!");
50
+
51
+ @@ -1526,7 +1514,7 @@ image_load_png(image_t *img, /* I - Imag
52
+
53
+ png_read_info(pp, info);
54
+
55
+ - if (info->color_type & PNG_COLOR_MASK_PALETTE)
56
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
57
+ {
58
+ png_set_expand(pp);
59
+
60
+ @@ -1535,15 +1523,15 @@ image_load_png(image_t *img, /* I - Imag
61
+ if (Encryption)
62
+ img->use ++;
63
+ }
64
+ - else if (info->bit_depth < 8)
65
+ + else if (png_get_bit_depth(pp, info) < 8)
66
+ {
67
+ png_set_packing(pp);
68
+ png_set_expand(pp);
69
+ }
70
+ - else if (info->bit_depth == 16)
71
+ + else if (png_get_bit_depth(pp, info) == 16)
72
+ png_set_strip_16(pp);
73
+
74
+ - if (info->color_type & PNG_COLOR_MASK_COLOR)
75
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
76
+ {
77
+ depth = 3;
78
+ img->depth = gray ? 1 : 3;
79
+ @@ -1554,10 +1542,10 @@ image_load_png(image_t *img, /* I - Imag
80
+ img->depth = 1;
81
+ }
82
+
83
+ - img->width = info->width;
84
+ - img->height = info->height;
85
+ + img->width = png_get_image_width(pp, info);
86
+ + img->height = png_get_image_height(pp, info);
87
+
88
+ - if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
89
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA)
90
+ {
91
+ if ((PSLevel == 0 && PDFVersion >= 14) || PSLevel == 3)
92
+ image_need_mask(img, 8);
93
+ @@ -1571,14 +1559,14 @@ image_load_png(image_t *img, /* I - Imag
94
+
95
+ #ifdef DEBUG
96
+ printf("color_type=0x%04x, depth=%d, img->width=%d, img->height=%d, img->depth=%d\n",
97
+ - info->color_type, depth, img->width, img->height, img->depth);
98
+ - if (info->color_type & PNG_COLOR_MASK_COLOR)
99
+ + png_get_color_type(pp, info), depth, img->width, img->height, img->depth);
100
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
101
+ puts(" COLOR");
102
+ else
103
+ puts(" GRAYSCALE");
104
+ - if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
105
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA)
106
+ puts(" ALPHA");
107
+ - if (info->color_type & PNG_COLOR_MASK_PALETTE)
108
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_PALETTE)
109
+ puts(" PALETTE");
110
+ #endif // DEBUG
111
+
112
+ @@ -1594,9 +1582,9 @@ image_load_png(image_t *img, /* I - Imag
113
+ * Allocate pointers...
114
+ */
115
+
116
+ - rows = (png_bytep *)calloc(info->height, sizeof(png_bytep));
117
+ + rows = (png_bytep *)calloc(png_get_image_height(pp, info), sizeof(png_bytep));
118
+
119
+ - for (i = 0; i < (int)info->height; i ++)
120
+ + for (i = 0; i < (int)png_get_image_height(pp, info); i ++)
121
+ rows[i] = img->pixels + i * img->width * depth;
122
+
123
+ /*
124
+ @@ -1610,7 +1598,7 @@ image_load_png(image_t *img, /* I - Imag
125
+ * Generate the alpha mask as necessary...
126
+ */
127
+
128
+ - if ((info->color_type & PNG_COLOR_MASK_ALPHA) || info->num_trans)
129
+ + if (png_get_color_type(pp, info) & PNG_COLOR_MASK_ALPHA)
130
+ {
131
+ #ifdef DEBUG
132
+ for (inptr = img->pixels, i = 0; i < img->height; i ++)
133
+ @@ -1639,7 +1627,7 @@ image_load_png(image_t *img, /* I - Imag
134
+ * Reformat the data as necessary for the reader...
135
+ */
136
+
137
+ - if (gray && info->color_type & PNG_COLOR_MASK_COLOR)
138
+ + if (gray && png_get_color_type(pp, info) & PNG_COLOR_MASK_COLOR)
139
+ {
140
+ /*
141
+ * Greyscale output needed...
142
+ @@ -1720,7 +1708,7 @@ image_need_mask(image_t *img, /* I - Ima
143
+ {
144
+ // Alpha mask
145
+ img->maskwidth = (img->width * scaling + 7) / 8;
146
+ - size = img->maskwidth * img->height * scaling;
147
+ + size = img->maskwidth * img->height * scaling + 1;
148
+ }
149
+
150
+ img->mask = (uchar *)calloc(size, 1);
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmldoc_remote_compile_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '0.10'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Noon
@@ -26,8 +26,8 @@ files:
26
26
  - ext/extconf.rb
27
27
  - htmldoc_remote_compile_wrapper.gemspec
28
28
  - lib/htmldoc_remote_compile_wrapper.rb
29
- - src/htmldoc-1.8.28-source.tar.gz
30
- - src/htmldoc-1.8.28.patch
29
+ - src/htmldoc-1.8.27-libpng15.patch
30
+ - src/htmldoc-1.8.27-source.tar.gz
31
31
  homepage: ''
32
32
  licenses: []
33
33
  metadata: {}
Binary file
@@ -1,20 +0,0 @@
1
- bug#510: Fix undefined symbols CUPS_SRAND and CUPS_RAND
2
- https://www.msweet.org/bugs.php?U510
3
-
4
- Index: htmldoc-1.8.28/htmldoc/http.c
5
- ===================================================================
6
- --- htmldoc-1.8.28.orig/htmldoc/http.c
7
- +++ htmldoc-1.8.28/htmldoc/http.c
8
- @@ -1229,10 +1229,10 @@ httpInitialize(void)
9
- * it is the best we can do (on others, this seed isn't even used...)
10
- */
11
-
12
- - CUPS_SRAND(time(NULL));
13
- + srand(time(NULL));
14
-
15
- for (i = 0; i < sizeof(data); i ++)
16
- - data[i] = CUPS_RAND();
17
- + data[i] = rand();
18
-
19
- RAND_seed(data, sizeof(data));
20
- #endif /* HAVE_GNUTLS */