Diff wxGTK-3.0.4-r5 with a wxGTK-3.0.5.1-r1

/usr/portage/x11-libs/wxGTK/wxGTK-3.0.5.1-r1.ebuild 2023-10-09 14:52:35.928368512 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2023 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4
EAPI=8
4
EAPI=7
5 5

  
6 6
inherit multilib-minimal
7 7

  
8
WXSUBVERSION=${PV}-gtk3				# 3.0.5.1-gtk3
9
WXVERSION=${WXSUBVERSION%.*}			# 3.0.5
10
WXRELEASE=${WXVERSION%.*}-gtk3			# 3.0-gtk3
11
WXRELEASE_NODOT=${WXRELEASE//./}		# 30-gtk3
12

  
8 13
DESCRIPTION="GTK+ version of wxWidgets, a cross-platform C++ GUI toolkit"
9 14
HOMEPAGE="https://wxwidgets.org/"
10 15
SRC_URI="
11 16
	https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}.tar.bz2
12
	https://dev.gentoo.org/~leio/distfiles/wxGTK-3.0.4_p20190713.tar.xz
13
	doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${PV}/wxWidgets-${PV}-docs-html.tar.bz2 )"
17
	https://dev.gentoo.org/~leio/distfiles/wxGTK-3.0.5_p20210214.tar.xz
18
	doc? ( https://github.com/wxWidgets/wxWidgets/releases/download/v${WXVERSION}/wxWidgets-${WXVERSION}-docs-html.tar.bz2 )"
14 19
S="${WORKDIR}/wxWidgets-${PV}"
15 20

  
16 21
LICENSE="wxWinLL-3 GPL-2 doc? ( wxWinFDL-3 )"
17
SLOT="3.0"
18
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
19
IUSE="+X doc debug gstreamer libnotify opengl pch sdl tiff"
22
SLOT="${WXRELEASE}"
23
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux"
24
IUSE="+X doc debug gstreamer libnotify opengl pch sdl test tiff webkit"
25
REQUIRED_USE="test? ( tiff ) tiff? ( X )"
26
RESTRICT="!test? ( test )"
20 27

  
21 28
RDEPEND="
29
	>=app-eselect/eselect-wxwidgets-20131230
22 30
	dev-libs/expat[${MULTILIB_USEDEP}]
23 31
	sdl? ( media-libs/libsdl2[${MULTILIB_USEDEP}] )
24 32
	X? (
25
		dev-libs/glib:2[${MULTILIB_USEDEP}]
33
		>=dev-libs/glib-2.22:2[${MULTILIB_USEDEP}]
26 34
		media-libs/libjpeg-turbo:=[${MULTILIB_USEDEP}]
27
		media-libs/libpng:=[${MULTILIB_USEDEP}]
35
		media-libs/libpng:0=[${MULTILIB_USEDEP}]
28 36
		sys-libs/zlib[${MULTILIB_USEDEP}]
29
		x11-libs/gtk+:2[${MULTILIB_USEDEP}]
37
		x11-libs/cairo[${MULTILIB_USEDEP}]
38
		x11-libs/gtk+:3[${MULTILIB_USEDEP}]
30 39
		x11-libs/gdk-pixbuf[${MULTILIB_USEDEP}]
31 40
		x11-libs/libSM[${MULTILIB_USEDEP}]
41
		x11-libs/libX11[${MULTILIB_USEDEP}]
32 42
		x11-libs/libXxf86vm[${MULTILIB_USEDEP}]
33 43
		x11-libs/pango[${MULTILIB_USEDEP}]
34 44
		gstreamer? (
......
37 47
		)
38 48
		libnotify? ( x11-libs/libnotify[${MULTILIB_USEDEP}] )
39 49
		opengl? ( virtual/opengl[${MULTILIB_USEDEP}] )
40
		tiff?   ( media-libs/tiff:=[${MULTILIB_USEDEP}] )
50
		tiff? ( media-libs/tiff:=[${MULTILIB_USEDEP}] )
51
		webkit? ( net-libs/webkit-gtk:4 )
41 52
	)"
42
DEPEND="
43
	${RDEPEND}
53
DEPEND="${RDEPEND}
44 54
	opengl? ( virtual/glu[${MULTILIB_USEDEP}] )
45 55
	X? ( x11-base/xorg-proto )"
46
BDEPEND="virtual/pkgconfig"
47
PDEPEND=">=app-eselect/eselect-wxwidgets-20131230"
56
BDEPEND="
57
	test? ( >=dev-util/cppunit-1.8.0 )
58
	>=app-eselect/eselect-wxwidgets-20131230
59
	virtual/pkgconfig"
48 60

  
49 61
PATCHES=(
50
	"${WORKDIR}"/wxGTK-3.0.4_p20190713/
51
	"${FILESDIR}"/${PN}-3.0.5-collision.patch
62
	"${WORKDIR}"/wxGTK-3.0.5_p20210214/
63
	"${FILESDIR}"/wxGTK-${SLOT}-translation-domain.patch
52 64
	"${FILESDIR}"/wxGTK-ignore-c++-abi.patch #676878
65
	"${FILESDIR}"/${PN}-configure-tests.patch
66
	"${FILESDIR}"/${PN}-3.0.5.1-configure-modern-c.patch
53 67
)
54 68

  
69
src_prepare() {
70
	default
71

  
72
	# Versionating
73
	sed -i \
74
		-e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
75
		-e "s:\(WX_RELEASE_NODOT = \).*:\1${WXRELEASE_NODOT}:"\
76
		-e "s:\(WX_VERSION = \).*:\1${WXVERSION}:"\
77
		-e "s:aclocal):aclocal/wxwin${WXRELEASE_NODOT}.m4):" \
78
		-e "s:wxstd.mo:wxstd${WXRELEASE_NODOT}.mo:" \
79
		-e "s:wxmsw.mo:wxmsw${WXRELEASE_NODOT}.mo:" \
80
		Makefile.in tests/Makefile.in || die
81

  
82
	sed -i \
83
		-e "s:\(WX_RELEASE = \).*:\1${WXRELEASE}:"\
84
		utils/wxrc/Makefile.in || die
85

  
86
	sed -i \
87
		-e "s:\(WX_VERSION=\).*:\1${WXVERSION}:" \
88
		-e "s:\(WX_RELEASE=\).*:\1${WXRELEASE}:" \
89
		-e "s:\(WX_SUBVERSION=\).*:\1${WXSUBVERSION}:" \
90
		-e '/WX_VERSION_TAG=/ s:${WX_RELEASE}:3.0:' \
91
		configure || die
92
}
93

  
55 94
multilib_src_configure() {
56
	local myconf=(
57
		# X independent options
95
	# X independent options
96
	local myeconfargs=(
58 97
		--with-zlib=sys
59 98
		--with-expat=sys
60 99
		--enable-compat28
......
64 103
		# See bug #504204
65 104
		# Commits 8c4774042b7fdfb08e525d8af4b7912f26a2fdce, fb809aeadee57ffa24591e60cfb41aecd4823090
66 105
		$(use_enable pch precomp-headers)
106

  
107
		# Don't hard-code libdir's prefix for wx-config
108
		--libdir='${prefix}'/$(get_libdir)
67 109
	)
68 110

  
69 111
	# debug in >=2.9
......
73 115
	# apps can disable these features by building w/ -NDEBUG or wxDEBUG_LEVEL_0.
74 116
	# http://docs.wxwidgets.org/3.0/overview_debugging.html
75 117
	# https://groups.google.com/group/wx-dev/browse_thread/thread/c3c7e78d63d7777f/05dee25410052d9c
76
	use debug && myconf+=( --enable-debug=max )
118
	use debug && myeconfargs+=( --enable-debug=max )
77 119

  
78 120
	# wxGTK options
79 121
	#   --enable-graphics_ctx - needed for webkit, editra
80 122
	#   --without-gnomevfs - bug #203389
81
	if use X; then
82
		myconf+=(
83
			--enable-gui
84
			--enable-graphics_ctx
85
			--with-gtkprint
86
			--with-libpng=sys
87
			--with-libxpm=sys
88
			--with-libjpeg=sys
89
			--without-gnomevfs
90
			--disable-webview
91
			$(use_enable gstreamer mediactrl)
92
			$(use_with libnotify)
93
			$(use_with opengl)
94
			$(use_with tiff libtiff sys)
95
		)
96
	else
97
		# wxBase options
98
		myconf+=( --disable-gui )
99
	fi
123
	use X && myeconfargs+=(
124
		--enable-graphics_ctx
125
		--with-gtkprint
126
		--enable-gui
127
		--with-gtk=3
128
		--with-libpng=sys
129
		--with-libjpeg=sys
130
		--without-gnomevfs
131
		$(use_enable gstreamer mediactrl)
132
		$(multilib_native_use_enable webkit webview)
133
		$(use_with libnotify)
134
		$(use_with opengl)
135
		$(use_with tiff libtiff sys)
136
		$(use_enable test tests)
137
	)
138

  
139
	# wxBase options
140
	! use X && myeconfargs+=( --disable-gui )
100 141

  
101
	ECONF_SOURCE="${S}" econf "${myconf[@]}"
142
	ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
143
}
144

  
145
multilib_src_test() {
146
	emake -C tests
147
	(cd tests && ./test) || die
102 148
}
103 149

  
104 150
multilib_src_install_all() {
......
107 153
	newdoc base/readme.txt base_readme.txt
108 154
	newdoc gtk/readme.txt gtk_readme.txt
109 155

  
110
	use doc && HTML_DOCS=( "${WORKDIR}"/wxWidgets-${PV}-docs-html/. )
156
	use doc && HTML_DOCS=( "${WORKDIR}"/wxWidgets-${WXVERSION}-docs-html/. )
111 157
	einstalldocs
112 158

  
113
	# Stray windows locale file, causes collisions
114
	rm -f "${ED}"/usr/share/locale/it/LC_MESSAGES/wxmsw.mo || die
159
	# Stray windows locale file, bug #650118
160
	rm -f "${ED}"/usr/share/locale/it/LC_MESSAGES/wxmsw30-gtk3.mo || die
161

  
162
	# Unversioned links
163
	rm "${ED}"/usr/bin/wx-config || die
164
	use X && { rm "${ED}"/usr/bin/wxrc || die; }
165

  
166
	# version bakefile presets
167
	pushd "${ED}"/usr/share/bakefile/presets >/dev/null || die
168
	local f
169
	for f in wx*; do
170
		mv "${f}" "${f/wx/wx30gtk3}" || die
171
	done
172
	popd >/dev/null || die
115 173
}
116 174

  
117 175
pkg_postinst() {
118
	has_version app-eselect/eselect-wxwidgets &&
119
		eselect wxwidgets update
176
	has_version -b app-eselect/eselect-wxwidgets \
177
		&& eselect wxwidgets update
120 178
}
121 179

  
122 180
pkg_postrm() {
123
	has_version app-eselect/eselect-wxwidgets &&
124
		eselect wxwidgets update
181
	has_version -b app-eselect/eselect-wxwidgets \
182
		&& eselect wxwidgets update
125 183
}
Thank you!