[arch-commits] Commit in cmake/repos/extra-x86_64 (4 files)
Antonio Rojas
arojas at gemini.archlinux.org
Thu Jul 28 21:55:30 UTC 2022
Date: Thursday, July 28, 2022 @ 21:55:30
Author: arojas
Revision: 451725
archrelease: copy trunk to extra-x86_64
Added:
cmake/repos/extra-x86_64/PKGBUILD
(from rev 451724, cmake/trunk/PKGBUILD)
cmake/repos/extra-x86_64/wxwidgets-3.2.patch
(from rev 451724, cmake/trunk/wxwidgets-3.2.patch)
Deleted:
cmake/repos/extra-x86_64/PKGBUILD
cmake/repos/extra-x86_64/wxwidgets-3.2.patch
---------------------+
PKGBUILD | 90 +++----
wxwidgets-3.2.patch | 606 +++++++++++++++++++++++++-------------------------
2 files changed, 348 insertions(+), 348 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2022-07-28 21:55:20 UTC (rev 451724)
+++ PKGBUILD 2022-07-28 21:55:30 UTC (rev 451725)
@@ -1,45 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-# Contributor: Pierre Schmitz <pierre at archlinux.de>
-
-pkgname=cmake
-pkgver=3.23.2
-pkgrel=2
-pkgdesc='A cross-platform open-source make system'
-arch=('x86_64')
-url="https://www.cmake.org/"
-license=('custom')
-depends=('curl' 'libarchive' 'hicolor-icon-theme' 'jsoncpp' 'libjsoncpp.so' 'libuv' 'rhash')
-makedepends=('qt6-base' 'python-sphinx' 'emacs')
-optdepends=('qt6-base: cmake-gui')
-source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
- wxwidgets-3.2.patch)
-sha512sums=('0925adf973d642fd76d4089b61b3882babb0a85050c4c57d5f5f3bd6b17564a9feb0beed236cd636e25f69072fa30b67ea3f80932380b6b6576f2dd78b8e6931'
- '618a529fcd0a5029160fc6ef74439b7cb54ca74d13d52dd6cad005710bf1be263d0bf90bc4becc63a37929ac2f86c51278685e9da93fd82355ac646cb43b356f')
-
-prepare() {
- patch -d $pkgname-$pkgver -p1 < wxwidgets-3.2.patch # Support wxWidgets 3.2
-}
-
-build() {
- cd ${pkgname}-${pkgver}
- ./bootstrap --prefix=/usr \
- --mandir=/share/man \
- --docdir=/share/doc/cmake \
- --datadir=/share/cmake \
- --sphinx-man \
- --sphinx-html \
- --system-libs \
- --qt-gui \
- --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
- make
-}
-
-package() {
- cd ${pkgname}-${pkgver}
- make DESTDIR="${pkgdir}" install
-
- rm -r "$pkgdir"/usr/share/doc/cmake/html/_sources
- emacs -batch -f batch-byte-compile "${pkgdir}"/usr/share/emacs/site-lisp/cmake-mode.el
- install -Dm644 Copyright.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
-}
Copied: cmake/repos/extra-x86_64/PKGBUILD (from rev 451724, cmake/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2022-07-28 21:55:30 UTC (rev 451725)
@@ -0,0 +1,45 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Pierre Schmitz <pierre at archlinux.de>
+
+pkgname=cmake
+pkgver=3.23.3
+pkgrel=1
+pkgdesc='A cross-platform open-source make system'
+arch=('x86_64')
+url="https://www.cmake.org/"
+license=('custom')
+depends=('curl' 'libarchive' 'hicolor-icon-theme' 'jsoncpp' 'libjsoncpp.so' 'libuv' 'rhash')
+makedepends=('qt6-base' 'python-sphinx' 'emacs')
+optdepends=('qt6-base: cmake-gui')
+source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
+ wxwidgets-3.2.patch)
+sha512sums=('75f86abe60ef28ba9bd06546c0c24578921621fb4be942171e629366a759cf1469e430945addc85f8ce977920883c063ed26de1b78fd24dfd98d0eb604800632'
+ '618a529fcd0a5029160fc6ef74439b7cb54ca74d13d52dd6cad005710bf1be263d0bf90bc4becc63a37929ac2f86c51278685e9da93fd82355ac646cb43b356f')
+
+prepare() {
+ patch -d $pkgname-$pkgver -p1 < wxwidgets-3.2.patch # Support wxWidgets 3.2
+}
+
+build() {
+ cd ${pkgname}-${pkgver}
+ ./bootstrap --prefix=/usr \
+ --mandir=/share/man \
+ --docdir=/share/doc/cmake \
+ --datadir=/share/cmake \
+ --sphinx-man \
+ --sphinx-html \
+ --system-libs \
+ --qt-gui \
+ --parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
+ make
+}
+
+package() {
+ cd ${pkgname}-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ rm -r "$pkgdir"/usr/share/doc/cmake/html/_sources
+ emacs -batch -f batch-byte-compile "${pkgdir}"/usr/share/emacs/site-lisp/cmake-mode.el
+ install -Dm644 Copyright.txt "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+}
Deleted: wxwidgets-3.2.patch
===================================================================
--- wxwidgets-3.2.patch 2022-07-28 21:55:20 UTC (rev 451724)
+++ wxwidgets-3.2.patch 2022-07-28 21:55:30 UTC (rev 451725)
@@ -1,303 +0,0 @@
-From ed51e0bb752ecaae29c4ac7a6a89ebfbe5fb4016 Mon Sep 17 00:00:00 2001
-From: Maarten Bent <MaartenBent at users.noreply.github.com>
-Date: Wed, 15 Jun 2022 18:23:41 +0200
-Subject: [PATCH 1/3] FindwxWidgets: Move extracting version number to a macro
-
----
- Modules/FindwxWidgets.cmake | 44 ++++++++++++++++++++-----------------
- 1 file changed, 24 insertions(+), 20 deletions(-)
-
-diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
-index f7996bacb0..accae50e80 100644
---- a/Modules/FindwxWidgets.cmake
-+++ b/Modules/FindwxWidgets.cmake
-@@ -215,6 +215,29 @@ else()
- set(wxWidgets_USE_FILE UsewxWidgets)
- endif()
-
-+macro(wx_extract_version)
-+ unset(_wx_filename)
-+ find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
-+ dbg_msg("_wx_filename: ${_wx_filename}")
-+
-+ if(NOT _wx_filename)
-+ message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.")
-+ endif()
-+
-+ file(READ "${_wx_filename}" _wx_version_h)
-+ unset(_wx_filename CACHE)
-+
-+ string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*"
-+ "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" )
-+ string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*"
-+ "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
-+ string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
-+ "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
-+ set(wxWidgets_VERSION_STRING
-+ "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
-+ dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
-+endmacro()
-+
- #=====================================================================
- # Determine whether unix or win32 paths should be used
- #=====================================================================
-@@ -981,26 +1004,7 @@ unset(_wx_lib_missing)
-
- # Check if a specific version was requested by find_package().
- if(wxWidgets_FOUND)
-- unset(_wx_filename)
-- find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
-- dbg_msg("_wx_filename: ${_wx_filename}")
--
-- if(NOT _wx_filename)
-- message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.")
-- endif()
--
-- file(READ "${_wx_filename}" _wx_version_h)
-- unset(_wx_filename CACHE)
--
-- string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*"
-- "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" )
-- string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*"
-- "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
-- string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
-- "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
-- set(wxWidgets_VERSION_STRING
-- "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
-- dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
-+ wx_extract_version()
- endif()
-
- # Debug output:
---
-GitLab
-
-
-From 853449429dec94d64bd0c0cfd41d0104416210df Mon Sep 17 00:00:00 2001
-From: Maarten Bent <MaartenBent at users.noreply.github.com>
-Date: Wed, 15 Jun 2022 18:26:08 +0200
-Subject: [PATCH 2/3] FindwxWidgets: Use version number from header for library
- names
-
----
- Modules/FindwxWidgets.cmake | 47 ++++++++++---------------------------
- 1 file changed, 12 insertions(+), 35 deletions(-)
-
-diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
-index accae50e80..3567a62df0 100644
---- a/Modules/FindwxWidgets.cmake
-+++ b/Modules/FindwxWidgets.cmake
-@@ -292,10 +292,11 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
- #
- # Find libraries associated to a configuration.
- #
-- macro(WX_FIND_LIBS _PF _UNV _UCD _DBG)
-+ macro(WX_FIND_LIBS _PF _UNV _UCD _DBG _VER)
- DBG_MSG_V("m_unv = ${_UNV}")
- DBG_MSG_V("m_ucd = ${_UCD}")
- DBG_MSG_V("m_dbg = ${_DBG}")
-+ DBG_MSG_V("m_ver = ${_VER}")
-
- # FIXME: What if both regex libs are available. regex should be
- # found outside the loop and only wx${LIB}${_UCD}${_DBG}.
-@@ -313,28 +314,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
-
- # Find wxWidgets multilib base libraries.
- find_library(WX_base${_DBG}
-- NAMES
-- wxbase31${_UCD}${_DBG}
-- wxbase30${_UCD}${_DBG}
-- wxbase29${_UCD}${_DBG}
-- wxbase28${_UCD}${_DBG}
-- wxbase27${_UCD}${_DBG}
-- wxbase26${_UCD}${_DBG}
-- wxbase25${_UCD}${_DBG}
-+ NAMES wxbase${_VER}${_UCD}${_DBG}
- PATHS ${WX_LIB_DIR}
- NO_DEFAULT_PATH
- )
- mark_as_advanced(WX_base${_DBG})
- foreach(LIB net odbc xml)
- find_library(WX_${LIB}${_DBG}
-- NAMES
-- wxbase31${_UCD}${_DBG}_${LIB}
-- wxbase30${_UCD}${_DBG}_${LIB}
-- wxbase29${_UCD}${_DBG}_${LIB}
-- wxbase28${_UCD}${_DBG}_${LIB}
-- wxbase27${_UCD}${_DBG}_${LIB}
-- wxbase26${_UCD}${_DBG}_${LIB}
-- wxbase25${_UCD}${_DBG}_${LIB}
-+ NAMES wxbase${_VER}${_UCD}${_DBG}_${LIB}
- PATHS ${WX_LIB_DIR}
- NO_DEFAULT_PATH
- )
-@@ -343,14 +330,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
-
- # Find wxWidgets monolithic library.
- find_library(WX_mono${_DBG}
-- NAMES
-- wx${_PF}${_UNV}31${_UCD}${_DBG}
-- wx${_PF}${_UNV}30${_UCD}${_DBG}
-- wx${_PF}${_UNV}29${_UCD}${_DBG}
-- wx${_PF}${_UNV}28${_UCD}${_DBG}
-- wx${_PF}${_UNV}27${_UCD}${_DBG}
-- wx${_PF}${_UNV}26${_UCD}${_DBG}
-- wx${_PF}${_UNV}25${_UCD}${_DBG}
-+ NAMES wx${_PF}${_UNV}${_VER}${_UCD}${_DBG}
- PATHS ${WX_LIB_DIR}
- NO_DEFAULT_PATH
- )
-@@ -360,14 +340,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
- foreach(LIB core adv aui html media xrc dbgrid gl qa richtext
- stc ribbon propgrid webview)
- find_library(WX_${LIB}${_DBG}
-- NAMES
-- wx${_PF}${_UNV}31${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}30${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}29${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}28${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}27${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}26${_UCD}${_DBG}_${LIB}
-- wx${_PF}${_UNV}25${_UCD}${_DBG}_${LIB}
-+ NAMES wx${_PF}${_UNV}${_VER}${_UCD}${_DBG}_${LIB}
- PATHS ${WX_LIB_DIR}
- NO_DEFAULT_PATH
- )
-@@ -678,10 +651,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
- set(wxWidgets_FOUND FALSE)
- endif()
-
-+ # Get version number.
-+ wx_extract_version()
-+ set(VER "${wxWidgets_VERSION_MAJOR}${wxWidgets_VERSION_MINOR}")
-+
- # Find wxWidgets libraries.
-- WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}")
-+ WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}" "${VER}")
- if(WX_USE_REL_AND_DBG)
-- WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "d")
-+ WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "d" "${VER}")
- endif()
-
- # Settings for requested libs (i.e., include dir, libraries, etc.).
---
-GitLab
-
-
-From 2a19231d618482755e9aae981a65680bb1ec1050 Mon Sep 17 00:00:00 2001
-From: Maarten Bent <MaartenBent at users.noreply.github.com>
-Date: Wed, 15 Jun 2022 18:28:00 +0200
-Subject: [PATCH 3/3] FindwxWidgets: Support more wxWidgets versions, including
- 3.2
-
-Update the example to use a more recent wxWidgets version.
-
-Use a list with known version numbers when searching for installation directories and wx-config names.
----
- Modules/FindwxWidgets.cmake | 58 ++++++++++++-------------------------
- 1 file changed, 18 insertions(+), 40 deletions(-)
-
-diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
-index 3567a62df0..9e7937e2ea 100644
---- a/Modules/FindwxWidgets.cmake
-+++ b/Modules/FindwxWidgets.cmake
-@@ -29,9 +29,9 @@ select a configuration):
- ::
-
- wxWidgets_ROOT_DIR - Base wxWidgets directory
-- (e.g., C:/wxWidgets-2.6.3).
-+ (e.g., C:/wxWidgets-3.2.0).
- wxWidgets_LIB_DIR - Path to wxWidgets libraries
-- (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
-+ (e.g., C:/wxWidgets-3.2.0/lib/vc_x64_lib).
- wxWidgets_CONFIGURATION - Configuration to use
- (e.g., msw, mswd, mswu, mswunivud, etc.)
- wxWidgets_EXCLUDE_COMMON_LIBRARIES
-@@ -215,6 +215,9 @@ else()
- set(wxWidgets_USE_FILE UsewxWidgets)
- endif()
-
-+# Known wxWidgets versions.
-+set(wx_versions 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5)
-+
- macro(wx_extract_version)
- unset(_wx_filename)
- find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
-@@ -443,6 +446,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
- # WIN32: Start actual work.
- #-------------------------------------------------------------------
-
-+ set(wx_paths "wxWidgets")
-+ foreach(version ${wx_versions})
-+ foreach(patch RANGE 15 0 -1)
-+ list(APPEND wx_paths "wxWidgets-${version}.${patch}")
-+ endforeach()
-+ endforeach()
-+
- # Look for an installation tree.
- find_path(wxWidgets_ROOT_DIR
- NAMES include/wx/wx.h
-@@ -454,41 +464,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
- D:/
- ENV ProgramFiles
- PATH_SUFFIXES
-- wxWidgets-3.1.0
-- wxWidgets-3.0.2
-- wxWidgets-3.0.1
-- wxWidgets-3.0.0
-- wxWidgets-2.9.5
-- wxWidgets-2.9.4
-- wxWidgets-2.9.3
-- wxWidgets-2.9.2
-- wxWidgets-2.9.1
-- wxWidgets-2.9.0
-- wxWidgets-2.8.9
-- wxWidgets-2.8.8
-- wxWidgets-2.8.7
-- wxWidgets-2.8.6
-- wxWidgets-2.8.5
-- wxWidgets-2.8.4
-- wxWidgets-2.8.3
-- wxWidgets-2.8.2
-- wxWidgets-2.8.1
-- wxWidgets-2.8.0
-- wxWidgets-2.7.4
-- wxWidgets-2.7.3
-- wxWidgets-2.7.2
-- wxWidgets-2.7.1
-- wxWidgets-2.7.0
-- wxWidgets-2.7.0-1
-- wxWidgets-2.6.4
-- wxWidgets-2.6.3
-- wxWidgets-2.6.2
-- wxWidgets-2.6.1
-- wxWidgets-2.5.4
-- wxWidgets-2.5.3
-- wxWidgets-2.5.2
-- wxWidgets-2.5.1
-- wxWidgets
-+ ${wx_paths}
- DOC "wxWidgets base/installation directory"
- )
-
-@@ -773,12 +749,14 @@ else()
- # Look for wx-config -- this can be set in the environment,
- # or try versioned and toolchain-versioned variants of the -config
- # executable as well.
-+ set(wx_config_names "wx-config")
-+ foreach(version ${wx_versions})
-+ list(APPEND wx_config_names "wx-config-${version}" "wxgtk3u-${version}-config" "wxgtk2u-${version}-config")
-+ endforeach()
- find_program(wxWidgets_CONFIG_EXECUTABLE
- NAMES
- $ENV{WX_CONFIG}
-- wx-config
-- wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8
-- wxgtk3u-3.1-config wxgtk3u-3.0-config wxgtk2u-2.8-config
-+ ${wx_config_names}
- DOC "Location of wxWidgets library configuration provider binary (wx-config)."
- ONLY_CMAKE_FIND_ROOT_PATH
- )
---
-GitLab
-
Copied: cmake/repos/extra-x86_64/wxwidgets-3.2.patch (from rev 451724, cmake/trunk/wxwidgets-3.2.patch)
===================================================================
--- wxwidgets-3.2.patch (rev 0)
+++ wxwidgets-3.2.patch 2022-07-28 21:55:30 UTC (rev 451725)
@@ -0,0 +1,303 @@
+From ed51e0bb752ecaae29c4ac7a6a89ebfbe5fb4016 Mon Sep 17 00:00:00 2001
+From: Maarten Bent <MaartenBent at users.noreply.github.com>
+Date: Wed, 15 Jun 2022 18:23:41 +0200
+Subject: [PATCH 1/3] FindwxWidgets: Move extracting version number to a macro
+
+---
+ Modules/FindwxWidgets.cmake | 44 ++++++++++++++++++++-----------------
+ 1 file changed, 24 insertions(+), 20 deletions(-)
+
+diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
+index f7996bacb0..accae50e80 100644
+--- a/Modules/FindwxWidgets.cmake
++++ b/Modules/FindwxWidgets.cmake
+@@ -215,6 +215,29 @@ else()
+ set(wxWidgets_USE_FILE UsewxWidgets)
+ endif()
+
++macro(wx_extract_version)
++ unset(_wx_filename)
++ find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
++ dbg_msg("_wx_filename: ${_wx_filename}")
++
++ if(NOT _wx_filename)
++ message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.")
++ endif()
++
++ file(READ "${_wx_filename}" _wx_version_h)
++ unset(_wx_filename CACHE)
++
++ string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*"
++ "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" )
++ string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*"
++ "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
++ string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
++ "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
++ set(wxWidgets_VERSION_STRING
++ "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
++ dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
++endmacro()
++
+ #=====================================================================
+ # Determine whether unix or win32 paths should be used
+ #=====================================================================
+@@ -981,26 +1004,7 @@ unset(_wx_lib_missing)
+
+ # Check if a specific version was requested by find_package().
+ if(wxWidgets_FOUND)
+- unset(_wx_filename)
+- find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
+- dbg_msg("_wx_filename: ${_wx_filename}")
+-
+- if(NOT _wx_filename)
+- message(FATAL_ERROR "wxWidgets wx/version.h file not found in ${wxWidgets_INCLUDE_DIRS}.")
+- endif()
+-
+- file(READ "${_wx_filename}" _wx_version_h)
+- unset(_wx_filename CACHE)
+-
+- string(REGEX REPLACE "^(.*\n)?#define +wxMAJOR_VERSION +([0-9]+).*"
+- "\\2" wxWidgets_VERSION_MAJOR "${_wx_version_h}" )
+- string(REGEX REPLACE "^(.*\n)?#define +wxMINOR_VERSION +([0-9]+).*"
+- "\\2" wxWidgets_VERSION_MINOR "${_wx_version_h}" )
+- string(REGEX REPLACE "^(.*\n)?#define +wxRELEASE_NUMBER +([0-9]+).*"
+- "\\2" wxWidgets_VERSION_PATCH "${_wx_version_h}" )
+- set(wxWidgets_VERSION_STRING
+- "${wxWidgets_VERSION_MAJOR}.${wxWidgets_VERSION_MINOR}.${wxWidgets_VERSION_PATCH}" )
+- dbg_msg("wxWidgets_VERSION_STRING: ${wxWidgets_VERSION_STRING}")
++ wx_extract_version()
+ endif()
+
+ # Debug output:
+--
+GitLab
+
+
+From 853449429dec94d64bd0c0cfd41d0104416210df Mon Sep 17 00:00:00 2001
+From: Maarten Bent <MaartenBent at users.noreply.github.com>
+Date: Wed, 15 Jun 2022 18:26:08 +0200
+Subject: [PATCH 2/3] FindwxWidgets: Use version number from header for library
+ names
+
+---
+ Modules/FindwxWidgets.cmake | 47 ++++++++++---------------------------
+ 1 file changed, 12 insertions(+), 35 deletions(-)
+
+diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
+index accae50e80..3567a62df0 100644
+--- a/Modules/FindwxWidgets.cmake
++++ b/Modules/FindwxWidgets.cmake
+@@ -292,10 +292,11 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+ #
+ # Find libraries associated to a configuration.
+ #
+- macro(WX_FIND_LIBS _PF _UNV _UCD _DBG)
++ macro(WX_FIND_LIBS _PF _UNV _UCD _DBG _VER)
+ DBG_MSG_V("m_unv = ${_UNV}")
+ DBG_MSG_V("m_ucd = ${_UCD}")
+ DBG_MSG_V("m_dbg = ${_DBG}")
++ DBG_MSG_V("m_ver = ${_VER}")
+
+ # FIXME: What if both regex libs are available. regex should be
+ # found outside the loop and only wx${LIB}${_UCD}${_DBG}.
+@@ -313,28 +314,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+
+ # Find wxWidgets multilib base libraries.
+ find_library(WX_base${_DBG}
+- NAMES
+- wxbase31${_UCD}${_DBG}
+- wxbase30${_UCD}${_DBG}
+- wxbase29${_UCD}${_DBG}
+- wxbase28${_UCD}${_DBG}
+- wxbase27${_UCD}${_DBG}
+- wxbase26${_UCD}${_DBG}
+- wxbase25${_UCD}${_DBG}
++ NAMES wxbase${_VER}${_UCD}${_DBG}
+ PATHS ${WX_LIB_DIR}
+ NO_DEFAULT_PATH
+ )
+ mark_as_advanced(WX_base${_DBG})
+ foreach(LIB net odbc xml)
+ find_library(WX_${LIB}${_DBG}
+- NAMES
+- wxbase31${_UCD}${_DBG}_${LIB}
+- wxbase30${_UCD}${_DBG}_${LIB}
+- wxbase29${_UCD}${_DBG}_${LIB}
+- wxbase28${_UCD}${_DBG}_${LIB}
+- wxbase27${_UCD}${_DBG}_${LIB}
+- wxbase26${_UCD}${_DBG}_${LIB}
+- wxbase25${_UCD}${_DBG}_${LIB}
++ NAMES wxbase${_VER}${_UCD}${_DBG}_${LIB}
+ PATHS ${WX_LIB_DIR}
+ NO_DEFAULT_PATH
+ )
+@@ -343,14 +330,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+
+ # Find wxWidgets monolithic library.
+ find_library(WX_mono${_DBG}
+- NAMES
+- wx${_PF}${_UNV}31${_UCD}${_DBG}
+- wx${_PF}${_UNV}30${_UCD}${_DBG}
+- wx${_PF}${_UNV}29${_UCD}${_DBG}
+- wx${_PF}${_UNV}28${_UCD}${_DBG}
+- wx${_PF}${_UNV}27${_UCD}${_DBG}
+- wx${_PF}${_UNV}26${_UCD}${_DBG}
+- wx${_PF}${_UNV}25${_UCD}${_DBG}
++ NAMES wx${_PF}${_UNV}${_VER}${_UCD}${_DBG}
+ PATHS ${WX_LIB_DIR}
+ NO_DEFAULT_PATH
+ )
+@@ -360,14 +340,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+ foreach(LIB core adv aui html media xrc dbgrid gl qa richtext
+ stc ribbon propgrid webview)
+ find_library(WX_${LIB}${_DBG}
+- NAMES
+- wx${_PF}${_UNV}31${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}30${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}29${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}28${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}27${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}26${_UCD}${_DBG}_${LIB}
+- wx${_PF}${_UNV}25${_UCD}${_DBG}_${LIB}
++ NAMES wx${_PF}${_UNV}${_VER}${_UCD}${_DBG}_${LIB}
+ PATHS ${WX_LIB_DIR}
+ NO_DEFAULT_PATH
+ )
+@@ -678,10 +651,14 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+ set(wxWidgets_FOUND FALSE)
+ endif()
+
++ # Get version number.
++ wx_extract_version()
++ set(VER "${wxWidgets_VERSION_MAJOR}${wxWidgets_VERSION_MINOR}")
++
+ # Find wxWidgets libraries.
+- WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}")
++ WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "${DBG}" "${VER}")
+ if(WX_USE_REL_AND_DBG)
+- WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "d")
++ WX_FIND_LIBS("${PF}" "${UNV}" "${UCD}" "d" "${VER}")
+ endif()
+
+ # Settings for requested libs (i.e., include dir, libraries, etc.).
+--
+GitLab
+
+
+From 2a19231d618482755e9aae981a65680bb1ec1050 Mon Sep 17 00:00:00 2001
+From: Maarten Bent <MaartenBent at users.noreply.github.com>
+Date: Wed, 15 Jun 2022 18:28:00 +0200
+Subject: [PATCH 3/3] FindwxWidgets: Support more wxWidgets versions, including
+ 3.2
+
+Update the example to use a more recent wxWidgets version.
+
+Use a list with known version numbers when searching for installation directories and wx-config names.
+---
+ Modules/FindwxWidgets.cmake | 58 ++++++++++++-------------------------
+ 1 file changed, 18 insertions(+), 40 deletions(-)
+
+diff --git a/Modules/FindwxWidgets.cmake b/Modules/FindwxWidgets.cmake
+index 3567a62df0..9e7937e2ea 100644
+--- a/Modules/FindwxWidgets.cmake
++++ b/Modules/FindwxWidgets.cmake
+@@ -29,9 +29,9 @@ select a configuration):
+ ::
+
+ wxWidgets_ROOT_DIR - Base wxWidgets directory
+- (e.g., C:/wxWidgets-2.6.3).
++ (e.g., C:/wxWidgets-3.2.0).
+ wxWidgets_LIB_DIR - Path to wxWidgets libraries
+- (e.g., C:/wxWidgets-2.6.3/lib/vc_lib).
++ (e.g., C:/wxWidgets-3.2.0/lib/vc_x64_lib).
+ wxWidgets_CONFIGURATION - Configuration to use
+ (e.g., msw, mswd, mswu, mswunivud, etc.)
+ wxWidgets_EXCLUDE_COMMON_LIBRARIES
+@@ -215,6 +215,9 @@ else()
+ set(wxWidgets_USE_FILE UsewxWidgets)
+ endif()
+
++# Known wxWidgets versions.
++set(wx_versions 3.3 3.2 3.1 3.0 2.9 2.8 2.7 2.6 2.5)
++
+ macro(wx_extract_version)
+ unset(_wx_filename)
+ find_file(_wx_filename wx/version.h PATHS ${wxWidgets_INCLUDE_DIRS} NO_DEFAULT_PATH)
+@@ -443,6 +446,13 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+ # WIN32: Start actual work.
+ #-------------------------------------------------------------------
+
++ set(wx_paths "wxWidgets")
++ foreach(version ${wx_versions})
++ foreach(patch RANGE 15 0 -1)
++ list(APPEND wx_paths "wxWidgets-${version}.${patch}")
++ endforeach()
++ endforeach()
++
+ # Look for an installation tree.
+ find_path(wxWidgets_ROOT_DIR
+ NAMES include/wx/wx.h
+@@ -454,41 +464,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
+ D:/
+ ENV ProgramFiles
+ PATH_SUFFIXES
+- wxWidgets-3.1.0
+- wxWidgets-3.0.2
+- wxWidgets-3.0.1
+- wxWidgets-3.0.0
+- wxWidgets-2.9.5
+- wxWidgets-2.9.4
+- wxWidgets-2.9.3
+- wxWidgets-2.9.2
+- wxWidgets-2.9.1
+- wxWidgets-2.9.0
+- wxWidgets-2.8.9
+- wxWidgets-2.8.8
+- wxWidgets-2.8.7
+- wxWidgets-2.8.6
+- wxWidgets-2.8.5
+- wxWidgets-2.8.4
+- wxWidgets-2.8.3
+- wxWidgets-2.8.2
+- wxWidgets-2.8.1
+- wxWidgets-2.8.0
+- wxWidgets-2.7.4
+- wxWidgets-2.7.3
+- wxWidgets-2.7.2
+- wxWidgets-2.7.1
+- wxWidgets-2.7.0
+- wxWidgets-2.7.0-1
+- wxWidgets-2.6.4
+- wxWidgets-2.6.3
+- wxWidgets-2.6.2
+- wxWidgets-2.6.1
+- wxWidgets-2.5.4
+- wxWidgets-2.5.3
+- wxWidgets-2.5.2
+- wxWidgets-2.5.1
+- wxWidgets
++ ${wx_paths}
+ DOC "wxWidgets base/installation directory"
+ )
+
+@@ -773,12 +749,14 @@ else()
+ # Look for wx-config -- this can be set in the environment,
+ # or try versioned and toolchain-versioned variants of the -config
+ # executable as well.
++ set(wx_config_names "wx-config")
++ foreach(version ${wx_versions})
++ list(APPEND wx_config_names "wx-config-${version}" "wxgtk3u-${version}-config" "wxgtk2u-${version}-config")
++ endforeach()
+ find_program(wxWidgets_CONFIG_EXECUTABLE
+ NAMES
+ $ENV{WX_CONFIG}
+- wx-config
+- wx-config-3.1 wx-config-3.0 wx-config-2.9 wx-config-2.8
+- wxgtk3u-3.1-config wxgtk3u-3.0-config wxgtk2u-2.8-config
++ ${wx_config_names}
+ DOC "Location of wxWidgets library configuration provider binary (wx-config)."
+ ONLY_CMAKE_FIND_ROOT_PATH
+ )
+--
+GitLab
+
More information about the arch-commits
mailing list