Title: [222907] trunk
Revision
222907
Author
fred.w...@free.fr
Date
2017-10-05 02:32:58 -0700 (Thu, 05 Oct 2017)

Log Message

Remove Brotli from Source/ThirdParty
https://bugs.webkit.org/show_bug.cgi?id=177804

Patch by Frederic Wang <fw...@igalia.com> on 2017-10-03
Reviewed by Michael Catanzaro.

.:

* Source/CMakeLists.txt: Do not build ThirdParty/brotli anymore.
* Source/cmake/FindBrotliDec.cmake: Added. New cmake module to find Brotli via PkgConfig.
* Source/cmake/OptionsGTK.cmake: Expose USE_WOFF2 as a public option and use find_package
to look for brotli.

Source/ThirdParty:

* brotli/CMakeLists.txt: Removed.
* brotli/LICENSE: Removed.
* brotli/README.webkit: Removed.
* brotli/common/constants.h: Removed.
* brotli/common/dictionary.bin: Removed.
* brotli/common/dictionary.c: Removed.
* brotli/common/dictionary.h: Removed.
* brotli/common/version.h: Removed.
* brotli/dec/bit_reader.c: Removed.
* brotli/dec/bit_reader.h: Removed.
* brotli/dec/context.h: Removed.
* brotli/dec/decode.c: Removed.
* brotli/dec/huffman.c: Removed.
* brotli/dec/huffman.h: Removed.
* brotli/dec/port.h: Removed.
* brotli/dec/prefix.h: Removed.
* brotli/dec/state.c: Removed.
* brotli/dec/state.h: Removed.
* brotli/dec/transform.h: Removed.
* brotli/include/brotli/decode.h: Removed.
* brotli/include/brotli/encode.h: Removed.
* brotli/include/brotli/port.h: Removed.
* brotli/include/brotli/types.h: Removed.
* brotli/update.sh: Removed.
* woff2/CMakeLists.txt: Use Brotli's include and library paths found by CMake.

Tools:

* gtk/jhbuild.modules: Build brotli 1.0.1 from the official github repository.
* Scripts/webkitpy/style/checker.py: Remove brotli.

Modified Paths

Added Paths

Removed Paths

  • trunk/Source/ThirdParty/brotli/

Diff

Modified: trunk/ChangeLog (222906 => 222907)


--- trunk/ChangeLog	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/ChangeLog	2017-10-05 09:32:58 UTC (rev 222907)
@@ -1,3 +1,15 @@
+2017-10-03  Frederic Wang  <fw...@igalia.com>
+
+        Remove Brotli from Source/ThirdParty
+        https://bugs.webkit.org/show_bug.cgi?id=177804
+
+        Reviewed by Michael Catanzaro.
+
+        * Source/CMakeLists.txt: Do not build ThirdParty/brotli anymore.
+        * Source/cmake/FindBrotliDec.cmake: Added. New cmake module to find Brotli via PkgConfig.
+        * Source/cmake/OptionsGTK.cmake: Expose USE_WOFF2 as a public option and use find_package
+        to look for brotli.
+
 2017-10-05  Yusuke Suzuki  <utatane....@gmail.com>
 
         [Linux] Port MallocBench

Modified: trunk/Source/CMakeLists.txt (222906 => 222907)


--- trunk/Source/CMakeLists.txt	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Source/CMakeLists.txt	2017-10-05 09:32:58 UTC (rev 222907)
@@ -18,7 +18,6 @@
 endif ()
 
 if (USE_WOFF2)
-    add_subdirectory(ThirdParty/brotli)
     add_subdirectory(ThirdParty/woff2)
 endif ()
 

Modified: trunk/Source/ThirdParty/ChangeLog (222906 => 222907)


--- trunk/Source/ThirdParty/ChangeLog	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Source/ThirdParty/ChangeLog	2017-10-05 09:32:58 UTC (rev 222907)
@@ -1,3 +1,36 @@
+2017-10-03  Frederic Wang  <fw...@igalia.com>
+
+        Remove Brotli from Source/ThirdParty
+        https://bugs.webkit.org/show_bug.cgi?id=177804
+
+        Reviewed by Michael Catanzaro.
+
+        * brotli/CMakeLists.txt: Removed.
+        * brotli/LICENSE: Removed.
+        * brotli/README.webkit: Removed.
+        * brotli/common/constants.h: Removed.
+        * brotli/common/dictionary.bin: Removed.
+        * brotli/common/dictionary.c: Removed.
+        * brotli/common/dictionary.h: Removed.
+        * brotli/common/version.h: Removed.
+        * brotli/dec/bit_reader.c: Removed.
+        * brotli/dec/bit_reader.h: Removed.
+        * brotli/dec/context.h: Removed.
+        * brotli/dec/decode.c: Removed.
+        * brotli/dec/huffman.c: Removed.
+        * brotli/dec/huffman.h: Removed.
+        * brotli/dec/port.h: Removed.
+        * brotli/dec/prefix.h: Removed.
+        * brotli/dec/state.c: Removed.
+        * brotli/dec/state.h: Removed.
+        * brotli/dec/transform.h: Removed.
+        * brotli/include/brotli/decode.h: Removed.
+        * brotli/include/brotli/encode.h: Removed.
+        * brotli/include/brotli/port.h: Removed.
+        * brotli/include/brotli/types.h: Removed.
+        * brotli/update.sh: Removed.
+        * woff2/CMakeLists.txt: Use Brotli's include and library paths found by CMake.
+
 2017-10-05  Frederic Wang  <fw...@igalia.com>
 
         Upgrade Brotli to version 1.0.1 and WOFF2 to latest upstream

Modified: trunk/Source/ThirdParty/woff2/CMakeLists.txt (222906 => 222907)


--- trunk/Source/ThirdParty/woff2/CMakeLists.txt	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Source/ThirdParty/woff2/CMakeLists.txt	2017-10-05 09:32:58 UTC (rev 222907)
@@ -12,10 +12,10 @@
   ${WOFF2_DIR}/src/woff2_out.cc
 )
 
-include_directories("${THIRDPARTY_DIR}/brotli/include")
+include_directories("${BROTLIDEC_INCLUDE_DIRS}")
 include_directories("${WOFF2_INCLUDE_DIRECTORIES}")
 add_library(woff2 STATIC ${WOFF2_SOURCES})
-target_link_libraries(woff2 brotli)
+target_link_libraries(woff2 "${BROTLIDEC_LIBRARIES}")
 
 if (COMPILER_IS_GCC_OR_CLANG)
     WEBKIT_ADD_TARGET_CXX_FLAGS(woff2 -Wno-cast-align

Added: trunk/Source/cmake/FindBrotliDec.cmake (0 => 222907)


--- trunk/Source/cmake/FindBrotliDec.cmake	                        (rev 0)
+++ trunk/Source/cmake/FindBrotliDec.cmake	2017-10-05 09:32:58 UTC (rev 222907)
@@ -0,0 +1,53 @@
+# - Try to find BrotliDec.
+# Once done, this will define
+#
+#  BROTLIDEC_FOUND - system has BrotliDec.
+#  BROTLIDEC_INCLUDE_DIRS - the BrotliDec include directories
+#  BROTLIDEC_LIBRARIES - link these to use BrotliDec.
+#
+# Copyright (C) 2017 Igalia S.L.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1.  Redistributions of source code must retain the above copyright
+#     notice, this list of conditions and the following disclaimer.
+# 2.  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.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND ITS 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 HOLDER OR ITS
+# 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.
+
+find_package(PkgConfig)
+pkg_check_modules(PC_BROTLIDEC libbrotlidec)
+
+find_path(BROTLIDEC_INCLUDE_DIRS
+    NAMES brotli/decode.h
+    HINTS ${PC_BROTLIDEC_INCLUDEDIR}
+)
+
+find_library(BROTLIDEC_LIBRARIES
+    NAMES brotlidec
+    HINTS ${PC_BROTLIDEC_LIBDIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(BrotliDec
+    REQUIRED_VARS BROTLIDEC_INCLUDE_DIRS BROTLIDEC_LIBRARIES
+    FOUND_VAR BROTLIDEC_FOUND
+    VERSION_VAR PC_BROTLIDEC_VERSION)
+
+mark_as_advanced(
+    BROTLIDEC_INCLUDE_DIRS
+    BROTLIDEC_LIBRARIES
+)

Modified: trunk/Source/cmake/OptionsGTK.cmake (222906 => 222907)


--- trunk/Source/cmake/OptionsGTK.cmake	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Source/cmake/OptionsGTK.cmake	2017-10-05 09:32:58 UTC (rev 222907)
@@ -57,7 +57,6 @@
 include(GStreamerDefinitions)
 
 set(USE_CAIRO ON)
-set(USE_WOFF2 ON)
 set(USE_XDGMIME ON)
 SET_AND_EXPOSE_TO_BUILD(USE_GCRYPT TRUE)
 
@@ -93,6 +92,7 @@
 WEBKIT_OPTION_DEFINE(USE_LIBHYPHEN "Whether to enable the default automatic hyphenation implementation." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_LIBSECRET "Whether to enable the persistent credential storage using libsecret." PUBLIC ON)
 WEBKIT_OPTION_DEFINE(USE_UPOWER "Whether to enable the low power mode implementation." PUBLIC ON)
+WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON)
 
 # Private options specific to the GTK+ port. Changing these options is
 # completely unsupported. They are intended for use only by WebKit developers.
@@ -382,6 +382,13 @@
     endif ()
 endif ()
 
+if (USE_WOFF2)
+    find_package(BrotliDec 1.0.1)
+    if (NOT BROTLIDEC_FOUND)
+       message(FATAL_ERROR "librotlidec is needed for USE_WOFF2.")
+    endif ()
+endif ()
+
 # Override the cached variables, gtk-doc and gobject-introspection do not really work when cross-building.
 if (CMAKE_CROSSCOMPILING)
     set(ENABLE_GTKDOC OFF)

Modified: trunk/Tools/ChangeLog (222906 => 222907)


--- trunk/Tools/ChangeLog	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Tools/ChangeLog	2017-10-05 09:32:58 UTC (rev 222907)
@@ -1,3 +1,13 @@
+2017-10-03  Frederic Wang  <fw...@igalia.com>
+
+        Remove Brotli from Source/ThirdParty
+        https://bugs.webkit.org/show_bug.cgi?id=177804
+
+        Reviewed by Michael Catanzaro.
+
+        * gtk/jhbuild.modules: Build brotli 1.0.1 from the official github repository.
+        * Scripts/webkitpy/style/checker.py: Remove brotli.
+
 2017-10-04  Alex Christensen  <achristen...@webkit.org>
 
         Stop linking with WebKitSystemInterface

Modified: trunk/Tools/Scripts/webkitpy/style/checker.py (222906 => 222907)


--- trunk/Tools/Scripts/webkitpy/style/checker.py	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Tools/Scripts/webkitpy/style/checker.py	2017-10-05 09:32:58 UTC (rev 222907)
@@ -213,7 +213,6 @@
     #
     ([os.path.join('webkitpy', 'thirdparty'),
       os.path.join('Source', 'ThirdParty', 'ANGLE'),
-      os.path.join('Source', 'ThirdParty', 'brotli'),
       os.path.join('Source', 'ThirdParty', 'woff2'),
       os.path.join('Source', 'ThirdParty', 'xdgmime')],
      ["-",

Modified: trunk/Tools/gtk/jhbuild.modules (222906 => 222907)


--- trunk/Tools/gtk/jhbuild.modules	2017-10-05 09:28:54 UTC (rev 222906)
+++ trunk/Tools/gtk/jhbuild.modules	2017-10-05 09:32:58 UTC (rev 222907)
@@ -7,6 +7,7 @@
 
   <metamodule id="webkitgtk-testing-dependencies">
     <dependencies>
+      <dep package="brotli"/>
       <dep package="cairo"/>
       <dep package="fonts"/>
       <dep package="dicts"/>
@@ -79,6 +80,10 @@
   <repository type="tarball" name="gnupg.org"
       href=""
 
+  <cmake id="brotli">
+    <branch repo="github.com" module="google/brotli.git" checkoutdir="brotli" tag="v1.0.1"/>
+  </cmake>
+
   <autotools id="cairo"
              autogen-sh="configure">
     <if condition-set="linux">
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to