Author: frankie Date: 2010-09-21 13:42:38 +0000 (Tue, 21 Sep 2010) New Revision: 2930
Added: packages/grass/trunk/debian/patches/scripts.dpatch Modified: packages/grass/trunk/debian/changelog Log: Script fixes stolen to 6.4.0. Modified: packages/grass/trunk/debian/changelog =================================================================== --- packages/grass/trunk/debian/changelog 2010-09-21 13:31:04 UTC (rev 2929) +++ packages/grass/trunk/debian/changelog 2010-09-21 13:42:38 UTC (rev 2930) @@ -7,6 +7,8 @@ + gcs.dpatch: fix a proj description in a .csv file for a specific CRS. + g.extension.dpatch: added Markus g.extension script to download and eventually install extension from GRASS svn add-ons repo. + + scripts.dpatch: some plain fixes to some shell scripts: m.proj, + r.mask, v.in.gpsbabel, v.in.mapgen. r.regression.line. -- Francesco Paolo Lovergine <fran...@debian.org> Tue, 21 Sep 2010 14:27:53 +0200 Added: packages/grass/trunk/debian/patches/scripts.dpatch =================================================================== --- packages/grass/trunk/debian/patches/scripts.dpatch (rev 0) +++ packages/grass/trunk/debian/patches/scripts.dpatch 2010-09-21 13:42:38 UTC (rev 2930) @@ -0,0 +1,182 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## scripts.dpatch by Francesco Paolo Lovergine <fran...@debian.org> +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +...@dpatch@ +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' grass-6.4.0~rc6+42329~/scripts/m.proj/m.proj grass-6.4.0~rc6+42329/scripts/m.proj/m.proj +--- grass-6.4.0~rc6+42329~/scripts/m.proj/m.proj 2010-03-15 14:23:45.000000000 +0100 ++++ grass-6.4.0~rc6+42329/scripts/m.proj/m.proj 2010-09-21 15:37:08.000000000 +0200 +@@ -29,6 +29,7 @@ + #% description: Input coordinate file (omit to read from stdin) + #% required : no + #% key_desc : filename ++#% guisection: Files & format + #%end + #%option + #% key: output +@@ -37,6 +38,7 @@ + #% description: Output coordinate file (omit to send to stdout) + #% required : no + #% key_desc : filename ++#% guisection: Files & format + #%end + #%option + #% key: fs +@@ -45,34 +47,41 @@ + #% required : no + #% key_desc : character + #% answer : | ++#% guisection: Files & format + #%end + #%option + #% key: proj_in + #% type: string + #% description: Input projection parameters (PROJ.4 style) + #% required : no ++#% guisection: Projections + #%end + #%option + #% key: proj_out + #% type: string + #% description: Output projection parameters (PROJ.4 style) + #% required : no ++#% guisection: Projections + #%end + #%flag + #% key: i + #% description: Use LL WGS84 as input and current location as output projection ++#% guisection: Projections + #%end + #%flag + #% key: o + #% description: Use current location as input and LL WGS84 as output projection ++#% guisection: Projections + #%end + #%flag + #% key: d +-#% description: Output long/lat in decimal degrees or other projections with many decimal places ++#% description: Output long/lat in decimal degrees, or other projections with many decimal places ++#% guisection: Files & format + #%end + #%flag + #% key: g + #% description: Script style output in CSV format respecting the field separator settings ++#% guisection: Files & format + #%end + #%flag + #% key: v +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' grass-6.4.0~rc6+42329~/scripts/r.mask/r.mask grass-6.4.0~rc6+42329/scripts/r.mask/r.mask +--- grass-6.4.0~rc6+42329~/scripts/r.mask/r.mask 2010-03-15 14:23:25.000000000 +0100 ++++ grass-6.4.0~rc6+42329/scripts/r.mask/r.mask 2010-09-21 15:37:16.000000000 +0200 +@@ -55,6 +55,12 @@ + exec g.parser "$0" "$@" + fi + ++if [ -z "$GRASS_VERBOSE" ] || [ "$GRASS_VERBOSE" -le 2 ] ; then ++ BEQUIET="--q" ++else ++ BEQUIET="" ++fi ++ + # temp file + TEMPRAST="r_mask_$$" + +@@ -86,15 +92,15 @@ + + + if [ "$GIS_FLAG_R" -eq 1 ]; then +- if test -f `g.gisenv GISDBASE`/`g.gisenv LOCATION_NAME`/`g.gisenv MAPSET`/cell/MASK ; then ++ if test -f "`g.gisenv GISDBASE`/`g.gisenv LOCATION_NAME`/`g.gisenv MAPSET`/cell/MASK" ; then + g.remove rast=MASK +- g.message "Raster MASK removed" ++ g.message ${BEQUIET} "Raster MASK removed" + else +- g.message -w "No existing MASK to remove" ++ g.message ${BEQUIET} -w "No existing MASK to remove" + fi + else + if [ ! $GIS_OPT_INPUT ]; then +- g.message -w "No raster map for MASK provided" ++ g.message ${BEQUIET} -w "No raster map for MASK provided" + exit 1; + fi + if [ "$GIS_FLAG_O" -eq 1 ]; then +@@ -114,13 +120,13 @@ + g.rename --q rast=MASK,$TEMPRAST + r.mapcalc "MASK=if(isnull($TEMPRAST),1,null())" + g.remove --q rast=$TEMPRAST +- g.message "Inverted MASK created. All subsequent raster operations" ++ g.message ${BEQUIET} "Inverted MASK created. All subsequent raster operations" + else +- g.message "MASK created. All subsequent raster operations" ++ g.message ${BEQUIET} "MASK created. All subsequent raster operations" + fi +- g.message "will be limited to MASK area" +- g.message "Removing or renaming raster file named MASK will" +- g.message "restore raster operations to normal" ++ g.message ${BEQUIET} "will be limited to MASK area" ++ g.message ${BEQUIET} "Removing or renaming raster file named MASK will" ++ g.message ${BEQUIET} "restore raster operations to normal" + fi + + exit 0 +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' grass-6.4.0~rc6+42329~/scripts/r.regression.line/r.regression.line grass-6.4.0~rc6+42329/scripts/r.regression.line/r.regression.line +--- grass-6.4.0~rc6+42329~/scripts/r.regression.line/r.regression.line 2010-03-15 14:23:47.000000000 +0100 ++++ grass-6.4.0~rc6+42329/scripts/r.regression.line/r.regression.line 2010-09-21 15:37:38.000000000 +0200 +@@ -112,10 +112,10 @@ + }\ + END {B=(sumXY - sumX*sumY/tot)/(sumsqX - sumX*sumX/tot);\ + R= (sumXY - sumX*sumY/tot)/((sumsqX - sumX^2/tot)*(sumsqY - sumY^2/tot))^0.5;\ +-mediaX=sumX/tot;sumsqX=sumsqX/tot;varX=sumsqX-(mediaX^2);sdX=varX^0.5;\ +-mediaY=sumY/tot;sumsqY=sumsqY/tot;varY=sumsqY-(mediaY^2);sdY=varY^0.5;\ +-A=mediaY - B*mediaX; F= R^2/(1-R^2/tot-2);\ +-print A, B, R, tot, F, mediaX, sdX, mediaY, sdY}' "$TEMPFILE" > "$TEMPFILE"b ++meanX=sumX/tot; sumsqX=sumsqX/tot; varX=sumsqX-(meanX^2); sdX=varX^0.5;\ ++meanY=sumY/tot; sumsqY=sumsqY/tot; varY=sumsqY-(meanY^2); sdY=varY^0.5;\ ++A=meanY - B*meanX; F= R^2/(1-R^2/tot-2);\ ++print A, B, R, tot, F, meanX, sdX, meanY, sdY}' "$TEMPFILE" > "$TEMPFILE"b + + echo "a b R N F medX sdX medY sdY" | tr -s ' ' '\n' > "$TEMPFILE"d + cat "$TEMPFILE"b | tr -s ' ' '\n' > "$TEMPFILE"e +@@ -131,6 +131,7 @@ + echo " b: gain" + echo " R: sumXY - sumX*sumY/tot" + echo " N: number of elements" ++ echo " F: F-test significance" + echo " medX, medY: Means" + echo " sdX, sdY: Standard deviations" + echo "a b R N F medX sdX medY sdY" +@@ -146,6 +147,7 @@ + echo " b: gain" >> "$TEMPFILE"c + echo " R: sumXY - sumX*sumY/tot" >> "$TEMPFILE"c + echo " N: number of elements" >> "$TEMPFILE"c ++ echo " F: F-test significance" >> "$TEMPFILE"c + echo " medX, medY: Means" >> "$TEMPFILE"c + echo " sdX, sdY: Standard deviations" >> "$TEMPFILE"c + echo "a b R N F medX sdX medY sdY" >> "$TEMPFILE"c +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' grass-6.4.0~rc6+42329~/scripts/v.in.gpsbabel/v.in.gpsbabel grass-6.4.0~rc6+42329/scripts/v.in.gpsbabel/v.in.gpsbabel +--- grass-6.4.0~rc6+42329~/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-03-15 14:23:30.000000000 +0100 ++++ grass-6.4.0~rc6+42329/scripts/v.in.gpsbabel/v.in.gpsbabel 2010-09-21 15:37:54.000000000 +0200 +@@ -563,7 +563,7 @@ + if [ "$IN_PROJ" = "$OUT_PROJ" ] || [ $KEEP_WGS84 -eq 1 ] ; then + g.message "No projection transformation performed" + cat "${TEMPFILE}.base" | awk 'BEGIN {;} $1=="L" { print } ; \ +- $1!="L" { " %s %s\n", $1, $2) } END {;}' > "${TEMPFILE}.P_base" ++ $1!="L" { printf(" %s %s\n", $1, $2) } END {;}' > "${TEMPFILE}.P_base" + else + g.message "Attempting waypoint projection transform with cs2cs" + cs2cs -tL -f %.7f $IN_PROJ +to $OUT_PROJ < "${TEMPFILE}.base" > "${TEMPFILE}.P_mid" +diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' grass-6.4.0~rc6+42329~/scripts/v.in.mapgen/v.in.mapgen grass-6.4.0~rc6+42329/scripts/v.in.mapgen/v.in.mapgen +--- grass-6.4.0~rc6+42329~/scripts/v.in.mapgen/v.in.mapgen 2010-03-15 14:23:29.000000000 +0100 ++++ grass-6.4.0~rc6+42329/scripts/v.in.mapgen/v.in.mapgen 2010-09-21 15:38:12.000000000 +0200 +@@ -24,7 +24,7 @@ + # + + #%Module +-#% description: Import Mapgen or Matlab vector maps into GRASS. ++#% description: Import Mapgen or Matlab-ASCII vector maps into GRASS. + #% keywords: vector, import + #%End + #%flag Property changes on: packages/grass/trunk/debian/patches/scripts.dpatch ___________________________________________________________________ Added: svn:executable + * _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-grass-devel