image_optim_pack 0.1.0.20141104 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9aa7c5fc09098652d5a6aa75be135a3b7464bbe5
4
- data.tar.gz: 5516d88e56aeb400094e4466707c15a7a3c5c0c4
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NjViNmVmMjQ3OWE2YTk1YjQ0ZWJiMWRhZDFhMjVjZTI3MmYwOWNjZg==
5
+ data.tar.gz: !binary |-
6
+ NzU1OGNkNmNlZDg3Y2FjN2RmYzU0MDY3ZDU3ZTdjYTgxYzEwMmYxZg==
5
7
  SHA512:
6
- metadata.gz: df661f21e24f2bbe0e5e42d57119bd3e8abc01ce756dd1560dee198cba3233afb86373b4cf45d1de164464cf1f1f2778f755c55771ad23e7b4a3ef38b23fb412
7
- data.tar.gz: aa1da52038b2a685609932c1663eb1488290eab84a3f2da4c8e85b0478d78e6d346f083deca4c4ccb42e796ba563cdf6a67ad0b1895b9ee29f72297cd7da3be9
8
+ metadata.gz: !binary |-
9
+ NTI2YjhiYTFkNzI0NjAxYmE1YTgzMjUxNDk3Y2JlNGJhYmM0ZTgyNGY2ODEx
10
+ YmNhZWM5ZmZhYmEyNDJiNGJkNDg3Njg4MmNmMmRjOTI2Y2U3ODFkN2YyOTg2
11
+ M2RmODM0MGFlZWIzMjIzNzJmMzc0NWFiMTdkZGZlNTI0ZWY0ZjE=
12
+ data.tar.gz: !binary |-
13
+ MGIwNjcxMGQ3NGQ4M2NlMzhlZmRkZGQ3ZDJiOGJlZDYyMjkzOTY2MDI2ODFl
14
+ NWYzY2U5MjcxYzM0ZDY5OTY2ZTBjOGUxMWQ3ZmU1YjU4ZjNmYzEwMTNmYTZi
15
+ OTIxNTkzYzdlM2YwYWE0ZmQ5ZDMzZDgxMTM0NmQ5ODYwNzQwNzk=
data/.gitignore CHANGED
@@ -5,3 +5,4 @@
5
5
  /Gemfile.lock
6
6
  /*.gem
7
7
  /.bundle
8
+ /tmp/
data/.travis.yml CHANGED
@@ -5,18 +5,19 @@ rvm:
5
5
  - 1.9.3
6
6
  - 2.0.0
7
7
  - 2.1.0
8
- - ruby-head
9
8
  - jruby-18mode
10
9
  - jruby-19mode
11
- - jruby-head
12
10
  - ree
13
11
  script:
14
- - make test
15
- - bundle exec image_optim --info
16
- - bundle exec rspec
17
- - '! bundle show rubocop || bundle exec rubocop' # run rubocop only if bundled
12
+ if [ -z "$RUBOCOP" ]; then
13
+ make test
14
+ && bundle exec image_optim --info
15
+ && bundle exec rspec
16
+ ; else
17
+ bundle exec rubocop
18
+ ; fi
18
19
  matrix:
19
20
  fast_finish: true
20
- allow_failures:
21
- - rvm: ruby-head
22
- - rvm: jruby-head
21
+ include:
22
+ - env: RUBOCOP=true
23
+ rvm: default
data/Makefile CHANGED
@@ -5,8 +5,10 @@ run : all
5
5
  ADVANCECOMP_VER := 1.19
6
6
  GIFSICLE_VER := 1.86
7
7
  JHEAD_VER := 2.97
8
+ JPEGARCHIVE_VER := 2.0.1
8
9
  JPEGOPTIM_VER := 1.4.1
9
10
  LIBJPEG_VER := 9a
11
+ LIBMOZJPEG_VER := 2.1
10
12
  LIBPNG_VER := 1.6.14
11
13
  LIBZ_VER := 1.2.8
12
14
  OPTIPNG_VER := 0.7.5
@@ -20,6 +22,7 @@ ARCH := $(shell uname -m)
20
22
 
21
23
  IS_DARWIN := $(findstring darwin,$(OS))
22
24
  DLEXT := $(if $(IS_DARWIN),.dylib,.so)
25
+ HOST := $(ARCH)-$(if $(IS_DARWIN),apple,pc)-$(OS)
23
26
 
24
27
  DL_DIR := $(CURDIR)/download
25
28
  BUILD_ROOT_DIR := $(CURDIR)/build
@@ -64,8 +67,10 @@ endef
64
67
  $(eval $(call archive,ADVANCECOMP, http://prdownloads.sourceforge.net/advancemame/advancecomp-[VER].tar.gz?download))
65
68
  $(eval $(call archive,GIFSICLE, http://www.lcdf.org/gifsicle/gifsicle-[VER].tar.gz))
66
69
  $(eval $(call archive,JHEAD, http://www.sentex.net/~mwandel/jhead/jhead-[VER].tar.gz))
70
+ $(eval $(call archive,JPEGARCHIVE, https://github.com/danielgtaylor/jpeg-archive/archive/[VER].tar.gz))
67
71
  $(eval $(call archive,JPEGOPTIM, http://www.kokkonen.net/tjko/src/jpegoptim-[VER].tar.gz))
68
72
  $(eval $(call archive,LIBJPEG, http://www.ijg.org/files/jpegsrc.v[VER].tar.gz))
73
+ $(eval $(call archive,LIBMOZJPEG, https://github.com/mozilla/mozjpeg/archive/v[VER].tar.gz))
69
74
  $(eval $(call archive,LIBPNG, http://prdownloads.sourceforge.net/libpng/libpng-[VER].tar.gz?download))
70
75
  $(eval $(call archive,LIBZ, http://prdownloads.sourceforge.net/libpng/zlib-[VER].tar.gz?download))
71
76
  $(eval $(call archive,OPTIPNG, http://prdownloads.sourceforge.net/optipng/optipng-[VER].tar.gz?download))
@@ -81,16 +86,23 @@ PRODUCTS :=
81
86
  # $1 - product name
82
87
  # $2 - archive name ($1 if empty)
83
88
  # $3 - basename ($1 if empty)
84
- define target
89
+ define target-build
85
90
  $1_BASENAME := $(or $3,$(call downcase,$1))
86
91
  $1_DIR := $($(or $2,$1)_DIR)
87
92
  $1_TGZ := $($(or $2,$1)_TGZ)
88
93
  $1_TARGET := $$($1_DIR)/$$($1_BASENAME)
89
- PRODUCTS += $1
90
94
  # first dependency on archive
91
95
  $$($1_TARGET) $$($1_DIR)/__$$(notdir $$($1_TGZ))__ : $$($1_TGZ)
92
96
  # second dependency on check file
93
97
  $$($1_TARGET) : $$($1_DIR)/__$$(notdir $$($1_TGZ))__
98
+ endef
99
+
100
+ # $1 - product name
101
+ # $2 - archive name ($1 if empty)
102
+ # $3 - basename ($1 if empty)
103
+ define target
104
+ $(call target-build,$1,$2,$3)
105
+ PRODUCTS += $1
94
106
  # copy product to output dir
95
107
  $$(OUTPUT_DIR)/$$($1_BASENAME) : $$($1_TARGET)
96
108
  strip $$< -Sx -o $$@
@@ -101,9 +113,11 @@ endef
101
113
  $(eval $(call target,ADVPNG,ADVANCECOMP))
102
114
  $(eval $(call target,GIFSICLE))
103
115
  $(eval $(call target,JHEAD))
116
+ $(eval $(call target,JPEG-RECOMPRESS,JPEGARCHIVE))
104
117
  $(eval $(call target,JPEGOPTIM))
105
118
  $(eval $(call target,JPEGTRAN,LIBJPEG))
106
119
  $(eval $(call target,LIBJPEG,,libjpeg$(DLEXT)))
120
+ $(eval $(call target-build,LIBMOZJPEG,,libjpeg.a))
107
121
  $(eval $(call target,LIBPNG,,libpng$(DLEXT)))
108
122
  $(eval $(call target,LIBZ,,libz$(DLEXT)))
109
123
  $(eval $(call target,OPTIPNG))
@@ -145,6 +159,7 @@ test :
145
159
  $(call check_bin,advpng,--version 2>&1,$(ADVANCECOMP_VER))
146
160
  $(call check_bin,gifsicle,--version,$(GIFSICLE_VER))
147
161
  $(call check_bin,jhead,-V,$(JHEAD_VER))
162
+ $(call check_bin,jpeg-recompress,--version,$(JPEGARCHIVE_VER))
148
163
  $(call check_bin,jpegoptim,--version,$(JPEGOPTIM_VER))
149
164
  $(call check_bin,jpegtran,-v - 2>&1,$(LIBJPEG_VER))
150
165
  $(call check_bin,optipng,--version,$(OPTIPNG_VER))
@@ -174,17 +189,23 @@ clobber : clean-all
174
189
 
175
190
  # $1 - name of product
176
191
  # $2 - list of dependency products
177
- define depend
192
+ define depend-build
178
193
  # depend this product on every specified product
179
194
  $$($1_TARGET) : $(foreach dep,$2,$$($(dep)_TARGET))
180
- # depend output of this product on output of every specified product
181
- $$(OUTPUT_DIR)/$$($1_BASENAME) : $(foreach dep,$2,$$(OUTPUT_DIR)/$$($(dep)_BASENAME))
182
195
  # add dependent product dir to CPATH, LIBRARY_PATH and PKG_CONFIG_PATH
183
196
  $($1_TARGET) : export CPATH := $(subst $(eval) ,:,$(foreach dep,$2,$$($(dep)_DIR)))
184
197
  $($1_TARGET) : export LIBRARY_PATH := $$(CPATH)
185
198
  $($1_TARGET) : export PKG_CONFIG_PATH := $$(CPATH)
186
199
  endef
187
200
 
201
+ # $1 - name of product
202
+ # $2 - list of dependency products
203
+ define depend
204
+ $(call depend-build,$1,$2)
205
+ # depend output of this product on output of every specified product
206
+ $$(OUTPUT_DIR)/$$($1_BASENAME) : $(foreach dep,$2,$$(OUTPUT_DIR)/$$($(dep)_BASENAME))
207
+ endef
208
+
188
209
  define clean_untar
189
210
  rm -rf $(@D)
190
211
  $(mkpath) $(@D)
@@ -236,10 +257,15 @@ $(GIFSICLE_TARGET) :; $(clean_untar)
236
257
  $(JHEAD_TARGET) :; $(clean_untar)
237
258
  cd $(@D) && $(MAKE) jhead CC="$(CC) $(GCC_FLAGS)"
238
259
 
260
+ ## jpeg-recompress
261
+ $(eval $(call depend-build,JPEG-RECOMPRESS,LIBMOZJPEG))
262
+ $(JPEG-RECOMPRESS_TARGET) :; $(clean_untar)
263
+ cd $(@D) && $(MAKE) jpeg-recompress CC="$(CC) $(GCC_FLAGS)" LIBJPEG=$(LIBMOZJPEG_TARGET)
264
+
239
265
  ## jpegoptim
240
266
  $(eval $(call depend,JPEGOPTIM,LIBJPEG))
241
267
  $(JPEGOPTIM_TARGET) :; $(clean_untar)
242
- cd $(@D) && ./configure LDFLAGS="$(XORIGIN)"
268
+ cd $(@D) && ./configure LDFLAGS="$(XORIGIN)" --host $(HOST)
243
269
  cd $(@D) && $(MAKE) jpegoptim
244
270
  $(call chrpath_origin,$@)
245
271
 
@@ -260,6 +286,14 @@ endif
260
286
  cd $(@D) && $(ln_s) .libs/libjpeg$(DLEXT) .libs/jpegtran .
261
287
  $(call chrpath_origin,$(JPEGTRAN_TARGET))
262
288
 
289
+ ## libmozjpeg
290
+ $(LIBMOZJPEG_TARGET) :; $(clean_untar)
291
+ cd $(@D) && autoreconf -fiv
292
+ cd $(@D) && ./configure --host $(HOST)
293
+ cd $(@D)/simd && $(MAKE)
294
+ cd $(@D) && $(MAKE) libjpeg.la
295
+ cd $(@D) && $(ln_s) .libs/libjpeg.a .
296
+
263
297
  ## libpng
264
298
  $(eval $(call depend,LIBPNG,LIBZ))
265
299
  $(LIBPNG_TARGET) :; $(clean_untar)
data/README.markdown CHANGED
@@ -17,9 +17,18 @@ Contains binaries for Mac OS X (>= 10.6, i386 and x86\_64) and Linux (i686 and x
17
17
  * and [zopfli](https://code.google.com/p/zopfli/) by Lode Vandevenne and Jyrki ([license](acknowledgements/zopfli.txt), [contributors](acknowledgements/zopfli-contributors.txt))
18
18
  * [gifsicle](http://lcdf.org/gifsicle/) by Eddie Kohler ([GNU GPLv2](acknowledgements/gifsicle.txt))
19
19
  * [jhead](http://sentex.net/~mwandel/jhead/) by Matthias Wandel ([public domain](acknowledgements/jhead.txt))
20
+ * [jpeg-recompress](https://github.com/danielgtaylor/jpeg-archive) by Daniel G. Taylor ([license](acknowledgements/jpeg-archive.txt))
21
+ * includes [Image Quality Assessment (IQA)](http://tdistler.com/iqa/) by Tom Distler ([license](acknowledgements/iqa.txt))
22
+ * includes [SmallFry](https://github.com/dwbuiten/smallfry) by Derek Buitenhuis ([license](acknowledgements/smallfry.txt))
23
+ * statically linked against mozjpeg, see below
20
24
  * [jpegoptim](http://www.kokkonen.net/tjko/projects.html) by Timo Kokkonen ([GNU GPLv2](acknowledgements/jpegoptim.txt) or later)
21
25
  * [libjpeg and jpegtran](http://ijg.org/) by the Independent JPEG Group ([license](acknowledgements/libjpeg.txt))
26
+ * [libjpeg-turbo](http://www.libjpeg-turbo.org/) by libjpeg-turbo Project ([license](acknowledgements/libjpeg-turbo.txt))
27
+ * based on libjpeg, see above
28
+ * includes [x86 SIMD extension for IJG JPEG library](http://cetus.sakura.ne.jp/softlab/jpeg-x86simd/jpegsimd.html) by MIYASAKA Masaru ([license](acknowledgements/libjpeg-x86-simd.txt))
22
29
  * [libpng](http://libpng.org/pub/png/) by Guy Eric Schalnat, Andreas Dilger, Glenn Randers-Pehrson and others ([license](acknowledgements/libpng.txt))
30
+ * [mozjpeg](https://github.com/mozilla/mozjpeg) by Mozilla Research ([license](acknowledgements/mozjpeg.txt))
31
+ * base on libjpeg and libjpeg-turbo, see above
23
32
  * [optipng](http://optipng.sourceforge.net/) by Cosmin Truta ([license](acknowledgements/optipng.txt), [authors](acknowledgements/optipng-authors.txt))
24
33
  * contains code based in part on the work of Miyasaka Masaru for BMP support ([license](acknowledgements/bmp2png.txt))
25
34
  * and David Koblas for GIF support ([license](acknowledgements/gifread.txt))
@@ -0,0 +1,30 @@
1
+ Copyright (c) 2011, Tom Distler (http://tdistler.com)
2
+ All rights reserved.
3
+
4
+ The BSD License
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ - Redistributions of source code must retain the above copyright notice,
10
+ this list of conditions and the following disclaimer.
11
+
12
+ - Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ - Neither the name of the tdistler.com nor the names of its contributors may
17
+ be used to endorse or promote products derived from this software without
18
+ specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
24
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+ Copyright © 2014 Daniel G. Taylor <danielgtaylor@gmail.com>
3
+
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
5
+ this software and associated documentation files (the “Software”), to deal in
6
+ the Software without restriction, including without limitation the rights to
7
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8
+ of the Software, and to permit persons to whom the Software is furnished to do
9
+ so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
@@ -0,0 +1,27 @@
1
+ Most of libjpeg-turbo inherits the non-restrictive, BSD-style license used by
2
+ libjpeg (see README.) The TurboJPEG wrapper (both C and Java versions) and
3
+ associated test programs bear a similar license, which is reproduced below:
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+
8
+ - Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+ - Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+ - Neither the name of the libjpeg-turbo Project nor the names of its
14
+ contributors may be used to endorse or promote products derived from this
15
+ software without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS",
18
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
21
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27
+ POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,17 @@
1
+ Copyright (C) 1999-2006, MIYASAKA Masaru.
2
+
3
+ This software is provided 'as-is', without any express or implied
4
+ warranty. In no event will the authors be held liable for any damages
5
+ arising from the use of this software.
6
+
7
+ Permission is granted to anyone to use this software for any purpose,
8
+ including commercial applications, and to alter it and redistribute it
9
+ freely, subject to the following restrictions:
10
+
11
+ 1. The origin of this software must not be misrepresented; you must not
12
+ claim that you wrote the original software. If you use this software
13
+ in a product, an acknowledgment in the product documentation would be
14
+ appreciated but is not required.
15
+ 2. Altered source versions must be plainly marked as such, and must not be
16
+ misrepresented as being the original software.
17
+ 3. This notice may not be removed or altered from any source distribution.
@@ -0,0 +1,7 @@
1
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
2
+
3
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
4
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
5
+ * Neither the name of the libmozjpeg Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
6
+
7
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS", AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,13 @@
1
+ Copyright (c) 2014, Derek Buitenhuis
2
+
3
+ Permission to use, copy, modify, and/or distribute this software for any
4
+ purpose with or without fee is hereby granted, provided that the above
5
+ copyright notice and this permission notice appear in all copies.
6
+
7
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8
+ WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9
+ MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10
+ ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11
+ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12
+ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13
+ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'image_optim_pack'
5
- s.version = '0.1.0.20141104'
5
+ s.version = '0.2.0'
6
6
  s.summary = %q{Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpegoptim, jpegtran, optipng, pngcrush, pngquant}
7
7
  s.homepage = "http://github.com/toy/#{s.name}"
8
8
  s.authors = ['Ivan Kuchin']
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
16
  s.require_paths = %w[lib]
17
17
 
18
- s.add_dependency 'image_optim', '~> 0.18'
18
+ s.add_dependency 'image_optim', '~> 0.19'
19
19
  s.add_dependency 'fspath', '~> 2.1'
20
20
 
21
21
  s.add_development_dependency 'versionomy', '~> 0.4.4'
data/script/livecheck CHANGED
@@ -15,15 +15,25 @@ def version(string)
15
15
  Versionomy.parse(string)
16
16
  end
17
17
 
18
+ def get(url)
19
+ uri = URI(url)
20
+
21
+ http = Net::HTTP.new(uri.host, uri.port)
22
+ http.use_ssl = (uri.scheme == 'https')
23
+
24
+ request = Net::HTTP::Get.new(uri.request_uri)
25
+ http.request(request).body
26
+ end
27
+
18
28
  name = ARGV[0].downcase
19
29
  config = YAML.load(DATA)[name]
20
30
  abort "Livecheck for #{name} was not defined" unless config
21
31
 
22
- uri = URI(config['url'])
32
+ url = config['url']
23
33
  version_regex = Regexp.new(config['regexp'])
24
34
  current_version = ARGV[1] && version(ARGV[1])
25
35
 
26
- data = Net::HTTP.get(uri)
36
+ data = get(url)
27
37
  versions = data.scan(version_regex).uniq.map{ |match| version(match[0]) }
28
38
  abort 'No versions found' if versions.empty?
29
39
 
@@ -52,9 +62,15 @@ jhead:
52
62
  jpegoptim:
53
63
  url: http://www.kokkonen.net/tjko/src/
54
64
  regexp: jpegoptim-(\d+(?:\.\d+)*)
65
+ jpegarchive:
66
+ url: https://github.com/danielgtaylor/jpeg-archive/releases.atom
67
+ regexp: <title>JPEG-Archive (\d+(?:\.\d+)*)</title>
55
68
  libjpeg:
56
69
  url: http://www.ijg.org/files/
57
70
  regexp: jpegsrc.v(.*?).tar.gz
71
+ libmozjpeg:
72
+ url: https://github.com/mozilla/mozjpeg/releases.atom
73
+ regexp: <title>mozjpeg v(\d+(?:\.\d+)*)</title>
58
74
  libpng:
59
75
  url: http://sourceforge.net/projects/libpng/rss
60
76
  regexp: /libpng\d*/(\d+(?:\.\d+)*)/
data/script/vm_init CHANGED
@@ -13,11 +13,11 @@ present(){
13
13
  [ $missing -eq 0 ] || return 127
14
14
  }
15
15
 
16
- if ! present make wget gcc g++ chrpath perl pkg-config automake; then
16
+ if ! present make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm; then
17
17
  if present apt-get; then
18
- apt-get -y install make wget gcc g++ chrpath perl pkg-config automake
18
+ apt-get -y install make wget gcc g++ chrpath perl pkg-config autoconf automake libtool nasm
19
19
  elif present yum; then
20
- yum -y install make wget gcc gcc-c++ chrpath perl pkg-config automake
20
+ yum -y install make wget gcc gcc-c++ chrpath perl pkg-config autoconf automake libtool nasm
21
21
  else
22
22
  echo 'unknown package manager'
23
23
  exit 1
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_optim_pack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.20141104
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ivan Kuchin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-04 00:00:00.000000000 Z
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: image_optim
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '0.18'
19
+ version: '0.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '0.18'
26
+ version: '0.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: fspath
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,20 @@ files:
100
100
  - acknowledgements/cexcept.txt
101
101
  - acknowledgements/gifread.txt
102
102
  - acknowledgements/gifsicle.txt
103
+ - acknowledgements/iqa.txt
103
104
  - acknowledgements/jhead.txt
105
+ - acknowledgements/jpeg-archive.txt
104
106
  - acknowledgements/jpegoptim.txt
107
+ - acknowledgements/libjpeg-turbo.txt
108
+ - acknowledgements/libjpeg-x86-simd.txt
105
109
  - acknowledgements/libjpeg.txt
106
110
  - acknowledgements/libpng.txt
111
+ - acknowledgements/mozjpeg.txt
107
112
  - acknowledgements/optipng-authors.txt
108
113
  - acknowledgements/optipng.txt
109
114
  - acknowledgements/pngcrush.txt
110
115
  - acknowledgements/pngquant.txt
116
+ - acknowledgements/smallfry.txt
111
117
  - acknowledgements/zlib.txt
112
118
  - acknowledgements/zopfli-contributors.txt
113
119
  - acknowledgements/zopfli.txt
@@ -124,6 +130,7 @@ files:
124
130
  - vendor/darwin/i386/advpng
125
131
  - vendor/darwin/i386/gifsicle
126
132
  - vendor/darwin/i386/jhead
133
+ - vendor/darwin/i386/jpeg-recompress
127
134
  - vendor/darwin/i386/jpegoptim
128
135
  - vendor/darwin/i386/jpegtran
129
136
  - vendor/darwin/i386/libjpeg.dylib
@@ -135,6 +142,7 @@ files:
135
142
  - vendor/darwin/x86_64/advpng
136
143
  - vendor/darwin/x86_64/gifsicle
137
144
  - vendor/darwin/x86_64/jhead
145
+ - vendor/darwin/x86_64/jpeg-recompress
138
146
  - vendor/darwin/x86_64/jpegoptim
139
147
  - vendor/darwin/x86_64/jpegtran
140
148
  - vendor/darwin/x86_64/libjpeg.dylib
@@ -146,6 +154,7 @@ files:
146
154
  - vendor/linux/i686/advpng
147
155
  - vendor/linux/i686/gifsicle
148
156
  - vendor/linux/i686/jhead
157
+ - vendor/linux/i686/jpeg-recompress
149
158
  - vendor/linux/i686/jpegoptim
150
159
  - vendor/linux/i686/jpegtran
151
160
  - vendor/linux/i686/libjpeg.so
@@ -157,6 +166,7 @@ files:
157
166
  - vendor/linux/x86_64/advpng
158
167
  - vendor/linux/x86_64/gifsicle
159
168
  - vendor/linux/x86_64/jhead
169
+ - vendor/linux/x86_64/jpeg-recompress
160
170
  - vendor/linux/x86_64/jpegoptim
161
171
  - vendor/linux/x86_64/jpegtran
162
172
  - vendor/linux/x86_64/libjpeg.so
@@ -175,20 +185,20 @@ require_paths:
175
185
  - lib
176
186
  required_ruby_version: !ruby/object:Gem::Requirement
177
187
  requirements:
178
- - - '>='
188
+ - - ! '>='
179
189
  - !ruby/object:Gem::Version
180
190
  version: '0'
181
191
  required_rubygems_version: !ruby/object:Gem::Requirement
182
192
  requirements:
183
- - - '>='
193
+ - - ! '>='
184
194
  - !ruby/object:Gem::Version
185
195
  version: '0'
186
196
  requirements: []
187
197
  rubyforge_project: image_optim_pack
188
- rubygems_version: 2.4.2
198
+ rubygems_version: 2.4.1
189
199
  signing_key:
190
200
  specification_version: 4
191
- summary: 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpegoptim,
201
+ summary: ! 'Precompiled binaries for image_optim: advpng, gifsicle, jhead, jpegoptim,
192
202
  jpegtran, optipng, pngcrush, pngquant'
193
203
  test_files:
194
204
  - spec/image_optim/pack_spec.rb