diff options
author | ng0 <ng0@pkgsrc.org> | 2019-11-16 17:36:28 +0000 |
---|---|---|
committer | ng0 <ng0@pkgsrc.org> | 2019-11-16 17:36:28 +0000 |
commit | c56ac39b5c3327f49361d2d2e44ffba26d032d2d (patch) | |
tree | a5b63812f558bdb7349ce2c11766c41c89105bda /x11/xplanet | |
parent | 5f3ee7735789302028008f3fda01cf8aecc39558 (diff) | |
download | pkgsrc-c56ac39b5c3327f49361d2d2e44ffba26d032d2d.tar.gz |
xplanet: Update to version 1.3.1
* Add 2017 leap second patch from upstream as well as
fix output bug when num_times is 2 patch.
* Fix build with clang
Upstream Changelog from SVN:
Don't outline symbol for markers where outlined=false
fix marker bug when range is a small value
update gif code to giflib-4.2.0
update gif code to 5.0.0
fix arc bug at close ranges, update default night image
update version number
use distance from limb plane instead of planet center when deciding when to draw annotations
reapply marker fix
fix limb distance bug
Add -label_altitude option
fix radius bug
Fix label bug
use GetTempPath() for windows
add windows directory
add string.h to png.c
use JPL's leapsecond kernel definitions for ET-UTC
add deltaT expression for pre 1838
fix UTC bug
Update MS Windows desktop size
update comments in config file
updates for cygwin
set default desktop file type to PNG
add 2015 leap second
release 1.3.1
Diffstat (limited to 'x11/xplanet')
-rw-r--r-- | x11/xplanet/Makefile | 21 | ||||
-rw-r--r-- | x11/xplanet/distinfo | 18 | ||||
-rw-r--r-- | x11/xplanet/options.mk | 3 | ||||
-rw-r--r-- | x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp | 38 | ||||
-rw-r--r-- | x11/xplanet/patches/patch-src_libdisplay_DisplayOutput.cpp | 16 | ||||
-rw-r--r-- | x11/xplanet/patches/patch-src_libimage_gif.c | 193 | ||||
-rw-r--r-- | x11/xplanet/patches/patch-src_readConfig-fixclang.cpp | 3 | ||||
-rw-r--r-- | x11/xplanet/patches/patch-src_xpUtil-Add2017LeapSecond.cpp | 16 |
8 files changed, 113 insertions, 195 deletions
diff --git a/x11/xplanet/Makefile b/x11/xplanet/Makefile index 3f7b7c12b77..e741273f619 100644 --- a/x11/xplanet/Makefile +++ b/x11/xplanet/Makefile @@ -1,7 +1,9 @@ -# $NetBSD: Makefile,v 1.90 2019/08/11 15:38:22 ng0 Exp $ +# $NetBSD: Makefile,v 1.91 2019/11/16 17:36:28 ng0 Exp $ -DISTNAME= xplanet-1.3.0 -PKGREVISION= 7 +# The 1.3.1 release is a few years old, and upstream recommends that +# the head of svn be used. However, we follow pkgsrc norms of +# packaging releases, with some commits applied as patches. +DISTNAME= xplanet-1.3.1 CATEGORIES= x11 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=xplanet/} @@ -11,15 +13,14 @@ COMMENT= Rotating rendered map of the Earth in X11 root window LICENSE= gnu-gpl-v2 USE_LANGUAGES= c c++11 -USE_TOOLS+= gmake pkg-config GNU_CONFIGURE= yes -CONFIGURE_ENV+= PERL=${_ENV_PERL:Q} -_ENV_PERL= ${TOOLS_SETENV} perl +USE_TOOLS+= perl +MAKE_ENV+= PERL5=${PERL5:Q} -# directory creation should be fixed in the future release of xplanet -XPLANET_DIRS= arcs config ephemeris fonts images markers origin -XPLANET_DIRS+= satellites scripts spice stars -INSTALLATION_DIRS+= ${XPLANET_DIRS:C,.*,share/xplanet/&,g} +# \todo Fix Native PNM support +CONFIGURE_ARGS+= --without-pnm +# \todo Remove when https://github.com/OpenSpace/Spice is in pkgsrc +CONFIGURE_ARGS+= ac_cv_lib_cspice_furnsh_c=no .include "options.mk" diff --git a/x11/xplanet/distinfo b/x11/xplanet/distinfo index 957de6675f8..721006a246e 100644 --- a/x11/xplanet/distinfo +++ b/x11/xplanet/distinfo @@ -1,14 +1,16 @@ -$NetBSD: distinfo,v 1.22 2019/08/11 15:38:22 ng0 Exp $ +$NetBSD: distinfo,v 1.23 2019/11/16 17:36:28 ng0 Exp $ -SHA1 (xplanet-1.3.0.tar.gz) = 7c5208b501b441a0184cbb334a5658d0309d7dac -RMD160 (xplanet-1.3.0.tar.gz) = b5ba6239019669668aeb7f63391aa850cc3dd8b7 -SHA512 (xplanet-1.3.0.tar.gz) = c9f0db21c457d0702f8b1fb6d632838f45e80ea45b9cade80d6ab0ae956fdca03cfeed9582548c69b349a354afc27308309656d7e06ac46bc416c3e1038f8efd -Size (xplanet-1.3.0.tar.gz) = 1227385 bytes +SHA1 (xplanet-1.3.1.tar.gz) = e711dc5a561f83d5bafcc4e47094addfd1806af7 +RMD160 (xplanet-1.3.1.tar.gz) = 7fb853538392fd871aeae44703d4f18af25ba682 +SHA512 (xplanet-1.3.1.tar.gz) = 06ce3187fbd364f4ccee768fceca559690c905c870e2fb25ca32453ce09c564ba3455ec539f1e3da177de23a0611f767b375efe2e10b601d09313c0d068e35e0 +Size (xplanet-1.3.1.tar.gz) = 1236035 bytes SHA1 (patch-src_libannotate_addArcs.cpp) = 5d2ba7c0df6989e0b0b838fccbc73fe7a17ba91c -SHA1 (patch-src_libannotate_addMarkers.cpp) = 9c05d3b308b6a957b8af7f8a05ba49a608f5120e +SHA1 (patch-src_libannotate_addMarkers.cpp) = eea1329b61961c47ff9e039961cc6c55db9bd507 SHA1 (patch-src_libannotate_addSatellites.cpp) = 7c8976a3e88ebac7e4d9b59a38f98f87b9d04f57 -SHA1 (patch-src_libimage_gif.c) = 6c107bd1f733fe82f2b88af8ad778e0fe5aea5bd +SHA1 (patch-src_libdisplay_DisplayOutput.cpp) = aa893648e1bcb22ff0ef19a141aff1f4910c89c4 +SHA1 (patch-src_libimage_gif.c) = 560297ee0a40b9c62278dcfc9bce4388e9e29d9d SHA1 (patch-src_libmultiple_RayleighScattering.cpp) = 3a64033dc0c6915c9cd2eed2e506dd4c802138c9 SHA1 (patch-src_libmultiple_drawStars.cpp) = b6a3f3995f4f1ac77660fdad64524ef6a48c4d50 -SHA1 (patch-src_readConfig-fixclang.cpp) = 642e56513e0ae9ebba18ccc653cb089858a18637 +SHA1 (patch-src_readConfig-fixclang.cpp) = d24cfc6f832e9445f8c968a75e4eb0a7688b0c84 SHA1 (patch-src_readConfig.cpp) = c1a46209dfcbb6a37b6c7ff90f633a6450fbd5d9 +SHA1 (patch-src_xpUtil-Add2017LeapSecond.cpp) = 6b48a78f29b441ebdcdd097d01d5479e3afc8edc diff --git a/x11/xplanet/options.mk b/x11/xplanet/options.mk index fc7ac95ac63..46169ce2b0e 100644 --- a/x11/xplanet/options.mk +++ b/x11/xplanet/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.1 2009/07/22 13:37:06 wiz Exp $ +# $NetBSD: options.mk,v 1.2 2019/11/16 17:36:28 ng0 Exp $ PKG_OPTIONS_VAR= PKG_OPTIONS.xplanet PKG_SUPPORTED_OPTIONS= x11 @@ -7,6 +7,7 @@ PKG_SUGGESTED_OPTIONS= x11 .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:Mx11) +# for pango pkg-config is required USE_TOOLS+= pkg-config .include "../../devel/pango/buildlink3.mk" diff --git a/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp b/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp index 23826c63f29..fdbc0f7c6d7 100644 --- a/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp +++ b/x11/xplanet/patches/patch-src_libannotate_addMarkers.cpp @@ -1,43 +1,47 @@ -$NetBSD: patch-src_libannotate_addMarkers.cpp,v 1.1 2018/02/13 12:45:02 ryoon Exp $ +$NetBSD: patch-src_libannotate_addMarkers.cpp,v 1.2 2019/11/16 17:36:28 ng0 Exp $ + +Multiple inFile.getline() calls within xplanet test the return +against NULL in a read loop, but g++ 6 doesn't like this. Replace +with checks for inFile.eof() and inFile.fail() instead. --- src/libannotate/addMarkers.cpp.orig 2011-11-15 01:44:24.000000000 +0000 +++ src/libannotate/addMarkers.cpp -@@ -423,13 +423,16 @@ addMarkers(PlanetProperties *planetPrope +@@ -429,12 +429,16 @@ addMarkers(PlanetProperties *planetProperties, Planet *planet, { ifstream inFile(markerFile.c_str()); char *line = new char[MAX_LINE_LENGTH]; - while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) -+ while (1) ++ while (1) { unsigned char color[3]; memcpy(color, planetProperties->MarkerColor(), 3); string font(planetProperties->MarkerFont()); int fontSize(planetProperties->MarkerFontSize()); ++ ++ inFile.getline (line, MAX_LINE_LENGTH, '\n'); ++ if (inFile.eof() || inFile.fail()) ++ break; -+ inFile.getline (line, MAX_LINE_LENGTH, '\n'); -+ if (inFile.eof() || inFile.fail()) -+ break; - readMarkerFile(line, planet, pixel_radius, X, Y, Z, + readMarkerFile(line, planet, pixel_radius, view, projection, width, height, - color, font, fontSize, -@@ -469,13 +472,18 @@ addMarkers(View *view, const int width, +@@ -475,13 +479,18 @@ addMarkers(View *view, const int width, const int height, { ifstream inFile(markerFile.c_str()); char *line = new char[MAX_LINE_LENGTH]; - while (inFile.getline (line, MAX_LINE_LENGTH, '\n') != NULL) -- { -+ while (1) -+ { -+ inFile.getline (line, MAX_LINE_LENGTH, '\n'); ++ while (1) + { ++ inFile.getline (line, MAX_LINE_LENGTH, '\n'); + unsigned char color[3]; memcpy(color, options->Color(), 3); string font(options->Font()); int fontSize(options->FontSize()); - -+ if (inFile.eof() || inFile.fail()) -+ break; +- ++ ++ if (inFile.eof() || inFile.fail()) ++ break; + - readMarkerFile(line, NULL, 0, 0, 0, 0, + readMarkerFile(line, NULL, 0, view, NULL, width, height, color, font, fontSize, 1.0, diff --git a/x11/xplanet/patches/patch-src_libdisplay_DisplayOutput.cpp b/x11/xplanet/patches/patch-src_libdisplay_DisplayOutput.cpp new file mode 100644 index 00000000000..db30622ee79 --- /dev/null +++ b/x11/xplanet/patches/patch-src_libdisplay_DisplayOutput.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-src_libdisplay_DisplayOutput.cpp,v 1.1 2019/11/16 17:36:28 ng0 Exp $ + +pick from https://sourceforge.net/p/xplanet/code/208/ +fix output bug when num_times is 2 + +--- src/libdisplay/DisplayOutput.cpp~ ++++ src/libdisplay/DisplayOutput.cpp +@@ -51,7 +51,7 @@ + string outputFilename = options->OutputBase(); + int startIndex = options->OutputStartIndex(); + int stopIndex = options->NumTimes() + startIndex - 1; +- if (stopIndex > 1) ++ if (stopIndex > 0) + { + const int digits = (int) (log10((double) stopIndex) + 1); + char buffer[64]; diff --git a/x11/xplanet/patches/patch-src_libimage_gif.c b/x11/xplanet/patches/patch-src_libimage_gif.c index 43032b8f811..670cfe84fbb 100644 --- a/x11/xplanet/patches/patch-src_libimage_gif.c +++ b/x11/xplanet/patches/patch-src_libimage_gif.c @@ -1,176 +1,53 @@ -$NetBSD: patch-src_libimage_gif.c,v 1.3 2014/05/25 09:18:06 obache Exp $ +$NetBSD: patch-src_libimage_gif.c,v 1.4 2019/11/16 17:36:28 ng0 Exp $ * Fix build with giflib 5.1. --- src/libimage/gif.c.orig 2006-03-25 22:50:51.000000000 +0000 +++ src/libimage/gif.c -@@ -21,8 +21,26 @@ +@@ -21,7 +21,7 @@ #include <stdio.h> #include <stdlib.h> - -+#ifndef TRUE -+#define TRUE 1 -+#endif -+#ifndef FALSE -+#define FALSE 0 -+#endif + #include <string.h> +- ++#include <stdbool.h> #include <gif_lib.h> -+/* from util/qprintf.c of giflib 5.0.4 */ -+void -+PrintGifError(int ErrorCode) -+{ -+ char *Err = GifErrorString(ErrorCode); -+ -+ if (Err != NULL) -+ fprintf(stderr, "GIF-LIB error: %s.\n", Err); -+ else -+ fprintf(stderr, "GIF-LIB undefined error %d.\n", ErrorCode); -+} -+ /* - A lot of this is based on the gif2rgb and rgb2gif codes in the libungif - distribution. -@@ -37,16 +55,17 @@ read_gif(const char *filename, int *widt - GifFileType *infile; - GifRecordType record_type; - GifRowType *buffer = NULL; -+ int ErrorCode; - - int i, j; - int color_index; - unsigned char *ptr = NULL; - -- infile = DGifOpenFileName(filename); -+ infile = DGifOpenFileName(filename, &ErrorCode); - - if (infile == NULL) - { -- PrintGifError(); -+ PrintGifError(ErrorCode); - return(0); - } - -@@ -54,7 +73,7 @@ read_gif(const char *filename, int *widt - { - if (DGifGetRecordType(infile, &record_type) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(infile->Error); - return(0); - } - -@@ -63,7 +82,7 @@ read_gif(const char *filename, int *widt - case IMAGE_DESC_RECORD_TYPE: - if (DGifGetImageDesc(infile) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(infile->Error); - return(0); - } - -@@ -107,14 +126,14 @@ read_gif(const char *filename, int *widt - GifByteType *ext; - if (DGifGetExtension(infile, &ext_code, &ext) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(infile->Error); - return(0); - } - while (ext != NULL) - { - if (DGifGetExtensionNext(infile, &ext) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(infile->Error); - return(0); - } - } -@@ -154,7 +173,7 @@ read_gif(const char *filename, int *widt - - free(buffer); - -- DGifCloseFile(infile); -+ DGifCloseFile(infile, NULL); - return(1); - } - -@@ -166,6 +185,7 @@ write_gif(const char *filename, int widt - GifByteType *red, *green, *blue, *buffer, *ptr; - GifFileType *outfile; - ColorMapObject *colormap; -+ int ErrorCode; - - red = malloc(width * height * sizeof(GifByteType)); - green = malloc(width * height * sizeof(GifByteType)); -@@ -178,7 +198,7 @@ write_gif(const char *filename, int widt - return(0); - } - -- colormap = MakeMapObject(colormap_size, NULL); -+ colormap = GifMakeMapObject(colormap_size, NULL); - - for (i = 0; i < width * height; i++) - { -@@ -187,10 +207,10 @@ write_gif(const char *filename, int widt - blue[i] = (GifByteType) rgb[3*i+2]; +@@ -178,8 +178,12 @@ read_gif(const char *filename, int *width, int *height, unsigned char **rgb) + *BufferP++ = ColorMapEntry->Blue; + } } - -- if (QuantizeBuffer(width, height, &colormap_size, red, green, blue, -+ if (GifQuantizeBuffer(width, height, &colormap_size, red, green, blue, - buffer, colormap->Colors) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(-1); - return(0); +- ++ ++#if GIFLIB_MAJOR >= 5 ++ if (DGifCloseFile(GifFile, NULL) == GIF_ERROR) { ++#else + if (DGifCloseFile(GifFile) == GIF_ERROR) { ++#endif + return(0); } -@@ -198,24 +218,24 @@ write_gif(const char *filename, int widt - free(green); - free(blue); - -- outfile = EGifOpenFileName((char *) filename, FALSE); -+ outfile = EGifOpenFileName((char *) filename, FALSE, &ErrorCode); - if (outfile == NULL) - { -- PrintGifError(); -+ PrintGifError(ErrorCode); - return(0); - } +@@ -493,7 +497,11 @@ SortCmpRtn(const void *Entry1, + 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 + } - if (EGifPutScreenDesc(outfile, width, height, colormap_size, 0, colormap) - == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(outfile->Error); - return(0); + int +@@ -589,7 +597,11 @@ write_gif(const char *filename, int width, int height, char *rgb) + Ptr += width; } - if (EGifPutImageDesc(outfile, 0, 0, width, height, FALSE, NULL) - == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(outfile->Error); - return(0); - } ++#if GIFLIB_MAJOR >= 5 ++ if (EGifCloseFile(GifFile, NULL) == GIF_ERROR) ++#else + if (EGifCloseFile(GifFile) == GIF_ERROR) ++#endif -@@ -224,7 +244,7 @@ write_gif(const char *filename, int widt { - if (EGifPutLine(outfile, ptr, width) == GIF_ERROR) - { -- PrintGifError(); -+ PrintGifError(outfile->Error); - return(0); - } - ptr += width; -@@ -232,8 +252,8 @@ write_gif(const char *filename, int widt - - EGifSpew(outfile); - -- if (EGifCloseFile(outfile) == GIF_ERROR) -- PrintGifError(); -+ if (EGifCloseFile(outfile, NULL) == GIF_ERROR) -+ PrintGifError(outfile->Error); - - free(buffer); - + QuitGifError(GifFile); diff --git a/x11/xplanet/patches/patch-src_readConfig-fixclang.cpp b/x11/xplanet/patches/patch-src_readConfig-fixclang.cpp index 308a8c9b18f..c6adf0ef30b 100644 --- a/x11/xplanet/patches/patch-src_readConfig-fixclang.cpp +++ b/x11/xplanet/patches/patch-src_readConfig-fixclang.cpp @@ -1,4 +1,5 @@ -$NetBSD: patch-src_readConfig-fixclang.cpp,v 1.1 2019/08/11 15:38:22 ng0 Exp $ +$NetBSD: patch-src_readConfig-fixclang.cpp,v 1.2 2019/11/16 17:36:28 ng0 Exp $ + This patch has been imported from FreeBSD ports, written by adridg. The later chunks (using i2b) are compile fixes on aarch64 (presumably with diff --git a/x11/xplanet/patches/patch-src_xpUtil-Add2017LeapSecond.cpp b/x11/xplanet/patches/patch-src_xpUtil-Add2017LeapSecond.cpp new file mode 100644 index 00000000000..b3e02b62d32 --- /dev/null +++ b/x11/xplanet/patches/patch-src_xpUtil-Add2017LeapSecond.cpp @@ -0,0 +1,16 @@ +$NetBSD: patch-src_xpUtil-Add2017LeapSecond.cpp,v 1.1 2019/11/16 17:36:28 ng0 Exp $ + +Add 2017 leap second +Taken from upstream: https://sourceforge.net/p/xplanet/code/209/ + + +--- src/xpUtil.cpp~ ++++ src/xpUtil.cpp +@@ -434,6 +434,7 @@ deltaETpost1972(const double jd) + if (jd >= toJulian(2009, 1, 1, 0, 0, 0)) delta_at++; // 34 + if (jd >= toJulian(2012, 7, 1, 0, 0, 0)) delta_at++; // 35 + if (jd >= toJulian(2015, 7, 1, 0, 0, 0)) delta_at++; // 36 ++ if (jd >= toJulian(2017, 1, 1, 0, 0, 0)) delta_at++; // 37 + + const double J2000 = toJulian(2000, 1, 1, 12, 0, 0); + const double m = m0 + m1 * (jd - J2000) * 86400; |