Skip to content

Commit

Permalink
Merge pull request #11 from kolyshkin/go111
Browse files Browse the repository at this point in the history
osx fixes for go 1.11
  • Loading branch information
thaJeztah authored Oct 11, 2018
2 parents dec60d5 + 246d9b3 commit 7e5e4c1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM golang:1.11.0
ARG APT_MIRROR=deb.debian.org
RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list

RUN apt-get update -qq && apt-get install -y -q \
RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \
libltdl-dev \
gcc-mingw-w64 \
parallel \
Expand Down
28 changes: 23 additions & 5 deletions osx-cross.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@

set -eu -o pipefail

PKG_DEPS="patch xz-utils clang"
PKG_DEPS="patch xz-utils clang llvm file"

apt-get update -qq
time apt-get install -y -q $PKG_DEPS
time apt-get install -y -q --no-install-recommends $PKG_DEPS

# NOTE: when changing version here, make sure to
# also change OSX_CODENAME below to match
OSX_SDK=MacOSX10.10.sdk
SDK_SUM=631b4144c6bf75bf7a4d480d685a9b5bda10ee8d03dbf0db829391e2ef858789

OSX_SDK=MacOSX10.11.sdk
OSX_CROSS_COMMIT=a9317c18a3a457ca0a657f08cc4d0d43c6cf8953
OSXCROSS_PATH="/osxcross"

LIBTOOL_VERSION=2.4.6
OSX_CODENAME=yosemite

echo "Cloning osxcross"
time git clone https://github.com/tpoechtrager/osxcross.git $OSXCROSS_PATH
cd $OSXCROSS_PATH
Expand All @@ -25,5 +31,17 @@ echo "Downloading OSX SDK"
time curl -sSL https://s3.dockerproject.org/darwin/v2/${OSX_SDK}.tar.xz \
-o "${OSXCROSS_PATH}/tarballs/${OSX_SDK}.tar.xz"

echo "$SDK_SUM ${OSXCROSS_PATH}/tarballs/${OSX_SDK}.tar.xz" \
| sha256sum -c -

echo "Building osxcross"
UNATTENDED=yes OSX_VERSION_MIN=10.6 ${OSXCROSS_PATH}/build.sh > /dev/null
# Go 1.11 requires OSX >= 10.10
UNATTENDED=yes OSX_VERSION_MIN=10.10 ${OSXCROSS_PATH}/build.sh > /dev/null

echo "Installing libtool from brew"
curl -sSL https://homebrew.bintray.com/bottles/libtool-${LIBTOOL_VERSION}.${OSX_CODENAME}.bottle.tar.gz \
| gzip -dc | tar xf - \
-C ${OSXCROSS_PATH}/target/SDK/${OSX_SDK}/usr/ \
--strip-components=2 \
libtool/${LIBTOOL_VERSION}/include/ \
libtool/${LIBTOOL_VERSION}/lib/

0 comments on commit 7e5e4c1

Please sign in to comment.