summaryrefslogtreecommitdiff
path: root/x11/xplanet
diff options
context:
space:
mode:
authoratatat <atatat>2002-04-04 16:47:54 +0000
committeratatat <atatat>2002-04-04 16:47:54 +0000
commitafbf2715b6e5ba19d1977d2318206baa870aeaf7 (patch)
tree76b5423a831cb620c3accd51fd82934c08cdb165 /x11/xplanet
parent4bef81bd5a466b0a68484181d06fcd543037eb51 (diff)
downloadpkgsrc-afbf2715b6e5ba19d1977d2318206baa870aeaf7.tar.gz
Add freetype2 support to xplanet, and add two easy ways (the XPLANET
environment variable and the $HOME/.xplanet directory) for users to maintain data sets and images for xplanet without having to them in ${LOCALBASE}/share/xplanet.
Diffstat (limited to 'x11/xplanet')
-rw-r--r--x11/xplanet/Makefile10
-rw-r--r--x11/xplanet/distinfo10
-rw-r--r--x11/xplanet/patches/patch-aa15
-rw-r--r--x11/xplanet/patches/patch-ab15
-rw-r--r--x11/xplanet/patches/patch-ac15
-rw-r--r--x11/xplanet/patches/patch-ad57
-rw-r--r--x11/xplanet/patches/patch-ae47
-rw-r--r--x11/xplanet/patches/patch-af81
-rw-r--r--x11/xplanet/patches/patch-ag80
-rw-r--r--x11/xplanet/patches/patch-ah83
10 files changed, 411 insertions, 2 deletions
diff --git a/x11/xplanet/Makefile b/x11/xplanet/Makefile
index cccd1ac8dd0..fc8d870e73c 100644
--- a/x11/xplanet/Makefile
+++ b/x11/xplanet/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2002/03/25 16:08:07 atatat Exp $
+# $NetBSD: Makefile,v 1.2 2002/04/04 16:47:54 atatat Exp $
#
DISTNAME= xplanet-0.93
+PKGREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://prdownloads.sourceforge.net/xplanet/
@@ -20,11 +21,18 @@ DEPENDS+= glu-*:../../graphics/glu
LIBS= -lpbm -lppm -lpgm
MAKE_ENV+= LIBS="${LIBS}"
+pre-configure:
+ cd ${WRKSRC} ; \
+ f=xplanet.1 ; \
+ [ -f $$f.BAK ] || ${MV} $$f $$f.BAK ; \
+ ${SED} -e 's|@PREFIX@|${PREFIX}|g' < $$f.BAK > $$f
+
.include "../../graphics/libungif/buildlink.mk"
.include "../../graphics/jpeg/buildlink.mk"
.include "../../graphics/png/buildlink.mk"
.include "../../graphics/netpbm/buildlink.mk"
.include "../../graphics/tiff/buildlink.mk"
+.include "../../graphics/freetype2/buildlink.mk"
.include "../../x11/tk/buildlink.mk"
.include "../../mk/x11.buildlink.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/x11/xplanet/distinfo b/x11/xplanet/distinfo
index 6aa56a9789f..d6ea5b2dc2a 100644
--- a/x11/xplanet/distinfo
+++ b/x11/xplanet/distinfo
@@ -1,4 +1,12 @@
-$NetBSD: distinfo,v 1.1 2002/03/25 16:08:07 atatat Exp $
+$NetBSD: distinfo,v 1.2 2002/04/04 16:47:54 atatat Exp $
SHA1 (xplanet-0.93.tar.gz) = 5071bcaa203b340ca2f6e5099c7f3891d103258f
Size (xplanet-0.93.tar.gz) = 1164083 bytes
+SHA1 (patch-aa) = 3081b5a31e998211a87b1f61c28c0600d6285d9e
+SHA1 (patch-ab) = 2d51e109df7cdff79d2cd5ae3fcb3adfddfd02ea
+SHA1 (patch-ac) = a66c8105bf1e31991fadeb3f53774375cc6200cc
+SHA1 (patch-ad) = 95c0ec0f7ee99f4cbf6d5509e7bea25de0653ba6
+SHA1 (patch-ae) = b4a000a9f47b8f735427ff5ae809503d325d43e7
+SHA1 (patch-af) = bcfea356988ba96479f11a456e13e55950431dfa
+SHA1 (patch-ag) = 55720da3e95587fdd22a534e6422f7376724d820
+SHA1 (patch-ah) = 5042d454143b9c92e8555c0f19f24dde4e6ea81c
diff --git a/x11/xplanet/patches/patch-aa b/x11/xplanet/patches/patch-aa
new file mode 100644
index 00000000000..c6787a2e27b
--- /dev/null
+++ b/x11/xplanet/patches/patch-aa
@@ -0,0 +1,15 @@
+$NetBSD: patch-aa,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Make freetype2 work with xplanet.
+
+--- aclocal.m4.orig Tue Jan 22 21:07:42 2002
++++ aclocal.m4 Wed Apr 3 00:10:53 2002
+@@ -9,7 +9,7 @@
+ AC_MSG_WARN(*** Xplanet will be built without freetype support ***)
+ with_freetype='no'
+ else
+- FREETYPE_CFLAGS="-I`$FREETYPE_CONFIG --prefix`/include `$FREETYPE_CONFIG --cflags`"
++ FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags` -I`$FREETYPE_CONFIG --prefix`/include"
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+ AC_SUBST(FREETYPE_CFLAGS)
+ AC_SUBST(FREETYPE_LIBS)
diff --git a/x11/xplanet/patches/patch-ab b/x11/xplanet/patches/patch-ab
new file mode 100644
index 00000000000..fa7e4e1adc3
--- /dev/null
+++ b/x11/xplanet/patches/patch-ab
@@ -0,0 +1,15 @@
+$NetBSD: patch-ab,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Make freetype2 work with xplanet.
+
+--- configure.orig Tue Jan 22 21:07:42 2002
++++ configure Wed Apr 3 00:11:22 2002
+@@ -2725,7 +2725,7 @@
+ echo "configure: warning: *** Xplanet will be built without freetype support ***" 1>&2
+ with_freetype='no'
+ else
+- FREETYPE_CFLAGS="-I`$FREETYPE_CONFIG --prefix`/include `$FREETYPE_CONFIG --cflags`"
++ FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags` -I`$FREETYPE_CONFIG --prefix`/include"
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+
+
diff --git a/x11/xplanet/patches/patch-ac b/x11/xplanet/patches/patch-ac
new file mode 100644
index 00000000000..0b6e8c4b2fa
--- /dev/null
+++ b/x11/xplanet/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- xplanet.cc.orig Tue Jan 22 21:07:42 2002
++++ xplanet.cc Tue Apr 2 22:43:04 2002
+@@ -231,6 +231,8 @@
+ }
+
+ cerr << "the current directory\nthe images subdirectory\n"
++ << "$XPLANET" << separator << "images\n"
++ << "$HOME" << separator << ".xplanet" << separator << "images\n"
+ << prefix << separator << "images\n";
+
+ if (opts.mapdir.size() == 0)
diff --git a/x11/xplanet/patches/patch-ad b/x11/xplanet/patches/patch-ad
new file mode 100644
index 00000000000..e3b4c16c493
--- /dev/null
+++ b/x11/xplanet/patches/patch-ad
@@ -0,0 +1,57 @@
+$NetBSD: patch-ad,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- util.cc.orig Tue Jan 22 21:07:42 2002
++++ util.cc Tue Apr 2 22:43:04 2002
+@@ -28,6 +28,7 @@
+ using namespace std;
+
+ #include <errno.h>
++#include <stdlib.h>
+ #include <sys/time.h>
+
+ #include "auxfiles.h"
+@@ -339,7 +340,41 @@
+ filename = newname;
+ return(true);
+ }
+-
++
++ char *xplanet = getenv("XPLANET");
++ if (xplanet != NULL)
++ {
++ newname = xplanet;
++ newname += separator;
++ newname += "images";
++ newname += separator;
++ newname += filename;
++
++ if (fileExists(newname))
++ {
++ filename = newname;
++ return(true);
++ }
++ }
++
++ char *home = getenv("HOME");
++ if (home != NULL)
++ {
++ newname = home;
++ newname += separator;
++ newname += ".xplanet";
++ newname += separator;
++ newname += "images";
++ newname += separator;
++ newname += filename;
++
++ if (fileExists(newname))
++ {
++ filename = newname;
++ return(true);
++ }
++ }
++
+ newname = prefix;
+ newname += separator;
+ newname += "images";
diff --git a/x11/xplanet/patches/patch-ae b/x11/xplanet/patches/patch-ae
new file mode 100644
index 00000000000..db076ba2746
--- /dev/null
+++ b/x11/xplanet/patches/patch-ae
@@ -0,0 +1,47 @@
+$NetBSD: patch-ae,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- libannotate/drawSatellite.cc.orig Tue Jan 22 21:07:42 2002
++++ libannotate/drawSatellite.cc Tue Apr 2 22:43:04 2002
+@@ -56,6 +56,40 @@
+ return(true);
+ }
+
++ char *xplanet = getenv("XPLANET");
++ if (xplanet != NULL)
++ {
++ satellite_file = xplanet;
++ satellite_file += separator;
++ satellite_file += "satellites";
++ satellite_file += separator;
++ satellite_file += filename;
++
++ if (fileExists(satellite_file))
++ {
++ filename = satellite_file;
++ return(true);
++ }
++ }
++
++ char *home = getenv("HOME");
++ if (home != NULL)
++ {
++ satellite_file = home;
++ satellite_file += separator;
++ satellite_file += ".xplanet";
++ satellite_file += separator;
++ satellite_file += "satellites";
++ satellite_file += separator;
++ satellite_file += filename;
++
++ if (fileExists(satellite_file))
++ {
++ filename = satellite_file;
++ return(true);
++ }
++ }
++
+ satellite_file = prefix;
+ satellite_file += separator;
+ satellite_file += "satellites";
diff --git a/x11/xplanet/patches/patch-af b/x11/xplanet/patches/patch-af
new file mode 100644
index 00000000000..d0da71f300c
--- /dev/null
+++ b/x11/xplanet/patches/patch-af
@@ -0,0 +1,81 @@
+$NetBSD: patch-af,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- libannotate/drawMarkers.cc.orig Tue Jan 22 21:07:42 2002
++++ libannotate/drawMarkers.cc Tue Apr 2 22:43:04 2002
+@@ -92,6 +92,74 @@
+ return(true);
+ }
+
++ char *xplanet = getenv("XPLANET");
++ if (xplanet != NULL)
++ {
++ if (locale)
++ {
++ markerfile = xplanet;
++ markerfile += separator;
++ markerfile += "markers";
++ markerfile += separator;
++ markerfile += locale_string;
++ markerfile += filename;
++
++ if (fileExists(markerfile))
++ {
++ filename = markerfile;
++ return(true);
++ }
++ }
++
++ markerfile = xplanet;
++ markerfile += separator;
++ markerfile += "markers";
++ markerfile += separator;
++ markerfile += filename;
++
++ if (fileExists(markerfile))
++ {
++ filename = markerfile;
++ return(true);
++ }
++ }
++
++ char *home = getenv("HOME");
++ if (home != NULL)
++ {
++ if (locale)
++ {
++ markerfile = home;
++ markerfile += separator;
++ markerfile += ".xplanet";
++ markerfile += separator;
++ markerfile += "markers";
++ markerfile += separator;
++ markerfile += locale_string;
++ markerfile += filename;
++
++ if (fileExists(markerfile))
++ {
++ filename = markerfile;
++ return(true);
++ }
++ }
++
++ markerfile = home;
++ markerfile += separator;
++ markerfile += ".xplanet";
++ markerfile += separator;
++ markerfile += "markers";
++ markerfile += separator;
++ markerfile += filename;
++
++ if (fileExists(markerfile))
++ {
++ filename = markerfile;
++ return(true);
++ }
++ }
++
+ // Check for the input filename in $prefix/markers
+ // Check for the input filename in the "markers" subdirectory
+ if (locale)
diff --git a/x11/xplanet/patches/patch-ag b/x11/xplanet/patches/patch-ag
new file mode 100644
index 00000000000..a45ee12e3fe
--- /dev/null
+++ b/x11/xplanet/patches/patch-ag
@@ -0,0 +1,80 @@
+$NetBSD: patch-ag,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- libdisplay/DisplayBase.cc.orig Tue Jan 22 21:07:42 2002
++++ libdisplay/DisplayBase.cc Tue Apr 2 22:43:04 2002
+@@ -208,6 +208,40 @@
+ return(1);
+ }
+
++ char *xplanet = getenv("XPLANET");
++ if (xplanet != NULL)
++ {
++ newfont = xplanet;
++ newfont += separator;
++ newfont += "fonts";
++ newfont += separator;
++ newfont += fontname;
++
++ if (fileExists(newfont))
++ {
++ fontname = newfont;
++ return(true);
++ }
++ }
++
++ char *home = getenv("HOME");
++ if (home != NULL)
++ {
++ newfont = home;
++ newfont += separator;
++ newfont += ".xplanet";
++ newfont += separator;
++ newfont += "fonts";
++ newfont += separator;
++ newfont += fontname;
++
++ if (fileExists(newfont))
++ {
++ fontname = newfont;
++ return(true);
++ }
++ }
++
+ newfont = prefix;
+ newfont += separator;
+ newfont += "fonts";
+@@ -533,6 +567,32 @@
+ string rgbfile = "rgb.txt";
+
+ ifstream infile(rgbfile.c_str());
++ if (infile.bad())
++ {
++ char *xplanet = getenv("XPLANET");
++ if (xplanet != NULL)
++ {
++ infile.close();
++ rgbfile = xplanet;
++ rgbfile += separator;
++ rgbfile += "rgb.txt";
++ infile.open(rgbfile.c_str());
++ }
++ }
++ if (infile.bad())
++ {
++ char *home = getenv("HOME");
++ if (home != NULL)
++ {
++ infile.close();
++ rgbfile = home;
++ rgbfile += separator;
++ rgbfile += ".xplanet";
++ rgbfile += separator;
++ rgbfile += "rgb.txt";
++ infile.open(rgbfile.c_str());
++ }
++ }
+ if (infile.bad())
+ {
+ infile.close();
diff --git a/x11/xplanet/patches/patch-ah b/x11/xplanet/patches/patch-ah
new file mode 100644
index 00000000000..daf33b2e44a
--- /dev/null
+++ b/x11/xplanet/patches/patch-ah
@@ -0,0 +1,83 @@
+$NetBSD: patch-ah,v 1.1 2002/04/04 16:47:55 atatat Exp $
+
+Add support for $XPLANET/images and $HOME/.xplanet/images images, etc.
+
+--- xplanet.1.orig Tue Jan 22 21:07:42 2002
++++ xplanet.1 Wed Apr 3 10:05:01 2002
+@@ -621,7 +621,8 @@
+ TrueType fonts:
+ First look in fontdir (if the -fontdir option is used), then in the
+ current directory, then in a subdirectory "fonts" of the current
+-directory, and finally in $PREFIX/fonts. The default font is
++directory, in $XPLANET/fonts, in $HOME/.xplanet/fonts, and finally
++in $PREFIX/fonts. The default font is
+ helr____.ttf. Note that TrueType fonts are only used if an X11
+ display is not available, a TrueType font is specified with the -font
+ option, or the -truetype option is specified.
+@@ -629,22 +630,25 @@
+ image files:
+ First look in mapdir (if the -mapdir option is used), then in the
+ current directory, then in a subdirectory "images" of the current
+-directory, and finally in $PREFIX/images. The default name is
++directory, in $XPLANET/images, in $HOME/.xplanet/images, and finally
++in $PREFIX/images. The default name is
+ body.jpg (e.g. earth.jpg, neptune.jpg). The extension of the file by
+ default is jpg but this can also be set at compilation time.
+
+ marker files:
+ First look in the current directory, then in a subdirectory "markers"
+-of the current directory, and finally in $PREFIX/markers. The default
++of the current directory, in $XPLANET/markers, in $HOME/.xplanet/markers,
++and finally in $PREFIX/markers. The default
+ marker file name is body (e.g. earth, neptune).
+
+ satellite files:
+ First look in the current directory, then in a subdirectory
+-"satellites" of the current directory, and finally in
++"satellites" of the current directory, in $XPLANET/satellites, in
++$HOME/.xplanet/satellites, and finally in
+ $PREFIX/satellites.
+
+ The value of $PREFIX is set at compilation time in auxfiles.h. On a
+-Unix system it is usually /usr/local/share/xplanet, and on Windows it
++NetBSD system it is usually @PREFIX@/share/xplanet, and on Windows it
+ is usually C:\\WINDOWS\\Desktop. See the INSTALL file for more details
+ on the configuration options.
+
+@@ -704,23 +708,23 @@
+ .SH FILES
+ .nf
+ .sp
+-/usr/local/bin/xplanet
+-/usr/local/bin/xplanetbg
+-/usr/local/bin/tkxplanet
+-/usr/local/bin/tzcoord.pl
+-/usr/local/man/man1/xplanet.1
+-/usr/local/man/man1/xplanetbg.1
+-/usr/local/man/man1/tkxplanet.1
+-/usr/local/man/man1/tzcoord.pl.1
+-/usr/local/share/xplanet/rgb.txt
+-/usr/local/share/xplanet/fonts/helr____.ttf
+-/usr/local/share/xplanet/images/body.jpg
+-/usr/local/share/xplanet/markers/body
++@PREFIX@/bin/xplanet
++@PREFIX@/bin/xplanetbg
++@PREFIX@/bin/tkxplanet
++@PREFIX@/bin/tzcoord.pl
++@PREFIX@/man/man1/xplanet.1
++@PREFIX@/man/man1/xplanetbg.1
++@PREFIX@/man/man1/tkxplanet.1
++@PREFIX@/man/man1/tzcoord.pl.1
++@PREFIX@/share/xplanet/rgb.txt
++@PREFIX@/share/xplanet/fonts/helr____.ttf
++@PREFIX@/share/xplanet/images/body.jpg
++@PREFIX@/share/xplanet/markers/body
+ where body is the name of the appropriate body, specified in the -body
+ option.
+ .sp
+ .fi
+-The default prefix /usr/local/share/xplanet is set in auxfiles.h and
++The default prefix @PREFIX@/share/xplanet is set in auxfiles.h and
+ may be changed if desired.
+ .SH AUTHOR
+ xplanet was written by