File ds9.patch of Package ds9
diff -dur SAOImageDS9.orig/ast/src/plot.h SAOImageDS9/ast/src/plot.h
--- SAOImageDS9.orig/ast/src/plot.h 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/ast/src/plot.h 2021-11-26 19:16:30.567370880 +0100
@@ -696,7 +696,7 @@
#if defined(astCLASS) /* Protected. */
AstPlot *astPlot_( void *, const float *, const double *, const char *, int *, ...);
#else
-AstPlot *astPlotId_( void *, const float [], const double [], const char *, ... )__attribute__((format(printf,4,5)));
+AstPlot *astPlotId_( void *, const float [], const double [], const char *, ... ) ;
#endif
#if defined(astCLASS) /* Protected */
diff -dur SAOImageDS9.orig/fitsy/compress.C SAOImageDS9/fitsy/compress.C
--- SAOImageDS9.orig/fitsy/compress.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/fitsy/compress.C 2021-11-26 21:03:29.794251513 +0100
@@ -629,6 +629,8 @@
case SUBDITHER1:
case SUBDITHER2:
return unquantize(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -648,6 +650,8 @@
case SUBDITHER1:
case SUBDITHER2:
return unquantize(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -675,6 +679,8 @@
case SUBDITHER1:
case SUBDITHER2:
return unquantize(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -694,6 +700,8 @@
case SUBDITHER1:
case SUBDITHER2:
return unquantize(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -722,6 +730,8 @@
return unquantize(*ptr,zs,zz);
case SUBDITHER2:
return unquantizeZero(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -742,6 +752,8 @@
return unquantize(*ptr,zs,zz);
case SUBDITHER2:
return unquantizeZero(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -770,6 +782,8 @@
return unquantize(*ptr,zs,zz);
case SUBDITHER2:
return unquantizeZero(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
@@ -790,6 +804,8 @@
return unquantize(*ptr,zs,zz);
case SUBDITHER2:
return unquantizeZero(*ptr,zs,zz);
+ default:
+ return NAN;
}
}
diff -dur SAOImageDS9.orig/make.include SAOImageDS9/make.include
--- SAOImageDS9.orig/make.include 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/make.include 2021-11-26 22:50:44.757048410 +0100
@@ -426,8 +426,8 @@
@echo "*** $@ ***"
$(MAKE) -C ast -j ast.h
cp ast/ast.h $(includedir)/.
- cp ast/grf.h $(includedir)/.
- cp ast/grf3d.h $(includedir)/.
+ cp ast/src/grf.h $(includedir)/.
+ cp ast/src/grf3d.h $(includedir)/.
ast/.libs/libast_err.a :
@echo ""
diff -dur SAOImageDS9.orig/tcl8.6/unix/configure SAOImageDS9/tcl8.6/unix/configure
--- SAOImageDS9.orig/tcl8.6/unix/configure 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tcl8.6/unix/configure 2021-11-26 19:18:23.414892118 +0100
@@ -4935,6 +4935,8 @@
echo "${ECHO_T}$ac_cv_func_sin" >&6
if test $ac_cv_func_sin = yes; then
MATH_LIBS=""
+ # LIBS modific. apparently needed on the openSUSE Tumbleweed RJM 2021-05-28
+ LIBS="-lm $LIBS"
else
MATH_LIBS="-lm"
fi
diff -dur SAOImageDS9.orig/tkimg/compat/libtiff/libtiff/Makefile.am SAOImageDS9/tkimg/compat/libtiff/libtiff/Makefile.am
--- SAOImageDS9.orig/tkimg/compat/libtiff/libtiff/Makefile.am 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tkimg/compat/libtiff/libtiff/Makefile.am 2021-11-26 19:19:07.300101791 +0100
@@ -151,6 +151,8 @@
mkg3states_SOURCES = mkg3states.c tif_fax3.h
mkg3states_LDADD = $(LIBPORT)
+BUILT_SOURCES = tif_config.h
+
faxtable: mkg3states
(rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
diff -dur SAOImageDS9.orig/tkimg/genConfigureFiles.sh SAOImageDS9/tkimg/genConfigureFiles.sh
--- SAOImageDS9.orig/tkimg/genConfigureFiles.sh 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tkimg/genConfigureFiles.sh 2021-11-26 19:20:09.410400730 +0100
@@ -1,26 +1,26 @@
#!/bin/sh
-autoconf ; rm -r autom4te.cache
-pushd base ; autoconf ; rm -r autom4te.cache ; popd
-pushd bmp ; autoconf ; rm -r autom4te.cache ; popd
-pushd dted ; autoconf ; rm -r autom4te.cache ; popd
-pushd flir ; autoconf ; rm -r autom4te.cache ; popd
-pushd gif ; autoconf ; rm -r autom4te.cache ; popd
-pushd ico ; autoconf ; rm -r autom4te.cache ; popd
-pushd jpeg ; autoconf ; rm -r autom4te.cache ; popd
-pushd libjpeg; autoconf ; rm -r autom4te.cache ; popd
-pushd libpng ; autoconf ; rm -r autom4te.cache ; popd
-pushd libtiff; autoconf ; rm -r autom4te.cache ; popd
-pushd pcx ; autoconf ; rm -r autom4te.cache ; popd
-pushd pixmap ; autoconf ; rm -r autom4te.cache ; popd
-pushd png ; autoconf ; rm -r autom4te.cache ; popd
-pushd ppm ; autoconf ; rm -r autom4te.cache ; popd
-pushd ps ; autoconf ; rm -r autom4te.cache ; popd
-pushd raw ; autoconf ; rm -r autom4te.cache ; popd
-pushd sgi ; autoconf ; rm -r autom4te.cache ; popd
-pushd sun ; autoconf ; rm -r autom4te.cache ; popd
-pushd tga ; autoconf ; rm -r autom4te.cache ; popd
-pushd tiff ; autoconf ; rm -r autom4te.cache ; popd
-pushd window ; autoconf ; rm -r autom4te.cache ; popd
-pushd xbm ; autoconf ; rm -r autom4te.cache ; popd
-pushd xpm ; autoconf ; rm -r autom4te.cache ; popd
-pushd zlib ; autoconf ; rm -r autom4te.cache ; popd
+autoreconf -i -f -s ; rm -r autom4te.cache
+pushd base ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd bmp ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd dted ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd flir ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd gif ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd ico ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd jpeg ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd libjpeg; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd libpng ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd libtiff; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd pcx ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd pixmap ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd png ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd ppm ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd ps ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd raw ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd sgi ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd sun ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd tga ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd tiff ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd window ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd xbm ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd xpm ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
+pushd zlib ; autoreconf -i -f -s ; rm -r autom4te.cache ; popd
diff -dur SAOImageDS9.orig/tkimg/libpng/Makefile.in SAOImageDS9/tkimg/libpng/Makefile.in
--- SAOImageDS9.orig/tkimg/libpng/Makefile.in 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tkimg/libpng/Makefile.in 2021-11-26 19:20:46.397578750 +0100
@@ -158,6 +158,7 @@
CFLAGS = @CFLAGS@ -DPNG_IMPEXP=MODULE_SCOPE -DPNG_EXTERN=MODULE_SCOPE
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+BUILT_SOURCES = pnglibconf.h
#========================================================================
# Start of user-definable TARGETS section
#========================================================================
diff -dur SAOImageDS9.orig/tksao/frame/context.C SAOImageDS9/tksao/frame/context.C
--- SAOImageDS9.orig/tksao/frame/context.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tksao/frame/context.C 2021-11-26 21:04:45.918562379 +0100
@@ -738,6 +738,7 @@
switch (which) {
case FrScale::IMGSEC:
case FrScale::DATASEC:
+ default:
return &iparams;
case FrScale::CROPSEC:
return &cparams;
diff -dur SAOImageDS9.orig/tksao/frame/fitsdata.C SAOImageDS9/tksao/frame/fitsdata.C
--- SAOImageDS9.orig/tksao/frame/fitsdata.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tksao/frame/fitsdata.C 2021-11-26 21:06:51.010073212 +0100
@@ -151,6 +151,7 @@
case FrScale::SCAN:
case FrScale::DATAMIN:
case FrScale::IRAFMIN:
+ default:
return 1;
case FrScale::SAMPLE:
return minmaxSample_;
@@ -201,6 +202,7 @@
switch (minmaxMode_) {
case FrScale::SCAN:
case FrScale::SAMPLE:
+ default:
str << min_ << ends;
break;
@@ -245,6 +247,7 @@
switch (minmaxMode_) {
case FrScale::SCAN:
case FrScale::SAMPLE:
+ default:
str << max_ << ends;
break;
@@ -288,6 +291,7 @@
switch (minmaxMode_) {
case FrScale::SCAN:
case FrScale::SAMPLE:
+ default:
return min_;
case FrScale::DATAMIN:
@@ -309,6 +313,7 @@
switch (minmaxMode_) {
case FrScale::SCAN:
case FrScale::SAMPLE:
+ default:
return max_;
case FrScale::DATAMIN:
@@ -1012,6 +1017,7 @@
switch (clipMode_) {
case FrScale::MINMAX:
+ default:
low_ = min();
high_ = max();
break;
diff -dur SAOImageDS9.orig/tksao/frame/frmap.C SAOImageDS9/tksao/frame/frmap.C
--- SAOImageDS9.orig/tksao/frame/frmap.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tksao/frame/frmap.C 2021-11-26 21:07:19.287188686 +0100
@@ -86,6 +86,7 @@
{
switch (sys) {
case Coord::REF:
+ default:
return vv;
case Coord::USER:
return vv * refToUser;
@@ -109,6 +110,7 @@
{
switch (sys) {
case Coord::REF:
+ default:
return vv;
case Coord::USER:
return vv * userToRef;
diff -dur SAOImageDS9.orig/tksao/frame/marker.C SAOImageDS9/tksao/frame/marker.C
--- SAOImageDS9.orig/tksao/frame/marker.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tksao/frame/marker.C 2021-11-26 21:08:18.149429060 +0100
@@ -278,6 +278,7 @@
GC lgc;
switch (mode) {
case SRC:
+ default:
lgc = gc;
XSetForeground(display, gc, color);
break;
@@ -343,6 +344,7 @@
// set width, color, dash
switch (mode) {
case SRC:
+ default:
XSetForeground(display, gc, color);
if ((properties & SOURCE) && !(properties & DASH))
renderXLineNoDash(gc);
@@ -1075,6 +1077,7 @@
switch (parent->getOrientation()) {
case Coord::NORMAL:
case Coord::XY:
+ default:
return angle + parent->getRotation();
case Coord::XX:
case Coord::YY:
@@ -1100,6 +1103,7 @@
{
switch (parent->frameType()) {
case Base::F2D:
+ default:
return arrow2D(p1,p2,sys);
case Base::F3D:
return arrow3D(p1,p2,sys);
diff -dur SAOImageDS9.orig/tksao/frame/projection.C SAOImageDS9/tksao/frame/projection.C
--- SAOImageDS9.orig/tksao/frame/projection.C 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/tksao/frame/projection.C 2021-11-26 21:09:00.435601743 +0100
@@ -65,6 +65,7 @@
// set width, color, dash
switch (mode) {
case SRC:
+ default:
XSetForeground(display, gc, color);
renderXLineNoDash(gc);
return gc;
@@ -195,6 +196,7 @@
{
switch (h) {
case 1:
+ default:
p1 = v;
break;
case 2:
diff -dur SAOImageDS9.orig/unix/Makefile.in SAOImageDS9/unix/Makefile.in
--- SAOImageDS9.orig/unix/Makefile.in 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/unix/Makefile.in 2021-11-26 23:07:56.654548495 +0100
@@ -13,7 +13,7 @@
ARCH = @ARCH@
TKFLAGS = @TKFLAGS@
SSLCONFIG = @SSLCONFIG@
-JOBS = @CORES@
+JOBS = 1
XML2CONFIG = @XML2CONFIG@
XSLTCONFIG = @XSLTCONFIG@
diff -dur SAOImageDS9.orig/unix/configure.ac SAOImageDS9/unix/configure.ac
--- SAOImageDS9.orig/unix/configure.ac 2021-10-11 17:49:08.000000000 +0200
+++ SAOImageDS9/unix/configure.ac 2021-11-26 19:21:40.649839868 +0100
@@ -55,6 +55,7 @@
#--------------------------------------------------------------------
TEA_CONFIG_CFLAGS
+AC_CHECK_LIB([m],[cos])
#--------------------------------------------------------------------
# Set the default compiler switches based on the --enable-symbols option.