| Author: Maks Orlovich <morlovich@google.com> |
| Description: Build against system giflib |
| |
| --- a/src/pagespeed/kernel/image/gif_reader.cc |
| +++ b/src/pagespeed/kernel/image/gif_reader.cc |
| @@ -41,7 +41,7 @@ |
| #endif |
| #endif |
| |
| -#include "third_party/giflib/lib/gif_lib.h" |
| +#include "gif_lib.h" |
| } |
| |
| #if GIFLIB_MAJOR < 5 || (GIFLIB_MAJOR == 5 && GIFLIB_MINOR == 0) |
| --- a/src/pagespeed/kernel/image/gif_reader.h |
| +++ b/src/pagespeed/kernel/image/gif_reader.h |
| @@ -31,7 +31,7 @@ |
| #include "pagespeed/kernel/image/scanline_utils.h" |
| |
| extern "C" { |
| -#include "third_party/giflib/lib/gif_lib.h" |
| +#include "gif_lib.h" |
| |
| #ifdef USE_SYSTEM_LIBPNG |
| #include "png.h" // NOLINT |
| --- a/src/pagespeed/kernel/image/gif_square.h |
| +++ b/src/pagespeed/kernel/image/gif_square.h |
| @@ -27,7 +27,7 @@ |
| #include "pagespeed/kernel/image/image_util.h" |
| |
| extern "C" { |
| -#include "third_party/giflib/lib/gif_lib.h" |
| +#include "gif_lib.h" |
| } |
| |
| namespace net_instaweb { |
| --- a/src/third_party/giflib/giflib.gyp |
| +++ b/src/third_party/giflib/giflib.gyp |
| @@ -13,92 +13,24 @@ |
| # limitations under the License. |
| |
| { |
| - 'variables': { |
| - 'pagespeed_root': '../..', |
| - 'giflib_root': '<(pagespeed_root)/third_party/giflib', |
| - 'giflib_src_root': '<(giflib_root)/lib', |
| - 'giflib_gen_arch_root': '<(giflib_root)/gen/arch/<(OS)/<(target_arch)', |
| - }, |
| 'targets': [ |
| { |
| - 'target_name': 'giflib_core', |
| - 'type': '<(library)', |
| - 'sources': [ |
| - 'lib/gifalloc.c', |
| - 'lib/gif_err.c', |
| - ] |
| - }, |
| - { |
| 'target_name': 'dgiflib', |
| - 'type': '<(library)', |
| - 'sources': [ |
| - 'lib/dgif_lib.c', |
| - ], |
| - 'dependencies': [ |
| - 'giflib_core', |
| - ], |
| - 'include_dirs': [ |
| - '<(giflib_src_root)', |
| - '<(giflib_gen_arch_root)/include', |
| - '<(giflib_gen_arch_root)/include/private', |
| - ], |
| - 'defines': [ |
| - # We assume that int is 32bit on all platforms. This is the |
| - # same assumption made in basictypes.h. |
| - 'UINT32=unsigned int', |
| - '_GBA_NO_FILEIO', |
| - ], |
| - 'direct_dependent_settings': { |
| - 'include_dirs': [ |
| - '<(giflib_src_root)', |
| - '<(giflib_gen_arch_root)/include', |
| + 'type': 'none', |
| + 'all_dependent_settings': { |
| + 'libraries': [ |
| + '-lgif', |
| ], |
| - }, |
| - 'xcode_settings': { |
| - 'WARNING_CFLAGS': [ |
| - '-Wno-pointer-sign', |
| - ], |
| - }, |
| - 'cflags': [ |
| - '-Wno-pointer-sign', |
| - ], |
| + } |
| }, |
| { |
| 'target_name': 'egiflib', |
| - 'type': '<(library)', |
| - 'sources': [ |
| - 'lib/egif_lib.c', |
| - 'lib/gif_hash.c' |
| - ], |
| - 'dependencies': [ |
| - 'giflib_core', |
| - ], |
| - 'include_dirs': [ |
| - '<(giflib_src_root)', |
| - '<(giflib_gen_arch_root)/include', |
| - '<(giflib_gen_arch_root)/include/private', |
| - ], |
| - 'defines': [ |
| - # We assume that int is 32bit on all platforms. This is the |
| - # same assumption made in basictypes.h. |
| - 'UINT32=unsigned int', |
| - '_GBA_NO_FILEIO', |
| - 'HAVE_FCNTL_H', |
| - ], |
| - 'direct_dependent_settings': { |
| - 'include_dirs': [ |
| - '<(giflib_src_root)', |
| - '<(giflib_gen_arch_root)/include', |
| - ], |
| - }, |
| - 'xcode_settings': { |
| - 'WARNING_CFLAGS': [ |
| - '-Wno-pointer-sign', |
| + 'type': 'none', |
| + 'all_dependent_settings': { |
| + 'libraries': [ |
| + '-lgif', |
| ], |
| - }, |
| - 'cflags': [ |
| - '-Wno-pointer-sign', |
| - ], |
| + } |
| }, |
| ], |
| } |