wxWidgets-gtk3: update to 3.2.2.1, transition from wxWidgets

This commit is contained in:
Andrew J. Hesford 2023-09-25 00:04:33 -04:00
parent f04b3954b6
commit 99996d8f99
12 changed files with 267 additions and 56 deletions

View File

@ -1559,9 +1559,6 @@ libofx.so.7 libofx-0.10.1_1
libsigsegv.so.2 libsigsegv-2.10_2
libfprint.so.0 libfprint0-1.0_1
libfprint-2.so.2 libfprint-1.90.7_1
libwx_baseu_xml-3.0.so.0 wxWidgets-common-3.0.4_1
libwx_baseu-3.0.so.0 wxWidgets-common-3.0.4_1
libwx_baseu_net-3.0.so.0 wxWidgets-common-3.0.4_1
libmspack.so.0 libmspack-0.4alpha_1
libslim.so.1.3.6 slim-1.3.6_1
libmediaart-2.0.so.0 libmediaart-1.9.1_1
@ -3474,19 +3471,22 @@ libmozjs-78.so.0 mozjs78-78.1.0_1
libebur128.so.1 libebur128-1.2.4_1
libgtksourceview-4.so.0 gtksourceview4-4.0.2_1
libgtksourceview-5.so.0 gtksourceview5-5.2.0_1
libwx_gtk3u_propgrid-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_qa-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_core-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_html-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_adv-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_richtext-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_xrc-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_webview-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_aui-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_media-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_ribbon-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_gl-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_gtk3u_stc-3.0.so.0 wxWidgets-gtk3-3.0.4_1
libwx_baseu_xml-3.2.so.0 wxWidgets-common-3.2.2.1_1
libwx_baseu-3.2.so.0 wxWidgets-common-3.2.2.1_1
libwx_baseu_net-3.2.so.0 wxWidgets-common-3.2.2.1_1
libwx_gtk3u_adv-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_aui-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_core-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_gl-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_html-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_media-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_propgrid-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_qa-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_ribbon-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_richtext-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_stc-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_webview-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libwx_gtk3u_xrc-3.2.so.0 wxWidgets-gtk3-3.2.2.1_1
libtepl-6.so.2 tepl-6.4.0_1
libnomacsCore.so.3 nomacs-3.10.2_4
libaudit.so.1 libaudit-2.8.4_1

1
srcpkgs/wxWidgets Symbolic link
View File

@ -0,0 +1 @@
wxWidgets-gtk3

1
srcpkgs/wxWidgets-devel Symbolic link
View File

@ -0,0 +1 @@
wxWidgets-gtk3

View File

@ -0,0 +1,34 @@
https://git.alpinelinux.org/aports/plain/community/wxwidgets/musl-locale-l.patch
these macro'd away functions don't exist in musl (yet)
diff --git a/include/wx/xlocale.h b/include/wx/xlocale.h
index c433d25..794cf0b 100644
--- a/include/wx/xlocale.h
+++ b/include/wx/xlocale.h
@@ -33,6 +33,26 @@
#include "wx/crt.h" // Includes wx/chartype.h, wx/wxcrt.h(wx/string.h)
#include "wx/intl.h" // wxLanguage
+#ifndef strtol_l
+#define strtol_l(s, p, base, l) strtol(s, p, base)
+#endif
+
+#ifndef strtoul_l
+#define strtoul_l(s, p, base, l) strtoul(s, p, base)
+#endif
+
+#ifndef wcstod_l
+#define wcstod_l(s, p, l) wcstod(s, p)
+#endif
+
+#ifndef wcstol_l
+#define wcstol_l(s, p, base, l) wcstol(s, p, base)
+#endif
+
+#ifndef wcstoul_l
+#define wcstoul_l(s, p, base, l) wcstoul(s, p, base)
+#endif
+
// The platform-specific locale type
// If wxXLocale_t is not defined, then only "C" locale support is provided
#ifdef wxHAS_XLOCALE_SUPPORT

View File

@ -0,0 +1,16 @@
https://git.alpinelinux.org/aports/plain/community/wxwidgets/invalid-header-syntax.patch
diff --git a/include/wx/matrix.h b/include/wx/matrix.h
index 3b3225d..e77fb1a 100644
--- a/include/wx/matrix.h
+++ b/include/wx/matrix.h
@@ -37,8 +37,8 @@
// at a certain coordinate and angle within another parent picture.
// At all times m_isIdentity is set if the matrix itself is an Identity matrix.
// It is used where possible to optimize calculations.
-class
wxDEPRECATED_EXPORT_CORE("use wxAffineMatrix2D instead")
+class
wxTransformMatrix: public wxObject
{
public:

View File

@ -0,0 +1,16 @@
https://git.alpinelinux.org/aports/plain/community/wxwidgets/largefile.patch
nothing sets this to 0, but for some reason it gets undef'd
diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in
index e4c9e83..e9ef8dc 100644
--- a/build/cmake/setup.h.in
+++ b/build/cmake/setup.h.in
@@ -867,7 +867,7 @@
/*
* Define if large (64 bit file offsets) files are supported.
*/
-#cmakedefine HAVE_LARGEFILE_SUPPORT 1
+#define HAVE_LARGEFILE_SUPPORT 1
/*
* Use OpenGL

View File

@ -0,0 +1,18 @@
Cross-compiled libraries get a suffix naming the system by default, but this
causes deviation from native-built libraries and should be disabled.
--- a/build/cmake/functions.cmake
+++ b/build/cmake/functions.cmake
@@ -219,9 +219,9 @@
endif()
set(cross_target)
- if (CMAKE_CROSSCOMPILING)
- set(cross_target "-${CMAKE_SYSTEM_NAME}")
- endif()
+ #if (CMAKE_CROSSCOMPILING)
+ # set(cross_target "-${CMAKE_SYSTEM_NAME}")
+ #endif()
set(lib_prefix "lib")
if(MSVC OR (WIN32 AND wxBUILD_SHARED))

View File

@ -0,0 +1,45 @@
https://git.alpinelinux.org/aports/plain/community/wxwidgets/no-glvnd.patch
find_package(OpenGL) only works with glvnd and hardcodes glvnd paths, even
though all these components are easily found with pkgconfig..
diff --git a/build/cmake/init.cmake b/build/cmake/init.cmake
index ef28c99..b4df830 100644
--- a/build/cmake/init.cmake
+++ b/build/cmake/init.cmake
@@ -408,17 +408,26 @@ if(wxUSE_GUI)
set(OPENGL_FOUND TRUE)
set(OPENGL_LIBRARIES "-framework OpenGLES" "-framework QuartzCore" "-framework GLKit")
else()
- find_package(OpenGL)
- if(OPENGL_FOUND)
- foreach(gltarget OpenGL::GL OpenGL::GLU OpenGL::OpenGL)
- if(TARGET ${gltarget})
- set(OPENGL_LIBRARIES ${gltarget} ${OPENGL_LIBRARIES})
- endif()
- endforeach()
- endif()
- if(WXGTK3 AND OpenGL_EGL_FOUND AND wxUSE_GLCANVAS_EGL)
+ # find_package(OpenGL)
+ # if(OPENGL_FOUND)
+ # foreach(gltarget OpenGL::GL OpenGL::GLU OpenGL::OpenGL)
+ # if(TARGET ${gltarget})
+ # set(OPENGL_LIBRARIES ${gltarget} ${OPENGL_LIBRARIES})
+ # endif()
+ # endforeach()
+ # endif()
+ find_package(PkgConfig REQUIRED)
+ pkg_check_modules(GLU REQUIRED glu IMPORTED_TARGET GLOBAL)
+ add_library(OpenGL::GLU ALIAS PkgConfig::GLU)
+ pkg_check_modules(GL REQUIRED gl IMPORTED_TARGET GLOBAL)
+ add_library(OpenGL::GL ALIAS PkgConfig::GL)
+ pkg_check_modules(EGL REQUIRED egl IMPORTED_TARGET GLOBAL)
+ add_library(OpenGL::EGL ALIAS PkgConfig::EGL)
+ set(OPENGL_FOUND TRUE)
+ set(OpenGL_EGL_FOUND TRUE)
+ if(WXGTK3 AND wxUSE_GLCANVAS_EGL)
if(TARGET OpenGL::EGL)
- set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES})
+ set(OPENGL_LIBRARIES OpenGL::EGL ${OPENGL_LIBRARIES} GL)
endif()
set(OPENGL_INCLUDE_DIR ${OPENGL_INCLUDE_DIR} ${OPENGL_EGL_INCLUDE_DIRS})
find_package(WAYLANDEGL)

View File

@ -1,18 +1,19 @@
Taken from
Adapted from a prior patch which was taken from
https://github.com/archlinux/svntogit-packages/blob/71ee17d529f8e0dc5c44d2fffb0dfa69b71daa0b/repos/extra-x86_64/make-abicheck-non-fatal.patch
diff -up wxGTK-2.8.12/src/common/appbase.cpp.abicheck wxGTK-2.8.12/src/common/appbase.cpp
--- a/src/common/appbase.cpp.abicheck 2015-03-12 17:15:18.000000000 +0100
+++ b/src/common/appbase.cpp 2015-03-12 17:15:57.000000000 +0100
@@ -424,10 +424,7 @@ bool wxAppConsole::CheckBuildOptions(con
msg.Printf(_T("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
lib.c_str(), progName.c_str(), prog.c_str());
diff -up a/src/common/appbase.cpp b/src/common/appbase.cpp
--- a/src/common/appbase.cpp
+++ b/src/common/appbase.cpp
@@ -850,11 +850,8 @@
wxString prog = wxString::FromAscii(optionsSignature);
wxString progName = wxString::FromAscii(componentName);
- wxLogFatalError(msg.c_str());
- wxLogFatalError(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
+ wxLogWarning(wxT("Mismatch between the program and library build versions detected.\nThe library used %s,\nand %s used %s."),
lib, progName, prog);
-
- // normally wxLogFatalError doesn't return
- return false;
+ wxLogWarning(msg.c_str());
}
#undef wxCMP
return true;

View File

@ -0,0 +1,56 @@
Fix some of the automatically populated fields, which will generally be
incorrect in xbps-src cross-compilation environments.
--- ./wx-config.in
+++ ./wx-config.in
@@ -268,7 +268,9 @@
--help|-h)
usage
;;
-
+ --host=*)
+ continue
+ ;;
--*=*)
_name=`option_name $arg`
_value=`option_value $arg`
@@ -398,13 +400,13 @@
}
# Returns true if this script is for a cross compiled config.
-is_cross() { [ "x@cross_compiling@" = "xyes" ]; }
+is_cross() { false; }
# Determine the base directories we require.
prefix=${input_option_prefix-${this_prefix:-@prefix@}}
exec_prefix=${input_option_exec_prefix-${input_option_prefix-${this_exec_prefix:-@exec_prefix@}}}
-wxconfdir="@libdir@/wx/config"
+wxconfdir="${exec_prefix}/lib/wx/config"
installed_configs=`cd "$wxconfdir" 2> /dev/null && ls | grep -v "^inplace-"`
@@ -940,8 +942,8 @@
exec_prefix=${this_exec_prefix-$exec_prefix}
includedir="@includedir@"
-libdir="@libdir@"
-bindir="@bindir@"
+libdir="${exec_prefix}/lib"
+bindir="${exec_prefix}/bin"
# Trivial queries we can answer now.
[ -z "$output_option_prefix" ] || echo $prefix
@@ -950,9 +952,9 @@
[ -z "$output_option_version" ] || echo "@WX_VERSION@"
[ -z "$output_option_version_full" ] || echo "@WX_SUBVERSION@"
[ -z "$output_option_basename" ] || echo "@WX_LIBRARY_BASENAME_GUI@"
-[ -z "$output_option_cc" ] || echo "@CC@"
-[ -z "$output_option_cxx" ] || echo "@CXX@"
-[ -z "$output_option_ld" ] || echo "@CXX@ -o"
+[ -z "$output_option_cc" ] || echo "${bindir}/gcc"
+[ -z "$output_option_cxx" ] || echo "${bindir}/g++"
+[ -z "$output_option_ld" ] || echo "${bindir}/g++ -o"
[ -z "$flag_option_selected_config" ] || echo "$this_config"
for q in $query_options; do

View File

@ -1,51 +1,62 @@
# Template file for 'wxWidgets-gtk3'
pkgname=wxWidgets-gtk3
version=3.0.5.1
revision=6
build_style=gnu-configure
configure_args="--with-gtk=3 --enable-unicode --with-opengl --with-sdl
--with-libmspack --with-libnotify --enable-mediactrl"
version=3.2.2.1
revision=1
build_style=cmake
cmake_builddir="build-gtk3"
configure_args="-DwxBUILD_TOOLKIT=gtk3 -DwxUSE_OPENGL=ON -DwxUSE_LIBMSPACK=ON
-DwxUSE_GTKPRINT=ON -DwxUSE_UNICODE=ON -DwxUSE_MEDIACTRL=ON
-DwxUSE_PRIVATE_FONTS=ON -DwxUSE_REGEX=sys -DwxUSE_ZLIB=sys -DwxUSE_EXPAT=sys
-DwxUSE_LIBJPEG=sys -DwxUSE_LIBPNG=sys -DwxUSE_LIBTIFF=sys -DwxUSE_LIBLZMA=sys
-DwxUSE_LIBNOTIFY=sys -DwxUSE_LIBSDL=sys"
hostmakedepends="pkg-config"
makedepends="SDL2-devel gst-plugins-base1-devel gstreamer1-devel gtk+3-devel
libmspack-devel libnotify-devel tiff-devel webkit2gtk-devel glu-devel"
short_desc="The wxWidgets GUI toolkit library compiled with gtk3 support"
libmspack-devel libnotify-devel tiff-devel webkit2gtk-devel glu-devel
gst-plugins-bad1-devel libsecret-devel pcre2-devel liblzma-devel gspell-devel
libcurl-devel zlib-devel expat-devel libpng-devel"
short_desc="Cross-platform GUI library (built with GTK+ 3.0)"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="custom:wxWindows"
homepage="https://www.wxwidgets.org"
distfiles="https://github.com/wxWidgets/wxWidgets/releases/download/v${version}/wxWidgets-${version}.tar.bz2"
checksum=440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807
checksum=dffcb6be71296fff4b7f8840eb1b510178f57aa2eb236b20da41182009242c02
CXXFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
post_patch() {
if [ "${XBPS_TARGET_LIBC}" = "musl" ]; then
patch -Np1 < "${FILESDIR}/musl-locale-l.patch"
fi
}
post_install() {
local _config="gtk3-unicode-3.0"
# remove all occurrences of $XBPS_CROSS_TRIPLET in wx-config:
# - mark this build as native build
if [ "$CROSS_BUILD" ]; then
rename "${XBPS_CROSS_TRIPLET}-" "" \
${DESTDIR}/usr/lib/wx/config/* \
${DESTDIR}/usr/lib/wx/include/*
rename -- "-${XBPS_CROSS_TRIPLET}" "" ${DESTDIR}/usr/lib/*
local _patch="${version#*.*.}"
local _majmin="${version%."${_patch}"}"
local _config="gtk3-unicode-${_majmin}"
sed -i -e "s/${XBPS_CROSS_TRIPLET}-//g" \
-e "s/-${XBPS_CROSS_TRIPLET}//g" \
-e "s,$XBPS_CROSS_BASE,,g" \
if [ "$CROSS_BUILD" ]; then
# Remove $XBPS_CROSS_TRIPLET from cmake helper...
sed -i -e "s@/usr/${XBPS_CROSS_TRIPLET}@@g" \
${DESTDIR}/usr/lib/cmake/wxWidgets/wxWidgetsTargets.cmake
# ...and the output of the wx-config utility
sed -i -e "s@/usr/${XBPS_CROSS_TRIPLET}@@g" \
${DESTDIR}/usr/lib/wx/config/${_config}
fi
# Remove generic wx-config, link to toolkit-specific version
rm -f ${DESTDIR}/usr/bin/wx-config
ln -sf ../lib/wx/config/${_config} ${DESTDIR}/usr/bin/wx-config-gtk3
# - ignore --host option; breaks configure scripts when
# cross compiling (isnt necessary in our case anyway)
sed -i -e 's,^bindir=.*,bindir=${exec_prefix}/bin,' \
-e 's/is_cross().*/is_cross() { false; }/g' \
-e '/--\*=\*)/i --host=\*) continue;;' \
-e "s,/usr/lib,\${exec_prefix}/lib,g" \
$DESTDIR/usr/lib/wx/config/${_config}
# Make sure to install the autotools macro, CMake does not
vmkdir usr/share/aclocal
vinstall wxwin.m4 644 usr/share/aclocal
}
wxWidgets-common_package() {
short_desc+=" - common files"
pkg_install() {
vmove "usr/lib/libwx_baseu*.so.*"
vmove usr/share
vlicense docs/licendoc.txt
vlicense docs/licence.txt
}
@ -58,6 +69,7 @@ wxWidgets-common-devel_package() {
vmove "usr/bin/wxrc*"
vmove "usr/lib/libwx_baseu*.so"
vmove usr/include
vmove usr/share/aclocal
}
}
@ -68,5 +80,18 @@ wxWidgets-gtk3-devel_package() {
vmove usr/bin
vmove "usr/lib/*.so"
vmove usr/lib/wx
vmove usr/lib/cmake
}
}
wxWidgets_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" (transitional dummy package)"
build_style=meta
}
wxWidgets-devel_package() {
depends="${sourcepkg}-devel>=${version}_${revision}"
short_desc+=" - development files (transitional dummy package)"
build_style=meta
}

View File

@ -1,3 +1 @@
site="https://github.com/wxWidgets/wxWidgets/releases/latest"
# development version
ignore='3.1.*'
pkgname=wxWidgets