1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
|
Description: update ECMGeneratePkgConfigFile to latest version, fill in DESCRIPTION
Origin: upstream, https://github.com/annulen/webkit/commit/0325d51c4a2a05fb
Last-Update: 2018-01-09
--- a/Source/WebKit/PlatformQt.cmake
+++ b/Source/WebKit/PlatformQt.cmake
@@ -479,6 +479,7 @@
if (NOT MACOS_BUILD_FRAMEWORKS)
ecm_generate_pkgconfig_file(
BASE_NAME Qt5WebKit
+ DESCRIPTION "Qt WebKit module"
DEPS "${WEBKIT_PKGCONGIG_DEPS}"
FILENAME_VAR WebKit_PKGCONFIG_FILENAME
)
@@ -669,6 +670,7 @@
if (NOT MACOS_BUILD_FRAMEWORKS)
ecm_generate_pkgconfig_file(
BASE_NAME Qt5WebKitWidgets
+ DESCRIPTION "Qt WebKitWidgets module"
DEPS "${WEBKITWIDGETS_PKGCONFIG_DEPS}"
FILENAME_VAR WebKitWidgets_PKGCONFIG_FILENAME
)
--- a/Source/cmake/ECMGeneratePkgConfigFile.cmake
+++ b/Source/cmake/ECMGeneratePkgConfigFile.cmake
@@ -16,6 +16,7 @@
# [INCLUDE_INSTALL_DIR <dir>]
# [LIB_INSTALL_DIR <dir>]
# [DEFINES -D<variable=value>...]
+# [DESCRIPTION <library description>]
# [INSTALL])
#
# ``BASE_NAME`` is the name of the module. It's the name projects will use to
@@ -42,6 +43,10 @@
# ``DEFINES`` is a list of preprocessor defines that it is recommended users of
# the library pass to the compiler when using it.
#
+# ``DESCRIPTION`` describes what this library is. If it's not specified, CMake
+# will first try to get the description from the metainfo.yaml file or will
+# create one based on ``LIB_NAME``.
+#
# ``INSTALL`` will cause the module to be installed to the ``pkgconfig``
# subdirectory of ``LIB_INSTALL_DIR``, unless the ``ECM_PKGCONFIG_INSTALL_DIR``
# cache variable is set to something different. Note that the first call to
@@ -66,24 +71,39 @@
# )
#
# Since 1.3.0.
+# ``DESCRIPTION`` available since 5.1.41
+#
#=============================================================================
# Copyright 2014 Aleix Pol Gonzalez <aleixpol@kde.org>
# Copyright 2014 David Faure <faure@kde.org>
#
-# Distributed under the OSI-approved BSD License (the "License");
-# see accompanying file COPYING-CMAKE-SCRIPTS for details.
-#
-# This software is distributed WITHOUT ANY WARRANTY; without even the
-# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-# See the License for more information.
-#=============================================================================
-# (To distribute this file outside of extra-cmake-modules, substitute the full
-# License text for the above reference.)
+# 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 copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
function(ECM_GENERATE_PKGCONFIG_FILE)
set(options INSTALL)
- set(oneValueArgs BASE_NAME LIB_NAME FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
+ set(oneValueArgs BASE_NAME LIB_NAME FILENAME_VAR INCLUDE_INSTALL_DIR LIB_INSTALL_DIR DESCRIPTION)
set(multiValueArgs DEPS DEFINES)
cmake_parse_arguments(EGPF "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
@@ -119,6 +139,17 @@
set(EGPF_LIB_INSTALL_DIR "lib")
endif()
endif()
+ if(NOT EGPF_DESCRIPTION)
+ if(EXISTS ${CMAKE_SOURCE_DIR}/metainfo.yaml)
+ file(STRINGS "${CMAKE_SOURCE_DIR}/metainfo.yaml" _EGPF_METAINFO_DESCRIPTION_STRING REGEX "^description:.*$")
+ if(_EGPF_METAINFO_DESCRIPTION_STRING)
+ string(REGEX REPLACE "^description:[ ]*(.*)" "\\1" EGPF_DESCRIPTION ${_EGPF_METAINFO_DESCRIPTION_STRING})
+ endif()
+ endif()
+ if("${EGPF_DESCRIPTION}" STREQUAL "")
+ set(EGPF_DESCRIPTION "${EGPF_LIB_NAME} library.")
+ endif()
+ endif()
set(PKGCONFIG_TARGET_BASENAME ${EGPF_BASE_NAME})
set(PKGCONFIG_TARGET_LIBNAME ${EGPF_LIB_NAME})
@@ -135,6 +166,7 @@
else()
set(PKGCONFIG_TARGET_LIBS "${CMAKE_INSTALL_PREFIX}/${EGPF_LIB_INSTALL_DIR}")
endif()
+ set(PKGCONFIG_TARGET_DESCRIPTION "${EGPF_DESCRIPTION}")
set(PKGCONFIG_TARGET_DEFINES "")
if(EGPF_DEFINES)
set(PKGCONFIG_TARGET_DEFINES "${EGPF_DEFINE}")
@@ -148,6 +180,7 @@
file(WRITE ${PKGCONFIG_FILENAME}
"
Name: ${PKGCONFIG_TARGET_LIBNAME}
+Description: ${PKGCONFIG_TARGET_DESCRIPTION}
Version: ${PROJECT_VERSION}
Libs: -L${CMAKE_INSTALL_PREFIX}/${EGPF_LIB_INSTALL_DIR} -l${PKGCONFIG_TARGET_LIBNAME}
Cflags: ${PKGCONFIG_TARGET_INCLUDES} ${PKGCONFIG_TARGET_DEFINES}
@@ -156,8 +189,11 @@
)
if(EGPF_INSTALL)
- set(ECM_PKGCONFIG_INSTALL_DIR "${EGPF_LIB_INSTALL_DIR}/pkgconfig" CACHE PATH "The directory where pkgconfig will be installed to.")
+ if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ set(ECM_PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig" CACHE PATH "The directory where pkgconfig will be installed to.")
+ else()
+ set(ECM_PKGCONFIG_INSTALL_DIR "${EGPF_LIB_INSTALL_DIR}/pkgconfig" CACHE PATH "The directory where pkgconfig will be installed to.")
+ endif()
install(FILES ${PKGCONFIG_FILENAME} DESTINATION ${ECM_PKGCONFIG_INSTALL_DIR})
endif()
endfunction()
-
|