#! /bin/bash # $Id: build.sh,v 1.19 2004/01/09 15:18:13 jt Exp $ # vim: tabstop=4 # usage: CYGWIN-PATCHES/build.sh 7.4.5 1 # parse arguments version=$1 port=$2 # constants pkg=postgresql # dir variables Prefix=/usr TmpDir=/tmp/$pkg.$$ InstallPrefix=$TmpDir$Prefix DataDir=$InstallPrefix/share BinDir=$InstallPrefix/bin LibDir=$InstallPrefix/lib ManDir=$DataDir/man DocDir=$DataDir/doc/$pkg-$version CygDocDir=$DataDir/doc/Cygwin PatchDir=CYGWIN-PATCHES SrcDocDir=doc # you might have to add these # special tkConfig.sh 8.4 fixes (the tcltk maintainer should really fix these paths) # but you can also fix them in /usr/lib/t(k|cl)Config.sh # with perl -pi.orig -e's|/cygnus/netrel/build|/usr/src|; s|/netrel/src|/usr/src|;' /usr/lib/tkConfig.sh /usr/lib/tclConfig.sh # mounting them is not that good... #UsrSrcMount="`cygpath -w /usr/src`" #mount -f -u -b "$UsrSrcMount" "/cygnus/netrel/build" #mount -f -u -b "$UsrSrcMount" "/netrel/src" if [ ! -d /usr/src/libtcltk ]; then if [ -d /usr/src/tcltk-20030901-1 ]; then ln -s /usr/src/tcltk-20030901-1 /usr/src/libtcltk withTcl="--with-tcl --with-tclconfig=/usr/lib --with-tkconfig=/usr/lib" echo "src package tcltk-20030901-1 found. will build --with-tcl" else echo "src package at /usr/src/tcltk-20030901-1 not found. will not build --with-tcl" withTcl= fi else withTcl="--with-tcl --with-tclconfig=/usr/lib --with-tkconfig=/usr/lib" echo "src package libtcltk found. will build --with-tcl" fi # not yet ready for primetime withTcl= # configure ./configure --with-template=cygwin --enable-integer-datetimes --enable-nls --enable-multibyte --with-python --with-perl --with-java --with-CXX --with-openssl $withTcl --prefix=$Prefix --sysconfdir=/etc --datadir=/usr/share --mandir=/usr/share/man --docdir=$Prefix/share/doc/$pkg-$version # patch the wrong cygwin tcltk paths if [ ! -z $withTcl ]; then perl -pi.orig -e's|/cygnus/netrel/build|/usr/src|; s|/netrel/src|/usr/src|;' src/Makefile.global # perl -pi.orig -e"s|TCL_LIBS=''|TCL_LIBS='-ltcl'|;" src/ fi # patch Makefile.cygwin patch -p0 <