From daba259089b5524b3c29fc0f54ef9ff6c573976e Mon Sep 17 00:00:00 2001 From: John Darrington Date: Sun, 18 Apr 2021 08:38:48 +0200 Subject: [PATCH] Added a script to assist building for w32 * Windows/README: New file. * Windows/build-dependencies: New file. --- Windows/README | 2 + Windows/build-dependencies | 377 +++++++++++++++++++++++++++++++++++++ 2 files changed, 379 insertions(+) create mode 100644 Windows/README create mode 100755 Windows/build-dependencies diff --git a/Windows/README b/Windows/README new file mode 100644 index 0000000000..948c9d8132 --- /dev/null +++ b/Windows/README @@ -0,0 +1,2 @@ +This is not part of the GNU PSPP program, but is used with GNU PSPP to help +create a self extracting installer program for MS windows. diff --git a/Windows/build-dependencies b/Windows/build-dependencies new file mode 100755 index 0000000000..236b1d8bdc --- /dev/null +++ b/Windows/build-dependencies @@ -0,0 +1,377 @@ +#!/bin/sh + +## This program is not part of PSPP but is used to help build PSPP +## Copyright (C) 2021 John Darrington +## +## This program is free software: you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation, either version 3 of the License, or +## (at your option) any later version. +## +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. +## +## You should have received a copy of the GNU General Public License +## along with this program. If not, see . + +# This script downloads (if necessary) and builds the required +# dependencies of PSPP. You may find it useful when cross building. +# Sadly, it it very likely that you'll have to tweak the order of the +# packages, the versions of the packages, their CFLAGS and other +# details in order to succesfully build for any particular +# architecture. In its current form, it has been tweaked for building +# for mingw archs. + +required_native_programs="awk sha256sum tar sed gtk-encode-symbolic-svg ninja meson cat grep pkg-config" + +for p in $required_native_programs; do + if ! type "$p" > /dev/null; then + echo $p must be installed and in PATH; + exit 1 + fi +done + +while test $# -gt 0; do + case $1 in + --arch=*) + arch=${1##--arch=};; + --sandbox=*) + SANDBOX=${1##--sandbox=};; + --tarballs=*) + SRC_TARBALL_DIR=${1##--tarballs=};; + *) + printf "Usage: $0 --arch= --sandbox= [--tarballs=]\n"; + exit 1; + ;; + esac + shift 1; +done + +if test -z "$SANDBOX" || -z "$arch"; then + printf "Usage: $0 --arch= --sandbox= [--tarballs=]\n"; + exit 1; +fi + +SANDBOX=`eval echo $SANDBOX` + +if test -z "$SRC_TARBALL_DIR"; then + SRC_TARBALL_DIR="$SANDBOX/tarballs" +fi + +SRC_TARBALL_DIR=`eval echo $SRC_TARBALL_DIR` + +rm -rIf $SANDBOX + +default_build_procs=$(expr $(cat /proc/cpuinfo | grep -c '^processor') + 1) + +mkdir -p $SRC_TARBALL_DIR + +mkdir -p $SANDBOX + +export DESTDIR="" + +cat > $SANDBOX/cross-file.txt <