[SCM] Tcl interface to FITS Files branch, debian, updated. 6ff47d1fc430ef25b59fc1d74d4301c772adde5c
Ole Streicher
debian at liska.ath.cx
Wed Jul 25 09:04:37 UTC 2012
The following commit has been merged in the debian branch:
commit be8d7504e4ea363ca444910620c938dd0fb5a3d5
Author: Ole Streicher <debian at liska.ath.cx>
Date: Wed Jul 25 10:16:01 2012 +0200
Added debian files and patches needed to build
Still not a tcl package...
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..1c5cead
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,23 @@
+Source: tcl-fitstcl
+Section: science
+Priority: optional
+Maintainer: Debian Science Maintainers <debian-science-maintainers at lists.alioth.debian.org>
+Uploaders: Ole Streicher <debian at liska.ath.cx>
+DM-Upload-Allowed: yes
+Build-Depends: debhelper (>= 9),
+ dh-autoreconf,
+ libcfitsio3-dev
+Standards-Version: 3.9.3
+Homepage: http://heasarc.gsfc.nasa.gov/docs/software/lheasoft/ftools/fv/fitsTcl_home.html
+Vcs-Git: git://git.debian.org/git/debian-science/packages/tcl-fitstcl.git
+Vcs-Browser: http://git.debian.org/?p=debian-science/packages/tcl-fitstcl.git
+
+Package: tcl-fitstcl
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Tcl interface to FITS files
+ fitsTcl is an extension to the Tcl language, providing simple access to
+ astronomical data stored in FITS file format. fitsTcl implements a Tcl
+ interface to the cfitsio library, developed by the HEASARC (High Energy
+ Astrophysics Science Archive Research Center) at the NASA Goddard Space
+ Flight Center.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..6421934
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,38 @@
+Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
+Upstream-Name: fitsTcl
+Upstream-Contact: William Pence, Pan Chai
+Source: http://heasarc.gsfc.nasa.gov/FTP/software/lheasoft/fv/fitsTcl/
+
+Files: * debian/patches/cfitsio_header.patch
+Copyright: 2000-2009, William Pence, Pan Chai
+License: MIT
+ Copyright (Unpublished--all rights reserved under the copyright laws of
+ the United States), U.S. Government as represented by the Administrator
+ of the National Aeronautics and Space Administration. No copyright is
+ claimed in the United States under Title 17, U.S. Code.
+ .
+ Permission to freely use, copy, modify, and distribute this software
+ and its documentation without fee is hereby granted, provided that this
+ copyright notice and disclaimer of warranty appears in all copies.
+ .
+ DISCLAIMER:
+ .
+ THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND,
+ EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO,
+ ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY
+ IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+ PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE
+ DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE
+ SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY
+ DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY
+ CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
+ CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY
+ PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED
+ FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR
+ SERVICES PROVIDED HEREUNDER.
+
+Files: debian/*
+Copyright: 2012 Ole Streicher <debian at liska.ath.cx>
+License: MIT
+ see above
diff --git a/debian/patches/cfitsio_header.patch b/debian/patches/cfitsio_header.patch
new file mode 100644
index 0000000..7d398a7
--- /dev/null
+++ b/debian/patches/cfitsio_header.patch
@@ -0,0 +1,209 @@
+Author: William Pence (author of cfitsio)
+Description: Install cfitsio header files that were not in the cfitsio
+ distribution but needed for compilation here.
+--- /dev/null
++++ b/eval_tab.h
+@@ -0,0 +1,41 @@
++typedef union {
++ int Node; /* Index of Node */
++ double dbl; /* real value */
++ long lng; /* integer value */
++ char log; /* logical value */
++ char str[256]; /* string value */
++} FFSTYPE;
++#define BOOLEAN 258
++#define LONG 259
++#define DOUBLE 260
++#define STRING 261
++#define BITSTR 262
++#define FUNCTION 263
++#define BFUNCTION 264
++#define GTIFILTER 265
++#define REGFILTER 266
++#define COLUMN 267
++#define BCOLUMN 268
++#define SCOLUMN 269
++#define BITCOL 270
++#define ROWREF 271
++#define NULLREF 272
++#define SNULLREF 273
++#define OR 274
++#define AND 275
++#define EQ 276
++#define NE 277
++#define GT 278
++#define LT 279
++#define LTE 280
++#define GTE 281
++#define POWER 282
++#define NOT 283
++#define INTCAST 284
++#define FLTCAST 285
++#define UMINUS 286
++#define ACCUM 287
++#define DIFF 288
++
++
++extern FFSTYPE fflval;
+--- /dev/null
++++ b/eval_defs.h
+@@ -0,0 +1,159 @@
++#include <stdio.h>
++#include <math.h>
++#include <stdlib.h>
++#include <string.h>
++#if defined(__sgi) || defined(__hpux)
++#include <alloca.h>
++#endif
++#ifdef sparc
++#include <malloc.h>
++#endif
++#include "fitsio2.h"
++
++#ifndef FFBISON
++#include "eval_tab.h"
++#endif
++
++#define MAXDIMS 5
++#define MAXSUBS 10
++#define MAXVARNAME 80
++#define CONST_OP -1000
++#define pERROR -1
++
++
++typedef struct {
++ char name[MAXVARNAME+1];
++ int type;
++ long nelem;
++ int naxis;
++ long naxes[MAXDIMS];
++ char *undef;
++ void *data;
++ } DataInfo;
++
++typedef struct {
++ long nelem;
++ int naxis;
++ long naxes[MAXDIMS];
++ char *undef;
++ union {
++ double dbl;
++ long lng;
++ char log;
++ char str[256];
++ double *dblptr;
++ long *lngptr;
++ char *logptr;
++ char **strptr;
++ void *ptr;
++ } data;
++ } lval;
++
++typedef struct Node {
++ int operation;
++ void (*DoOp)(struct Node *this);
++ int nSubNodes;
++ int SubNodes[MAXSUBS];
++ int type;
++ lval value;
++ } Node;
++
++typedef struct {
++ fitsfile *def_fptr;
++ int (*getData)( char *dataName, void *dataValue );
++ int (*loadData)( int varNum, long fRow, long nRows,
++ void *data, char *undef );
++
++ int compressed;
++ int timeCol;
++ int parCol;
++ int valCol;
++
++ char *expr;
++ int index;
++ int is_eobuf;
++
++ Node *Nodes;
++ int nNodes;
++ int nNodesAlloc;
++ int resultNode;
++
++ long firstRow;
++ long nRows;
++
++ int nCols;
++ iteratorCol *colData;
++ DataInfo *varData;
++ PixelFilter *pixFilter;
++
++ long firstDataRow;
++ long nDataRows;
++ long totalRows;
++
++ int datatype;
++ int hdutype;
++
++ int status;
++ } ParseData;
++
++typedef enum {
++ rnd_fct = 1001,
++ sum_fct,
++ nelem_fct,
++ sin_fct,
++ cos_fct,
++ tan_fct,
++ asin_fct,
++ acos_fct,
++ atan_fct,
++ sinh_fct,
++ cosh_fct,
++ tanh_fct,
++ exp_fct,
++ log_fct,
++ log10_fct,
++ sqrt_fct,
++ abs_fct,
++ atan2_fct,
++ ceil_fct,
++ floor_fct,
++ round_fct,
++ min1_fct,
++ min2_fct,
++ max1_fct,
++ max2_fct,
++ near_fct,
++ circle_fct,
++ box_fct,
++ elps_fct,
++ isnull_fct,
++ defnull_fct,
++ gtifilt_fct,
++ regfilt_fct,
++ ifthenelse_fct,
++ row_fct,
++ null_fct,
++ median_fct,
++ average_fct,
++ stddev_fct,
++ nonnull_fct,
++ angsep_fct,
++ gasrnd_fct,
++ poirnd_fct
++ } funcOp;
++
++extern ParseData gParse;
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++ int ffparse(void);
++ int fflex(void);
++ void ffrestart(FILE*);
++
++ void Evaluate_Parser( long firstRow, long nRows );
++
++#ifdef __cplusplus
++ }
++#endif
diff --git a/debian/patches/char_literal.patch b/debian/patches/char_literal.patch
new file mode 100644
index 0000000..2961837
--- /dev/null
+++ b/debian/patches/char_literal.patch
@@ -0,0 +1,320 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Correct warnings with -Werror=format-security and conversion
+ from pointer to int.
+--- a/fitsIO.c
++++ b/fitsIO.c
+@@ -1782,7 +1782,7 @@
+
+ case TDOUBLE:
+ dblData = (double *) ckalloc(nCol*nRow*sizeof(double));
+- memset (dblData, NULL, nCol*nRow*sizeof(double));
++ memset (dblData, 0, nCol*nRow*sizeof(double));
+
+ ffgsfd(curFile->fptr,
+ 1,
+@@ -1826,7 +1826,7 @@
+
+ case TLONGLONG:
+ longlongData = (LONGLONG *) ckalloc(nCol*nRow*sizeof(LONGLONG));
+- memset (longlongData, NULL, nCol*nRow*sizeof(LONGLONG));
++ memset (longlongData, 0, nCol*nRow*sizeof(LONGLONG));
+
+ ffgsfjj(curFile->fptr,
+ 1,
+@@ -1875,7 +1875,7 @@
+
+ case TFLOAT:
+ floatData = (float *) ckalloc(nCol*nRow*sizeof(float));
+- memset (floatData, NULL, nCol*nRow*sizeof(float));
++ memset (floatData, 0, nCol*nRow*sizeof(float));
+
+ ffgsfe(curFile->fptr,
+ 1,
+@@ -1920,7 +1920,7 @@
+ case TLONG:
+ case TINT:
+ intData = (int *) ckalloc(nRow*nCol*sizeof(int));
+- memset (intData, NULL, nCol*nRow*sizeof(int));
++ memset (intData, 0, nCol*nRow*sizeof(int));
+ ffgsfk(curFile->fptr,
+ 1,
+ curFile->CHDUInfo.image.naxes,
+@@ -1963,7 +1963,7 @@
+
+ case TSHORT:
+ shortData = (short *) ckalloc(nCol*nRow*sizeof(short));
+- memset (shortData, NULL, nCol*nRow*sizeof(short));
++ memset (shortData, 0, nCol*nRow*sizeof(short));
+
+ ffgsfi(curFile->fptr,
+ 1,
+@@ -2007,7 +2007,7 @@
+
+ case TBYTE:
+ byteData = (unsigned char *) ckalloc(nCol*nRow*sizeof(unsigned char));
+- memset (byteData, NULL, nCol*nRow*sizeof(unsigned char));
++ memset (byteData, 0, nCol*nRow*sizeof(unsigned char));
+
+ ffgsfb(curFile->fptr,
+ 1,
+@@ -3977,8 +3977,8 @@
+ fprintf(fPtr, "\"");
+ if ( ifPrintRow == 1 ) {
+ sprintf(outputStr, "%d", m);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr, "%s", outputStr);
++ fprintf(fPtr, "%s", sepString);
+ }
+
+ saveVectorTableRowToAscii(curFile, filename, fileStatus, m, 1, fCol, nCols, baseColNum, ifCSV,
+@@ -4191,9 +4191,9 @@
+ return TCL_ERROR;
+ }
+
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr, "%s", outputStr);
+ if ( k != (fCol+nCols-1) )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr, "%s", sepString);
+ }
+
+ return TCL_OK;
+@@ -4406,9 +4406,9 @@
+ fprintf(fPtr, rowFormatStr, outputStr);
+ } else {
+ /* don't pad */
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ }
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (j=0; j< nCols; j++) {
+
+@@ -4423,7 +4423,7 @@
+ 0, sepString, ifVariableVec, colFStr[j], dataType, fPtr, ifFixedFormat);
+ if ( ifFixedFormat == 0 ) {
+ if ( j < nCols-1 ) {
+- fprintf(fPtr,sepString);
++ fprintf(fPtr,"%s",sepString);
+ }
+ }
+
+@@ -4716,7 +4716,7 @@
+ if ( ifFixedFormat == 0 ) {
+ if ( j != nCols-1 )
+ /* print sepString if we're not on last column */
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ }
+ }
+@@ -4875,7 +4875,7 @@
+
+ case TDOUBLE:
+ dblData = (double *) ckalloc(nCols*nRows*sizeof(double));
+- memset (dblData, NULL, nCols*nRows*sizeof(double));
++ memset (dblData, 0, nCols*nRows*sizeof(double));
+
+ ffgsfd(curFile->fptr,
+ 0,
+@@ -4905,8 +4905,8 @@
+ if ( ifPrintRow == 1 ) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -4916,9 +4916,9 @@
+ sprintf(outputStr,"%#.10E", dblData[tmpIndex]);
+ /* sprintf(outputStr,"%s", dblData[tmpIndex]); */
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -4929,7 +4929,7 @@
+
+ case TLONGLONG:
+ longlongData = (LONGLONG *) ckalloc(nCols*nRows*sizeof(LONGLONG));
+- memset (longlongData, NULL, nCols*nRows*sizeof(LONGLONG));
++ memset (longlongData, 0, nCols*nRows*sizeof(LONGLONG));
+
+ ffgsfjj(curFile->fptr,
+ 0,
+@@ -4959,8 +4959,8 @@
+ if ( ifPrintRow == 1 ) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -4973,9 +4973,9 @@
+ sprintf(outputStr,"%lld", longlongData[tmpIndex]);
+ #endif
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -4986,7 +4986,7 @@
+
+ case TFLOAT:
+ floatData = (float *) ckalloc(nCols*nRows*sizeof(float));
+- memset (floatData, NULL, nCols*nRows*sizeof(float));
++ memset (floatData, 0, nCols*nRows*sizeof(float));
+ ffgsfe(curFile->fptr,
+ 0,
+ curFile->CHDUInfo.image.naxes,
+@@ -5015,8 +5015,8 @@
+ if ( ifPrintRow == 1) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -5025,9 +5025,9 @@
+ } else {
+ sprintf(outputStr,"%#.5f", floatData[tmpIndex]);
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -5039,7 +5039,7 @@
+
+ case TINT:
+ intData = (int *) ckalloc(nRows*nCols*sizeof(int));
+- memset (intData, NULL, nCols*nRows*sizeof(int));
++ memset (intData, 0, nCols*nRows*sizeof(int));
+ ffgsfk(curFile->fptr,
+ 0,
+ curFile->CHDUInfo.image.naxes,
+@@ -5068,8 +5068,8 @@
+ if ( ifPrintRow == 1) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -5078,9 +5078,9 @@
+ } else {
+ sprintf(outputStr,"%d", intData[tmpIndex]);
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -5092,7 +5092,7 @@
+
+ case TSHORT:
+ shortData = (short *) ckalloc(nCols*nRows*sizeof(short));
+- memset (shortData, NULL, nCols*nRows*sizeof(short));
++ memset (shortData, 0, nCols*nRows*sizeof(short));
+ ffgsfi(curFile->fptr,
+ 0,
+ curFile->CHDUInfo.image.naxes,
+@@ -5121,8 +5121,8 @@
+ if ( ifPrintRow == 1) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -5131,9 +5131,9 @@
+ } else {
+ sprintf(outputStr,"%d", shortData[tmpIndex]);
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -5145,7 +5145,7 @@
+
+ case TBYTE:
+ byteData = (unsigned char *) ckalloc(nCols*nRows*sizeof(unsigned char));
+- memset (byteData, NULL, nCols*nRows*sizeof(unsigned char));
++ memset (byteData, 0, nCols*nRows*sizeof(unsigned char));
+ ffgsfb(curFile->fptr,
+ 0,
+ curFile->CHDUInfo.image.naxes,
+@@ -5174,8 +5174,8 @@
+ if ( ifPrintRow == 1) {
+ int rowNum = fRow + j;
+ sprintf(outputStr, "%d", rowNum);
+- fprintf(fPtr, outputStr);
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", outputStr);
++ fprintf(fPtr,"%s", sepString);
+ }
+ for (i=0; i<nCols ; i++ ) {
+ tmpIndex = j*nCols + i;
+@@ -5184,9 +5184,9 @@
+ } else {
+ sprintf(outputStr,"%u", byteData[tmpIndex]);
+ }
+- fprintf(fPtr, outputStr);
++ fprintf(fPtr,"%s", outputStr);
+ if ( i != nCols-1 )
+- fprintf(fPtr, sepString);
++ fprintf(fPtr,"%s", sepString);
+ }
+ if ( ifCSV == 1)
+ fprintf(fPtr, "\"");
+@@ -7120,13 +7120,13 @@
+ uniqueNum = 0;
+ if (isMerge == 0 ) {
+ for (i=0; i<numRows; i++) {
+- sprintf(rowlist[i],"%d",columndata[i].rowindex);
++ sprintf(rowlist[i],"%ld",columndata[i].rowindex);
+ }
+
+ } else {
+ for (i=0; i<numRows; i++) {
+ if ( columndata[i].flag == 0 ) {
+- sprintf(rowlist[uniqueNum],"%d",columndata[i].rowindex);
++ sprintf(rowlist[uniqueNum],"%ld",columndata[i].rowindex);
+ uniqueNum++;
+ }
+ }
diff --git a/debian/patches/fix_spelling.patch b/debian/patches/fix_spelling.patch
new file mode 100644
index 0000000..963d153
--- /dev/null
+++ b/debian/patches/fix_spelling.patch
@@ -0,0 +1,22 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Spellfixes
+--- a/fitsCmds.c
++++ b/fitsCmds.c
+@@ -212,7 +212,7 @@
+ mSilent = 1;
+ } else {
+ Tcl_SetResult(curFile->interp, "fitsTcl Error: "
+- "unkown option: -s for load without read header", TCL_STATIC);
++ "unknown option: -s for load without read header", TCL_STATIC);
+ return TCL_ERROR;
+ }
+ }
+@@ -708,7 +708,7 @@
+ " - if no rowList is provided, give all rows\n"
+ " - if no colList is provided, give all columns\n"
+ " - use colList = * for all columns\n"
+- " - -c means return each column as a seperate list.\n"
++ " - -c means return each column as a separate list.\n"
+ "get vtable ?-noformat? colname firstelement ?rowList?\n"
+ " - get the firstelement-th vector element\n"
+ "\n";
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..80efa9e
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,5 @@
+fix_spelling.patch
+use_shared_cfitsio.patch
+cfitsio_header.patch
+char_literal.patch
+set_installdir.patch
diff --git a/debian/patches/set_installdir.patch b/debian/patches/set_installdir.patch
new file mode 100644
index 0000000..d13ecbc
--- /dev/null
+++ b/debian/patches/set_installdir.patch
@@ -0,0 +1,21 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Correct the installation directory
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -22,7 +22,7 @@
+ #----------------------------------------------------------------------------
+ # Configurable macros:
+ #----------------------------------------------------------------------------
+-INSTALLDIR = @prefix@
++INSTALLDIR = $(DESTDIR)@prefix@
+ CC = @CC@
+ RANLIB = @RANLIB@
+ CFLAGS = @CFLAGS@
+@@ -64,6 +64,7 @@
+
+
+ install: all
++ mkdir -p ${INSTALLDIR}/lib/
+ @if [ "x${C_LIB_OPTION}" = xstatic ]; then \
+ echo "cp ${STATIC_LIB} ${INSTALLDIR}/lib/"; \
+ cp ${STATIC_LIB} ${INSTALLDIR}/lib/; \
diff --git a/debian/patches/use_shared_cfitsio.patch b/debian/patches/use_shared_cfitsio.patch
new file mode 100644
index 0000000..b36b62b
--- /dev/null
+++ b/debian/patches/use_shared_cfitsio.patch
@@ -0,0 +1,103 @@
+Author: Ole Streicher <debian at liska.ath.cx>
+Description: Remove the need of a private cfitsio source copy
+ However, this patch still needs the files eval_defs.h and
+ eval_tab.h copied from the cfitsion source.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -12,12 +12,12 @@
+
+ OBJECTS = ${CFILES:.c=.o}
+ LOCAL_OBJ = ${OBJECTS} ${SHARED_CFILE:.c=.o}
+-SHARED_OBJ = ${LOCAL_OBJ} ${CFITSIO_DIR}/*.o
++SHARED_OBJ = ${LOCAL_OBJ}
+
+ STATIC_LIB = lib${LIBRARY}.a
+ SHARED_LIB = lib${LIBRARY}${SHLIB_SUFFIX}
+
+-IFLAGS = -I${CFITSIO_DIR} -I${TCL_INC_PATH}
++IFLAGS = -I${TCL_INC_PATH}
+
+ #----------------------------------------------------------------------------
+ # Configurable macros:
+@@ -35,7 +35,6 @@
+ TCL_INC_PATH = @TCL_INC_PATH@
+ TCL_LIB_PATH = @TCL_PATH@
+ TCL_LIB = @TCL_LIB@
+-CFITSIO_DIR = @CFITSIODIR@
+ SHLIB_LD_LIBS = @LIBS@ @SHLIB_LD_LIBS@
+
+ #----------------------------------------------------------------------------
+@@ -52,34 +51,17 @@
+ ar cr ${STATIC_LIB} ${OBJECTS}
+ ${RANLIB} ${STATIC_LIB}
+
+-${SHARED_LIB}: build-cfitsio ${LOCAL_OBJ}
++${SHARED_LIB}: ${LOCAL_OBJ}
+ @if [ "x${TCL_LIB_PATH}" = x -o "x${TCL_LIB}" = x ]; then \
+ echo "${SHLIB_LD} ${LD_FLAGS} ${SHARED_OBJ} ${SHLIB_LD_LIBS} -o ${SHARED_LIB}"; \
+ ${SHLIB_LD} ${LD_FLAGS} ${SHARED_OBJ} ${SHLIB_LD_LIBS} \
+- -o ${SHARED_LIB}; \
++ -ltcl -lwcs -lcfitsio -o ${SHARED_LIB}; \
+ else \
+ echo "${SHLIB_LD} ${LD_FLAGS} ${SHARED_OBJ} ${SHLIB_LD_LIBS} -L${TCL_LIB_PATH} -l${TCL_LIB} -o ${SHARED_LIB}"; \
+ ${SHLIB_LD} ${LD_FLAGS} ${SHARED_OBJ} ${SHLIB_LD_LIBS} \
+ -L${TCL_LIB_PATH} -l${TCL_LIB} -o ${SHARED_LIB}; \
+ fi
+
+-build-cfitsio:
+- @if [ "x${CFITSIO_DIR}" != x ]; then \
+- if [ -d "${CFITSIO_DIR}" ]; then \
+- if [ ! -f ${CFITSIO_DIR}/f77_wrap4.o ]; then \
+- echo "Configuring and building in ${CFITSIO_DIR}"; \
+- cd ${CFITSIO_DIR}; ./configure; \
+- ${MAKE} stand_alone "CC=${CC}" "CFLAGS=${CFLAGS}" \
+- "FITSIO_OBJ=" "FITSIO_SRC="; \
+- fi; \
+- else \
+- echo "CFITSIO_DIR='${CFITSIO_DIR}' does not exist!"; \
+- exit 1; \
+- fi; \
+- else \
+- echo "CFITSIO_DIR was not set!"; \
+- exit 1; \
+- fi
+
+ install: all
+ @if [ "x${C_LIB_OPTION}" = xstatic ]; then \
+--- a/configure.in
++++ b/configure.in
+@@ -56,26 +56,8 @@
+ [ --with-itcl Path to itcl source ],
+ ITCL_PATH=$withval
+ )
+-AC_ARG_WITH(
+- cfitsio,
+- [ --with-cfitsio Path to cfitsio source ],
+- CFITSIO=$withval
+-)
+ # Make sure we have cfitsio before proceeding:
+ #-------------------------------------------
+-AC_MSG_CHECKING([for cfitsio source directory])
+-CFITSIODIR=
+-for dir in $CFITSIO ./cfitsio ; do
+- if test -r $dir/eval_defs.h; then
+- CFITSIODIR=$dir
+- AC_MSG_RESULT($dir)
+- break
+- fi
+-done
+-if test -z "$CFITSIODIR"; then
+- AC_MSG_RESULT([no])
+- AC_MSG_ERROR(Can't find cfitsio. Use --with-cfitsio to specify the location of the cfitsio source code.)
+-fi
+ #-------------------------------------------
+ AC_ARG_ENABLE(
+ shared,
+@@ -95,7 +77,6 @@
+ changequote([,])
+ AC_SUBST(TCL_LIB)
+ AC_SUBST(TK_LIB)
+-AC_SUBST(CFITSIODIR)
+
+ if test $lhea_shared = yes; then
+ C_LIB_OPTION=shared
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..3376a3a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,11 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+%:
+ dh $@ --with autoreconf
+
+override_dh_auto_configure:
+ dh_auto_configure -- --with-tcl-includes=/usr/include/tcl
+
+override_dh_installchangelogs:
+ dh_installchangelogs ReleaseNotes
\ No newline at end of file
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
--
Tcl interface to FITS Files
More information about the debian-science-commits
mailing list