+heif-converter — Convert HEIC/AVIF images to any format (#4179)

* +heif-converter — Convert HEIC/AVIF images to any format

* better test
This commit is contained in:
Kevin Chen 2023-11-22 14:08:11 -05:00 committed by GitHub
parent a44a251288
commit 57461f2c7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 43 additions and 0 deletions

View file

@ -0,0 +1,43 @@
distributable:
url: https://github.com/MaestroError/heif-converter-image/archive/refs/tags/0.2.tar.gz
strip-components: 1
versions:
- 2023.6.23
# FIXME once there has been an official release
# See https://github.com/orgs/teaxyz/discussions/321
# github: MaestroError/heif-converter-image
# strip: /v/
provides:
- bin/heif-converter
dependencies:
github.com/strukturag/libheif: "*"
build:
dependencies:
go.dev: ^1.19
script: |
go mod download
mkdir -p "{{ prefix }}"/bin
go build -v -trimpath -ldflags="$LDFLAGS" -o $BUILDLOC .
env:
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
GO111MODULE: on
CGO_ENABLED: 1
BUILDLOC: "{{prefix}}/bin/heif-converter"
LDFLAGS:
- -s
- -w
linux:
# or segmentation fault
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
LDFLAGS:
- -buildmode=pie
test:
script:
- which heif-converter
- heif-converter avif star-wars.avif star-wars.png