[WPE][CMake] Add "dist" and "distcheck" targets
authoraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 16:00:24 +0000 (16:00 +0000)
committeraperez@igalia.com <aperez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Sep 2017 16:00:24 +0000 (16:00 +0000)
https://bugs.webkit.org/show_bug.cgi?id=176448

Reviewed by Carlos Garcia Campos.

Add "dist" and "distcheck" CMake targets, which create release tarballs.
These are available only when configuring with -DDEVELOPER_MODE=TRUE.

.:

* Source/PlatformWPE.cmake: Added.
* Source/cmake/FindXz.cmake: Added.

Tools:

* wpe/manifest.txt.in: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221734 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/PlatformWPE.cmake [new file with mode: 0644]
Source/cmake/FindXz.cmake [new file with mode: 0644]
Tools/ChangeLog
Tools/wpe/manifest.txt.in [new file with mode: 0644]

index 9025b5f..96c7ced 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2017-09-07  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE][CMake] Add "dist" and "distcheck" targets
+        https://bugs.webkit.org/show_bug.cgi?id=176448
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add "dist" and "distcheck" CMake targets, which create release tarballs.
+        These are available only when configuring with -DDEVELOPER_MODE=TRUE.
+
+        * Source/PlatformWPE.cmake: Added.
+        * Source/cmake/FindXz.cmake: Added.
+
 2017-09-05  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Wrong use of PLUGIN_ARCHITECTURE(X11) in several places
diff --git a/Source/PlatformWPE.cmake b/Source/PlatformWPE.cmake
new file mode 100644 (file)
index 0000000..21596bf
--- /dev/null
@@ -0,0 +1,44 @@
+if (DEVELOPER_MODE)
+    find_package(Xz REQUIRED)
+
+    configure_file(
+        ${TOOLS_DIR}/wpe/manifest.txt.in
+        ${CMAKE_BINARY_DIR}/manifest.txt
+    )
+
+    add_custom_target(distcheck
+        COMMENT "Checking release tarball: wpewebkit-${PROJECT_VERSION}.tar"
+        DEPENDS "${CMAKE_BINARY_DIR}/manifest.txt"
+                "${TOOLS_DIR}/gtk/make-dist.py"
+        COMMAND "${TOOLS_DIR}/gtk/make-dist.py"
+                "--check" "--port=WPE"
+                "--tarball-name=wpewebkit"
+                "--source-dir=${CMAKE_SOURCE_DIR}"
+                "--build-dir=${CMAKE_BINARY_DIR}"
+                "--version=${PROJECT_VERSION}"
+                "${CMAKE_BINARY_DIR}/manifest.txt"
+        COMMAND "${XZ_EXECUTABLE}" "-evfQ"
+                "${CMAKE_BINARY_DIR}/wpewebkit-${PROJECT_VERSION}.tar"
+        USES_TERMINAL
+    )
+
+    add_custom_command(
+        COMMENT "Creating release tarball: wpewebkit-${PROJECT_VERSION}.tar.xz"
+        OUTPUT "${CMAKE_BINARY_DIR}/wpewebkit-${PROJECT_VERSION}.tar.xz"
+        MAIN_DEPENDENCY "${CMAKE_BINARY_DIR}/manifest.txt"
+        DEPENDS "${TOOLS_DIR}/gtk/make-dist.py"
+        COMMAND "${TOOLS_DIR}/gtk/make-dist.py"
+                "--tarball-name=wpewebkit"
+                "--source-dir=${CMAKE_SOURCE_DIR}"
+                "--build-dir=${CMAKE_BINARY_DIR}"
+                "--version=${PROJECT_VERSION}"
+                "${CMAKE_BINARY_DIR}/manifest.txt"
+        COMMAND "${XZ_EXECUTABLE}" "-evfQ"
+                "${CMAKE_BINARY_DIR}/wpewebkit-${PROJECT_VERSION}.tar"
+        USES_TERMINAL
+    )
+
+    add_custom_target(dist
+        DEPENDS "${CMAKE_BINARY_DIR}/wpewebkit-${PROJECT_VERSION}.tar.xz"
+    )
+endif ()
diff --git a/Source/cmake/FindXz.cmake b/Source/cmake/FindXz.cmake
new file mode 100644 (file)
index 0000000..665e31a
--- /dev/null
@@ -0,0 +1,19 @@
+# - Find xz
+# This module looks for xz. This module defines the
+# following variables:
+#  XZ_EXECUTABLE
+#  XZ_FOUND
+
+include(FindCygwin)
+
+find_program(XZ_EXECUTABLE
+    xz
+    ${CYGWIN_INSTALL_PATH}/bin
+)
+
+# Handle the QUIETLY and REQUIRED arguments and set XZ_FOUND to TRUE if
+# all listed variables are TRUE.
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xz DEFAULT_MSG XZ_EXECUTABLE)
+
+mark_as_advanced(XZ_EXECUTABLE)
index 4a0a54d..6d20921 100644 (file)
@@ -1,3 +1,15 @@
+2017-09-07  Adrian Perez de Castro  <aperez@igalia.com>
+
+        [WPE][CMake] Add "dist" and "distcheck" targets
+        https://bugs.webkit.org/show_bug.cgi?id=176448
+
+        Reviewed by Carlos Garcia Campos.
+
+        Add "dist" and "distcheck" CMake targets, which create release tarballs.
+        These are available only when configuring with -DDEVELOPER_MODE=TRUE.
+
+        * wpe/manifest.txt.in: Added.
+
 2017-09-07  Per Arne Vollan  <pvollan@apple.com>
 
         [Win] Enable DatatransferItems in DRT.
diff --git a/Tools/wpe/manifest.txt.in b/Tools/wpe/manifest.txt.in
new file mode 100644 (file)
index 0000000..129e0b2
--- /dev/null
@@ -0,0 +1,95 @@
+# Global rules
+exclude #$
+exclude ChangeLog
+exclude CMakeLists.txt.user
+exclude Makefile
+exclude PlatformAppleWin.cmake
+exclude PlatformMac.cmake
+exclude PlatformGTK.cmake
+exclude PlatformWin.cmake
+exclude PlatformWinCairo.cmake
+exclude tags$
+exclude ~$
+exclude \.#$
+exclude \.bak$
+exclude \.cproject$
+exclude \.git$
+exclude \.gitattributes$
+exclude \.gitignore$
+exclude \.icns$
+exclude \.lproj$
+exclude \.m$
+exclude \.mm$
+exclude \.nib$
+exclude \.o$
+exclude \.order$
+exclude \.orig$
+exclude \.pdf$
+exclude \.plist$
+exclude \.project$
+exclude \.props$
+exclude \.pyc$
+exclude \.pyo$
+exclude \.rej$
+exclude \.rtf$
+exclude \.sb$
+exclude \.sb\.in$
+exclude \.settings$
+exclude \.svn$
+exclude \.sw[a-p]$
+exclude \.vcxproj$
+exclude \.xib$
+exclude \.xcconfig$
+exclude \.xcodeproj$
+
+# Exclude directories from other ports
+exclude .*\/(Configurations|mac|ios|cf|cg|cocoa|Cocoa|objc|avfoundation|ca|curl|win|gtk)\/.*$
+
+directory Source
+exclude Source/JavaScriptCore/tests
+exclude Source/ThirdParty/libwebrtc
+exclude Source/ThirdParty/qunit
+exclude Source/WebCore/platform/audio/resources
+exclude Source/WebCore/bindings/scripts/test
+exclude Source/WebCore/Resources
+exclude Source/WebKitLegacy/.*
+exclude Source/cmake/OptionsWinCairo.cmake$
+exclude Source/cmake/OptionsWindows.cmake$
+exclude Source/cmake/OptionsAppleWin.cmake$
+exclude Source/cmake/OptionsGTK.cmake$
+exclude Source/WebInspectorUI/Tools
+exclude Source/WebInspectorUI/UserInterface/Images
+
+exclude Source/WebKit/Resources
+
+# We do want to include the NEWS, but we want it to be in the root of the archive.
+# FIXME: No NEWS file for now.
+#file Source/WebKit/wpe/NEWS NEWS
+
+directory Source/WebInspectorUI/UserInterface/Images/gtk
+file Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js Source/WebCore/English.lproj/mediaControlsLocalizedStrings.js
+file Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js
+
+# Include only the resources we actually build
+file Source/WebCore/Resources/missingImage.png
+file Source/WebCore/Resources/missingImage@2x.png
+file Source/WebCore/Resources/panIcon.png
+file Source/WebCore/Resources/plugIns.js
+file Source/WebCore/Resources/textAreaResizeCorner.png
+file Source/WebCore/Resources/textAreaResizeCorner@2x.png
+file Source/WebCore/Resources/urlIcon.png
+file Source/WebCore/platform/audio/resources/Composite.wav
+
+directory Tools/wpe
+exclude Tools/wpe/patches
+exclude Tools/wpe/jhbuild.modules
+exclude Tools/wpe/jhbuildrc
+
+directory Tools/TestWebKitAPI
+
+file CMakeLists.txt
+file Tools/CMakeLists.txt
+
+# FIXME: We are not currently generating documentation for WPE.
+#directory ${CMAKE_BINARY_DIR}/Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html Documentation/webkit2gtk-${WEBKITGTK_API_VERSION}/html
+#directory ${CMAKE_BINARY_DIR}/Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html Documentation/webkitdomgtk-${WEBKITGTK_API_VERSION}/html