package/wpebackend-fdo: bump to version 1.2.0
authorAdrian Perez de Castro <aperez@igalia.com>
Mon, 20 May 2019 21:40:35 +0000 (00:40 +0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sun, 26 May 2019 12:34:56 +0000 (14:34 +0200)
WPE WebKit 2.24.x requires WPEBackend-fdo 1.2.x, as indicated at:

  https://wpewebkit.org/release/schedule/#compatible-components

The added patch makes the build system pick the version of
wayland-scanner from $(HOST_DIR), instead of the target version.

Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
Acked-by: Francois Perrad <francois.perrad@gadz.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/wpebackend-fdo/0001-Improve-how-CMake-looks-for-wayland-scanner.patch [new file with mode: 0644]
package/wpebackend-fdo/wpebackend-fdo.hash
package/wpebackend-fdo/wpebackend-fdo.mk

diff --git a/package/wpebackend-fdo/0001-Improve-how-CMake-looks-for-wayland-scanner.patch b/package/wpebackend-fdo/0001-Improve-how-CMake-looks-for-wayland-scanner.patch
new file mode 100644 (file)
index 0000000..d83902c
--- /dev/null
@@ -0,0 +1,137 @@
+From a03431fb562176d25919e76e0baf52a0ba3752c4 Mon Sep 17 00:00:00 2001
+From: Adrian Perez de Castro <aperez@igalia.com>
+Date: Wed, 15 May 2019 20:54:10 +0300
+Subject: [PATCH] Improve how CMake looks for wayland-scanner
+
+This improves FindWaylandScanner.cmake to allow it to find the
+wayland-scanner tool in any of the following ways (in order of
+preference):
+
+  1. By passing -DWAYLAND_SCANNER=path/to/wayland-scanner to CMake.
+  2. Looking for wayland-scanner in the current $PATH
+  3. Figuring out the location from pkg-config (as before).
+
+This will make the package friendlier to cross-compilation, and
+then build systems can either prepend their locations for host
+tools to $PATH (covered by 2. above), or they can specify the
+tool path in the command line (covered by 1. above) if they need
+to be more specific.
+
+The motivation for this patch is to avoid kludges like the following:
+
+  https://patchwork.ozlabs.org/comment/2172010/
+
+Signed-off-by: Adrian Perez de Castro <aperez@igalia.com>
+[Upstream status: https://github.com/Igalia/WPEBackend-fdo/pull/39]
+
+---
+ cmake/FindWaylandScanner.cmake | 93 ++++++++++++++++++++++++++++++----
+ 1 file changed, 84 insertions(+), 9 deletions(-)
+
+diff --git a/cmake/FindWaylandScanner.cmake b/cmake/FindWaylandScanner.cmake
+index 09a92b2..7130c10 100644
+--- a/cmake/FindWaylandScanner.cmake
++++ b/cmake/FindWaylandScanner.cmake
+@@ -28,15 +28,90 @@
+ # 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(WAYLAND_SCANNER wayland-scanner)
+-
+-pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
+-if (WAYLAND_SCANNER_VERSION VERSION_LESS "1.15")
+-    set(WAYLAND_SCANNER_CODE_ARG "code")
+-else ()
+-    set(WAYLAND_SCANNER_CODE_ARG "private-code")
++set(WAYLAND_SCANNER "" CACHE FILEPATH "Path to the wayland-scanner tool")
++
++function(wayland_scanner_get_version _result _exepath)
++    set(_version "")
++    set(_status -1)
++    if (EXISTS "${_exepath}")
++        execute_process(
++            COMMAND "${_exepath}" "--version"
++            RESULT_VARIABLE _status
++            ERROR_VARIABLE _version
++            ERROR_STRIP_TRAILING_WHITESPACE
++            OUTPUT_QUIET
++        )
++        if (_status EQUAL 0)
++            string(REPLACE "wayland-scanner" "" _version "${_version}")
++            string(STRIP "${_version}" _version)
++        endif ()
++    endif ()
++    if (_version)
++        set(${_result} "${_version}" PARENT_SCOPE)
++    else ()
++        unset(${_result} PARENT_SCOPE)
++    endif ()
++endfunction()
++
++#
++# Method 1: If -DWAYLAND_SCANNER=... was passed on the command line,
++#           check whether we can extract the version number from it.
++#           Otherwise: unset the variable, to try other methods below.
++#
++if (WAYLAND_SCANNER)
++    wayland_scanner_get_version(WAYLAND_SCANNER_VERSION "${WAYLAND_SCANNER}")
++    if (NOT WAYLAND_SCANNER_VERSION)
++        set(WAYLAND_SCANNER "")
++    endif ()
++endif ()
++
++#
++# Method 2: Try to find an executable program in the current $PATH.
++#
++if (NOT WAYLAND_SCANNER)
++    find_program(WAYLAND_SCANNER_EXECUTABLE NAMES wayland-scanner)
++    if (WAYLAND_SCANNER_EXECUTABLE)
++        wayland_scanner_get_version(WAYLAND_SCANNER_VERSION "${WAYLAND_SCANNER_EXECUTABLE}")
++        if (WAYLAND_SCANNER_VERSION)
++            set(WAYLAND_SCANNER "${WAYLAND_SCANNER_EXECUTABLE}")
++        endif ()
++    endif ()
++    unset(WAYLAND_SCANNER_EXECUTABLE)
++endif ()
++
++#
++# Method 3: Try to find the executable using pkg-config, in case the
++#           tool was installed in a non-standard location.
++#
++if (NOT DEFINED WAYLAND_SCANNER OR NOT WAYLAND_SCANNER)
++    find_package(PkgConfig)
++    pkg_check_modules(WAYLAND_SCANNER_PC wayland-scanner)
++    if (WAYLAND_SCANNER_PC_FOUND)
++        pkg_get_variable(WAYLAND_SCANNER_PC_EXECUTABLE wayland-scanner wayland_scanner)
++        if (WAYLAND_SCANNER_PC_EXECUTABLE)
++            wayland_scanner_get_version(WAYLAND_SCANNER_VERSION "${WAYLAND_SCANNER_PC_EXECUTABLE}")
++            if (WAYLAND_SCANNER_VERSION)
++                set(WAYLAND_SCANNER "${WAYLAND_SCANNER_PC_EXECUTABLE}")
++            endif ()
++        endif ()
++    endif ()
++    unset(WAYLAND_SCANNER_PC)
++    unset(WAYLAND_SCANNER_PC_EXECUTABLE)
++endif ()
++
++if (WAYLAND_SCANNER_VERSION)
++    if (WAYLAND_SCANNER_VERSION VERSION_LESS "1.15")
++        set(WAYLAND_SCANNER_CODE_ARG "code")
++    else ()
++        set(WAYLAND_SCANNER_CODE_ARG "private-code")
++    endif ()
+ endif ()
+ include(FindPackageHandleStandardArgs)
+-FIND_PACKAGE_HANDLE_STANDARD_ARGS(WAYLAND_SCANNER DEFAULT_MSG WAYLAND_SCANNER)
++FIND_PACKAGE_HANDLE_STANDARD_ARGS(
++    WAYLAND_SCANNER
++    DEFAULT_MSG
++    WAYLAND_SCANNER
++    WAYLAND_SCANNER_VERSION
++    WAYLAND_SCANNER_CODE_ARG
++)
+-- 
+2.21.0
+
index 6e6f9f0e3f42fce9f7e7e8ed4bc0a6b01498353e..4d89d1e16f3cec9c6a9031f603ead6af260f60e1 100644 (file)
@@ -1,7 +1,7 @@
-# From https://wpewebkit.org/releases/wpebackend-fdo-1.0.1.tar.xz.sums
-md5 2ee81a4212c18110a06a0c51c12e0d2e wpebackend-fdo-1.0.1.tar.xz
-sha1 cdc6ac95e302a2358204b766936a9bf8ef4f26f2 wpebackend-fdo-1.0.1.tar.xz
-sha256 15b8b1febea5d9c271e95c35b3c1e13f870712a54bc5f689cfdbb96e2f070fc8 wpebackend-fdo-1.0.1.tar.xz
+# From https://wpewebkit.org/releases/wpebackend-fdo-1.2.0.tar.xz.sums
+md5 74e1b2fc2bc19933b17ff4f8435f67cd wpebackend-fdo-1.2.0.tar.xz
+sha1 60559697512fd483c1d918b708a3d1d130b74a0a wpebackend-fdo-1.2.0.tar.xz
+sha256 b1bb261273772af8f7d96d94989fc2ed0445ec06c7eb21f47a1b94e52422ddd5 wpebackend-fdo-1.2.0.tar.xz
 
 # Hashes for license files:
 sha256 c9f6803371047fad3e72200ec6cd226329a5ee08ac61104c8211c2761fb46825 COPYING
index 5842861bac4c62002021b925c56cc9a7d79edcb4..15530ec45fe2444c1174d7ea99e431aa345deb6e 100644 (file)
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-WPEBACKEND_FDO_VERSION = 1.0.1
+WPEBACKEND_FDO_VERSION = 1.2.0
 WPEBACKEND_FDO_SITE = https://wpewebkit.org/releases
 WPEBACKEND_FDO_SOURCE = wpebackend-fdo-$(WPEBACKEND_FDO_VERSION).tar.xz
 WPEBACKEND_FDO_INSTALL_STAGING = YES