On 12/31/2017 6:57 PM, Olivier Mascia wrote:
Le 1 janv. 2018 à 01:20, The Tick <[email protected]> a écrit :

Could you lend me pointers on which MinGW version to get (and from where) so I 
can have a similar setup as yours?
I didn't used MinGW these last years (though did in the past).
Just visited www.mingw.org, but it looks like the pointers to download there 
are severely outdated (2013?).
Is this the right current MinGW project?

Don't know if this would be helpful but I've been using MSYS2 -- that project 
is kept up-to-date with their pacman tool and they have both a 32- and 64-bit 
gcc. There is also a mingw flavored gcc but I am not sure how it differs from 
the msys2 flavored gcc.

Thanks.  Got msys2 configured for now.
I guess what I'll need is simply the recipe from Fossil developers on what 
'MingGW' setup they use and how they trigger the build using those tools, so I 
can reproduce building Fossil correctly with that configuration and give a hand 
to complete the win-server-ipv6 branch, using those tools.

Attached is what I use on win7x64. The resulting fossil.exe seems to work fine.
#
# Usage: bash BUILD.sh [clean] [fossil-directory]
#
# Build [or clean after a build] fossil
#
# Prerequisites for a build
#
# Msys2: make symlinks or place here (see Msys2 build section below):
#   fossil-2.1/compat/openssl-1.0.2k -> ../../openssl-1.0.2k
#   fossil-2.1/compat/Tcl-x64-8.6.6 -> ../../../Tcl/PREFIX-x64-8.6.6
#   fossil-2.1/compat/tcl8.6.6srcdir -> ../../../Tcl/tcl8.6.6
#

clean=false
FOSSIL=
while [ $# -gt 0 ]
do
  if [ -d "$1" ] && [ -f "$1/fossil.1" ]
  then
    FOSSIL="$1"
  elif [ "$1" = "clean" ]
  then
    clean=true
  else
    echo >&2 Usage: $0 [fossil-directory] [clean]
    exit 2
  fi
  shift
done

if uname -o | fgrep -iq linux
then
  unix=true
else
  unix=false
fi

if [ "$FOSSIL" != "" ]
then
  targetFossil="$FOSSIL"
  echo Using Fossil source directory $targetFossil
else
  fossil=($(ls -d fossil-[0-9].[0-9]*))
  if [ ${#fossil[*]} -eq 0 ]
  then
    echo Fossil source directory not found
    exit 1
  fi
  if [ ${#fossil[*]} -eq 1 ]
  then
    targetFossil=${fossil[0]}
    echo Fossil source directory $targetFossil found
  else
    PS3="Select the Fossil directory to build (or 'q' to quit): "
    select targetFossil in ${fossil[@]}
    do
      if [ -n "$targetFossil" ]
      then
        break
      fi
      if [ "$REPLY" = "q" -o "$REPLY" = "Q" ]
      then
        exit 1
      fi
      echo "Response \"$REPLY\" unrecognized"
    done
  fi
fi

cd "$targetFossil"

if $unix
then
  # Tested so far on Ubuntu

  if $clean
  then
    test -f Makefile && make clean
    rm -f Makefile config.log
    exit 0
  fi

  TCL=$(ls -d /opt/ActiveTcl*)

  if [ ! -d $TCL ]
  then
    echo >&2
    echo >&2 TCL installation not found in /opt
    exit 1
  fi

  ./configure \
    --with-openssl=auto \
    --with-zlib=auto \
    --with-legacy-mv-rm \
    --with-th1-docs  \
    --with-th1-hooks \
    --with-tcl=$TCL \
    --with-tcl-stubs \
    --json

  make -j3

else
  # Assume windows Msys2

  if $clean
  then
    make \
      -f win/Makefile.mingw \
      clean
    exit 0
  fi

  # Make symlinks or whatever in the compat/ directory as appropriate
  #OPENSSLDIR=openssl-1.0.2k
  OPENSSLDIR=openssl-1.1.0f
  TCLDIR=Tcl-x64-8.6.6
  TCLSRCDIR=Tcl8.6.6srcdir

  testdir() {
    if ! eval test -d compat/\$$1
    then
      if ! $fail
      then
        fail=true
      fi
      eval echo >&2 $1 directory not found: compat/\$$1
    fi
  }

  fail=false
  testdir OPENSSLDIR
  testdir TCLDIR
  testdir TCLSRCDIR
  if $fail
  then
    echo >&2
    echo >&2 Required prerequisite directory\(s\) not found
    exit 1
  fi

  set -x 

  make \
    -f win/Makefile.mingw \
    X64=1 \
    FOSSIL_TCL_SOURCE=0 \
    FOSSIL_ENABLE_JSON=1 \
    FOSSIL_ENABLE_SSL=1 \
    FOSSIL_BUILD_SSL=1 \
    FOSSIL_ENABLE_EXEC_REL_PATHS=1 \
    FOSSIL_ENABLE_LEGACY_MV_RM=1 \
    FOSSIL_ENABLE_TH1_DOCS=1 \
    FOSSIL_ENABLE_TH1_HOOKS=1 \
    FOSSIL_ENABLE_TCL=1 \
    FOSSIL_ENABLE_TCL_STUBS=1 \
    FOSSIL_ENABLE_TCL_PRIVATE_STUBS=1 \
    OPENSSLDIR='$(SRCDIR)/../compat/'$OPENSSLDIR \
    TCLDIR='$(SRCDIR)/../compat/'$TCLDIR \
    TCLSRCDIR='$(SRCDIR)/../compat/'$TCLSRCDIR

    #### Load Tcl using the private stubs mechanism
    # FOSSIL_ENABLE_TCL_PRIVATE_STUBS = 1
fi
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to