2019-11-11 03:03:14 +01:00
|
|
|
if [ -z "$archs" ]; then
|
2020-04-01 10:23:05 +02:00
|
|
|
archs="aarch64* armv[567]* i686* x86_64* ppc64le*"
|
2019-11-11 03:03:14 +01:00
|
|
|
fi
|
2015-02-21 13:38:37 +01:00
|
|
|
hostmakedepends+=" go"
|
|
|
|
nostrip=yes
|
2015-11-19 09:55:48 +01:00
|
|
|
nopie=yes
|
2015-02-21 14:34:03 +01:00
|
|
|
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
2016-09-16 22:26:56 +02:00
|
|
|
aarch64*) export GOARCH=arm64;;
|
2019-11-11 03:03:14 +01:00
|
|
|
armv5*) export GOARCH=arm; export GOARM=5;;
|
2015-02-21 14:34:03 +01:00
|
|
|
armv6*) export GOARCH=arm; export GOARM=6;;
|
|
|
|
armv7*) export GOARCH=arm; export GOARM=7;;
|
|
|
|
i686*) export GOARCH=386;;
|
|
|
|
x86_64*) export GOARCH=amd64;;
|
2019-01-01 00:24:00 +01:00
|
|
|
ppc64le*) export GOARCH=ppc64le;;
|
|
|
|
ppc64*) export GOARCH=ppc64;;
|
2019-11-11 03:03:14 +01:00
|
|
|
ppc*) export GOARCH=ppc;;
|
|
|
|
mipsel*) export GOARCH=mipsle;;
|
|
|
|
mips*) export GOARCH=mips;;
|
2015-02-21 14:34:03 +01:00
|
|
|
esac
|
|
|
|
|
|
|
|
export GOPATH="${wrksrc}/_build-${pkgname}-xbps"
|
2017-11-24 23:05:29 +01:00
|
|
|
GOSRCPATH="${GOPATH}/src/${go_import_path}"
|
2015-09-04 02:18:57 +02:00
|
|
|
export CGO_CFLAGS="$CFLAGS"
|
|
|
|
export CGO_CPPFLAGS="$CPPFLAGS"
|
|
|
|
export CGO_CXXFLAGS="$CXXFLAGS"
|
|
|
|
export CGO_LDFLAGS="$LDFLAGS"
|
|
|
|
export CGO_ENABLED=1
|
2018-09-11 12:38:46 +02:00
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
|
|
*-musl) export GOCACHE="${XBPS_HOSTDIR}/gocache-muslc" ;;
|
|
|
|
*) export GOCACHE="${XBPS_HOSTDIR}/gocache-glibc" ;;
|
|
|
|
esac
|