Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/xplanet/files/, x11-misc/xplanet/
Date: Tue, 04 May 2021 13:35:50
Message-Id: 1620135340.17d912ff9ad0a450e9250e8224866ca172926b60.polynomial-c@gentoo
1 commit: 17d912ff9ad0a450e9250e8224866ca172926b60
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 4 13:25:36 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Tue May 4 13:35:40 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d912ff
7
8 x11-misc/xplanet: Revbump to fix freetype detection
9
10 Bumped to EAPI-7
11 Overhauled src_configure function
12
13 Closes: https://bugs.gentoo.org/788136
14 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
15
16 .../files/xplanet-1.3.1-freetype_pkgconfig.patch | 40 +++++++++++++++
17 x11-misc/xplanet/xplanet-1.3.1-r1.ebuild | 57 +++++++++-------------
18 2 files changed, 63 insertions(+), 34 deletions(-)
19
20 diff --git a/x11-misc/xplanet/files/xplanet-1.3.1-freetype_pkgconfig.patch b/x11-misc/xplanet/files/xplanet-1.3.1-freetype_pkgconfig.patch
21 new file mode 100644
22 index 00000000000..534a32e9ef7
23 --- /dev/null
24 +++ b/x11-misc/xplanet/files/xplanet-1.3.1-freetype_pkgconfig.patch
25 @@ -0,0 +1,40 @@
26 +https://bugs.gentoo.org/788136
27 +
28 +--- xplanet-1.3.1/acinclude.m4
29 ++++ xplanet-1.3.1/acinclude.m4
30 +@@ -48,23 +48,22 @@
31 +
32 + AC_DEFUN([AC_FIND_FREETYPE],
33 + [
34 +-
35 ++PKG_PROG_PKG_CONFIG
36 + AC_ARG_WITH(freetype,AC_HELP_STRING([--with-freetype],[Enable Freetype support for TrueType fonts (YES)]))
37 +
38 + have_freetype='no'
39 +-if test "$with_freetype" != 'no'; then
40 +- AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
41 +- if test "$FREETYPE_CONFIG" = no; then
42 +- AC_MSG_WARN(*** Xplanet will be built without freetype support ***)
43 +- else
44 +- FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags` -I`$FREETYPE_CONFIG --prefix`/include"
45 +- FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
46 +- AC_SUBST(FREETYPE_CFLAGS)
47 +- AC_SUBST(FREETYPE_LIBS)
48 +- AC_DEFINE(HAVE_LIBFREETYPE,,Define if you have freetype)
49 ++AS_IF([test "$with_freetype" != 'no'], [
50 ++ PKG_CHECK_MODULES([FREETYPE], [freetype2], [
51 ++ AC_DEFINE([HAVE_LIBFREETYPE],,[Define if you have freetype])
52 + have_freetype='yes'
53 +- fi
54 +-fi
55 ++ ], [
56 ++ AS_IF([test "$with_freetype" != 'yes'], [
57 ++ AC_MSG_WARN(*** Xplanet will be built without freetype support ***)
58 ++ ], [
59 ++ AC_MSG_ERROR(*** freetype support requested but not found ***)
60 ++ ])
61 ++ ])
62 ++])
63 + ])
64 +
65 + AC_DEFUN([AC_FIND_PANGO],
66
67 diff --git a/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild b/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
68 index 7fd20ea87c2..1eef6008ea9 100644
69 --- a/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
70 +++ b/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
71 @@ -1,8 +1,8 @@
72 -# Copyright 1999-2018 Gentoo Foundation
73 +# Copyright 1999-2021 Gentoo Authors
74 # Distributed under the terms of the GNU General Public License v2
75
76 -EAPI=6
77 -inherit flag-o-matic
78 +EAPI=7
79 +inherit autotools flag-o-matic
80
81 DESCRIPTION="Render images of the earth into the X root window"
82 HOMEPAGE="http://xplanet.sourceforge.net/"
83 @@ -32,8 +32,8 @@ RDEPEND="
84 x11-libs/libXt
85 )
86 "
87 -DEPEND="
88 - ${RDEPEND}
89 +DEPEND="${RDEPEND}"
90 +BDEPEND="
91 truetype? ( virtual/pkgconfig )
92 X? ( x11-base/xorg-proto )
93 "
94 @@ -41,39 +41,28 @@ DEPEND="
95 PATCHES=(
96 "${FILESDIR}"/${P}-giflib.patch
97 "${FILESDIR}"/${P}-remove-null-comparison.patch
98 + "${FILESDIR}"/${P}-freetype_pkgconfig.patch #788136
99 )
100
101 +src_prepare() {
102 + default
103 + eautoreconf #788136
104 +}
105 +
106 src_configure() {
107 # econf says 'checking pnm.h presence... no'
108 use png && append-cppflags -I"${EPREFIX}"/usr/include/netpbm
109
110 - local myconf=()
111 -
112 - use X \
113 - && myconf+=( --with-x --with-xscreensaver ) \
114 - || myconf+=( --with-x=no --with-xscreensaver=no )
115 -
116 - use gif \
117 - && myconf+=( --with-gif ) \
118 - || myconf+=( --with-gif=no )
119 -
120 - use jpeg \
121 - && myconf+=( --with-jpeg ) \
122 - || myconf+=( --with-jpeg=no )
123 -
124 - use tiff \
125 - && myconf+=( --with-tiff ) \
126 - || myconf+=( --with-tiff=no )
127 -
128 - use png \
129 - && myconf+=( --with-png --with-pnm ) \
130 - || myconf+=( --with-png=no --with-pnm=no )
131 -
132 - use truetype \
133 - && myconf+=( --with-freetype --with-pango ) \
134 - || myconf+=( --with-freetype=no --with-pango=no )
135 -
136 - econf \
137 - --with-cspice=no \
138 - "${myconf[@]}"
139 + local myconf=(
140 + --with-freetype$(usex truetype '' '=no')
141 + --with-gif$(usex gif '' '=no')
142 + --with-jpeg$(usex jpeg '' '=no')
143 + --with-pango$(usex truetype '' '=no')
144 + --with-png$(usex png '' '=no')
145 + --with-pnm$(usex png '' '=no')
146 + --with-tiff$(usex tiff '' '=no')
147 + --with-x$(usex X '' '=no')
148 + --with-xscreensaver$(usex X '' '=no')
149 + )
150 + econf --with-cspice=no "${myconf[@]}"
151 }