-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
build.conf
82 lines (68 loc) · 3.22 KB
/
build.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
AVR_VERSION=3.6.1
BUILD_NUMBER=arduino7
AVR_SOURCES="http://downloads.arduino.cc/tools/opensource/Atmel-AVR-GNU-Toolchain/${AVR_VERSION}"
ATMEL_PACKS_SOURCES="http://packs.download.atmel.com/"
GNU_SOURCES="https://ftp.gnu.org/gnu/"
MPC_SOURCES="http://repository.timesys.com/buildsources/m/mpc/"
# The following version numbers are by default parsed out of the SOURCES.README
# in the Atmel distribution, you can override here if you want (or if it breaks)
# GCC_VERSION=4.9.2
# AUTOCONF_VERSION=2.64
# AUTOMAKE_VERSION=1.11.1
# GMP_VERSION=5.0.2
# MPFR_VERSION=3.0.0
# MPC_VERSION=0.9
GCC_VERSION=7.3.0
MPFR_VERSION=3.1.0
ATMEL_ATMEGA_PACK_VERSION=1.4.351
ATMEL_ATMEGA_PACK_FILENAME=Atmel.ATmega_DFP.${ATMEL_ATMEGA_PACK_VERSION}
ATMEL_ATMEGA_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_ATMEGA_PACK_FILENAME}.atpack
ATMEL_ATTINY_PACK_VERSION=1.4.310
ATMEL_ATTINY_PACK_FILENAME=Atmel.ATtiny_DFP.${ATMEL_ATTINY_PACK_VERSION}
ATMEL_ATTINY_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_ATTINY_PACK_FILENAME}.atpack
ATMEL_DX_PACK_VERSION=1.0.27
ATMEL_DX_PACK_FILENAME=Atmel.AVR-Dx_DFP.${ATMEL_DX_PACK_VERSION}
ATMEL_DX_PACK_URL=${ATMEL_PACKS_SOURCES}${ATMEL_DX_PACK_FILENAME}.atpack
# With any luck, you don't need to edit the below
################################################################################
if [[ "$OSTYPE" == "darwin"* ]]; then
SED=gsed
else
SED=sed
fi
GREP=grep
#fallback for grep without pearl regexp
SOURCES_README="$(wget -O - ${AVR_SOURCES}/SOURCES.README 2>/dev/null)"
[ -z "$GCC_VERSION" ] && GCC_VERSION="$(echo "$SOURCES_README" | $GREP "GCC" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$AUTOMAKE_VERSION" ] && AUTOMAKE_VERSION="$(echo "$SOURCES_README" | $GREP "automake" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$AUTOCONF_VERSION" ] && AUTOCONF_VERSION="$(echo "$SOURCES_README" | $GREP "autoconf" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$GMP_VERSION" ] && GMP_VERSION="$(echo "$SOURCES_README" | $GREP "gmp" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$MPFR_VERSION" ] && MPFR_VERSION="$(echo "$SOURCES_README" | $GREP "mpfr" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
[ -z "$MPC_VERSION" ] && MPC_VERSION="$(echo "$SOURCES_README" | $GREP "mpc" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")"
# Build the URLs from which to grab the archives for those components
AUTOCONF_SOURCE="${GNU_SOURCES}/autoconf/autoconf-${AUTOCONF_VERSION}.tar.bz2"
AUTOMAKE_SOURCE="${GNU_SOURCES}/automake/automake-${AUTOMAKE_VERSION}.tar.bz2"
GMP_SOURCE="${GNU_SOURCES}/gmp/gmp-${GMP_VERSION}.tar.bz2"
MPFR_SOURCE="${GNU_SOURCES}/mpfr/mpfr-${MPFR_VERSION}.tar.bz2"
MPC_SOURCE="${MPC_SOURCES}/mpc-${MPC_VERSION}/mpc-${MPC_VERSION}.tar.gz"
# For debugging, spit it all out
cat <<EOF
VERSIONS
-------------------------------------------------------------------------------
GCC: ${GCC_VERSION}
AVR: ${AVR_VERSION}
BUILD: ${BUILD_NUMBER}
AUTOCONF: ${AUTOCONF_VERSION}
AUTOMAKE: ${AUTOMAKE_VERSION}
GMP: ${GMP_VERSION}
MPFR: ${MPFR_VERSION}
MPC: ${MPC_VERSION}
SOURCES
-------------------------------------------------------------------------------
AUTOCONF: ${AUTOCONF_SOURCE}
AUTOMAKE: ${AUTOMAKE_SOURCE}
GMP: ${GMP_SOURCE}
MPFR: ${MPFR_SOURCE}
MPC: ${MPC_SOURCE}
AVR: ${AVR_SOURCES}/*
EOF