diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 42 |
1 files changed, 26 insertions, 16 deletions
@@ -6,33 +6,43 @@ pkgname=tmux pkgver=3.3_a -pkgrel=1 -pkgdesc='A terminal multiplexer' +pkgrel=3 +pkgdesc='Terminal multiplexer' url='https://github.com/tmux/tmux/wiki' arch=('x86_64') license=('BSD') depends=('ncurses' 'libevent' 'libutempter') -options=(lto) -source=("https://github.com/tmux/tmux/releases/download/${pkgver/_/}/tmux-${pkgver/_/}.tar.gz") -sha256sums=('e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f') -b2sums=('e835ce0f136175521035a684419f221864edb0a9506d7d68cbc0239b1349e78949ebd96573a9d8651a2df6d99acb433075d6e0c20d7394a53fe6b44bd9e56069') +# # For some reason this breaks compiling. "error: C compiler cannot create executables" +# # But old-fashioned raw injection of -flto=auto via export doesn't. +#options=('lto') +source=("https://github.com/tmux/tmux/releases/download/${pkgver/_/}/tmux-${pkgver/_/}.tar.gz" + "CVE-2022-47016.patch") +sha256sums=('e4fd347843bd0772c4f48d6dde625b0b109b7a380ff15db21e97c11a4dcdf93f' + '58fb690833e086b71b52555aa8eced695ace0a0bc51b8bccfda441e35a47ca93') +b2sums=('e835ce0f136175521035a684419f221864edb0a9506d7d68cbc0239b1349e78949ebd96573a9d8651a2df6d99acb433075d6e0c20d7394a53fe6b44bd9e56069' + '5d6e44167fc067da71a7b222eea9f631bf9a64e88846d243207e9e29ab25e0bc78addca6b006ceed43a45be88abc53822a1250fd5b9a7c4830496ef77408eae3') + +prepare() { + cd "$pkgname-${pkgver/_/}" + patch -Np1 -i ../CVE-2022-47016.patch +} build() { - cd "$srcdir/$pkgname-${pkgver/_/}" + cd "$pkgname-${pkgver/_/}" - export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIE" - export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIE" + export CFLAGS="$CFLAGS -O3 -fstack-protector-all -fPIE -flto=auto" + export CXXFLAGS="$CXXFLAGS -O3 -fstack-protector-all -fPIE -flto=auto" export LDFLAGS="$LDFLAGS,-pie" - ./configure \ - --prefix=/usr \ - --enable-utempter - make + ./configure \ + --prefix=/usr \ + --enable-utempter + make } package() { - cd "$srcdir/$pkgname-${pkgver/_/}" + cd "$pkgname-${pkgver/_/}" - make install DESTDIR="$pkgdir" - install -D -m0644 COPYING "$pkgdir/usr/share/licenses/tmux/LICENSE" + make install DESTDIR="$pkgdir" + install -D -m0644 COPYING "$pkgdir/usr/share/licenses/tmux/LICENSE" } |