*/*: downgrade m68k down to ~m68k
[gentoo.git] / app-eselect / eselect-wxwidgets / eselect-wxwidgets-20180529.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit multilib
7
8 WXWRAP_VER=1.4
9
10 DESCRIPTION="Eselect module and wrappers for wxWidgets"
11 HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
12 SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz
13         https://dev.gentoo.org/~mgorny/dist/${PN}-files.tar.bz2"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~alpha amd64 arm ~arm64 hppa ~ia64 ~mips ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~x86-solaris"
18
19 RDEPEND=">=app-admin/eselect-1.4.13"
20
21 src_prepare() {
22         cp "${WORKDIR}"/eselect-wxwidgets-files/{wx-config,wxrc}-${WXWRAP_VER} . || die
23         sed \
24                 -e "/^LIBDIR=/s:lib:$(get_libdir):" \
25                 -e "/^EPREFIX=/s:'':'${EPREFIX}':" \
26                 -i {wx-config,wxrc}-${WXWRAP_VER} || die
27         eapply_user
28 }
29
30 src_install() {
31         insinto /usr/share/eselect/modules
32         doins wxwidgets.eselect
33
34         insinto /usr/share/aclocal
35         newins "${WORKDIR}"/eselect-wxwidgets-files/wxwin.m4-3.0 wxwin.m4
36
37         newbin wx-config-${WXWRAP_VER} wx-config
38         newbin wxrc-${WXWRAP_VER} wxrc
39
40         keepdir /var/lib/wxwidgets
41         keepdir /usr/share/bakefile/presets
42 }
43
44 pkg_postinst() {
45         if [[ ! -e ${EROOT}/var/lib/wxwidgets/current ]]; then
46                 echo 'WXCONFIG="none"' > "${EROOT}"/var/lib/wxwidgets/current
47         fi
48
49         elog "This eselect module only controls the version of wxGTK used when"
50         elog "building packages outside of portage.  If you are not doing development"
51         elog "with wxWidgets or bakefile you will never need to use it."
52 }