diff --git a/debian/patches/01-LDFLAGS.diff b/debian/patches/01-LDFLAGS.diff deleted file mode 100644 index 0f3c987..0000000 --- a/debian/patches/01-LDFLAGS.diff +++ /dev/null @@ -1,22 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:02 +0800 -Subject: LDFLAGS - ---- - configure.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 69cabc1..3df213b 100644 ---- a/configure.in -+++ b/configure.in -@@ -185,7 +185,7 @@ if test "x$EXT" != xcygwin && test "x$EXT" != xdarwin && test "x$EXT" != xlnx && - fi - fi - AC_PROG_CC --LDFLAGS="$CFLAGS" -+#LDFLAGS="$CFLAGS" - LDFLAGS_BIN="$LDFLAGS" - - if test "x$FC" = "xnone" ; then diff --git a/debian/patches/02-system-cfortran.patch b/debian/patches/02-system-cfortran.patch deleted file mode 100644 index 2a17d65..0000000 --- a/debian/patches/02-system-cfortran.patch +++ /dev/null @@ -1,141 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:02 +0800 -Subject: system-cfortran - -Use system cfortran header. ---- - f77_wrap.h | 60 ++++++++++++++++++++++++++++++------------------------------ - 1 file changed, 30 insertions(+), 30 deletions(-) - -diff --git a/f77_wrap.h b/f77_wrap.h -index 8b00493..d54c35d 100644 ---- a/f77_wrap.h -+++ b/f77_wrap.h -@@ -1,6 +1,6 @@ - #define UNSIGNED_BYTE - --#include "cfortran.h" -+#include - - /************************************************************************ - Some platforms creates longs as 8-byte integers. On other machines, ints -@@ -29,16 +29,16 @@ - #undef LONGV_cfT - #undef PLONG_cfT - --#define LONGV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LONGV,A,B,C,D,E) --#define PLONG_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,PLONG,A,B,C,D,E) -+#define LONGV_cfSTR(N,T,A,B,C,D,E) CFORTRAN_XCAT_(CFARGS,N)(T,LONGV,A,B,C,D,E) -+#define PLONG_cfSTR(N,T,A,B,C,D,E) CFORTRAN_XCAT_(CFARGS,N)(T,PLONG,A,B,C,D,E) - #define LONGVVVVVVV_cfTYPE int - #define PLONG_cfTYPE int --#define LONGV_cfQ(B) long *B, _(B,N); -+#define LONGV_cfQ(B) long *B, CFORTRAN_XCAT_(B,N); - #define PLONG_cfQ(B) long B; --#define LONGV_cfT(M,I,A,B,D) ( (_(B,N) = * _3(M,_LONGV_A,I)), \ -- B = F2Clongv(_(B,N),A) ) -+#define LONGV_cfT(M,I,A,B,D) ( (CFORTRAN_XCAT_(B,N) = * CFORTRAN_XCAT_3(M,_LONGV_A,I)), \ -+ B = F2Clongv(CFORTRAN_XCAT_(B,N),A) ) - #define PLONG_cfT(M,I,A,B,D) ((B=*A),&B) --#define LONGV_cfR(A,B,D) C2Flongv(_(B,N),A,B); -+#define LONGV_cfR(A,B,D) C2Flongv(CFORTRAN_XCAT_(B,N),A,B); - #define PLONG_cfR(A,B,D) *A=B; - #define LONGV_cfH(S,U,B) - #define PLONG_cfH(S,U,B) -@@ -93,7 +93,7 @@ extern unsigned long gMinStrLen; - A->dsc$w_length, \ - num_elem(A->dsc$a_pointer, \ - A->dsc$w_length, \ -- _3(M,_STRV_A,I) ) ) -+ CFORTRAN_XCAT_3(M,_STRV_A,I) ) ) - #else - #ifdef CRAYFortran - #define PPSTRING_cfT(M,I,A,B,D) (unsigned char*)_fcdtocp(A) -@@ -103,20 +103,20 @@ extern unsigned long gMinStrLen; - #endif - - #define _cfMAX(A,B) ( (A>B) ? A : B ) --#define STRINGV_cfQ(B) char **B; unsigned int _(B,N), _(B,M); -+#define STRINGV_cfQ(B) char **B; unsigned int CFORTRAN_XCAT_(B,N), CFORTRAN_XCAT_(B,M); - #define STRINGV_cfR(A,B,D) free(B[0]); free(B); - #define TTSTR( A,B,D) \ - ((B=(char*)malloc(_cfMAX(D,gMinStrLen)+1))[D]='\0',memcpy(B,A,D), \ - kill_trailing(B,' ')) - #define TTTTSTRV( A,B,D,E) ( \ -- _(B,N)=_cfMAX(E,1), \ -- _(B,M)=_cfMAX(D,gMinStrLen)+1, \ -- B=(char**)malloc(_(B,N)*sizeof(char*)), \ -- B[0]=(char*)malloc(_(B,N)*_(B,M)), \ -- vindex(B,_(B,M),_(B,N),f2cstrv2(A,B[0],D,_(B,M),_(B,N))) \ -+ CFORTRAN_XCAT_(B,N)=_cfMAX(E,1), \ -+ CFORTRAN_XCAT_(B,M)=_cfMAX(D,gMinStrLen)+1, \ -+ B=(char**)malloc(CFORTRAN_XCAT_(B,N)*sizeof(char*)), \ -+ B[0]=(char*)malloc(CFORTRAN_XCAT_(B,N)*CFORTRAN_XCAT_(B,M)), \ -+ vindex(B,CFORTRAN_XCAT_(B,M),CFORTRAN_XCAT_(B,N),f2cstrv2(A,B[0],D,CFORTRAN_XCAT_(B,M),CFORTRAN_XCAT_(B,N))) \ - ) - #define RRRRPSTRV(A,B,D) \ -- c2fstrv2(B[0],A,_(B,M),D,_(B,N)), \ -+ c2fstrv2(B[0],A,CFORTRAN_XCAT_(B,M),D,CFORTRAN_XCAT_(B,N)), \ - free(B[0]), \ - free(B); - -@@ -169,10 +169,10 @@ static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len, - #undef BYTE_cfSTR - #undef BYTEV_cfSTR - --#define BYTE_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTE,B,X,Y,Z,0) --#define BYTEV_cfINT(N,A,B,X,Y,Z) _(CFARGS,N)(A,BYTEV,B,X,Y,Z,0) --#define BYTE_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTE,A,B,C,D,E) --#define BYTEV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,BYTEV,A,B,C,D,E) -+#define BYTE_cfINT(N,A,B,X,Y,Z) CFORTRAN_XCAT_(CFARGS,N)(A,BYTE,B,X,Y,Z,0) -+#define BYTEV_cfINT(N,A,B,X,Y,Z) CFORTRAN_XCAT_(CFARGS,N)(A,BYTEV,B,X,Y,Z,0) -+#define BYTE_cfSTR(N,T,A,B,C,D,E) CFORTRAN_XCAT_(CFARGS,N)(T,BYTE,A,B,C,D,E) -+#define BYTEV_cfSTR(N,T,A,B,C,D,E) CFORTRAN_XCAT_(CFARGS,N)(T,BYTEV,A,B,C,D,E) - #define BYTE_cfSEP(T,B) INT_cfSEP(T,B) - #define BYTEV_cfSEP(T,B) INT_cfSEP(T,B) - #define BYTE_cfH(S,U,B) STRING_cfH(S,U,B) -@@ -211,11 +211,11 @@ static char *f2cstrv2(char *fstr, char* cstr, int felem_len, int celem_len, - - #undef LOGICALV_cfSTR - #undef LOGICALV_cfT --#define LOGICALV_cfSTR(N,T,A,B,C,D,E) _(CFARGS,N)(T,LOGICALV,A,B,C,D,E) --#define LOGICALV_cfQ(B) char *B; unsigned int _(B,N); --#define LOGICALV_cfT(M,I,A,B,D) (_(B,N)= * _3(M,_LOGV_A,I), \ -- B=F2CcopyLogVect(_(B,N),A)) --#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(_(B,N),A,B); -+#define LOGICALV_cfSTR(N,T,A,B,C,D,E) CFORTRAN_XCAT_(CFARGS,N)(T,LOGICALV,A,B,C,D,E) -+#define LOGICALV_cfQ(B) char *B; unsigned int CFORTRAN_XCAT_(B,N); -+#define LOGICALV_cfT(M,I,A,B,D) (CFORTRAN_XCAT_(B,N)= * CFORTRAN_XCAT_3(M,_LOGV_A,I), \ -+ B=F2CcopyLogVect(CFORTRAN_XCAT_(B,N),A)) -+#define LOGICALV_cfR(A,B,D) C2FcopyLogVect(CFORTRAN_XCAT_(B,N),A,B); - #define LOGICALV_cfH(S,U,B) - - static char *F2CcopyLogVect(long size, int *A) -@@ -268,20 +268,20 @@ extern fitsfile *gFitsFiles[]; /* by Fortran unit numbers */ - memchr(A,'\0',D) ? A : TTSTR(A,B,D) - - #define FCALLSCFUN0(T0,CN,UN,LN) \ -- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \ -- CFextern _(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \ -- {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) _(T0,_cfI)} -+ CFextern CFORTRAN_XCAT_(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)); \ -+ CFextern CFORTRAN_XCAT_(T0,_cfFZ)(UN,LN) void ABSOFT_cf2(T0)) \ -+ {_Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN(); _Icf(0,K,T0,0,0) CFORTRAN_XCAT_(T0,_cfI)} - - #define FCALLSCFUN14(T0,CN,UN,LN,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ -- CFextern _(T0,_cfF)(UN,LN) \ -+ CFextern CFORTRAN_XCAT_(T0,_cfF)(UN,LN) \ - CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)); \ -- CFextern _(T0,_cfF)(UN,LN) \ -+ CFextern CFORTRAN_XCAT_(T0,_cfF)(UN,LN) \ - CFARGT14(NCF,DCF,ABSOFT_cf2(T0),T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE)) \ - { CFARGT14S(QCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) \ - _Icf(2,UU,T0,A0,0); _Icf(0,L,T0,0,0) CN( TCF(LN,T1,1,0) TCF(LN,T2,2,1) \ - TCF(LN,T3,3,1) TCF(LN,T4,4,1) TCF(LN,T5,5,1) TCF(LN,T6,6,1) TCF(LN,T7,7,1) \ - TCF(LN,T8,8,1) TCF(LN,T9,9,1) TCF(LN,TA,10,1) TCF(LN,TB,11,1) TCF(LN,TC,12,1) \ - TCF(LN,TD,13,1) TCF(LN,TE,14,1) ); _Icf(0,K,T0,0,0) \ -- CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) _(T0,_cfI) \ -+ CFARGT14S(RCF,T1,T2,T3,T4,T5,T6,T7,T8,T9,TA,TB,TC,TD,TE) CFORTRAN_XCAT_(T0,_cfI) \ - } - diff --git a/debian/patches/03-off_t.diff b/debian/patches/03-off_t.diff deleted file mode 100644 index 77591cd..0000000 --- a/debian/patches/03-off_t.diff +++ /dev/null @@ -1,35 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:02 +0800 -Subject: off_t - ---- - fitsio.h | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/fitsio.h b/fitsio.h -index 1d5a583..9c96551 100644 ---- a/fitsio.h -+++ b/fitsio.h -@@ -69,7 +69,7 @@ SERVICES PROVIDED HEREUNDER." - # define _MIPS_SZLONG 64 - #endif - --#if defined(linux) || defined(__APPLE__) || defined(__sgi) -+#if defined(__linux__) || defined(__APPLE__) || defined(__sgi) - # include /* apparently needed on debian linux systems */ - #endif /* to define off_t */ - -@@ -83,10 +83,10 @@ SERVICES PROVIDED HEREUNDER." - /* on whether _LARGEFILE_SOURCE is defined in sys/feature_tests.h */ - /* (at least on Solaris platforms using cc) */ - --/* Debian systems require: "(defined(linux) && defined(__off_t_defined))" */ -+/* Debian systems require: "(defined(__linux__) && defined(__off_t_defined))" */ - /* the mingw-w64 compiler requires: "(defined(__MINGW32__) && defined(_OFF_T_DEFINED))" */ - #if defined(_OFF_T) \ -- || (defined(linux) && defined(__off_t_defined)) \ -+ || (defined(__linux__) && defined(__off_t_defined)) \ - || (defined(__MINGW32__) && defined(_OFF_T_DEFINED)) \ - || defined(_MIPS_SZLONG) || defined(__APPLE__) || defined(_AIX) - # define OFF_T off_t diff --git a/debian/patches/04-pkgconfig-private.patch b/debian/patches/04-pkgconfig-private.patch deleted file mode 100644 index d785268..0000000 --- a/debian/patches/04-pkgconfig-private.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:02 +0800 -Subject: pkgconfig-private - ---- - cfitsio.pc.in | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/cfitsio.pc.in b/cfitsio.pc.in -index f0a5aa4..66e446e 100644 ---- a/cfitsio.pc.in -+++ b/cfitsio.pc.in -@@ -7,6 +7,6 @@ Name: cfitsio - Description: FITS File Subroutine Library - URL: https://heasarc.gsfc.nasa.gov/fitsio/ - Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@ --Libs: -L${libdir} -lcfitsio @LIBS@ --Libs.private: -lm -+Libs: -L${libdir} -lcfitsio -lpthread -+Libs.private: -lm @LIBS@ - Cflags: -I${includedir} diff --git a/debian/patches/05-system-zlib.patch b/debian/patches/05-system-zlib.patch deleted file mode 100644 index b31ca19..0000000 --- a/debian/patches/05-system-zlib.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:02 +0800 -Subject: system-zlib - ---- - Makefile.in | 6 ++---- - cfitsio.pc.in | 2 +- - zlib/zcompress.c | 2 +- - 3 files changed, 4 insertions(+), 6 deletions(-) - -diff --git a/Makefile.in b/Makefile.in -index 2ee3f74..27c1daa 100644 ---- a/Makefile.in -+++ b/Makefile.in -@@ -68,9 +68,7 @@ CORE_SOURCES = buffers.c cfileio.c checksum.c drvrfile.c drvrmem.c \ - pliocomp.c fits_hcompress.c fits_hdecompress.c \ - simplerng.c @GSIFTP_SRC@ - --ZLIB_SOURCES = zlib/adler32.c zlib/crc32.c zlib/deflate.c zlib/infback.c \ -- zlib/inffast.c zlib/inflate.c zlib/inftrees.c zlib/trees.c \ -- zlib/uncompr.c zlib/zcompress.c zlib/zuncompress.c zlib/zutil.c -+ZLIB_SOURCES = zlib/zcompress.c zlib/zuncompress.c - - SOURCES = ${CORE_SOURCES} ${ZLIB_SOURCES} @F77_WRAPPERS@ - -@@ -103,7 +101,7 @@ lib${PACKAGE}.a: ${OBJECTS} - shared: lib${PACKAGE}${SHLIB_SUFFIX} - - lib${PACKAGE}${SHLIB_SUFFIX}: ${OBJECTS} -- ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm ${LIBS_CURL} ${LIBS} -+ ${SHLIB_LD} ${LDFLAGS} -o ${CFITSIO_SHLIB} ${OBJECTS} -lm -lz ${LIBS_CURL} ${LIBS} - @if [ "x${CFITSIO_SHLIB_SONAME}" != x ]; then \ - ln -sf ${CFITSIO_SHLIB} ${CFITSIO_SHLIB_SONAME}; \ - ln -sf ${CFITSIO_SHLIB_SONAME} $@; \ -diff --git a/cfitsio.pc.in b/cfitsio.pc.in -index 66e446e..693dafc 100644 ---- a/cfitsio.pc.in -+++ b/cfitsio.pc.in -@@ -8,5 +8,5 @@ Description: FITS File Subroutine Library - URL: https://heasarc.gsfc.nasa.gov/fitsio/ - Version: @CFITSIO_MAJOR@.@CFITSIO_MINOR@ - Libs: -L${libdir} -lcfitsio -lpthread --Libs.private: -lm @LIBS@ -+Libs.private: -lm -lz @LIBS@ - Cflags: -I${includedir} -diff --git a/zlib/zcompress.c b/zlib/zcompress.c -index d425aec..440e70c 100644 ---- a/zlib/zcompress.c -+++ b/zlib/zcompress.c -@@ -3,7 +3,7 @@ - #include - #include - #include --#include "zlib.h" -+#include - - #define GZBUFSIZE 115200 /* 40 FITS blocks */ - #define BUFFINCR 28800 /* 10 FITS blocks */ diff --git a/debian/patches/06-riscv64.diff b/debian/patches/06-riscv64.diff deleted file mode 100644 index c805487..0000000 --- a/debian/patches/06-riscv64.diff +++ /dev/null @@ -1,47 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:03 +0800 -Subject: riscv64 - ---- - fitsio2.h | 20 ++++++++++++++------ - 1 file changed, 14 insertions(+), 6 deletions(-) - -diff --git a/fitsio2.h b/fitsio2.h -index d6b750f..1e94632 100644 ---- a/fitsio2.h -+++ b/fitsio2.h -@@ -137,6 +137,20 @@ extern int Fitsio_Pthread_Status; - # error "can't handle long size given by _MIPS_SZLONG" - # endif - -+#elif defined(__riscv) -+ -+/* RISC-V is little endian */ -+ -+#define BYTESWAPPED TRUE -+ -+# if __riscv_xlen == 32 -+# define LONGSIZE 32 -+# elif __riscv_xlen == 64 -+# define LONGSIZE 64 -+# else -+# error "can't handle long size given by __riscv_xlen" -+# endif -+ - /* ============================================================== */ - /* the following are all 32-bit byteswapped platforms */ - -@@ -204,12 +218,6 @@ extern int Fitsio_Pthread_Status; - #define BYTESWAPPED FALSE - #endif - --#elif defined(__riscv) -- --/* RISC-V is little endian */ -- --#define BYTESWAPPED TRUE -- - #else - - /* assume all other machine uses the same IEEE formats as used in FITS files */ diff --git a/debian/patches/08-hurd.diff b/debian/patches/08-hurd.diff deleted file mode 100644 index 4984055..0000000 --- a/debian/patches/08-hurd.diff +++ /dev/null @@ -1,25 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:03 +0800 -Subject: hurd - ---- - configure.in | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/configure.in b/configure.in -index 3df213b..2ad367e 100644 ---- a/configure.in -+++ b/configure.in -@@ -142,6 +142,11 @@ case $host in - ARCH="linux" - EXT="lnx" - ;; -+ *-*-gnu) -+ # Hurd only has 3 values in the triplet -+ ARCH="linux" -+ EXT="lnx" -+ ;; - *hpux*) - ARCH="hp" - EXT="hpu" diff --git a/debian/patches/09-drvnet-format-security.diff b/debian/patches/09-drvnet-format-security.diff deleted file mode 100644 index 0b981da..0000000 --- a/debian/patches/09-drvnet-format-security.diff +++ /dev/null @@ -1,24 +0,0 @@ -From: Debian Astronomy Maintainers - -Date: Sat, 14 May 2022 03:24:03 +0800 -Subject: drvnet-format-security - ---- - drvrnet.c | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/drvrnet.c b/drvrnet.c -index be0c9f7..30c0743 100644 ---- a/drvrnet.c -+++ b/drvrnet.c -@@ -1257,9 +1257,7 @@ int curlProgressCallback(void *clientp, double dltotal, double dlnow, - urlname = (char *)clientp; - if (urlname) - { -- fprintf(stderr,"Downloading "); -- fprintf(stderr,urlname); -- fprintf(stderr,"...\n"); -+ fprintf(stderr,"Downloading %s...\n", urlname); - } - isFirst = 0; - } diff --git a/debian/patches/series b/debian/patches/series deleted file mode 100644 index b90ab80..0000000 --- a/debian/patches/series +++ /dev/null @@ -1,8 +0,0 @@ -01-LDFLAGS.diff -02-system-cfortran.patch -03-off_t.diff -04-pkgconfig-private.patch -05-system-zlib.patch -06-riscv64.diff -08-hurd.diff -09-drvnet-format-security.diff diff --git a/debian/source/format b/debian/source/format index 163aaf8..89ae9db 100644 --- a/debian/source/format +++ b/debian/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native)