[tcl-fitstcl] 01/04: Adjust patches for new version
Ole Streicher
olebole at moszumanska.debian.org
Wed Jun 10 15:40:36 UTC 2015
This is an automated email from the git hooks/post-receive script.
olebole pushed a commit to branch debian
in repository tcl-fitstcl.
commit bb7214d16ddc014e0612c96883ad206990962114
Author: Ole Streicher <olebole at debian.org>
Date: Wed Jun 10 17:34:48 2015 +0200
Adjust patches for new version
---
debian/patches/fix_compiler_warnings.patch | 332 +----------------------------
debian/patches/fix_fitsCmds.patch | 106 ---------
debian/patches/fix_spelling.patch | 22 --
debian/patches/nonlinux.patch | 10 +-
debian/patches/propagate_flags.patch | 8 +-
debian/patches/series | 2 -
debian/patches/set_installdir.patch | 30 +--
debian/patches/use_shared_cfitsio.patch | 48 ++---
8 files changed, 52 insertions(+), 506 deletions(-)
diff --git a/debian/patches/fix_compiler_warnings.patch b/debian/patches/fix_compiler_warnings.patch
index 46f82ef..bb55571 100644
--- a/debian/patches/fix_compiler_warnings.patch
+++ b/debian/patches/fix_compiler_warnings.patch
@@ -3,340 +3,12 @@ Description: Correct warnings with -Werror=format-security and conversion
from pointer to int.
--- a/fitsIO.c
+++ b/fitsIO.c
-@@ -81,8 +81,9 @@
- {
- int i,status=0;
- int simple,extend;
-- long pcount, gcount, rowlen, varidat;
-+ long pcount, gcount, rowlen;
- LONGLONG tbcol[FITS_COLMAX];
-+ LONGLONG varidat;
- char tmpStr[80];
- char tmpKey[FLEN_KEYWORD];
- Tcl_HashEntry *thisEntry;
-@@ -1782,7 +1783,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 +1827,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 +1876,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 +1921,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 +1964,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 +2008,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,
-@@ -3976,9 +3977,9 @@
- if ( ifCSV == 1 )
- fprintf(fPtr, "\"");
- if ( ifPrintRow == 1 ) {
-- sprintf(outputStr, "%d", m);
-- fprintf(fPtr, outputStr);
-- fprintf(fPtr, sepString);
-+ sprintf(outputStr, "%lld", m);
-+ fprintf(fPtr, "%s", outputStr);
-+ fprintf(fPtr, "%s", sepString);
- }
-
- saveVectorTableRowToAscii(curFile, filename, fileStatus, m, 1, fCol, nCols, baseColNum, ifCSV,
-@@ -4180,7 +4181,7 @@
+@@ -4208,7 +4208,7 @@
} else if( anyf ) {
- /* */
+ strcpy(outputStr,"NULL");
} else {
- strcpy(outputStr,longlongValue[0]);
+ sprintf(outputStr,colFormat,longlongValue[0]);
}
break;
-@@ -4191,9 +4192,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 +4407,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 +4424,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 +4717,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 +4876,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 +4906,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 +4917,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 +4930,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 +4960,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 +4974,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 +4987,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 +5016,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 +5026,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 +5040,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 +5069,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 +5079,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 +5093,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 +5122,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 +5132,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 +5146,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 +5175,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 +5185,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 +7121,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_fitsCmds.patch b/debian/patches/fix_fitsCmds.patch
deleted file mode 100644
index 263c4d1..0000000
--- a/debian/patches/fix_fitsCmds.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-Author: Ole Streicher <debian at liska.ath.cx>
-Description: Fix some bugs in fitsCmds.c:
- * In fitsTcl_get(), the header is allocated by ffhdr2str(), but is freed by
- ckfree(). This causes crashes if ckfree() is not just a free() alias.
- * Fix some variable declarations and type casts to match prototypes.
- * Check the number of arguments in "get translatedKeywords".
- * Fix status parameter in exxor handling of fits_copy_cell2image() of
- "get translatedKeywords".
---- a/fitsCmds.c
-+++ b/fitsCmds.c
-@@ -360,7 +360,7 @@
-
- } else if( !strcmp("filesize",argv[2]) ) {
-
-- sprintf(result,"%ld",curFile->fptr->Fptr->filesize/2880);
-+ sprintf(result,"%lld",curFile->fptr->Fptr->filesize/2880);
- Tcl_SetResult(curFile->interp, result, TCL_VOLATILE);
-
- } else if( !strcmp("hdutype",argv[2]) ) {
-@@ -976,8 +976,8 @@
- int naxis = 2;
- long naxes[2];
- int columns[FITS_MAXDIMS];
-- int *nkeys;
-- char **header;
-+ int nkeys;
-+ char *header;
- int i,j;
-
- /* Pan Chai: there is only 2 columns */
-@@ -1032,7 +1032,7 @@
- }
-
- status = 0;
-- if ( ffhdr2str(dummyptr, 1, (char *)NULL, 0, &header, &nkeys, &status) > 0 ) {
-+ if ( ffhdr2str(dummyptr, 1, (char **)NULL, 0, &header, &nkeys, &status) > 0 ) {
- Tcl_SetResult(curFile->interp, "Failed to collect all the headers.", TCL_STATIC);
- return TCL_ERROR;
- }
-@@ -1049,7 +1049,7 @@
- Tcl_ListObjAppendElement( curFile->interp, listObj, Tcl_NewListObj(5,data) );
- Tcl_SetObjResult(curFile->interp, listObj);
-
-- ckfree( (char*) header);
-+ free( header);
- return TCL_OK;
-
- } else if( !strcmp("translatedKeywords", argv[2]) ) {
-@@ -1058,6 +1058,13 @@
- long rownum;
- fitsfile *newptr;
-
-+ if ( argc != 5 ) {
-+ Tcl_SetResult(curFile->interp,
-+ "Usage: get translatedKeywords rownum colname",
-+ TCL_STATIC);
-+ return TCL_ERROR;
-+ }
-+
- strcpy(outfile, "mem://_1");
-
- /* Copy the image into new primary array and open it as the current */
-@@ -1075,13 +1082,14 @@
- status = 0;
- if (fits_copy_cell2image(curFile->fptr, newptr, argv[3], rownum, &status) > 0)
- {
-+ int status2 = 0;
- ffpmsg("Failed to copy table cell to new primary array:");
-- ffclos(curFile->fptr, status);
-+ ffclos(curFile->fptr, &status2);
- curFile->fptr = 0; /* return null file pointer */
- return(status);
- }
-
-- if ( ffhdr2str(newptr, 1, (char *)NULL, 0, &header, &nkeys, &status) > 0 ) {
-+ if ( ffhdr2str(newptr, 1, (char **)NULL, 0, &header, &nkeys, &status) > 0 ) {
- Tcl_SetResult(curFile->interp, "Failed to collect all the headers.", TCL_STATIC);
- return TCL_ERROR;
- }
-@@ -1102,7 +1110,7 @@
- Tcl_SetObjResult(curFile->interp, listObj);
- */
-
-- ckfree( (char*) header);
-+ free( header);
- return TCL_OK;
-
- } else if( !strcmp("header2str", argv[2]) ) {
-@@ -1114,7 +1122,7 @@
- /* int *nkeys, O - returned number of 80-char keywords */
- /* int *status) IO - error status */
-
-- if ( ffhdr2str(curFile->fptr, 1, (char *)NULL, 0, &header, &nkeys, &status) > 0 ) {
-+ if ( ffhdr2str(curFile->fptr, 1, (char **)NULL, 0, &header, &nkeys, &status) > 0 ) {
- Tcl_SetResult(curFile->interp, "Failed to collect all the headers.", TCL_STATIC);
- return TCL_ERROR;
- }
-@@ -1123,7 +1131,7 @@
- Tcl_ListObjAppendElement( curFile->interp, listObj, Tcl_NewIntObj( nkeys ) );
- Tcl_SetObjResult(curFile->interp, listObj);
-
-- ckfree( (char*) header);
-+ free( header);
- return TCL_OK;
-
- } else if( !strcmp("imgwcs", argv[2]) ) {
diff --git a/debian/patches/fix_spelling.patch b/debian/patches/fix_spelling.patch
deleted file mode 100644
index 963d153..0000000
--- a/debian/patches/fix_spelling.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-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/nonlinux.patch b/debian/patches/nonlinux.patch
index 5b66b24..bfc55ed 100644
--- a/debian/patches/nonlinux.patch
+++ b/debian/patches/nonlinux.patch
@@ -2,7 +2,7 @@ Author: Ole Streicher <debian at liska.ath.cx>
Description: Extend the known operating systems by Gnu HURD and kfreeBSD.
--- a/configure.in
+++ b/configure.in
-@@ -97,7 +97,7 @@
+@@ -78,7 +78,7 @@
AC_MSG_ERROR(HEAsoft: Unable to guess system type. Please set it using --with-bindir option)
fi
changequote(,)
@@ -11,12 +11,12 @@ Description: Extend the known operating systems by Gnu HURD and kfreeBSD.
changequote([,])
lhea_machine=`$UNAME -m 2> /dev/null`
BIN_EXT=
-@@ -117,7 +117,7 @@
- EXT=hpu
- lhea_machine=`$UNAME -m 2> /dev/null | tr '/' ' ' | awk '{ print $2 }'`
+@@ -89,7 +89,7 @@
+ BIN_EXT=".exe"
+ EXT=win
;;
- Linux*)
+ Linux*|kFreeBSD*|GNU*)
EXT=lnx
;;
- OSF1*)
+ Darwin*)
diff --git a/debian/patches/propagate_flags.patch b/debian/patches/propagate_flags.patch
index 9203c59..c25df74 100644
--- a/debian/patches/propagate_flags.patch
+++ b/debian/patches/propagate_flags.patch
@@ -2,18 +2,18 @@ Author: Ole Streicher <debian at liska.ath.cx>
Description: Propagate CPPFLAGS and LDFLAGS for hardening
--- a/Makefile.in
+++ b/Makefile.in
-@@ -90,7 +90,7 @@
+@@ -89,7 +89,7 @@
.c.o:
-- ${CC} -c ${CFLAGS} ${DEFS} ${IFLAGS} $<
-+ ${CC} -c ${CPPFLAGS} ${CFLAGS} ${DEFS} ${IFLAGS} $<
+- ${CC} -c -o ${<D}/${@F} ${CFLAGS} ${DEFS} ${IFLAGS} $<
++ ${CC} -c -o ${<D}/${@F} ${CPPFLAGS} ${CFLAGS} ${DEFS} ${IFLAGS} $<
#
# $Log: Makefile.in,v $
--- a/configure.in
+++ b/configure.in
-@@ -289,7 +289,7 @@
+@@ -235,7 +235,7 @@
# Shared library section
#-------------------------------------------------------------------------------
diff --git a/debian/patches/series b/debian/patches/series
index c6e5345..a7d5486 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,8 +1,6 @@
-fix_fitsCmds.patch
use_shared_cfitsio.patch
cfitsio_header.patch
set_installdir.patch
fix_compiler_warnings.patch
-fix_spelling.patch
nonlinux.patch
propagate_flags.patch
diff --git a/debian/patches/set_installdir.patch b/debian/patches/set_installdir.patch
index ae57bbe..e14dd8f 100644
--- a/debian/patches/set_installdir.patch
+++ b/debian/patches/set_installdir.patch
@@ -11,15 +11,14 @@ Description: Correct the installation directory
CC = @CC@
RANLIB = @RANLIB@
CFLAGS = @CFLAGS@
-@@ -61,6 +61,7 @@
+@@ -61,18 +61,20 @@
${SHLIB_LD} ${LD_FLAGS} ${SHARED_OBJ} ${SHLIB_LD_LIBS} \
-L${TCL_LIB_PATH} -l${TCL_LIB} -o ${SHARED_LIB}; \
fi
+ echo "pkg_mkIndex . ${SHARED_LIB}" | tclsh
-
install: all
-@@ -68,12 +69,13 @@
+ @if [ "x${C_LIB_OPTION}" = xstatic ]; then \
echo "cp ${STATIC_LIB} ${INSTALLDIR}/lib/"; \
cp ${STATIC_LIB} ${INSTALLDIR}/lib/; \
else \
@@ -30,14 +29,14 @@ Description: Correct the installation directory
fi
clean:
-- -rm -rf *.o *~ ${STATIC_LIB} ${SHARED_LIB}
-+ -rm -rf *.o *~ ${STATIC_LIB} ${SHARED_LIB} pkgIndex.tcl
+- -rm -rf ${LOCAL_OBJ} ${STATIC_LIB} ${SHARED_LIB}
++ -rm -rf ${LOCAL_OBJ} ${STATIC_LIB} ${SHARED_LIB} pkgIndex.tcl
distclean: clean
-rm -f config.cache config.status config.log Makefile so_locations
--- a/fitsInit.c
+++ b/fitsInit.c
-@@ -24,6 +24,8 @@
+@@ -160,6 +160,8 @@
int i;
@@ -48,26 +47,31 @@ Description: Correct the installation directory
FitsOpenFiles[i].kwds = FitsOpenKwds + i;
--- a/fitsTcl.html
+++ b/fitsTcl.html
-@@ -39,19 +39,13 @@
+@@ -39,24 +39,14 @@
</p>
<p>
-fitsTcl is compiled as a dynamic library which can be loaded as a TCL
-extension. To load fitsTcl, type the following command in a Tcl shell
--(running on UNIX)
+fitsTcl is compiled as a TCL packge. To load fitsTcl, type the following
+command in a Tcl shell
+ (i.e. tclsh):
<pre>
--% load libfitstcl.so
+-% load libfitstcl.so (Linux)
+-
+-% load libfitstcl.dylib (Mac OS X)
+-
+-% load libfitstcl (Cygwin)
+% package require fitsTcl
</pre>
--(Under Mac OS and Windows, the library is instead named
--<tt>fitstcl.dll</tt>.) If the library is not found you may need to
+-If the library is not found you may need to
-set the environment variable <tt>LD_LIBRARY_PATH</tt> (Unix only) to the
-directory containing libfitstcl.so or include an explicit path to the
-file.
- </p>
-
+-</p>
+-
<p>
+ In fitsTcl, every FITS file is treated as a <b>FitsFile</b> object. The
+ following sections describe how to create <b>FitsFile</b> objects and all
diff --git a/debian/patches/use_shared_cfitsio.patch b/debian/patches/use_shared_cfitsio.patch
index b36b62b..78a51b3 100644
--- a/debian/patches/use_shared_cfitsio.patch
+++ b/debian/patches/use_shared_cfitsio.patch
@@ -4,22 +4,25 @@ Description: Remove the need of a private cfitsio source copy
eval_tab.h copied from the cfitsion source.
--- a/Makefile.in
+++ b/Makefile.in
-@@ -12,12 +12,12 @@
-
+@@ -12,15 +12,12 @@
OBJECTS = ${CFILES:.c=.o}
LOCAL_OBJ = ${OBJECTS} ${SHARED_CFILE:.c=.o}
--SHARED_OBJ = ${LOCAL_OBJ} ${CFITSIO_DIR}/*.o
+
+-CFITSIO_OBJ_TMP = ${shell if [ -f ${CFITSIO_DIR}/Makefile ]; then ${MAKE} -f ${CFITSIO_DIR}/Makefile cfitsioLibObjs; fi | grep buffers}
+-CFITSIO_OBJ = ${shell if [ "x${CFITSIO_OBJ_TMP}" != "x" ]; then echo ${CFITSIO_OBJ_TMP}; fi | sed "s: : ${CFITSIO_DIR}/:g" | sed "s:^:${CFITSIO_DIR}/:"}
+-
+-SHARED_OBJ = ${LOCAL_OBJ} ${CFITSIO_OBJ}
+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}
+-IFLAGS = -I${CFITSIO_DIR} -I${TCL_INC_PATH} -I./
++IFLAGS = -I${TCL_INC_PATH} -I./
#----------------------------------------------------------------------------
# Configurable macros:
-@@ -35,7 +35,6 @@
+@@ -38,7 +35,6 @@
TCL_INC_PATH = @TCL_INC_PATH@
TCL_LIB_PATH = @TCL_PATH@
TCL_LIB = @TCL_LIB@
@@ -27,7 +30,7 @@ Description: Remove the need of a private cfitsio source copy
SHLIB_LD_LIBS = @LIBS@ @SHLIB_LD_LIBS@
#----------------------------------------------------------------------------
-@@ -52,34 +51,17 @@
+@@ -55,35 +51,17 @@
ar cr ${STATIC_LIB} ${OBJECTS}
${RANLIB} ${STATIC_LIB}
@@ -47,7 +50,7 @@ Description: Remove the need of a private cfitsio source copy
-build-cfitsio:
- @if [ "x${CFITSIO_DIR}" != x ]; then \
- if [ -d "${CFITSIO_DIR}" ]; then \
-- if [ ! -f ${CFITSIO_DIR}/f77_wrap4.o ]; then \
+- if [ ! -f ${CFITSIO_DIR}/buffers.o ]; then \
- echo "Configuring and building in ${CFITSIO_DIR}"; \
- cd ${CFITSIO_DIR}; ./configure; \
- ${MAKE} stand_alone "CC=${CC}" "CFLAGS=${CFLAGS}" \
@@ -61,22 +64,25 @@ Description: Remove the need of a private cfitsio source copy
- echo "CFITSIO_DIR was not set!"; \
- exit 1; \
- fi
-
+-
install: all
@if [ "x${C_LIB_OPTION}" = xstatic ]; then \
+ echo "cp ${STATIC_LIB} ${INSTALLDIR}/lib/"; \
--- a/configure.in
+++ b/configure.in
-@@ -56,26 +56,8 @@
- [ --with-itcl Path to itcl source ],
- ITCL_PATH=$withval
- )
+@@ -45,30 +45,6 @@
+ fi
+ AC_SUBST(TCL_INC_PATH)
+
+-# CFITSIO:
+-#-------------------------------------------
-AC_ARG_WITH(
- cfitsio,
- [ --with-cfitsio Path to cfitsio source ],
- CFITSIO=$withval
-)
- # Make sure we have cfitsio before proceeding:
- #-------------------------------------------
+-# Make sure we have cfitsio before proceeding:
+-#-------------------------------------------
-AC_MSG_CHECKING([for cfitsio source directory])
-CFITSIODIR=
-for dir in $CFITSIO ./cfitsio ; do
@@ -88,16 +94,10 @@ Description: Remove the need of a private cfitsio source copy
-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.)
+- AC_MSG_ERROR(Cannot find cfitsio. Use --with-cfitsio to specify the location of the cfitsio source code.)
-fi
+-AC_SUBST(CFITSIODIR)
+-
#-------------------------------------------
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
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/tcl-fitstcl.git
More information about the debian-science-commits
mailing list