Date: Friday, April 8, 2022 @ 13:49:35 Author: foutrelis Revision: 1182983
upgpkg: aerc 0.9.0-1: new upstream release - substitute notmuch-runtime for notmuch - add gawk (used by the colorize filter since aerc 0.8.2) - tweak optdeps; both w3m and dante are needed to view HTML messages Added: aerc/trunk/mk-rename-ambiguous-LDFLAGS-variable.patch Modified: aerc/trunk/PKGBUILD --------------------------------------------+ PKGBUILD | 20 ++++++--- mk-rename-ambiguous-LDFLAGS-variable.patch | 60 +++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-04-08 12:25:38 UTC (rev 1182982) +++ PKGBUILD 2022-04-08 13:49:35 UTC (rev 1182983) @@ -4,20 +4,28 @@ # Contributor: Drew DeVault <[email protected]> pkgname=aerc -pkgver=0.8.0 +pkgver=0.9.0 pkgrel=1 pkgdesc='Email Client for your Terminal' arch=('x86_64') url='https://git.sr.ht/~rjarry/aerc' license=('MIT') -depends=('notmuch') -makedepends=('go' 'git' 'scdoc') -optdepends=('w3m: html viewer support' 'dante: proxy support') +depends=('notmuch-runtime' 'gawk') +makedepends=('go' 'scdoc') +optdepends=('w3m: for showing HTML messages' + 'dante: for showing HTML messages') provides=('aerc') conflicts=('aerc') -source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~rjarry/${pkgname}/archive/${pkgver}.tar.gz") -sha512sums=('e99c0ec3429f8e236a2e4a4a6ce1fd1fcfe39089c7ea5b8f73292ac8f0f3e12234d43f535797537e051a13503af9e07ab82731b6d321582d37a2cd8dc9eb1c0d') +source=("$pkgname-$pkgver.tar.gz::https://git.sr.ht/~rjarry/${pkgname}/archive/${pkgver}.tar.gz" + mk-rename-ambiguous-LDFLAGS-variable.patch) +sha512sums=('5821a35bc9c893ac800532b24cce0dcee5113fe41cce057e3ce952c7d7e9add680cbb11b4700cc8896d852817534d979df44f1cb82d93ae5438ebed826bab7bb' + 'd93538b775b8bbb97b966110558c640e02248c425da001a7b0a6d262a91e551f8ebd4c4a7ea430873915245676c97852b79a94671cdd5fd57c60f2b7a40355c2') +prepare() { + cd "$srcdir/$pkgname-$pkgver" + patch -Np1 -i ../mk-rename-ambiguous-LDFLAGS-variable.patch +} + build() { cd "$srcdir/$pkgname-$pkgver" export CGO_LDFLAGS="${LDFLAGS}" Added: mk-rename-ambiguous-LDFLAGS-variable.patch =================================================================== --- mk-rename-ambiguous-LDFLAGS-variable.patch (rev 0) +++ mk-rename-ambiguous-LDFLAGS-variable.patch 2022-04-08 13:49:35 UTC (rev 1182983) @@ -0,0 +1,60 @@ +From 247c6c74380a9e56527ec0a87965a39142ffc213 Mon Sep 17 00:00:00 2001 +From: Robin Jarry <[email protected]> +Date: Mon, 28 Mar 2022 14:33:17 +0200 +Subject: [PATCH] mk: rename ambiguous LDFLAGS variable + +The LDFLAGS environment variable is usually indented for C the linker +flags which are not compatible with go -ldflags. + +Use a more explicit GO_LDFLAGS variable instead. Allow adding extra +flags without overriding the default ones by specifying +GO_EXTRA_LDFLAGS. + +This may break the build on some distros that rely on setting LDFLAGS to +change the default shareDir or version. They will have to switch to +GO_EXTRA_LDFLAGS. + +Link: https://salsa.debian.org/go-team/packages/aerc/-/commit/e9ed90beae9f +Link: https://src.fedoraproject.org/rpms/aerc/blob/f36/f/aerc.spec#_86 +Fixes: e7e22aba60ce ("mk: rebuild if goflags or ldflags have changed") +Signed-off-by: Robin Jarry <[email protected]> +--- + Makefile | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 4967182..14adf89 100644 +--- a/Makefile ++++ b/Makefile +@@ -10,8 +10,11 @@ SHAREDIR?=$(PREFIX)/share/aerc + MANDIR?=$(PREFIX)/share/man + GO?=go + GOFLAGS?= +-LDFLAGS+=-X main.Version=$(VERSION) +-LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR) ++# ignore environment variable ++GO_LDFLAGS:= ++GO_LDFLAGS+=-X main.Version=$(VERSION) ++GO_LDFLAGS+=-X git.sr.ht/~rjarry/aerc/config.shareDir=$(SHAREDIR) ++GO_LDFLAGS+=$(GO_EXTRA_LDFLAGS) + + GOSRC!=find * -name '*.go' + GOSRC+=go.mod go.sum +@@ -31,7 +34,7 @@ DOCS := \ + + all: aerc $(DOCS) + +-build_cmd:=$(GO) build $(GOFLAGS) -ldflags "$(LDFLAGS)" -o aerc ++build_cmd:=$(GO) build $(GOFLAGS) -ldflags "$(GO_LDFLAGS)" -o aerc + + # the following command outputs nothing, we only want to execute it once + # and force .aerc.d to be regenerated when build_cmd has changed +@@ -63,7 +66,7 @@ debug: aerc.debug + @echo ' dlv attach $$(pidof aerc.debug)' + + aerc.debug: $(GOSRC) +- $(GO) build $(GOFLAGS) -gcflags=*=-N -gcflags=*=-l -ldflags="$(LDFLAGS)" -o aerc.debug ++ $(GO) build $(GOFLAGS) -gcflags=*=-N -gcflags=*=-l -ldflags="$(GO_LDFLAGS)" -o aerc.debug + + .1.scd.1: + scdoc < $< > $@
