[arch-commits] Commit in webkit2gtk/trunk (PKGBUILD gcc7-memcpy.patch gcc7.patch)

Jan Steffens heftig at archlinux.org
Tue Jun 27 13:15:35 UTC 2017


    Date: Tuesday, June 27, 2017 @ 13:15:35
  Author: heftig
Revision: 299295

2.16.5-1

Added:
  webkit2gtk/trunk/gcc7.patch
    (from rev 299294, webkit2gtk/trunk/gcc7-memcpy.patch)
Modified:
  webkit2gtk/trunk/PKGBUILD
Deleted:
  webkit2gtk/trunk/gcc7-memcpy.patch

-------------------+
 PKGBUILD          |   31 ++++++++++++++-----------------
 gcc7-memcpy.patch |   34 ----------------------------------
 gcc7.patch        |   47 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 51 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-06-27 11:48:43 UTC (rev 299294)
+++ PKGBUILD	2017-06-27 13:15:35 UTC (rev 299295)
@@ -2,7 +2,7 @@
 # Contributor: Eric Bélanger <eric at archlinux.org>
 
 pkgname=webkit2gtk
-pkgver=2.16.4
+pkgver=2.16.5
 pkgrel=1
 pkgdesc="GTK+ Web content engine library"
 arch=(i686 x86_64)
@@ -10,18 +10,17 @@
 license=(custom)
 depends=(libxt libxslt enchant geoclue2 gst-plugins-base-libs
          libsecret libwebp harfbuzz-icu gtk3 libnotify hyphen)
-makedepends=(gtk2 gperf gobject-introspection ruby gtk-doc cmake python python2)
+makedepends=(gtk2 gperf gobject-introspection ruby gtk-doc cmake python python2 ninja)
 optdepends=('gtk2: Netscape plugin support'
             'gst-plugins-base: free media decoding'
             'gst-plugins-good: media decoding'
             'gst-libav: nonfree media decoding')
-options=(!emptydirs)
 source=(https://webkitgtk.org/releases/webkitgtk-${pkgver}.tar.xz{,.asc}
-        icu59.patch gcc7-memcpy.patch)
-sha256sums=('f9aba4338319bd539785345144e28c8027dc8cb526b2e443e0c8f2c0239f5128'
+        icu59.patch gcc7.patch)
+sha256sums=('8e0396f3428e757898c5856e642eed4fcd5a20ae03d96d3eaa03b76634be7dd4'
             'SKIP'
             'eb791b9c8dcb84996904846dedf8c3ddf1a5fde32330177f3f0071510bd8ca6d'
-            '025e36bef353f850598a9bd9d91bc1aa2e2f75db9f46c252ec2f861726299189')
+            '0c8e7e0b7cb4379d59eca4a93df84c984a44feb979ad1b6c1f964192290e25f5')
 validpgpkeys=('D7FCF61CF9A2DEAB31D81BD3F3D322D0EC4582C3')
 
 prepare() {
@@ -29,7 +28,7 @@
   cd webkitgtk-$pkgver
 
   patch -Np1 -i ../icu59.patch
-  patch -Np1 -i ../gcc7-memcpy.patch  # https://bugs.webkit.org/show_bug.cgi?id=173407
+  patch -Np1 -i ../gcc7.patch  # https://bugs.webkit.org/show_bug.cgi?id=173407
 
   sed -i '1s/python$/&2/' Tools/gtk/generate-gtkdoc
   rm -r Source/ThirdParty/gtest/
@@ -37,22 +36,20 @@
 
 build() {
   cd build
-  cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=Release \
+  cmake -G Ninja -DPORT=GTK -DCMAKE_BUILD_TYPE=Release \
         -DCMAKE_SKIP_RPATH=ON -DCMAKE_INSTALL_PREFIX=/usr \
         -DLIB_INSTALL_DIR=/usr/lib -DLIBEXEC_INSTALL_DIR=/usr/lib/webkit2gtk-4.0 \
         -DENABLE_GTKDOC=ON -DPYTHON_EXECUTABLE=/usr/bin/python2 ../webkitgtk-$pkgver
-  make
+  ninja
 }
 
 package() {
   cd build
-  make DESTDIR="$pkgdir" install
+  DESTDIR="$pkgdir" ninja install
 
-  install -m755 -d "$pkgdir/usr/share/licenses/webkit2gtk"
-  cd "$srcdir/webkitgtk-$pkgver/Source"
-  for f in $(find -name 'COPYING*' -or -name 'LICENSE*'); do
-    echo $f >> "$pkgdir/usr/share/licenses/webkit2gtk/LICENSE"
-    cat $f >> "$pkgdir/usr/share/licenses/webkit2gtk/LICENSE"
-    echo "" >> "$pkgdir/usr/share/licenses/webkit2gtk/LICENSE"
-  done
+  cd ../webkitgtk-$pkgver/Source
+  while IFS= read -d $'\0' -r _f; do
+    echo "### $_f ###"; cat "$_f"; echo
+  done < <(find . -name 'COPYING*' -or -name 'LICENSE*' -print0) \
+    | install -Dm644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
 }

Deleted: gcc7-memcpy.patch
===================================================================
--- gcc7-memcpy.patch	2017-06-27 11:48:43 UTC (rev 299294)
+++ gcc7-memcpy.patch	2017-06-27 13:15:35 UTC (rev 299295)
@@ -1,34 +0,0 @@
-diff -u -r webkitgtk-2.16.4/Source/WTF/wtf/text/StringImpl.h webkitgtk-2.16.4-memcpy/Source/WTF/wtf/text/StringImpl.h
---- webkitgtk-2.16.4/Source/WTF/wtf/text/StringImpl.h	2017-02-20 17:20:15.000000000 +0100
-+++ webkitgtk-2.16.4-memcpy/Source/WTF/wtf/text/StringImpl.h	2017-06-21 09:45:07.835653812 +0200
-@@ -581,29 +581,7 @@
-     // FIXME: Does this really belong in StringImpl?
-     template <typename T> static void copyChars(T* destination, const T* source, unsigned numCharacters)
-     {
--        if (numCharacters == 1) {
--            *destination = *source;
--            return;
--        }
--
--        if (numCharacters <= s_copyCharsInlineCutOff) {
--            unsigned i = 0;
--#if (CPU(X86) || CPU(X86_64))
--            const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T);
--
--            if (numCharacters > charsPerInt) {
--                unsigned stopCount = numCharacters & ~(charsPerInt - 1);
--
--                const uint32_t* srcCharacters = reinterpret_cast<const uint32_t*>(source);
--                uint32_t* destCharacters = reinterpret_cast<uint32_t*>(destination);
--                for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j)
--                    destCharacters[j] = srcCharacters[j];
--            }
--#endif
--            for (; i < numCharacters; ++i)
--                destination[i] = source[i];
--        } else
--            memcpy(destination, source, numCharacters * sizeof(T));
-+        memcpy(destination, source, numCharacters * sizeof(T));
-     }
- 
-     ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters)

Copied: webkit2gtk/trunk/gcc7.patch (from rev 299294, webkit2gtk/trunk/gcc7-memcpy.patch)
===================================================================
--- gcc7.patch	                        (rev 0)
+++ gcc7.patch	2017-06-27 13:15:35 UTC (rev 299295)
@@ -0,0 +1,47 @@
+diff -u -r webkitgtk-2.16.5/Source/cmake/OptionsCommon.cmake webkitgtk-2.16.5-gcc7/Source/cmake/OptionsCommon.cmake
+--- webkitgtk-2.16.5/Source/cmake/OptionsCommon.cmake	2017-05-06 10:48:27.000000000 +0200
++++ webkitgtk-2.16.5-gcc7/Source/cmake/OptionsCommon.cmake	2017-06-27 13:15:26.858090686 +0200
+@@ -38,7 +38,9 @@
+ define_property(TARGET PROPERTY FOLDER INHERITED BRIEF_DOCS "folder" FULL_DOCS "IDE folder name")
+ 
+ if (COMPILER_IS_GCC_OR_CLANG)
++    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-expansion-to-defined -Wno-implicit-fallthrough")
+     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-exceptions -fno-strict-aliasing")
++    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-expansion-to-defined -Wno-implicit-fallthrough")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-strict-aliasing -fno-rtti")
+     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y")
+ endif ()
+diff -u -r webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h
+--- webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h	2017-02-20 17:20:15.000000000 +0100
++++ webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h	2017-06-27 13:13:57.801527350 +0200
+@@ -581,29 +581,7 @@
+     // FIXME: Does this really belong in StringImpl?
+     template <typename T> static void copyChars(T* destination, const T* source, unsigned numCharacters)
+     {
+-        if (numCharacters == 1) {
+-            *destination = *source;
+-            return;
+-        }
+-
+-        if (numCharacters <= s_copyCharsInlineCutOff) {
+-            unsigned i = 0;
+-#if (CPU(X86) || CPU(X86_64))
+-            const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T);
+-
+-            if (numCharacters > charsPerInt) {
+-                unsigned stopCount = numCharacters & ~(charsPerInt - 1);
+-
+-                const uint32_t* srcCharacters = reinterpret_cast<const uint32_t*>(source);
+-                uint32_t* destCharacters = reinterpret_cast<uint32_t*>(destination);
+-                for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j)
+-                    destCharacters[j] = srcCharacters[j];
+-            }
+-#endif
+-            for (; i < numCharacters; ++i)
+-                destination[i] = source[i];
+-        } else
+-            memcpy(destination, source, numCharacters * sizeof(T));
++        memcpy(destination, source, numCharacters * sizeof(T));
+     }
+ 
+     ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters)



More information about the arch-commits mailing list