Skip to content

x11-libs/wxGTK - bump with removal of hardcoded strings

wxWidgets release currently at 3.2.1. Existing ebuild file (3.2.0-r300) has hard coded revision strings during prepare/install phases.

Diff below suggesting fix to resolve revision strings based on package value as well as to bump revision.

--- a/x11-libs/wxGTK/wxGTK-3.2.0-r300.ebuild
+++ b/x11-libs/wxGTK/wxGTK-3.2.1-r300.ebuild
@@ -1,14 +1,17 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
 inherit multilib-minimal
 
-WXSUBVERSION=${PV}.0-gtk3			# 3.2.4.0-gtk3
-WXVERSION=${WXSUBVERSION%.*}			# 3.2.4
-WXRELEASE=${WXVERSION%.*}-gtk3			# 3.2-gtk3
-WXRELEASE_NODOT=${WXRELEASE//./}		# 32-gtk3
+WXSUBVERSION=${PV}.0-gtk3          # 3.2.4.0-gtk3
+WXVERSION=${WXSUBVERSION%.*}       # 3.2.4
+WXVERSION_SHORT=${WXVERSION%.*}    # 3.2
+WXRELEASE=${WXVERSION_SHORT}-gtk3  # 3.2-gtk3
+WXRELEASE_NODOT=${WXRELEASE//./}   # 32-gtk3
+WXRELEASE_NOHYPH=${WXRELEASE//-/}  # 32gtk3
+
 
 DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit"
 HOMEPAGE="https://wxwidgets.org/"
@@ -71,7 +74,7 @@
 		-e "s:\(WX_VERSION=\).*:\1${WXVERSION}:" \
 		-e "s:\(WX_RELEASE=\).*:\1${WXRELEASE}:" \
 		-e "s:\(WX_SUBVERSION=\).*:\1${WXSUBVERSION}:" \
-		-e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:3.2:' \
+		-e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:${WXVERSION_SHORT}:' \
 		configure || die
 }
 
@@ -140,7 +143,7 @@
 	pushd "${ED}"/usr/share/bakefile/presets >/dev/null || die
 	local f
 	for f in wx*; do
-		mv "${f}" "${f/wx/wx31gtk3}" || die
+		mv "${f}" "${f/wx/wx${WXRELEASE_NOHYPH}}" || die
 	done
 	popd >/dev/null || die
 }
Edited by digifuzzy