Files
photoview/scripts/set_compiler_env.sh
Googol Lee 03b290eba7 Update API with Debian trixie (#1286)
Fix #1273.

- Cleanup `libatlas-base-dev`

  `ATLAS` is an optimized BLAS implementation. Today, the project looks dead. The last stable release (3.10.3)
happened in 2016. The last development release (3.11.41, not packaged) was in 2018. The git repository has seen no commit since 2019. Debian decided to [remove all `libatlas` packages](https://lists.debian.org/debian-science/2023/07/msg00010.html), including `libatlas-base-dev` from `trixie`.

  `libatlas-base-dev` provides a unique `cblas` package with `pkg-config`. Debian provides [`blas`](https://lists.debian.org/debian-science/2023/07/msg00012.html) to cover all the feature in `cblas`. `go-face` already depends on [`blas`](0c14797b4d/face.go (L4)), and it's safe to remove `cblas`.

  Maybe we should fork `go-face` and put those changes in the foked repo.

- Renaming `exiftool`

  In `trixie`, `exiftool` package is renamed as `libimage-exiftool-perl`.
2025-08-20 21:29:03 +02:00

55 lines
1.2 KiB
Bash
Executable File

#!/bin/sh
set -eu
# Configure environment for cross-compiling.
: ${TARGETPLATFORM=linux/`dpkg --print-architecture`}
TARGETOS="$(echo $TARGETPLATFORM | cut -d"/" -f1)"
TARGETARCH="$(echo $TARGETPLATFORM | cut -d"/" -f2)"
TARGETVARIANT="$(echo $TARGETPLATFORM | cut -d"/" -f3)"
DEBIAN_ARCH=$TARGETARCH
if [ "$TARGETARCH" = "arm" ]
then
DEBIAN_ARCH=armel
if [ "$TARGETVARIANT" = "v7" ]
then
DEBIAN_ARCH=armhf
fi
fi
dpkg --add-architecture $DEBIAN_ARCH
apt-get update
apt-get install -y git curl crossbuild-essential-${DEBIAN_ARCH} libc-dev:${DEBIAN_ARCH} autoconf automake libtool m4 pkg-config cmake dpkg-dev
dpkg-architecture -a $DEBIAN_ARCH >/env
export $(cat /env)
CGO_ENABLED="1"
GOOS="$TARGETOS"
GOARCH="$TARGETARCH"
GOARM="7"
if [ "$TARGETARCH" = "arm" ] && [ ! -z "$TARGETVARIANT" ]; then
case "$TARGETVARIANT" in
"v5")
export GOARM="5"
;;
"v6")
export GOARM="6"
;;
esac
fi
echo CGO_ENABLED="${CGO_ENABLED}" >>/env
echo GOOS="${GOOS}" >>/env
echo GOARCH="${GOARCH}" >>/env
echo GOARM="${GOARM}" >>/env
echo AR="${DEB_HOST_MULTIARCH}-ar" >>/env
echo CC="${DEB_HOST_MULTIARCH}-gcc" >>/env
echo CXX="${DEB_HOST_MULTIARCH}-g++" >>/env
echo PKG_CONFIG_PATH="/usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/" >>/env
cat /env