1 |
On Sun, 2021-08-01 at 14:36 +0200, Ulrich Müller wrote: |
2 |
> Reviewed-by: Mart Raudsepp <leio@g.o> |
3 |
> Reviewed-by: David Seifert <soap@g.o> |
4 |
> Signed-off-by: Ulrich Müller <ulm@g.o> |
5 |
> --- |
6 |
> eclass/wxwidgets.eclass | 13 +++++++------ |
7 |
> 1 file changed, 7 insertions(+), 6 deletions(-) |
8 |
> |
9 |
> diff --git a/eclass/wxwidgets.eclass b/eclass/wxwidgets.eclass |
10 |
> index 4357e7367cc7..28735aaac6fd 100644 |
11 |
> --- a/eclass/wxwidgets.eclass |
12 |
> +++ b/eclass/wxwidgets.eclass |
13 |
> @@ -4,7 +4,7 @@ |
14 |
> # @ECLASS: wxwidgets.eclass |
15 |
> # @MAINTAINER: |
16 |
> # wxwidgets@g.o |
17 |
> -# @SUPPORTED_EAPIS: 7 |
18 |
> +# @SUPPORTED_EAPIS: 7 8 |
19 |
> # @BLURB: Manages build configuration for wxGTK-using packages. |
20 |
> # @DESCRIPTION: |
21 |
> # This eclass sets up the proper environment for ebuilds using the wxGTK |
22 |
> @@ -21,10 +21,9 @@ |
23 |
> # The configuration chosen is based on the version required and the flags |
24 |
> # wxGTK was built with. |
25 |
> |
26 |
> -case ${EAPI:-0} in |
27 |
> - [0-6]) die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; |
28 |
> - 7) ;; |
29 |
> - *) die "Unsupported EAPI=${EAPI} (unknown) for ${ECLASS}" ;; |
30 |
> +case ${EAPI} in |
31 |
> + 7|8) ;; |
32 |
> + *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; |
33 |
> esac |
34 |
> |
35 |
> if [[ -z ${_WXWIDGETS_ECLASS} ]]; then |
36 |
> @@ -37,7 +36,9 @@ _WXWIDGETS_ECLASS=1 |
37 |
> # The SLOT of the x11-libs/wxGTK you're targeting. Needs to be defined before |
38 |
> # inheriting the eclass. Can be either "3.0" or "3.0-gtk3". |
39 |
> case ${WX_GTK_VER} in |
40 |
> - 3.0|3.0-gtk3) ;; |
41 |
> + 3.0-gtk3) ;; |
42 |
> + 3.0) [[ ${EAPI} == 7 ]] \ |
43 |
> + || die "GTK 2 no longer supported in EAPI ${EAPI}" ;; |
44 |
|
45 |
Let's make it: |
46 |
|
47 |
[[ ${EAPI} != 7 ]] && die ... |
48 |
|
49 |
to keep the logic more straightforward (and consistent with 'if ...; |
50 |
then'). |
51 |
|
52 |
> "") die "WX_GTK_VER not declared" ;; |
53 |
> *) die "Invalid WX_GTK_VER: must be set to a valid wxGTK SLOT ('3.0' or '3.0-gtk3')" ;; |
54 |
> esac |
55 |
|
56 |
-- |
57 |
Best regards, |
58 |
Michał Górny |