[gentoo-commits] repo/gentoo:master commit in: x11-misc/xplanet/files/, x11-misc/xplanet/

2021-05-04 Thread Lars Wendler
commit: 17d912ff9ad0a450e9250e8224866ca172926b60
Author: Lars Wendler  gentoo  org>
AuthorDate: Tue May  4 13:25:36 2021 +
Commit: Lars Wendler  gentoo  org>
CommitDate: Tue May  4 13:35:40 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17d912ff

x11-misc/xplanet: Revbump to fix freetype detection

Bumped to EAPI-7
Overhauled src_configure function

Closes: https://bugs.gentoo.org/788136
Signed-off-by: Lars Wendler  gentoo.org>

 .../files/xplanet-1.3.1-freetype_pkgconfig.patch   | 40 +++
 x11-misc/xplanet/xplanet-1.3.1-r1.ebuild   | 57 +-
 2 files changed, 63 insertions(+), 34 deletions(-)

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
new file mode 100644
index 000..534a32e9ef7
--- /dev/null
+++ b/x11-misc/xplanet/files/xplanet-1.3.1-freetype_pkgconfig.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/788136
+
+--- xplanet-1.3.1/acinclude.m4
 xplanet-1.3.1/acinclude.m4
+@@ -48,23 +48,22 @@
+ 
+ AC_DEFUN([AC_FIND_FREETYPE],
+ [
+-
++PKG_PROG_PKG_CONFIG
+ AC_ARG_WITH(freetype,AC_HELP_STRING([--with-freetype],[Enable Freetype 
support for TrueType fonts (YES)]))
+ 
+ have_freetype='no'
+-if test "$with_freetype" != 'no'; then
+-  AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+-  if test "$FREETYPE_CONFIG" = no; then
+-AC_MSG_WARN(*** Xplanet will be built without freetype support ***)
+-  else
+-FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags` -I`$FREETYPE_CONFIG 
--prefix`/include"
+-FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+-AC_SUBST(FREETYPE_CFLAGS)
+-AC_SUBST(FREETYPE_LIBS)
+-AC_DEFINE(HAVE_LIBFREETYPE,,Define if you have freetype)
++AS_IF([test "$with_freetype" != 'no'], [
++  PKG_CHECK_MODULES([FREETYPE], [freetype2], [
++AC_DEFINE([HAVE_LIBFREETYPE],,[Define if you have freetype])
+ have_freetype='yes'
+-  fi
+-fi
++  ], [
++AS_IF([test "$with_freetype" != 'yes'], [
++  AC_MSG_WARN(*** Xplanet will be built without freetype support ***)
++], [
++  AC_MSG_ERROR(*** freetype support requested but not found ***)
++])
++  ])
++])
+ ])
+ 
+ AC_DEFUN([AC_FIND_PANGO],

diff --git a/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild 
b/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
index 7fd20ea87c2..1eef6008ea9 100644
--- a/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
+++ b/x11-misc/xplanet/xplanet-1.3.1-r1.ebuild
@@ -1,8 +1,8 @@
-# Copyright 1999-2018 Gentoo Foundation
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=6
-inherit flag-o-matic
+EAPI=7
+inherit autotools flag-o-matic
 
 DESCRIPTION="Render images of the earth into the X root window"
 HOMEPAGE="http://xplanet.sourceforge.net/;
@@ -32,8 +32,8 @@ RDEPEND="
x11-libs/libXt
)
 "
-DEPEND="
-   ${RDEPEND}
+DEPEND="${RDEPEND}"
+BDEPEND="
truetype? ( virtual/pkgconfig )
X? ( x11-base/xorg-proto )
 "
@@ -41,39 +41,28 @@ DEPEND="
 PATCHES=(
"${FILESDIR}"/${P}-giflib.patch
"${FILESDIR}"/${P}-remove-null-comparison.patch
+   "${FILESDIR}"/${P}-freetype_pkgconfig.patch #788136
 )
 
+src_prepare() {
+   default
+   eautoreconf #788136
+}
+
 src_configure() {
# econf says 'checking pnm.h presence... no'
use png && append-cppflags -I"${EPREFIX}"/usr/include/netpbm
 
-   local myconf=()
-
-   use X \
-   && myconf+=( --with-x --with-xscreensaver ) \
-   || myconf+=( --with-x=no --with-xscreensaver=no )
-
-   use gif \
-   && myconf+=( --with-gif ) \
-   || myconf+=( --with-gif=no )
-
-   use jpeg \
-   && myconf+=( --with-jpeg ) \
-   || myconf+=( --with-jpeg=no )
-
-   use tiff \
-   && myconf+=( --with-tiff ) \
-   || myconf+=( --with-tiff=no )
-
-   use png \
-   && myconf+=( --with-png --with-pnm ) \
-   || myconf+=( --with-png=no --with-pnm=no )
-
-   use truetype \
-   && myconf+=( --with-freetype --with-pango ) \
-   || myconf+=( --with-freetype=no --with-pango=no )
-
-   econf \
-   --with-cspice=no \
-   "${myconf[@]}"
+   local myconf=(
+   --with-freetype$(usex truetype '' '=no')
+   --with-gif$(usex gif '' '=no')
+   --with-jpeg$(usex jpeg '' '=no')
+   --with-pango$(usex truetype '' '=no')
+   --with-png$(usex png '' '=no')
+   --with-pnm$(usex png '' '=no')
+   --with-tiff$(usex tiff '' '=no')
+   --with-x$(usex X '' '=no')
+   --with-xscreensaver$(usex X '' '=no')
+   )
+   econf --with-cspice=no "${myconf[@]}"
 }



[gentoo-commits] repo/gentoo:master commit in: x11-misc/xplanet/files/, x11-misc/xplanet/

2017-02-28 Thread David Seifert
commit: 4a6c36cea73fe40cf56d73505c347d56d1663d33
Author: Harri Nieminen  gmail  com>
AuthorDate: Sat Feb 25 08:52:06 2017 +
Commit: David Seifert  gentoo  org>
CommitDate: Tue Feb 28 19:10:32 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4a6c36ce

x11-misc/xplanet: Fix build with gcc6, bug #594804

Gentoo-Bug: https://bugs.gentoo.org/594804

Package-Manager: Portage-2.3.3, Repoman-2.3.1
Closes: https://github.com/gentoo/gentoo/pull/4085

 .../xplanet-1.3.1-remove-null-comparison.patch | 157 +
 x11-misc/xplanet/xplanet-1.3.1-r1.ebuild   |  83 +++
 2 files changed, 240 insertions(+)

diff --git a/x11-misc/xplanet/files/xplanet-1.3.1-remove-null-comparison.patch 
b/x11-misc/xplanet/files/xplanet-1.3.1-remove-null-comparison.patch
new file mode 100644
index 00..3ead8872e0
--- /dev/null
+++ b/x11-misc/xplanet/files/xplanet-1.3.1-remove-null-comparison.patch
@@ -0,0 +1,157 @@
+Index: src/libannotate/addArcs.cpp
+===
+diff --git a/src/libannotate/addArcs.cpp b/src/libannotate/addArcs.cpp
+--- a/src/libannotate/addArcs.cpp  (revision 206)
 b/src/libannotate/addArcs.cpp  (revision 207)
+@@ -258,7 +258,7 @@
+ {
+ ifstream inFile(arcFile.c_str());
+ char *line = new char[MAX_LINE_LENGTH];
+-while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
++while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
+ readArcFile(line, planet, view, projection,
+ planetProperties, annotationMap);
+ 
+@@ -292,7 +292,7 @@
+ {
+ ifstream inFile(arcFile.c_str());
+ char *line = new char[256];
+-while (inFile.getline (line, 256, '\n') != NULL)
++while (inFile.getline (line, 256, '\n'))
+ readArcFile(line, NULL, view, NULL, NULL, annotationMap);
+ 
+ inFile.close();
+Index: src/libannotate/addMarkers.cpp
+===
+diff --git a/src/libannotate/addMarkers.cpp b/src/libannotate/addMarkers.cpp
+--- a/src/libannotate/addMarkers.cpp   (revision 206)
 b/src/libannotate/addMarkers.cpp   (revision 207)
+@@ -429,7 +429,7 @@
+ {
+ ifstream inFile(markerFile.c_str());
+ char *line = new char[MAX_LINE_LENGTH];
+-while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
++while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
+ {
+ unsigned char color[3];
+ memcpy(color, planetProperties->MarkerColor(), 3);
+@@ -475,7 +475,7 @@
+ {
+ ifstream inFile(markerFile.c_str());
+ char *line = new char[MAX_LINE_LENGTH];
+-while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
++while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
+ {
+ unsigned char color[3];
+ memcpy(color, options->Color(), 3);
+Index: src/libannotate/addSatellites.cpp
+===
+diff --git a/src/libannotate/addSatellites.cpp 
b/src/libannotate/addSatellites.cpp
+--- a/src/libannotate/addSatellites.cpp(revision 206)
 b/src/libannotate/addSatellites.cpp(revision 207)
+@@ -488,10 +488,10 @@
+ {
+ ifstream inFile(tleFile.c_str());
+ char lines[3][80];
+-while (inFile.getline(lines[0], 80) != NULL)
++while (inFile.getline(lines[0], 80))
+ {
+-if ((inFile.getline(lines[1], 80) == NULL) 
+-|| (inFile.getline(lines[2], 80) == NULL))
++if ((!inFile.getline(lines[1], 80)) 
++|| (!inFile.getline(lines[2], 80)))
+ {
+ ostringstream errStr;
+ errStr << "Malformed TLE file (" << tleFile << ")?\n";
+@@ -542,7 +542,7 @@
+ {
+ ifstream inFile(satFile.c_str());
+ char *line = new char[MAX_LINE_LENGTH];
+-while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL)
++while (inFile.getline (line, MAX_LINE_LENGTH, '\n'))
+ readSatelliteFile(line, planet, view, projection,
+   planetProperties, annotationMap);
+ 
+Index: src/libannotate/addSpiceObjects.cpp
+===
+diff --git a/src/libannotate/addSpiceObjects.cpp 
b/src/libannotate/addSpiceObjects.cpp
+--- a/src/libannotate/addSpiceObjects.cpp  (revision 206)
 b/src/libannotate/addSpiceObjects.cpp  (revision 207)
+@@ -524,7 +524,7 @@
+ {
+ ifstream inFile(kernelFile.c_str());
+ char *line = new char[MAX_LINE_LENGTH];
+-while 

[gentoo-commits] repo/gentoo:master commit in: x11-misc/xplanet/files/, x11-misc/xplanet/

2016-04-10 Thread Jeroen Roovers
commit: a6f240d87f47be9607a24c31d5867cd87487e533
Author: Jeroen Roovers  gentoo  org>
AuthorDate: Mon Apr 11 05:30:56 2016 +
Commit: Jeroen Roovers  gentoo  org>
CommitDate: Mon Apr 11 05:41:01 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a6f240d8

x11-misc/xplanet: Version bump.

Package-Manager: portage-2.2.28

 x11-misc/xplanet/Manifest |  1 +
 x11-misc/xplanet/files/xplanet-1.3.1-giflib.patch | 55 
 x11-misc/xplanet/xplanet-1.3.1.ebuild | 78 +++
 3 files changed, 134 insertions(+)

diff --git a/x11-misc/xplanet/Manifest b/x11-misc/xplanet/Manifest
index d52d658..0382efb 100644
--- a/x11-misc/xplanet/Manifest
+++ b/x11-misc/xplanet/Manifest
@@ -1 +1,2 @@
 DIST xplanet-1.3.0.tar.gz 1227385 SHA256 
44fb742bb93e5661ea8b11ccabcc12896693e051f3dd5083c9227224c416b442 SHA512 
c9f0db21c457d0702f8b1fb6d632838f45e80ea45b9cade80d6ab0ae956fdca03cfeed9582548c69b349a354afc27308309656d7e06ac46bc416c3e1038f8efd
 WHIRLPOOL 
e4fe013eeef4868d28f8a53c194f54865dd4cf29137936eb609352fba4a3481e0a6db9664944cb67d9e7896b150b5e640c95136e6b9f33dc4810591316d0371a
+DIST xplanet-1.3.1.tar.gz 1236035 SHA256 
4380d570a8bf27b81fb629c97a636c1673407f4ac4989ce931720078a90aece7 SHA512 
06ce3187fbd364f4ccee768fceca559690c905c870e2fb25ca32453ce09c564ba3455ec539f1e3da177de23a0611f767b375efe2e10b601d09313c0d068e35e0
 WHIRLPOOL 
4c40fac4056654aa195f9955053d2dfba6791e8e2021673f05c334163ee5b1d842e6101447228844573ed41a88f37c0fd96df633716bddeb55c8940941621ad9

diff --git a/x11-misc/xplanet/files/xplanet-1.3.1-giflib.patch 
b/x11-misc/xplanet/files/xplanet-1.3.1-giflib.patch
new file mode 100644
index 000..b4d6fb9
--- /dev/null
+++ b/x11-misc/xplanet/files/xplanet-1.3.1-giflib.patch
@@ -0,0 +1,55 @@
+--- a/src/libimage/gif.c
 b/src/libimage/gif.c
+@@ -20,6 +20,7 @@
+ 
+ #include 
+ #include 
++#include 
+ #include 
+ 
+ #include 
+@@ -179,7 +180,11 @@
+   }
+ }
+ 
++#if GIFLIB_MAJOR >= 5
++if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) {
++#else
+ if (DGifCloseFile(GifFile) == GIF_ERROR) {
++#endif
+   return(0);
+ }
+ 
+@@ -240,7 +245,7 @@
+  *   Also non of the parameter are allocated by this routine.
+  *   This function returns GIF_OK if succesfull, GIF_ERROR otherwise.
+  
**/
+-static int
++int
+ QuantizeBuffer(unsigned int Width,
+unsigned int Height,
+int *ColorMapSize,
+@@ -493,7 +498,11 @@
+ static void QuitGifError(GifFileType *GifFile)
+ {
+ fprintf(stderr, "Error writing GIF file\n");
++#if GIFLIB_MAJOR >= 5
++if (GifFile != NULL) EGifCloseFile(GifFile, NULL);
++#else
+ if (GifFile != NULL) EGifCloseFile(GifFile);
++#endif
+ }
+ 
+ int 
+@@ -589,7 +598,11 @@
+   Ptr += width;
+ }
+ 
++#if GIFLIB_MAJOR >= 5
++if (EGifCloseFile(GifFile, NULL) == GIF_ERROR)
++#else
+ if (EGifCloseFile(GifFile) == GIF_ERROR)
++#endif
+ 
+ {
+   QuitGifError(GifFile);

diff --git a/x11-misc/xplanet/xplanet-1.3.1.ebuild 
b/x11-misc/xplanet/xplanet-1.3.1.ebuild
new file mode 100644
index 000..726ebc0
--- /dev/null
+++ b/x11-misc/xplanet/xplanet-1.3.1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit base flag-o-matic
+
+DESCRIPTION="Render images of the earth into the X root window"
+HOMEPAGE="http://xplanet.sourceforge.net/;
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
+IUSE="gif jpeg png tiff truetype X"
+
+RDEPEND="gif? ( >media-libs/giflib-4.2 )
+   jpeg? ( virtual/jpeg )
+   png? (
+   media-libs/libpng:0
+   media-libs/netpbm
+   )
+   tiff? ( media-libs/tiff:0 )
+   truetype? (
+   media-libs/freetype:2
+   x11-libs/pango
+   )
+   X? (
+   x11-libs/libX11
+   x11-libs/libXext
+   x11-libs/libXScrnSaver
+   x11-libs/libXt
+   )"
+DEPEND="${RDEPEND}
+   truetype? ( virtual/pkgconfig )
+   X? (
+   x11-proto/scrnsaverproto
+   x11-proto/xproto
+   )"
+
+DOCS="AUTHORS ChangeLog NEWS README TODO"
+
+PATCHES=( "${FILESDIR}"/${P}-giflib.patch )
+
+src_configure() {
+   # econf says 'checking pnm.h presence... no'
+   use png && append-cppflags -I/usr/include/netpbm
+
+   local myconf
+
+   use X \
+   && myconf+=" --with-x --with-xscreensaver" \
+   || myconf+=" --with-x=no --with-xscreensaver=no"
+
+   use gif \
+   && myconf+=" --with-gif" \
+   || myconf+=" --with-gif=no"
+
+   use jpeg \
+   && myconf+=" --with-jpeg" \
+   || myconf+=" --with-jpeg=no"
+
+   use tiff \
+