aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-20 15:07:53 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-05-20 15:07:53 +0000
commit3056bdd2364fe1aa68f4ec7b0fe07740c3e8d123 (patch)
tree7ed3a99d0611db7d5b482226945b75e8fb719b66 /gyp
parent9e967ad6e54c1e2e5ffb9d6e9eb8414e6b36b0e3 (diff)
Since we're only using it on Linux now, just require poppler as a system dependency.
The Ubuntu package needed is libpoppler-cpp-dev. iconv and fontconfig were only used as Poppler dependencies. bson_c is also unused. BUG=skia: R=reed@google.com, rmistry@google.com, borenet@google.com, halcanary@google.com, mtklein@google.com Author: mtklein@chromium.org Review URL: https://codereview.chromium.org/294683003 git-svn-id: http://skia.googlecode.com/svn/trunk@14802 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gyp')
-rw-r--r--gyp/fontconfig.gyp199
-rw-r--r--gyp/gm.gyp2
-rw-r--r--gyp/iconv.gyp43
-rw-r--r--gyp/poppler.gyp244
4 files changed, 13 insertions, 475 deletions
diff --git a/gyp/fontconfig.gyp b/gyp/fontconfig.gyp
deleted file mode 100644
index 6575fe2765..0000000000
--- a/gyp/fontconfig.gyp
+++ /dev/null
@@ -1,199 +0,0 @@
-# GYP for fontconfig (
-#
-# This has been tested on Windows and Mac.
-# This library is native to Linux, so build from source is not necessary.
-#
-# Additional files for building under Windows are provided here: (LGPL)
-# http://comments.gmane.org/gmane.comp.fonts.fontconfig/4438
-
-{
- 'variables': {
- 'skia_warnings_as_errors': 0,
- },
- 'targets': [
- {
- 'target_name': 'fontconfig',
- 'type': 'none',
- 'dependencies': [
- 'libfontconfig',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/fontconfig',
- ],
- },
- 'conditions': [
- ['skia_os == "mac"', {
- 'dependencies': [
- 'fontconfig_setup',
- ],
- }],
- ],
- },
- {
- 'target_name': 'libfontconfig',
- 'type': 'static_library',
- 'dependencies': [
- 'freetype.gyp:freetype_poppler',
- ],
- 'include_dirs' : [
- '../third_party/externals/fontconfig',
- '../third_party/fontconfig/config',
- '../third_party/fontconfig/config/src',
- ],
- 'sources': [
- '../third_party/externals/fontconfig/src/fcatomic.c',
- '../third_party/externals/fontconfig/src/fcblanks.c',
- '../third_party/externals/fontconfig/src/fccache.c',
- '../third_party/externals/fontconfig/src/fccfg.c',
- '../third_party/externals/fontconfig/src/fccharset.c',
- '../third_party/externals/fontconfig/src/fccompat.c',
- '../third_party/externals/fontconfig/src/fcdbg.c',
- '../third_party/externals/fontconfig/src/fcdefault.c',
- '../third_party/externals/fontconfig/src/fcdir.c',
- '../third_party/externals/fontconfig/src/fcfreetype.c',
- '../third_party/externals/fontconfig/src/fcfs.c',
- '../third_party/externals/fontconfig/src/fchash.c',
- '../third_party/externals/fontconfig/src/fcinit.c',
- '../third_party/externals/fontconfig/src/fclang.c',
- '../third_party/externals/fontconfig/src/fclist.c',
- '../third_party/externals/fontconfig/src/fcmatch.c',
- '../third_party/externals/fontconfig/src/fcmatrix.c',
- '../third_party/externals/fontconfig/src/fcname.c',
- '../third_party/externals/fontconfig/src/fcobjs.c',
- '../third_party/externals/fontconfig/src/fcpat.c',
- '../third_party/externals/fontconfig/src/fcserialize.c',
- '../third_party/externals/fontconfig/src/fcstat.c',
- '../third_party/externals/fontconfig/src/fcstr.c',
- '../third_party/externals/fontconfig/src/fcxml.c',
- '../third_party/externals/fontconfig/src/ftglue.c',
- ],
- 'defines': [
- 'HAVE_CONFIG_H',
- ],
- 'cflags': [
- '-fPIC',
- ],
-
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/fontconfig',
- ],
- },
-
- 'conditions': [
- ['skia_os == "mac"', {
- 'include_dirs': [
- '<(SHARED_INTERMEDIATE_DIR)/fontconfig_config',
- '../third_party/fontconfig/config/mac',
- '../third_party/fontconfig/config/mac/src',
- ],
- 'dependencies': [
- 'fontconfig_config_template',
- ],
- 'libraries': [
- '$(SDKROOT)/usr/lib/libexpat.dylib',
- ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
- },
- }],
- ['skia_os == "win"', {
- 'include_dirs': [
- '../third_party/fontconfig/config/windows',
- '../third_party/fontconfig/config/windows/src',
- ],
- 'sources!': [
- '../third_party/externals/fontconfig/src/fccompat.c',
- '../third_party/externals/fontconfig/src/fcxml.c',
- ],
- 'defines': [
- # inline is not recognized in C and has to be __inline
- 'inline=__inline',
- ],
- }],
- ],
- },
- ],
- 'conditions': [
- ['skia_os == "mac"', {
- 'variables': {
- 'cachedir': '<(PRODUCT_DIR)/fontconfig/cache',
- 'configdir': '<(PRODUCT_DIR)/fontconfig/etc',
- },
- 'targets': [
- {
- 'target_name': 'fontconfig_config_template',
- 'type': 'none',
- 'actions': [{
- 'action_name': 'fontconfig_config_template',
- 'message': 'Generating fontconfig header',
- 'inputs': [
- '../third_party/fontconfig/process-template.py',
- '../third_party/fontconfig/config/mac/config.h.template',
- ],
- 'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/fontconfig_config/config.h',
- ],
- 'action': [
- 'python', '../third_party/fontconfig/process-template.py',
- '-i', '../third_party/fontconfig/config/mac/config.h.template',
- '-o', '<@(_outputs)',
- '-p', '@FC_CACHEDIR@', '<(cachedir)',
- '-p', '@FONTCONFIG_PATH@', '<(configdir)',
- ],
- }],
- }, {
- 'target_name': 'fontconfig_setup',
- 'type': 'none',
- 'dependencies': [
- 'fc-cache',
- ],
- 'actions': [{
- 'action_name': 'fontconfig_config_file',
- 'message': 'Generating font.conf',
- 'inputs': [
- '../third_party/fontconfig/process-template.py',
- '../third_party/externals/fontconfig/fonts.conf.in',
- ],
- 'outputs': [ '<(configdir)/fonts.conf', ],
- 'action': [
- 'python', '../third_party/fontconfig/process-template.py',
- '-i', '../third_party/externals/fontconfig/fonts.conf.in',
- '-o', '<(configdir)/fonts.conf',
- '-p', '@FC_CACHEDIR@', '<(cachedir)',
- '-k', '@FC_DEFAULT_FONTS@', '/System/Library/Fonts',
- '-k', '@FC_FONTPATH@', '<dir>/Library/Fonts</dir>',
- '-p', '@CONFIGDIR@', '<(configdir)/conf.d',
- '-k', '@PACKAGE@', 'fontconfig',
- '-k', '@VERSION@', '2.11.0',
- ],
- }, {
- 'action_name': 'populate_fontconfig_cache',
- 'message':
- 'Generating fontconfig cache (this will take a few minutes).',
- 'inputs': [
- '<(PRODUCT_DIR)/fc-cache',
- '<(configdir)/fonts.conf',
- ],
- 'outputs': [ '<(cachedir)/CACHEDIR.TAG', ],
- 'action': [ '<(PRODUCT_DIR)/fc-cache', '-s', '-f', '-v', ],
- }],
- },
- {
- 'target_name': 'fc-cache',
- 'type': 'executable',
- 'dependencies': [
- 'libfontconfig',
- ],
- 'libraries':[
- '$(SDKROOT)/usr/lib/libexpat.dylib',
- ],
- 'sources': [
- '../third_party/externals/fontconfig/fc-cache/fc-cache.c',
- ],
- },
- ],
- }],
- ],
-}
diff --git a/gyp/gm.gyp b/gyp/gm.gyp
index a4ec604fbf..b727afbd14 100644
--- a/gyp/gm.gyp
+++ b/gyp/gm.gyp
@@ -76,7 +76,7 @@
}],
['skia_poppler_enabled', {
'dependencies': [
- 'poppler.gyp:libpoppler-cpp-gpl',
+ 'poppler.gyp:*',
],
'defines': [
'SK_BUILD_POPPLER',
diff --git a/gyp/iconv.gyp b/gyp/iconv.gyp
deleted file mode 100644
index fbe16f79d8..0000000000
--- a/gyp/iconv.gyp
+++ /dev/null
@@ -1,43 +0,0 @@
-# GYP for iconv
-#
-# NOTE: WINDOWS BUILD ONLY.
-# iconv should be native to Mac and Linux.
-#
-# Based on instructions found on http://www.codeproject.com/Articles/302012/How-to-Build-libiconv-with-Microsoft-Visual-Studio
-# See the relevant README.chromium file for more information.
-
-{
- 'variables': {
- 'skia_warnings_as_errors': 0,
- },
- 'targets': [
- {
- 'target_name': 'iconv',
- 'type': 'static_library',
- 'include_dirs' : [
- '../third_party/externals/iconv/lib',
- '../third_party/iconv/config',
- ],
- 'sources': [
- '../third_party/externals/iconv/lib/iconv.c',
- '../third_party/externals/iconv/libcharset/lib/localcharset.c',
- ],
-
- 'conditions': [
- ['skia_os == "win"', {
- 'include_dirs': [
- '../third_party/iconv/config/windows',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/iconv/config/windows',
- ],
- },
- 'defines': [
- 'LIBDIR',
- ],
- }],
- ],
- },
- ],
-}
diff --git a/gyp/poppler.gyp b/gyp/poppler.gyp
index 027aea381a..6b7685d1f7 100644
--- a/gyp/poppler.gyp
+++ b/gyp/poppler.gyp
@@ -1,235 +1,15 @@
-# GYP for libpoppler, a PDF rendering library.
-#
-# !!! WARNING !!! Poppler is GPL software, and should not be used in anything
-# except testing code. Or the lawyercats won't be happy.
-#
-# libpoppler should be statically linked (doesn't have DLL exports),
-# but libpopper-cpp can be dynamically linked.
-
+# Poppler, assuming it's been installed to the (Linux) system.
{
- 'variables': {
- 'skia_warnings_as_errors': 0,
- },
- 'targets': [
- {
- 'target_name': 'libpoppler-gpl',
- 'type': 'static_library',
- 'include_dirs' : [
- '../third_party/externals/poppler',
- '../third_party/externals/poppler/goo',
- ],
- 'sources': [
- '../third_party/externals/poppler/fofi/FoFiBase.cc',
- '../third_party/externals/poppler/fofi/FoFiEncodings.cc',
- '../third_party/externals/poppler/fofi/FoFiIdentifier.cc',
- '../third_party/externals/poppler/fofi/FoFiTrueType.cc',
- '../third_party/externals/poppler/fofi/FoFiType1.cc',
- '../third_party/externals/poppler/fofi/FoFiType1C.cc',
- '../third_party/externals/poppler/goo/FixedPoint.cc',
- '../third_party/externals/poppler/goo/gfile.cc',
- '../third_party/externals/poppler/goo/gmem.cc',
- '../third_party/externals/poppler/goo/gmempp.cc',
- '../third_party/externals/poppler/goo/GooHash.cc',
- '../third_party/externals/poppler/goo/GooList.cc',
- '../third_party/externals/poppler/goo/GooString.cc',
- '../third_party/externals/poppler/goo/GooTimer.cc',
- '../third_party/externals/poppler/goo/grandom.cc',
- '../third_party/externals/poppler/goo/gstrtod.cc',
- '../third_party/externals/poppler/goo/ImgWriter.cc',
- '../third_party/externals/poppler/goo/JpegWriter.cc',
- '../third_party/externals/poppler/goo/PNGWriter.cc',
- '../third_party/externals/poppler/goo/TiffWriter.cc',
- '../third_party/externals/poppler/poppler/Annot.cc',
- '../third_party/externals/poppler/poppler/Array.cc',
- '../third_party/externals/poppler/poppler/BuiltinFont.cc',
- '../third_party/externals/poppler/poppler/BuiltinFontTables.cc',
- '../third_party/externals/poppler/poppler/CachedFile.cc',
- '../third_party/externals/poppler/poppler/Catalog.cc',
- '../third_party/externals/poppler/poppler/CharCodeToUnicode.cc',
- '../third_party/externals/poppler/poppler/CMap.cc',
- '../third_party/externals/poppler/poppler/DateInfo.cc',
- '../third_party/externals/poppler/poppler/Decrypt.cc',
- '../third_party/externals/poppler/poppler/Dict.cc',
- '../third_party/externals/poppler/poppler/Error.cc',
- '../third_party/externals/poppler/poppler/FileSpec.cc',
- '../third_party/externals/poppler/poppler/FontEncodingTables.cc',
- '../third_party/externals/poppler/poppler/FontInfo.cc',
- '../third_party/externals/poppler/poppler/Form.cc',
- '../third_party/externals/poppler/poppler/Function.cc',
- '../third_party/externals/poppler/poppler/Gfx.cc',
- '../third_party/externals/poppler/poppler/GfxFont.cc',
- '../third_party/externals/poppler/poppler/GfxState.cc',
- '../third_party/externals/poppler/poppler/GlobalParams.cc',
- '../third_party/externals/poppler/poppler/Hints.cc',
- '../third_party/externals/poppler/poppler/JArithmeticDecoder.cc',
- '../third_party/externals/poppler/poppler/JBIG2Stream.cc',
- '../third_party/externals/poppler/poppler/JPXStream.cc',
- '../third_party/externals/poppler/poppler/Lexer.cc',
- '../third_party/externals/poppler/poppler/Linearization.cc',
- '../third_party/externals/poppler/poppler/Link.cc',
- '../third_party/externals/poppler/poppler/LocalPDFDocBuilder.cc',
- '../third_party/externals/poppler/poppler/Movie.cc',
- '../third_party/externals/poppler/poppler/NameToCharCode.cc',
- '../third_party/externals/poppler/poppler/Object.cc',
- '../third_party/externals/poppler/poppler/OptionalContent.cc',
- '../third_party/externals/poppler/poppler/Outline.cc',
- '../third_party/externals/poppler/poppler/OutputDev.cc',
- '../third_party/externals/poppler/poppler/Page.cc',
- '../third_party/externals/poppler/poppler/PageLabelInfo.cc',
- '../third_party/externals/poppler/poppler/PageTransition.cc',
- '../third_party/externals/poppler/poppler/Parser.cc',
- '../third_party/externals/poppler/poppler/PDFDoc.cc',
- '../third_party/externals/poppler/poppler/PDFDocEncoding.cc',
- '../third_party/externals/poppler/poppler/PDFDocFactory.cc',
- '../third_party/externals/poppler/poppler/PopplerCache.cc',
- '../third_party/externals/poppler/poppler/PreScanOutputDev.cc',
- '../third_party/externals/poppler/poppler/ProfileData.cc',
- '../third_party/externals/poppler/poppler/PSOutputDev.cc',
- '../third_party/externals/poppler/poppler/PSTokenizer.cc',
- '../third_party/externals/poppler/poppler/Rendition.cc',
- '../third_party/externals/poppler/poppler/SecurityHandler.cc',
- '../third_party/externals/poppler/poppler/Sound.cc',
- '../third_party/externals/poppler/poppler/SplashOutputDev.cc',
- '../third_party/externals/poppler/poppler/StdinCachedFile.cc',
- '../third_party/externals/poppler/poppler/StdinPDFDocBuilder.cc',
- '../third_party/externals/poppler/poppler/Stream.cc',
- '../third_party/externals/poppler/poppler/strtok_r.cpp',
- '../third_party/externals/poppler/poppler/TextOutputDev.cc',
- '../third_party/externals/poppler/poppler/UnicodeMap.cc',
- '../third_party/externals/poppler/poppler/UnicodeTypeTable.cc',
- '../third_party/externals/poppler/poppler/UTF.cc',
- '../third_party/externals/poppler/poppler/ViewerPreferences.cc',
- '../third_party/externals/poppler/poppler/XpdfPluginAPI.cc',
- '../third_party/externals/poppler/poppler/XRef.cc',
- '../third_party/externals/poppler/splash/Splash.cc',
- '../third_party/externals/poppler/splash/SplashBitmap.cc',
- '../third_party/externals/poppler/splash/SplashClip.cc',
- '../third_party/externals/poppler/splash/SplashFont.cc',
- '../third_party/externals/poppler/splash/SplashFontEngine.cc',
- '../third_party/externals/poppler/splash/SplashFontFile.cc',
- '../third_party/externals/poppler/splash/SplashFontFileID.cc',
- '../third_party/externals/poppler/splash/SplashFTFont.cc',
- '../third_party/externals/poppler/splash/SplashFTFontEngine.cc',
- '../third_party/externals/poppler/splash/SplashFTFontFile.cc',
- '../third_party/externals/poppler/splash/SplashPath.cc',
- '../third_party/externals/poppler/splash/SplashPattern.cc',
- '../third_party/externals/poppler/splash/SplashScreen.cc',
- '../third_party/externals/poppler/splash/SplashState.cc',
- '../third_party/externals/poppler/splash/SplashT1Font.cc',
- '../third_party/externals/poppler/splash/SplashT1FontEngine.cc',
- '../third_party/externals/poppler/splash/SplashT1FontFile.cc',
- '../third_party/externals/poppler/splash/SplashXPath.cc',
- '../third_party/externals/poppler/splash/SplashXPathScanner.cc',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/poppler/poppler',
- ],
- },
- 'cflags': [
- '-w'
- ],
- 'cflags_cc!': [
- '-fno-rtti'
- ],
- 'conditions': [
- ['skia_os == "linux"', {
- 'include_dirs': [
- '../third_party/poppler/config/linux',
- '/usr/include/freetype2',
- ],
- 'cflags': [
- '-fPIC',
- ],
- }],
- ['skia_os in ["mac", "win"]', {
- 'dependencies': [
- 'freetype.gyp:freetype_poppler',
- 'fontconfig.gyp:fontconfig',
- ],
- }],
- ['skia_os == "mac"', {
- 'include_dirs': [
- '../third_party/poppler/config/mac',
- ],
- }],
- ['skia_os == "win"', {
- 'include_dirs': [
- '../third_party/poppler/config/windows',
- ],
- }],
- ],
- },
-
- {
- 'target_name': 'libpoppler-cpp-gpl',
- 'dependencies': [
- 'libpoppler-gpl',
- ],
- 'type': 'shared_library',
- 'include_dirs' : [
- '../third_party/externals/poppler/cpp',
- '../third_party/externals/poppler',
- '../third_party/externals/poppler/poppler',
- '../third_party/externals/poppler/goo',
-
- '../third_party/poppler/config',
- ],
- 'sources': [
- '../third_party/externals/poppler/cpp/PNMWriter.cc',
- '../third_party/externals/poppler/cpp/poppler-document.cpp',
- '../third_party/externals/poppler/cpp/poppler-embedded-file.cpp',
- '../third_party/externals/poppler/cpp/poppler-font.cpp',
- '../third_party/externals/poppler/cpp/poppler-global.cpp',
- '../third_party/externals/poppler/cpp/poppler-image.cpp',
- '../third_party/externals/poppler/cpp/poppler-page.cpp',
- '../third_party/externals/poppler/cpp/poppler-page-renderer.cpp',
- '../third_party/externals/poppler/cpp/poppler-page-transition.cpp',
- '../third_party/externals/poppler/cpp/poppler-private.cpp',
- '../third_party/externals/poppler/cpp/poppler-toc.cpp',
- ],
- 'defines': [
- 'poppler_cpp_EXPORTS',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../third_party/externals/poppler/cpp',
- ],
- },
- 'conditions': [
- ['skia_os == "linux"', {
- 'include_dirs': [
- '../third_party/poppler/config/linux',
- ],
- 'cflags': [
- '-fPIC',
- ],
- }],
- ['skia_os == "mac"', {
- 'include_dirs': [
- '../third_party/poppler/config/mac',
- ],
- 'libraries':[
- '$(SDKROOT)/usr/lib/libiconv.dylib',
- '$(SDKROOT)/usr/lib/libexpat.dylib',
- ],
- 'xcode_settings': {
- 'DYLIB_INSTALL_NAME_BASE': '@executable_path',
- 'OTHER_CPLUSPLUSFLAGS!': [
- # poppler doesn't do gcc-style exports
- '-fvisibility=hidden',
+ 'targets': [{
+ 'target_name': 'poppler',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'libraries': [
+ '-lpoppler-cpp',
],
- },
- }],
- ['skia_os == "win"', {
- 'dependencies': [
- 'iconv.gyp:iconv',
- ],
- 'include_dirs': [
- '../third_party/poppler/config/windows',
- ],
- }],
- ],
- },
- ],
+ 'include_dirs': [
+ '/usr/include/poppler/cpp',
+ ],
+ },
+ }],
}