summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-11-25 21:51:42 (GMT)
committer Ole Loots <ole@monochrom.net>2013-11-25 21:51:42 (GMT)
commitaf68fb87ac74088a15c12238947bf55834039f73 (patch)
treeb647af9cf683817e5b1985888eed56b1408fce8b
parentb361534441bcc9598bf31387c85ee6e0bc406581 (diff)
parent1ca95b6aad5fc7bde21c68b9fd876f8d4c0154e7 (diff)
downloadtoolchains-mono/atari-adjustments.tar.gz
toolchains-mono/atari-adjustments.tar.bz2
Merge branch 'master' into mono/atari-adjustmentsmono/atari-adjustments
-rw-r--r--.gitignore2
-rw-r--r--i686-w64-mingw32/Makefile4
-rw-r--r--m5475-atari-mint/Makefile30
-rwxr-xr-xm5475-atari-mint/fetchsrc16
-rw-r--r--m68k-atari-mint/Makefile31
-rwxr-xr-xm68k-atari-mint/fetchsrc16
-rw-r--r--sdk/Makefile99
-rwxr-xr-xsdk/fetchsrc18
8 files changed, 142 insertions, 74 deletions
diff --git a/.gitignore b/.gitignore
index b25c15b..f19d406 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
*~
+m5475-atari-mint/builddir
+m5475-atari-mint/sources
diff --git a/i686-w64-mingw32/Makefile b/i686-w64-mingw32/Makefile
index 73d2b8b..fda8123 100644
--- a/i686-w64-mingw32/Makefile
+++ b/i686-w64-mingw32/Makefile
@@ -1,6 +1,6 @@
-#!/bin/make
+#!/usr/bin/make
-# mingw toolchain
+# Build cross toolchain for i686 processor with a win32 (mingw) ABI
UPSTREAM_GCC_VERSION := 4.6.3
UPSTREAM_GCC_TARBALL := gcc-core-$(UPSTREAM_GCC_VERSION).tar.bz2
diff --git a/m5475-atari-mint/Makefile b/m5475-atari-mint/Makefile
index fdcd946..0458f15 100644
--- a/m5475-atari-mint/Makefile
+++ b/m5475-atari-mint/Makefile
@@ -1,3 +1,7 @@
+#!/usr/bin/make
+
+# Build cross toolchain for m5475 processor with an atari mint ABI
+
UPSTREAM_GCC_VERSION := 4.6.3
UPSTREAM_GCC_TARBALL := gcc-$(UPSTREAM_GCC_VERSION).tar.bz2
UPSTREAM_GCC_URI := http://ftp.gnu.org/gnu/gcc/gcc-$(UPSTREAM_GCC_VERSION)/$(UPSTREAM_GCC_TARBALL)
@@ -210,43 +214,43 @@ $(BUILDSTEPS)/binutils-srcdir.d: $(SOURCESDIR)/$(UPSTREAM_BINUTILS_TARBALL) $(SO
###
$(SOURCESDIR)/$(UPSTREAM_GCC_TARBALL):
- wget -q -O $@ $(UPSTREAM_GCC_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GCC_TARBALL) $(UPSTREAM_GCC_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GCC_PATCH):
- wget -q -O $@ $(UPSTREAM_GCC_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GCC_PATCH) $(UPSTREAM_GCC_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GMP_TARBALL):
- wget -q -O $@ $(UPSTREAM_GMP_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GMP_TARBALL) $(UPSTREAM_GMP_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MPFR_TARBALL):
- wget -q -O $@ $(UPSTREAM_MPFR_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MPFR_TARBALL) $(UPSTREAM_MPFR_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MPC_TARBALL):
- wget -q -O $@ $(UPSTREAM_MPC_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MPC_TARBALL) $(UPSTREAM_MPC_URI) $@
$(SOURCESDIR)/$(UPSTREAM_BINUTILS_TARBALL):
- wget -q -O $@ $(UPSTREAM_BINUTILS_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_BINUTILS_TARBALL) $(UPSTREAM_BINUTILS_URI) $@
$(SOURCESDIR)/$(UPSTREAM_BINUTILS_PATCH):
- wget -q -O $@ $(UPSTREAM_BINUTILS_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_BINUTILS_PATCH) $(UPSTREAM_BINUTILS_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTBIN_TARBALL):
- wget -q -O $@ $(UPSTREAM_MINTBIN_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTBIN_TARBALL) $(UPSTREAM_MINTBIN_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTBIN_PATCH):
- wget -q -O $@ $(UPSTREAM_MINTBIN_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTBIN_PATCH) $(UPSTREAM_MINTBIN_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTLIB_TARBALL):
- wget -q -O $@ $(UPSTREAM_MINTLIB_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTLIB_TARBALL) $(UPSTREAM_MINTLIB_URI) $@
$(SOURCESDIR)/$(UPSTREAM_PML_TARBALL):
- wget -q -O $@ $(UPSTREAM_PML_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_PML_TARBALL) $(UPSTREAM_PML_URI) $@
$(SOURCESDIR)/$(UPSTREAM_PML_PATCH):
- wget -q -O $@ $(UPSTREAM_PML_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_PML_PATCH) $(UPSTREAM_PML_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GEMLIB_TARBALL):
- wget -q -O $@ $(UPSTREAM_GEMLIB_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GEMLIB_TARBALL) $(UPSTREAM_GEMLIB_URI) $@
###
# Rule to create buildsteps dir
diff --git a/m5475-atari-mint/fetchsrc b/m5475-atari-mint/fetchsrc
new file mode 100755
index 0000000..bbe8f6b
--- a/dev/null
+++ b/m5475-atari-mint/fetchsrc
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# script to fetch toolchain source tar using ci.netsurf-browser.org as a cache
+
+# Usage fetchsrc <target> <source> <upstream> <output>
+
+NSSRV="http://ci.netsurf-browser.org/toolchain/"
+
+wget -q -O ${4} ${NSSRV}/${1}/${2}
+if [ $? -ne 0 ];then
+ wget -q -O ${4} ${3}
+ if [ $? -ne 0 ];then
+ rm ${4}
+ return 1
+ fi
+fi
diff --git a/m68k-atari-mint/Makefile b/m68k-atari-mint/Makefile
index 58b5bcd..413dbb4 100644
--- a/m68k-atari-mint/Makefile
+++ b/m68k-atari-mint/Makefile
@@ -1,3 +1,7 @@
+#!/usr/bin/make
+
+# Build cross toolchain for m68k processor with an atari mint ABI
+
UPSTREAM_GCC_VERSION := 4.6.3
UPSTREAM_GCC_TARBALL := gcc-$(UPSTREAM_GCC_VERSION).tar.bz2
UPSTREAM_GCC_URI := http://ftp.gnu.org/gnu/gcc/gcc-$(UPSTREAM_GCC_VERSION)/$(UPSTREAM_GCC_TARBALL)
@@ -210,43 +214,44 @@ $(BUILDSTEPS)/binutils-srcdir.d: $(SOURCESDIR)/$(UPSTREAM_BINUTILS_TARBALL) $(SO
###
$(SOURCESDIR)/$(UPSTREAM_GCC_TARBALL):
- wget -q -O $@ $(UPSTREAM_GCC_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GCC_TARBALL) $(UPSTREAM_GCC_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GCC_PATCH):
- wget -q -O $@ $(UPSTREAM_GCC_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GCC_PATCH) $(UPSTREAM_GCC_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GMP_TARBALL):
- wget -q -O $@ $(UPSTREAM_GMP_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GMP_TARBALL) $(UPSTREAM_GMP_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MPFR_TARBALL):
- wget -q -O $@ $(UPSTREAM_MPFR_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MPFR_TARBALL) $(UPSTREAM_MPFR_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MPC_TARBALL):
- wget -q -O $@ $(UPSTREAM_MPC_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MPC_TARBALL) $(UPSTREAM_MPC_URI) $@
$(SOURCESDIR)/$(UPSTREAM_BINUTILS_TARBALL):
- wget -q -O $@ $(UPSTREAM_BINUTILS_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_BINUTILS_TARBALL) $(UPSTREAM_BINUTILS_URI) $@
$(SOURCESDIR)/$(UPSTREAM_BINUTILS_PATCH):
- wget -q -O $@ $(UPSTREAM_BINUTILS_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_BINUTILS_PATCH) $(UPSTREAM_BINUTILS_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTBIN_TARBALL):
- wget -q -O $@ $(UPSTREAM_MINTBIN_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTBIN_TARBALL) $(UPSTREAM_MINTBIN_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTBIN_PATCH):
- wget -q -O $@ $(UPSTREAM_MINTBIN_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTBIN_PATCH) $(UPSTREAM_MINTBIN_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_MINTLIB_TARBALL):
- wget -q -O $@ $(UPSTREAM_MINTLIB_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_MINTLIB_TARBALL) $(UPSTREAM_MINTLIB_URI) $@
$(SOURCESDIR)/$(UPSTREAM_PML_TARBALL):
- wget -q -O $@ $(UPSTREAM_PML_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_PML_TARBALL) $(UPSTREAM_PML_URI) $@
$(SOURCESDIR)/$(UPSTREAM_PML_PATCH):
- wget -q -O $@ $(UPSTREAM_PML_PATCH_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_PML_PATCH) $(UPSTREAM_PML_PATCH_URI) $@
$(SOURCESDIR)/$(UPSTREAM_GEMLIB_TARBALL):
- wget -q -O $@ $(UPSTREAM_GEMLIB_URI)
+ $(TOP)/fetchsrc $(TARGET_NAME) $(UPSTREAM_GEMLIB_TARBALL) $(UPSTREAM_GEMLIB_URI) $@
+
###
# Rule to create buildsteps dir
diff --git a/m68k-atari-mint/fetchsrc b/m68k-atari-mint/fetchsrc
new file mode 100755
index 0000000..bbe8f6b
--- a/dev/null
+++ b/m68k-atari-mint/fetchsrc
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# script to fetch toolchain source tar using ci.netsurf-browser.org as a cache
+
+# Usage fetchsrc <target> <source> <upstream> <output>
+
+NSSRV="http://ci.netsurf-browser.org/toolchain/"
+
+wget -q -O ${4} ${NSSRV}/${1}/${2}
+if [ $? -ne 0 ];then
+ wget -q -O ${4} ${3}
+ if [ $? -ne 0 ];then
+ rm ${4}
+ return 1
+ fi
+fi
diff --git a/sdk/Makefile b/sdk/Makefile
index f130088..25bec2f 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -23,12 +23,12 @@ ifeq ($(GCCSDK_INSTALL_CROSSBIN),)
endif
# Upstream package versions
-VERSION_ZLIB := 1.2.7
+VERSION_ZLIB := 1.2.8
VERSION_LIBICONV := 1.13.1
VERSION_LIBTRE := 0.8.0
VERSION_LIBXML := 2.8.0
VERSION_OPENSSL := 1.0.1e
-VERSION_LIBPNG := 1.6.1
+VERSION_LIBPNG := 1.6.7
VERSION_LIBJPEG := 8d
VERSION_LIBLCMS := 2.3
VERSION_LIBMNG := 1.0.10
@@ -72,6 +72,8 @@ SOURCEDIR := $(CURDIR)/sources
BUILDDIR := $(CURDIR)/builddir-$(TARGET)
BUILDSTEPS := $(BUILDDIR)/build-steps
+FETCHSRC := $(CURDIR)/fetchsrc
+
# Compute the SDK components
SDK_ITEMS :=
@@ -150,26 +152,26 @@ $(BUILDSTEPS)/builddir.d:
# zlib
$(BUILDSTEPS)/zlib.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib-src.d
+ cd $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --static
+ cd $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) && $(env) make install
+ touch $@
+
+$(BUILDSTEPS)/zlib-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.gz
mkdir -p $(BUILDDIR)/zlib
- cd $(BUILDDIR)/zlib && tar xjf $(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.bz2
+ cd $(BUILDDIR)/zlib && tar xaf $(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.gz
for p in `ls $(RECIPES)/patches/zlib/*.p` ; do patch -d $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/zlib/$(TARGET)),)
for p in `ls $(RECIPES)/patches/zlib/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) -p0 <$$p ; done
endif
- cd $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --static
- cd $(BUILDDIR)/zlib/zlib-$(VERSION_ZLIB) && $(env) make install
- touch $@
-
-$(BUILDSTEPS)/zlib-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.bz2
touch $@
-$(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.bz2:
- wget -q -O $@ http://zlib.net/$(subst $(SOURCEDIR)/,,$@)
+$(SOURCEDIR)/zlib-$(VERSION_ZLIB).tar.gz:
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://zlib.net/$(subst $(SOURCEDIR)/,,$@)" $@
# libiconv
$(BUILDSTEPS)/libiconv.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libiconv-src.d
mkdir -p $(BUILDDIR)/libiconv
- cd $(BUILDDIR)/libiconv && tar xzf $(SOURCEDIR)/libiconv-$(VERSION_LIBICONV).tar.gz
+ cd $(BUILDDIR)/libiconv && tar xaf $(SOURCEDIR)/libiconv-$(VERSION_LIBICONV).tar.gz
for p in `ls $(RECIPES)/patches/libiconv/*.p` ; do patch -d $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/libiconv/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libiconv/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libiconv/libiconv-$(VERSION_LIBICONV) -p0 <$$p ; done
@@ -182,12 +184,12 @@ $(BUILDSTEPS)/libiconv-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libiconv-$(
touch $@
$(SOURCEDIR)/libiconv-$(VERSION_LIBICONV).tar.gz:
- wget -q -O $@ http://ftp.gnu.org/pub/gnu/libiconv/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ftp.gnu.org/pub/gnu/libiconv/$(subst $(SOURCEDIR)/,,$@)" $@
# libgnurx
$(BUILDSTEPS)/libgnurx.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libgnurx-src.d
mkdir -p $(BUILDDIR)/libgnurx
- cd $(BUILDDIR)/libgnurx && tar xzf $(SOURCEDIR)/libgnurx-$(VERSION_LIBGNURX).tar.gz
+ cd $(BUILDDIR)/libgnurx && tar xaf $(SOURCEDIR)/libgnurx-$(VERSION_LIBGNURX).tar.gz
for p in `ls $(RECIPES)/patches/libgnurx/*.p` ; do patch -d $(BUILDDIR)/libgnurx/mingw-libgnurx-$(VERSION_LIBGNURX) -p0 <$$p ; done
cd $(BUILDDIR)/libgnurx/mingw-libgnurx-$(VERSION_LIBGNURX) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET)
cd $(BUILDDIR)/libgnurx/mingw-libgnurx-$(VERSION_LIBGNURX) && $(env) make
@@ -198,7 +200,7 @@ $(BUILDSTEPS)/libgnurx-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libgnurx-$(
touch $@
$(SOURCEDIR)/libgnurx-$(VERSION_LIBGNURX).tar.gz:
- wget -q -O $@ "http://downloads.sourceforge.net/project/mingw/Other/UserContributed/regex/mingw-regex-$(VERSION_LIBGNURX)/mingw-libgnurx-$(VERSION_LIBGNURX)-src.tar.gz"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/mingw/Other/UserContributed/regex/mingw-regex-$(VERSION_LIBGNURX)/mingw-libgnurx-$(VERSION_LIBGNURX)-src.tar.gz" $@
# atari cf library
$(BUILDSTEPS)/libcf.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libcf-src.d
@@ -216,7 +218,7 @@ $(BUILDSTEPS)/libcf-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libcf-$(VERSIO
touch $@
$(SOURCEDIR)/libcf-$(VERSION_LIBCF).tar.bz2:
- wget -q -O $@ "http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/cflib-$(VERSION_LIBCF).tar.bz2"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://vincent.riviere.free.fr/soft/m68k-atari-mint/archives/cflib-$(VERSION_LIBCF).tar.bz2" $@
# atari windom library
$(BUILDSTEPS)/windom.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/windom-src.d
@@ -234,7 +236,7 @@ $(BUILDSTEPS)/windom-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/windom-$(VERS
touch $@
$(SOURCEDIR)/windom-$(VERSION_WINDOM).zip:
- wget -q -O $@ "http://downloads.sourceforge.net/project/windom/windom/$(VERSION_WINDOM)/windom-$(VERSION_WINDOM)-1.zip"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/windom/windom/$(VERSION_WINDOM)/windom-$(VERSION_WINDOM)-1.zip" $@
# atari ldg library
$(BUILDSTEPS)/ldg.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/ldg-src.d
@@ -251,7 +253,7 @@ $(BUILDSTEPS)/ldg-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/ldg-$(VERSION_LD
touch $@
$(SOURCEDIR)/ldg-$(VERSION_LDG).zip:
- wget -q -O $@ "http://ldg.org.free.fr/distrib/ldg-$(VERSION_LDG).zip"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ldg.org.free.fr/distrib/ldg-$(VERSION_LDG).zip" $@
# hermes bitmap lib
$(BUILDSTEPS)/hermes.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/hermes-src.d
@@ -271,7 +273,7 @@ $(BUILDSTEPS)/hermes-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/hermes-$(VERS
touch $@
$(SOURCEDIR)/hermes-$(VERSION_HERMES).tar.bz2:
- wget -q -O $@ "http://clanlib.org/download/legacy/Hermes-$(VERSION_HERMES).tar.bz2"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://clanlib.org/download/legacy/Hermes-$(VERSION_HERMES).tar.bz2" $@
# freetype font lib
$(BUILDSTEPS)/freetype.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/freetype-src.d
@@ -286,12 +288,12 @@ $(BUILDSTEPS)/freetype-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/freetype-$(
touch $@
$(SOURCEDIR)/freetype-$(VERSION_FREETYPE).tar.bz2:
- wget -q -O $@ "http://download.savannah.gnu.org/releases/freetype/freetype-$(VERSION_FREETYPE).tar.bz2"
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://download.savannah.gnu.org/releases/freetype/freetype-$(VERSION_FREETYPE).tar.bz2" $@
# regex
$(BUILDSTEPS)/libtre.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libtre-src.d
mkdir -p $(BUILDDIR)/libtre
- cd $(BUILDDIR)/libtre && tar xjf $(SOURCEDIR)/tre-$(VERSION_LIBTRE).tar.bz2
+ cd $(BUILDDIR)/libtre && tar xaf $(SOURCEDIR)/tre-$(VERSION_LIBTRE).tar.bz2
cd $(BUILDDIR)/libtre/tre-$(VERSION_LIBTRE) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared
cd $(BUILDDIR)/libtre/tre-$(VERSION_LIBTRE) && $(env) make install
cp $(RECIPES)/files/libtre/regex.h $(GCCSDK_INSTALL_ENV)/include/regex.h
@@ -301,12 +303,12 @@ $(BUILDSTEPS)/libtre-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/tre-$(VERSION
touch $@
$(SOURCEDIR)/tre-$(VERSION_LIBTRE).tar.bz2:
- wget -q -O $@ http://laurikari.net/tre/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://laurikari.net/tre/$(subst $(SOURCEDIR)/,,$@)" $@
# libpbl
$(BUILDSTEPS)/libpbl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libpbl-src.d
mkdir -p $(BUILDDIR)/libpbl
- cd $(BUILDDIR)/libpbl && tar xzf $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz
+ cd $(BUILDDIR)/libpbl && tar xaf $(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz
for p in `ls $(RECIPES)/patches/libpbl/*.p` ; do patch -d $(BUILDDIR)/libpbl/pbl_$(VERSION_LIBPBL)_04 -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/libpbl/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libpbl/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libpbl/pbl_$(VERSION_LIBPBL)_04 -p0 <$$p ; done
@@ -318,12 +320,12 @@ $(BUILDSTEPS)/libpbl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/pbl_$(VERSION
touch $@
$(SOURCEDIR)/pbl_$(VERSION_LIBPBL).tar.gz:
- wget -q -O $@ http://www.mission-base.com/peter/source/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://www.mission-base.com/peter/source/$(subst $(SOURCEDIR)/,,$@)" $@
# libXML2
$(BUILDSTEPS)/libxml2.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libxml2-src.d
mkdir -p $(BUILDDIR)/libxml2
- cd $(BUILDDIR)/libxml2 && tar xzf $(SOURCEDIR)/libxml2-$(VERSION_LIBXML).tar.gz
+ cd $(BUILDDIR)/libxml2 && tar xaf $(SOURCEDIR)/libxml2-$(VERSION_LIBXML).tar.gz
for p in `ls $(RECIPES)/patches/libxml2/*.p` ; do patch -d $(BUILDDIR)/libxml2/libxml2-$(VERSION_LIBXML) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/libxml2/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libxml2/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libxml2/libxml2-$(VERSION_LIBXML) -p0 <$$p ; done
@@ -336,12 +338,12 @@ $(BUILDSTEPS)/libxml2-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libxml2-$(VE
touch $@
$(SOURCEDIR)/libxml2-$(VERSION_LIBXML).tar.gz:
- wget -q -O $@ ftp://xmlsoft.org/libxml2/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "ftp://xmlsoft.org/libxml2/$(subst $(SOURCEDIR)/,,$@)" $@
# OpenSSL
$(BUILDSTEPS)/openssl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/openssl-src.d
mkdir -p $(BUILDDIR)/openssl
- cd $(BUILDDIR)/openssl && tar xzf $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz
+ cd $(BUILDDIR)/openssl && tar xaf $(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz
for p in `ls $(RECIPES)/patches/openssl/*.p` ; do patch -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/openssl/$(TARGET)),)
for p in `ls $(RECIPES)/patches/openssl/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/openssl/openssl-$(VERSION_OPENSSL) -p0 <$$p ; done
@@ -354,12 +356,12 @@ $(BUILDSTEPS)/openssl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/openssl-$(VE
touch $@
$(SOURCEDIR)/openssl-$(VERSION_OPENSSL).tar.gz:
- wget -q -O $@ http://openssl.org/source/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://openssl.org/source/$(subst $(SOURCEDIR)/,,$@)" $@
# libPNG
$(BUILDSTEPS)/libpng.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libpng-src.d
mkdir -p $(BUILDDIR)/libpng
- cd $(BUILDDIR)/libpng && tar xzf $(SOURCEDIR)/libpng-$(VERSION_LIBPNG).tar.gz
+ cd $(BUILDDIR)/libpng && tar xaf $(SOURCEDIR)/libpng-$(VERSION_LIBPNG).tar.gz
ifneq ($(realpath $(RECIPES)/patches/libpng/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libpng/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libpng/libpng-$(VERSION_LIBPNG) -p0 <$$p ; done
endif
@@ -371,12 +373,12 @@ $(BUILDSTEPS)/libpng-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libpng-$(VERS
touch $@
$(SOURCEDIR)/libpng-$(VERSION_LIBPNG).tar.gz:
- wget -q -O $@ http://downloads.sourceforge.net/libpng/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/libpng/$(subst $(SOURCEDIR)/,,$@)" $@
# libjpeg
$(BUILDSTEPS)/libjpeg.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libjpeg-src.d
mkdir -p $(BUILDDIR)/libjpeg
- cd $(BUILDDIR)/libjpeg && tar xzf $(SOURCEDIR)/jpegsrc.v$(VERSION_LIBJPEG).tar.gz
+ cd $(BUILDDIR)/libjpeg && tar xaf $(SOURCEDIR)/jpegsrc.v$(VERSION_LIBJPEG).tar.gz
for p in `ls $(RECIPES)/patches/libjpeg/*.p` ; do patch -d $(BUILDDIR)/libjpeg/jpeg-$(VERSION_LIBJPEG) -p0 <$$p ; done
cd $(BUILDDIR)/libjpeg/jpeg-$(VERSION_LIBJPEG) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared
cd $(BUILDDIR)/libjpeg/jpeg-$(VERSION_LIBJPEG) && $(env) make install
@@ -386,12 +388,12 @@ $(BUILDSTEPS)/libjpeg-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/jpegsrc.v$(V
touch $@
$(SOURCEDIR)/jpegsrc.v$(VERSION_LIBJPEG).tar.gz:
- wget -q -O $@ http://ijg.org/files/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ijg.org/files/$(subst $(SOURCEDIR)/,,$@)" $@
# liblcms
$(BUILDSTEPS)/liblcms.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libjpeg.d $(BUILDSTEPS)/liblcms-src.d
mkdir -p $(BUILDDIR)/liblcms
- cd $(BUILDDIR)/liblcms && tar xzf $(SOURCEDIR)/lcms2-$(VERSION_LIBLCMS).tar.gz
+ cd $(BUILDDIR)/liblcms && tar xaf $(SOURCEDIR)/lcms2-$(VERSION_LIBLCMS).tar.gz
for p in `ls $(RECIPES)/patches/liblcms/*.p` ; do patch -d $(BUILDDIR)/liblcms/lcms2-$(VERSION_LIBLCMS) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/liblcms/$(TARGET)),)
for p in `ls $(RECIPES)/patches/liblcms/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/liblcms/lcms2-$(VERSION_LIBLCMS) -p0 <$$p ; done
@@ -404,12 +406,13 @@ $(BUILDSTEPS)/liblcms-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/lcms2-$(VERS
touch $@
$(SOURCEDIR)/lcms2-$(VERSION_LIBLCMS).tar.gz:
- wget -q -O $@ http://downloads.sourceforge.net/project/lcms/lcms/$(VERSION_LIBLCMS)/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/lcms/lcms/$(VERSION_LIBLCMS)/$(subst $(SOURCEDIR)/,,$@)" $@
+
# libMNG
$(BUILDSTEPS)/libmng.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/libjpeg.d $(BUILDSTEPS)/liblcms.d $(BUILDSTEPS)/libmng-src.d
mkdir -p $(BUILDDIR)/libmng
- cd $(BUILDDIR)/libmng && tar xzf $(SOURCEDIR)/libmng-$(VERSION_LIBMNG).tar.gz
+ cd $(BUILDDIR)/libmng && tar xaf $(SOURCEDIR)/libmng-$(VERSION_LIBMNG).tar.gz
for p in `ls $(RECIPES)/patches/libmng/*.p` ; do patch -d $(BUILDDIR)/libmng/libmng-$(VERSION_LIBMNG) -p0 <$$p ; done
cp $(BUILDDIR)/libmng/libmng-$(VERSION_LIBMNG)/makefiles/makefile.unix $(BUILDDIR)/libmng/libmng-$(VERSION_LIBMNG)/Makefile
cd $(BUILDDIR)/libmng/libmng-$(VERSION_LIBMNG) && $(env) make install
@@ -419,12 +422,12 @@ $(BUILDSTEPS)/libmng-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/libmng-$(VERS
touch $@
$(SOURCEDIR)/libmng-$(VERSION_LIBMNG).tar.gz:
- wget -q -O $@ http://downloads.sourceforge.net/project/libmng/libmng-devel/$(VERSION_LIBMNG)/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/libmng/libmng-devel/$(VERSION_LIBMNG)/$(subst $(SOURCEDIR)/,,$@)" $@
# libcares
$(BUILDSTEPS)/libcares.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libcares-src.d
mkdir -p $(BUILDDIR)/libcares
- cd $(BUILDDIR)/libcares && tar xzf $(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz
+ cd $(BUILDDIR)/libcares && tar xaf $(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz
for p in `ls $(RECIPES)/patches/libcares/*.p` ; do patch -d $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/libcares/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libcares/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libcares/c-ares-$(VERSION_LIBCARES) -p0 <$$p ; done
@@ -437,7 +440,8 @@ $(BUILDSTEPS)/libcares-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/c-ares-$(VE
touch $@
$(SOURCEDIR)/c-ares-$(VERSION_LIBCARES).tar.gz:
- wget -q -O $@ http://c-ares.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://c-ares.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)" $@
+
# libcurl
$(BUILDSTEPS)/libcurl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDSTEPS)/openssl.d $(BUILDSTEPS)/libcares.d $(BUILDSTEPS)/libcurl-src.d
@@ -447,7 +451,7 @@ $(BUILDSTEPS)/libcurl.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/zlib.d $(BUILDST
$(BUILDSTEPS)/libcurl-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/curl-$(VERSION_LIBCURL).tar.bz2
mkdir -p $(BUILDDIR)/libcurl
- cd $(BUILDDIR)/libcurl && tar xjf $(SOURCEDIR)/curl-$(VERSION_LIBCURL).tar.bz2
+ cd $(BUILDDIR)/libcurl && tar xaf $(SOURCEDIR)/curl-$(VERSION_LIBCURL).tar.bz2
for p in `ls $(RECIPES)/patches/libcurl/*.p` ; do patch -d $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) -p0 <$$p ; done
ifneq ($(realpath $(RECIPES)/patches/libcurl/$(TARGET)),)
for p in `ls $(RECIPES)/patches/libcurl/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/libcurl/curl-$(VERSION_LIBCURL) -p0 <$$p ; done
@@ -455,13 +459,13 @@ endif
touch $@
$(SOURCEDIR)/curl-$(VERSION_LIBCURL).tar.bz2:
- wget -q -O $@ http://curl.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://curl.haxx.se/download/$(subst $(SOURCEDIR)/,,$@)" $@
-# libexpat
+# libexpat
$(BUILDSTEPS)/libexpat.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/libexpat-src.d
mkdir -p $(BUILDDIR)/libexpat
- cd $(BUILDDIR)/libexpat && tar xzf $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.gz
+ cd $(BUILDDIR)/libexpat && tar xaf $(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.gz
cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) ./configure --prefix=$(GCCSDK_INSTALL_ENV) --target=$(TARGET) --host=$(TARGET) --disable-shared
cd $(BUILDDIR)/libexpat/expat-$(VERSION_LIBEXPAT) && $(env) make install
touch $@
@@ -470,7 +474,8 @@ $(BUILDSTEPS)/libexpat-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/expat-$(VER
touch $@
$(SOURCEDIR)/expat-$(VERSION_LIBEXPAT).tar.gz:
- wget -q -O $@ http://downloads.sourceforge.net/project/expat/expat/$(VERSION_LIBEXPAT)/expat-$(VERSION_LIBEXPAT).tar.gz
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://downloads.sourceforge.net/project/expat/expat/$(VERSION_LIBEXPAT)/expat-$(VERSION_LIBEXPAT).tar.gz" $@
+
# nspr
$(BUILDSTEPS)/nspr.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/nspr-src.d
@@ -482,12 +487,12 @@ $(BUILDSTEPS)/nspr.d: $(BUILDSTEPS)/builddir.d $(BUILDSTEPS)/nspr-src.d
$(BUILDSTEPS)/nspr-src.d: $(BUILDSTEPS)/sourcedir.d $(SOURCEDIR)/nspr-$(VERSION_NSPR).tar.gz
$(RM) -rf $(BUILDDIR)/nspr
mkdir -p $(BUILDDIR)/nspr
- cd $(BUILDDIR)/nspr && tar xzf $(SOURCEDIR)/nspr-$(VERSION_NSPR).tar.gz
+ cd $(BUILDDIR)/nspr && tar xaf $(SOURCEDIR)/nspr-$(VERSION_NSPR).tar.gz
for p in `ls $(RECIPES)/patches/nspr/$(TARGET)/*.p` ; do patch -d $(BUILDDIR)/nspr/nspr-$(VERSION_NSPR) -p0 <$$p ; done
touch $@
$(SOURCEDIR)/nspr-$(VERSION_NSPR).tar.gz:
- wget -q -O $@ https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(VERSION_NSPR)/src/nspr-$(VERSION_NSPR).tar.gz
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(VERSION_NSPR)/src/nspr-$(VERSION_NSPR).tar.gz" $@
# spidermonkey (libmozjs)
@@ -515,7 +520,9 @@ endif
touch $@
$(SOURCEDIR)/spidermonkey-1.8.5.tar.gz:
- wget -q -O $@ http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ftp.mozilla.org/pub/mozilla.org/js/js185-1.0.0.tar.gz" $@
+
$(SOURCEDIR)/spidermonkey-1.7.0.tar.gz:
- wget -q -O $@ http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz
+ $(FETCHSRC) sdk $(subst $(SOURCEDIR)/,,$@) "http://ftp.mozilla.org/pub/mozilla.org/js/js-1.7.0.tar.gz" $@
+
diff --git a/sdk/fetchsrc b/sdk/fetchsrc
new file mode 100755
index 0000000..46b72b0
--- a/dev/null
+++ b/sdk/fetchsrc
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set -x
+
+# script to fetch toolchain source tar using ci.netsurf-browser.org as a cache
+
+# Usage fetchsrc <target> <source> <upstream> <output>
+
+NSSRV="http://ci.netsurf-browser.org/toolchain/"
+
+wget -q -O ${4} ${NSSRV}/${1}/${2}
+if [ $? -ne 0 ];then
+ wget -q -O ${4} ${3}
+ if [ $? -ne 0 ];then
+ rm ${4}
+ exit 1
+ fi
+fi