[SCM] Minimal buy-in FITS library and utility package branch, ubuntu, updated. 65164f3d12111b7b976c9b5550735e266fddf296

Ole Streicher debian at liska.ath.cx
Fri Jun 8 16:57:31 UTC 2012


The following commit has been merged in the ubuntu branch:
commit 7f44aad431b5d7fc83d8e12155fbec76b6c80e7c
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Fri Jun 8 18:50:57 2012 +0200

    Backport patches from saods9/funtools-1.4.5

diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..0db63f9
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,15 @@
+funtools for Debian
+===================
+
+This source is patched mainly for the use with saods9. In DS9, this version
+has version number 1.4.5; however no official 1.4.5 version is release yet
+from upstream.
+
+Other use than for DS9 is discouraged, since its upstream development is
+limited to DS9 since 2008. No other fixes or enhancements will be made. See
+
+http://hea-www.harvard.edu/RD/funtools/ 
+
+for the announcement.
+
+ -- Ole Streicher <debian at liska.ath.cx>, Fri, 08 Jun 2012 19:00:00 +0200
diff --git a/debian/changelog b/debian/changelog
index 98fc6f0..73120b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+funtools (1.4.4-3) unstable; urgency=low
+
+  * Update ds9 patches from version 7.0
+  * Set DM-Upload-Allowed: yes
+
+ -- Ole Streicher <debian at liska.ath.cx>  Fri, 08 Jun 2012 18:47:12 +0200
+
 funtools (1.4.4-2) unstable; urgency=low
 
   * Add dependency of libwcstools-dev to libfuntools-dev
diff --git a/debian/patches/ds9_fixes.diff b/debian/patches/ds9_fixes.diff
index 57b31de..6a08915 100644
--- a/debian/patches/ds9_fixes.diff
+++ b/debian/patches/ds9_fixes.diff
@@ -1,30 +1,63 @@
-Origin: http://hea-www.harvard.edu/saord/download/ds9/source/ds9.6.2.tar.gz
-Description: Fixes that were applied to the package included in the saods9 source.
+Origin: http://hea-www.harvard.edu/saord/download/ds9/source/ds9.7.0.tar.gz
+Description: Fixes that were applied to the package included in the saods9 
+ source. Only the patches that affect the Debian distribution are included here.
  These patches are not specific for DS9, however.
---- funtools-1.4.4/filter/filter.c	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//filter/filter.c	2012-03-02 09:35:47.000000000 +0100
-@@ -326,6 +326,8 @@
+ .
+ From the changelog:
+  * Fixed -J funcone, which was not properly outputting all rows.
+  * Fixed bug in funim.c which broke vcol functionality.
+ .
+--- a/filter/filter.c
++++ b/filter/filter.c
+@@ -326,24 +326,31 @@ Filter FilterOpen(header, string, mode)
    }
  
    /* determine which type of process execution we do */
+-  filter->ptype = DEFAULT_FILTER_PTYPE;
+-  *tbuf = '\0';
+-  if( (s=(char *)getenv("FILTER_PTYPE")) ){
+-    strcpy(tbuf, s);
+-  }
+-  if( !*tbuf && (s=xstrdup(filter->mode)) ){
+-    keyword(s, "ptype", tbuf, SZ_LINE);
+-    if( s ) xfree(s);
+-  }
+-  if( *tbuf ){
+-    if( *tbuf == 'p' )
+-      filter->ptype = PTYPE_PROCESS;
+-    else if( *tbuf == 'c' )
+-      filter->ptype = PTYPE_CONTAINED;
 +  switch(filter->method){
 +  case METHOD_C:
-   filter->ptype = DEFAULT_FILTER_PTYPE;
-   *tbuf = '\0';
-   if( (s=(char *)getenv("FILTER_PTYPE")) ){
-@@ -345,6 +347,11 @@
-       filter->ptype = PTYPE_DYNAMIC;
++    filter->ptype = DEFAULT_FILTER_PTYPE;
++    *tbuf = '\0';
++    if( (s=(char *)getenv("FILTER_PTYPE")) ){
++      strcpy(tbuf, s);
++    }
++    if( !*tbuf && (s=xstrdup(filter->mode)) ){
++      keyword(s, "ptype", tbuf, SZ_LINE);
++      if( s ) xfree(s);
++    }
++    if( *tbuf ){
++      if( *tbuf == 'p' )
++	filter->ptype = PTYPE_PROCESS;
++      else if( *tbuf == 'c' )
++	filter->ptype = PTYPE_CONTAINED;
+ #ifdef USE_DL
+-    else if( *tbuf == 'd' )
+-      filter->ptype = PTYPE_DYNAMIC;
++      else if( *tbuf == 'd' )
++	filter->ptype = PTYPE_DYNAMIC;
  #endif
-   }
++    }
 +    break;
 +  default:
 +    filter->ptype = PTYPE_PROCESS;
 +    break;
-+  }
+   }
  
    /* determine region paint mode */
-   *tbuf = '\0';
-@@ -470,7 +477,10 @@
+@@ -470,7 +477,10 @@ Filter FilterOpen(header, string, mode)
    if( !FilterProgCompile(filter) )
      goto error;
  
@@ -36,9 +69,37 @@ Description: Fixes that were applied to the package included in the saods9 sourc
      switch(filter->ptype){
      case PTYPE_PROCESS:
      case PTYPE_CONTAINED:
-@@ -501,6 +511,9 @@
+@@ -478,7 +488,7 @@ Filter FilterOpen(header, string, mode)
+       case PIPE_WIN32:
+ #if HAVE_CYGWIN
+ 	if( !WinProcessOpen(filter->prog, 
+-	    &(filter->ihandle), &(filter->ohandle), &(filter->process)) )
++	     &(filter->ihandle), &(filter->ohandle), &(filter->process)) )
+ 	  goto error;
+ #else
+ 	gerror(stderr, "internal error: no WinProcess without Windows");
+@@ -487,20 +497,23 @@ Filter FilterOpen(header, string, mode)
+ 	break;
+       default:
+ 	if( !ProcessOpen(filter->prog, 
+-		    &(filter->ichan), &(filter->ochan), &(filter->pid)) )
++	     &(filter->ichan), &(filter->ochan), &(filter->pid)) )
+ 	  goto error;
+ 	break;
+       }
+       break;
+ #ifdef USE_DL
+     case PTYPE_DYNAMIC:
+-     if( !(filter->dl=DLOpen(filter->prog)) )
+-       goto error;
+-     break;
++      if( !(filter->dl=DLOpen(filter->prog)) )
++	goto error;
++      break;
+ #endif
      default:
-       goto error;
+-      goto error;
++	goto error;
      }
 +    break;
 +  default:
@@ -46,9 +107,9 @@ Description: Fixes that were applied to the package included in the saods9 sourc
    }
  
    /* return the good news */
---- funtools-1.4.4/filter/filt.l	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//filter/filt.l	2012-03-02 09:35:47.000000000 +0100
-@@ -871,6 +871,26 @@
+--- a/filter/filt.l
++++ b/filter/filt.l
+@@ -871,6 +871,26 @@ compass     { BEGIN COMM; }
   *
   */
  
@@ -75,7 +136,7 @@ Description: Fixes that were applied to the package included in the saods9 sourc
  #ifdef YY_USE_PROTOS
  static void
  bin2num(char *d, char *s, int maxlen)
-@@ -1414,7 +1434,14 @@
+@@ -1414,7 +1434,14 @@ static void _FiltLexRegionStart(docols)
      FilterSymbolDefaults(filt, 0);
      /* initialize wcs for default image case */
      _FiltLexWcsCols(filt->fhd, filt->xbin, filt->ybin);
@@ -91,7 +152,7 @@ Description: Fixes that were applied to the package included in the saods9 sourc
      break;
    case 1:
      if( !initbindefs ){
-@@ -1427,16 +1454,24 @@
+@@ -1427,16 +1454,24 @@ static void _FiltLexRegionStart(docols)
      if( !filt->xbin || !filt->ybin ){
        _filterror("two binning columns are required for regions");
      }
@@ -120,9 +181,9 @@ Description: Fixes that were applied to the package included in the saods9 sourc
      break;
    }
    if( s ) xfree(s);
---- funtools-1.4.4/filter/filtprog_c.c	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//filter/filtprog_c.c	2012-03-02 09:35:47.000000000 +0100
-@@ -198,7 +198,8 @@
+--- a/filter/filtprog_c.c
++++ b/filter/filtprog_c.c
+@@ -198,7 +198,8 @@ static int FilterProgOpen_C(filter)
      ccstr = "gcc";
    }
    /* make sure we have a compiler */
@@ -132,19 +193,19 @@ Description: Fixes that were applied to the package included in the saods9 sourc
        !(filter->cc = Find("gcc", "x", NULL, FilterPath()))		&&
        !(filter->cc = Find("cc",  "x", NULL, FilterPath()))		&&
        !(filter->cc = Find("cc",  "x", NULL, "."))  			&&
---- funtools-1.4.4/filter/symbols.c	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//filter/symbols.c	2012-03-02 09:35:47.000000000 +0100
-@@ -217,6 +217,7 @@
- #else
- int FilterSymbolDefaults(filter, enter)
-      Filter filter;
-+     int enter;
- #endif
- {
-   int ip=0;
---- funtools-1.4.4/funcone.c	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//funcone.c	2012-03-02 09:35:48.000000000 +0100
-@@ -1036,6 +1036,9 @@
+@@ -212,6 +213,9 @@ static int FilterProgOpen_C(filter)
+ #if HAVE_CYGWIN
+   if( (s=strrchr(filter->cc, '/')) ){
+     s++;
++  }
++  else if( (s=strrchr(filter->cc, '\\')) ){
++    s++;
+   } else {
+     s = filter->cc;
+   }
+--- a/funcone.c
++++ b/funcone.c
+@@ -1036,6 +1036,9 @@ main(argc, argv)
    strncpy(decstr, argv[optind+ioff++], SZ_LINE-1);
    strncpy(radstr, argv[optind+ioff++], SZ_LINE-1);
  
@@ -154,7 +215,7 @@ Description: Fixes that were applied to the package included in the saods9 sourc
    /* process list arguments */
    if( dolist ){
      if( !(list=OpenList(lname, rastr, decstr, radstr)) ){
-@@ -1085,6 +1088,8 @@
+@@ -1085,6 +1088,8 @@ main(argc, argv)
      if( !(adbuf=xcalloc(nrow+1, sizeof(char))) ){
        gerror(stderr, "can't allocate all (-J|-X) buffer of size %d\n", nrow);
      }
@@ -163,7 +224,7 @@ Description: Fixes that were applied to the package included in the saods9 sourc
    }
  
    /* activate columns specified by user, if necessary */
-@@ -1371,7 +1376,7 @@
+@@ -1371,7 +1376,7 @@ done:
      while( (ebuf = (Ev)FunTableRowGet(fun, NULL, maxrow, NULL, &got)) ){
        /* if we have a filter, then we don't know the row number til after
  	 we read the event, i.e. now */
@@ -172,9 +233,9 @@ Description: Fixes that were applied to the package included in the saods9 sourc
        /* process all rows */
        for(i=0; i<got; i++){
  	/* skip rows that already were written out */
---- funtools-1.4.4/funtab.c	2012-03-02 09:35:45.000000000 +0100
-+++ funtools-1.4.4_ds9//funtab.c	2012-03-02 09:35:48.000000000 +0100
-@@ -1386,7 +1386,7 @@
+--- a/funtab.c
++++ b/funtab.c
+@@ -1386,7 +1386,7 @@ int FunTableRowPut(fun, rows, nrow, idx, plist)
  off_t
  FunTableRowSeek(Fun fun, int nrow, char *plist)
  #else
@@ -183,3 +244,49 @@ Description: Fixes that were applied to the package included in the saods9 sourc
       Fun fun;
       int nrow;
       char *plist;
+--- a/funim.c
++++ b/funim.c
+@@ -111,9 +111,9 @@ static void *_FunTableBin(fun, buf, plist)
+   /* optional value column for binning */
+   if( fun->vbin >= 0 ){
+     dovcol = 1;
+-    voffset = fun->header->table->col[fun->bin[2]].offset;
+-    vsize = fun->header->table->col[fun->bin[2]].size;
+-    vtype = fun->header->table->col[fun->bin[2]].type;
++    voffset = fun->header->table->col[fun->vbin].offset;
++    vsize = fun->header->table->col[fun->vbin].size;
++    vtype = fun->header->table->col[fun->vbin].type;
+   }
+   else{
+     dovcol = 0;
+--- a/calc.l
++++ b/calc.l
+@@ -284,7 +284,7 @@ static char *_CalcCB(name, client_data)
+ {
+   CalcCols cur;  
+   char tbuf[SZ_LINE];
+-  char tbuf2[SZ_LINE];
++  char tbuf2[SZ_LINE*2];
+   char tbuf3[SZ_LINE];
+   int i, got, ip;
+   
+--- a/util/gio.c
++++ b/util/gio.c
+@@ -2209,7 +2209,7 @@ void gerror(va_alist) va_dcl
+     vsnprintf(_gerrors, SZ_LINE-1, tbuf, args);
+     /* if the error flag is positive, we output immediately */
+     if( (fd != NULL) && _gerror ){
+-      fprintf(fd, _gerrors);
++      fputs(_gerrors, fd);
+       fflush(fd);
+     }
+     /* if the error flag is set high, we exit */
+@@ -2281,7 +2281,7 @@ void gwarning(va_alist) va_dcl
+     vsnprintf(_gwarnings, SZ_LINE-1, tbuf, args);
+     /* if the warning flag is positive, we output immediately */
+     if( (fd != NULL) && _gwarning ){
+-      fprintf(fd, _gwarnings);
++      fputs(_gwarnings, fd);
+       fflush(fd);
+     }
+ }

-- 
Minimal buy-in FITS library and utility package



More information about the debian-science-commits mailing list