[GRASS-SVN] r45529 - in grass/branches/releasebranch_6_4: .
lib/init mswindows/osgeo4w
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Mar 3 08:20:26 EST 2011
Author: martinl
Date: 2011-03-03 05:20:26 -0800 (Thu, 03 Mar 2011)
New Revision: 45529
Added:
grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl
Removed:
grass/branches/releasebranch_6_4/lib/init/grass.bat
grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl
grass/branches/releasebranch_6_4/mswindows/osgeo4w/ini.bat.tmpl
Modified:
grass/branches/releasebranch_6_4/Makefile
grass/branches/releasebranch_6_4/lib/init/Makefile
grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl
grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh
Log:
clean up osgeo4w winGRASS support scripts
(merge r45527 from devbr6)
Modified: grass/branches/releasebranch_6_4/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/Makefile 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/Makefile 2011-03-03 13:20:26 UTC (rev 45529)
@@ -267,12 +267,8 @@
test -d ${INST_DIR} || ${MAKE_DIR_CMD} ${INST_DIR}
@##### test -d ${INST_DIR}/dev || ${MAKE_DIR_CMD} ${INST_DIR}/dev
test -d ${BINDIR} || ${MAKE_DIR_CMD} ${BINDIR}
- -sed -e "s#^GISBASE.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
+ -sed -e "s#GISBASE=.*#GISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
-chmod a+x ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}
-ifneq ($(strip $(MINGW)),)
- -sed -e "s#WINGISBASE=.*#WINGISBASE=${INST_DIR}#" ${ARCH_BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat > ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat
- -chmod a+x ${BINDIR}/grass${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR}.bat
-endif
-cd ${GISBASE} ; tar cBf - $(FILES) | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bin | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - bwidget | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
@@ -280,7 +276,9 @@
-cd ${GISBASE} ; tar cBf - driver | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - etc | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - fonts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
+ifeq ($(strip $(MINGW)),)
-cd ${GISBASE} ; tar cBf - man | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
+endif
-cd ${GISBASE} ; tar cBf - scripts | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
-cd ${GISBASE} ; tar cBf - tools | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null
if [ ${LOCALE} -eq 1 ] ; then cd ${GISBASE} ; tar cBf - locale | (cd ${INST_DIR} ; tar xBf - ) 2>/dev/null ; fi
Modified: grass/branches/releasebranch_6_4/lib/init/Makefile
===================================================================
--- grass/branches/releasebranch_6_4/lib/init/Makefile 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/lib/init/Makefile 2011-03-03 13:20:26 UTC (rev 45529)
@@ -59,7 +59,6 @@
ifneq ($(strip $(MINGW)),)
FILES += \
- $(ARCH_BINDIR)/$(START_UP).bat \
$(ETC)/Init.bat \
$(ETC)/winlocale$(EXE) \
$(ETC)/grass-run.bat
@@ -83,16 +82,6 @@
grass.src > $(ARCH_BINDIR)/$(START_UP) 2>/dev/null ; true"
chmod a+x $(ARCH_BINDIR)/$(START_UP)
-$(ARCH_BINDIR)/$(START_UP).bat: init.bat grass.bat
- @test -d $(ARCH_BINDIR) || (echo 'ARCH_DISTDIR($(ARCH_BINDIR))' not found; exit 1)
- @test -w $(ARCH_BINDIR) || (echo '($(ARCH_BINDIR))' not writeable; exit 1)
- rm -f $@ ; true
- $(SHELL) -c "sed \
- -e \"s#GISBASE_VALUE#$(RUN_GISBASE)#\" \
- grass.bat | \
- tr '/' '\\\' > $@"
- chmod a+x $@
-
$(ETC)/Init.sh: init.sh
rm -f $@
$(SHELL) -c "sed \
Deleted: grass/branches/releasebranch_6_4/lib/init/grass.bat
===================================================================
--- grass/branches/releasebranch_6_4/lib/init/grass.bat 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/lib/init/grass.bat 2011-03-03 13:20:26 UTC (rev 45529)
@@ -1,33 +0,0 @@
- at echo off
-rem #########################################################################
-rem #
-rem # GRASS Initialization
-rem #
-rem #########################################################################
-
-rem *******Environment variables***********
-rem Uncomment and set the following values if they differ from the indicated default
-
-rem Directory where your .grassrc6 file will be stored
-rem set HOME=%USERPROFILE%
-
-rem Name of the wish (Tk) executable
-rem set GRASS_WISH=wish.exe
-
-rem Path to the shell command
-rem (adjust to where you installed msys or another shell)
-rem set GRASS_SH=c:\msys\1.0\bin\sh.exe
-
-rem Path to utilities used by some scripts, such as awk, sed, etc
-rem (adjust to where you installed msys, gnuwin32, or other similar utilises)
-rem set PATH=c:\msys\1.0\bin;c:\msys\1.0\lib;%PATH%
-
-rem Path to your web browser
-rem set GRASS_HTML_BROWSER=%SYSTEMDRIVE%/PROGRA~1/INTERN~1/IEXPLORE.EXE
-
-rem Path to the proj files (notably the epsg projection list)
-rem set GRASS_PROJSHARE=c:/grass/share/proj
-
-set WINGISBASE=GISBASE_VALUE
-"%WINGISBASE%\etc\Init.bat" %*
-
Copied: grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl (from rev 45527, grass/branches/develbranch_6/mswindows/osgeo4w/env.bat.tmpl)
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl (rev 0)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/env.bat.tmpl 2011-03-03 13:20:26 UTC (rev 45529)
@@ -0,0 +1,8 @@
+set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
+set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
+set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
+set GRASS_WISH=%OSGEO4W_ROOT%\bin\wish.exe
+set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
+set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
+set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe
+set PATH=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@\bin;%PATH%
Modified: grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.bat.tmpl 2011-03-03 13:20:26 UTC (rev 45529)
@@ -1,4 +1,5 @@
@echo off
-call @osgeo4w@\bin\o4w_env.bat
-call @osgeo4w@\bin\grass at POSTFIX@-env.bat
+call @OSGEO4W_ROOT@\bin\o4w_env.bat
+call @OSGEO4W_ROOT@\bin\gdal17.bat
+call @OSGEO4W_ROOT@\apps\grass\grass- at VERSION@\etc\env.bat
"%WINGISBASE%"\etc\init.bat %*
Deleted: grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/grass.tmpl 2011-03-03 13:20:26 UTC (rev 45529)
@@ -1,25 +0,0 @@
-#! /bin/sh
-#############################################################################
-#
-# MODULE: GRASS Initialization
-# AUTHOR(S): Justin Hickey - Thailand - jhickey at hpcc.nectec.or.th
-# PURPOSE: The source file for this shell script is in
-# lib/init/grass.src and is the grass startup script. It
-# requires a source file because the definition of GISBASE
-# is not known until compile time and is substituted from the
-# Makefile. Any command line options are passed to Init.sh.
-# COPYRIGHT: (C) 2000-2005 by the GRASS Development Team
-#
-# This program is free software under the GNU General Public
-# License (>=v2). Read the file COPYING that comes with GRASS
-# for details.
-#
-#############################################################################
-
-trap "echo 'User break!' ; exit" 2 3 9 15
-
-# Set the GISBASE variable
-GISBASE=@osgeo4w_msys@/apps/grass/grass- at VERSION@
-export GISBASE
-
-exec "$GISBASE/etc/Init.sh" "$@"
Deleted: grass/branches/releasebranch_6_4/mswindows/osgeo4w/ini.bat.tmpl
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/ini.bat.tmpl 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/ini.bat.tmpl 2011-03-03 13:20:26 UTC (rev 45529)
@@ -1,8 +0,0 @@
-set GISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
-set WINGISBASE=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@
-set GRASS_SH=%OSGEO4W_ROOT%\apps\msys\bin\sh.exe
-set GRASS_WISH=%OSGEO4W_ROOT%\bin\wish.exe
-set GRASS_PYTHON=%OSGEO4W_ROOT%\bin\python.exe
-set GRASS_PROJSHARE=%OSGEO4W_ROOT%\share\proj
-set GRASS_HTML_BROWSER=%PROGRAMFILES%\Internet Explorer\iexplore.exe
-set PATH=%OSGEO4W_ROOT%\apps\grass\grass- at VERSION@\bin;%PATH%
Modified: grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh
===================================================================
--- grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh 2011-03-03 13:19:37 UTC (rev 45528)
+++ grass/branches/releasebranch_6_4/mswindows/osgeo4w/package.sh 2011-03-03 13:20:26 UTC (rev 45529)
@@ -18,8 +18,8 @@
fi
export PACKAGE=${1:-1}
-export POSTFIX=$2
-export OSGEO4W_ROOT_MSYS=/c/OSGeo4W
+export OSGEO4W_ROOT_MSYS="/c/OSGeo4W"
+export OSGEO4W_ROOT="C:\\\OSGeo4W"
export PATH=.:/c/mingw/bin:/usr/local/bin:/bin:$OSGEO4W_ROOT_MSYS/bin:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/Subversion:$PWD/mswindows/osgeo4w
T0=$(date +%s)
@@ -96,9 +96,9 @@
./configure \
--with-libs="$OSGEO4W_ROOT_MSYS/lib $PWD/mswindows/osgeo4w/lib" \
--with-includes=$OSGEO4W_ROOT_MSYS/include \
- --exec-prefix=$OSGEO4W_ROOT_MSYS/bin \
--libexecdir=$OSGEO4W_ROOT_MSYS/bin \
--prefix=$OSGEO4W_ROOT_MSYS/apps/grass \
+ --bindir=$OSGEO4W_ROOT_MSYS/bin \
--includedir=$OSGEO4W_ROOT_MSYS/include \
--disable-x --without-x \
--with-cxx \
@@ -123,23 +123,24 @@
fi
log make
-make -k || make || ( cat error.log >&3 && false )
+#make -k || ( cat error.log >&3 && false )
log make install
make install
log cleanup
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib/*.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
-mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
+mv $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h \
+ $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h.mingw
cp mswindows/osgeo4w/config.h.switch $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass/config.h
cp mswindows/osgeo4w/config.h.vc $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/include/grass
-if [ -n "$POSTFIX" ] ; then
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.bat.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/grass.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/ini.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX-env.bat.tmpl
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$POSTFIX.bat
- sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$POSTFIX#g" mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$POSTFIX.bat
-fi
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT@#$OSGEO4W_ROOT#g" \
+ mswindows/osgeo4w/grass.bat.tmpl >$OSGEO4W_ROOT_MSYS/bin/grass$MAJOR$MINOR.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@OSGEO4W_ROOT_MSYS@#$OSGEO4W_ROOT#g" \
+ mswindows/osgeo4w/env.bat.tmpl >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/env.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+ mswindows/osgeo4w/postinstall.bat >$OSGEO4W_ROOT_MSYS/etc/postinstall/grass$MAJOR$MINOR.bat
+sed -e "s#@VERSION@#$VERSION#g" -e "s#@POSTFIX@#$MAJOR$MINOR#g" \
+ mswindows/osgeo4w/preremove.bat >$OSGEO4W_ROOT_MSYS/etc/preremove/grass$MAJOR$MINOR.bat
if [ -f /c/mingw/bin/libgnurx-0.dll ]; then
cp /c/mingw/bin/libgnurx-0.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
@@ -147,19 +148,13 @@
cp /c/mingw/bin/libintl-8.dll $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin
fi
-P="$(pwd -W)"
-P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"
+# P="$(pwd -W)"
+# P="${P//\//\\\\}\\\\dist.i686-pc-mingw32"
-sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
-rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"
-if [ -f $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR ]; then
- sed -e "s#$P#@osgeo4w_msys@#g" $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
- rm $OSGEO4W_ROOT_MSYS/apps/grass/bin/grass$MAJOR$MINOR
-elif [ -f dist.i686-pc-mingw32/grass$MAJOR$MINOR ]; then
- sed -e "s#$P#@osgeo4w_msys@/apps/grass/grass-$VERSION#g" dist.i686-pc-mingw32/grass$MAJOR$MINOR.tmp >$OSGEO4W_ROOT_MSYS/bin/grass$POSTFIX.tmpl
-fi
+# sed -e "s#$P#@osgeo4w@#g" $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap >$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap.tmpl
+# rm "$OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/etc/fontcap"
-if [ -n "$1" ] && [ -n "$2" ] ; then
+if [ -n "$1" ]; then
log building vc libraries
sh mswindows/osgeo4w/mklibs.sh $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/bin/*.$VERSION.dll
mv mswindows/osgeo4w/vc/grass*.lib $OSGEO4W_ROOT_MSYS/apps/grass/grass-$VERSION/lib
@@ -168,22 +163,21 @@
# $COMSPEC /c "mswindows\\osgeo4w\\gdalplugins.cmd $VERSION"
log CREATING PACKAGES
- mkdir -p package/grass$POSTFIX
+ mkdir -p package/grass$MAJOR$MINOR
- PDIR=$PWD/package
+ PDIR=$PWD/package
cd $OSGEO4W_ROOT_MSYS
- tar -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE.tar.bz2 \
- apps/grass/grass-$VERSION \
- bin/grass$POSTFIX.bat.tmpl \
- bin/grass$POSTFIX.tmpl \
- bin/grass$POSTFIX-env.bat.tmpl \
- etc/postinstall/grass$POSTFIX.bat \
- etc/preremove/grass$POSTFIX.bat
+ tar -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE.tar.bz2 \
+ apps/grass/grass-$VERSION \
+ bin/grass$MAJOR$MINOR.bat \
+ bin/grass$MAJOR$MINOR \
+ etc/postinstall/grass$MAJOR$MINOR.bat \
+ etc/preremove/grass$MAJOR$MINOR.bat
cd $PDIR/..
- svn diff >/tmp/grass$POSTFIX-$VERSION.diff
- tar -C /tmp -cjf $PDIR/grass$POSTFIX/grass$POSTFIX-$VERSION-$PACKAGE-src.tar.bz2 grass$POSTFIX-$VERSION.diff
+ svn diff >/tmp/grass-$VERSION.diff
+ tar -C /tmp -cjf $PDIR/grass$MAJOR$MINOR/grass-$VERSION-$PACKAGE-src.tar.bz2 grass-$VERSION.diff
fi
log
More information about the grass-commit
mailing list