Caleb Maclennan pushed to branch main at Arch Linux / Packaging / Packages / 
lapce


Commits:
34442c4f by Caleb Maclennan at 2026-07-15T17:03:31+03:00
upgpkg: 0.4.6-4: Rebuild with more devendoring, enable LTO across linked Rust/C 
code, see RFC69

c.f. https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/69

- - - - -


2 changed files:

- .SRCINFO
- PKGBUILD


Changes:

=====================================
.SRCINFO
=====================================
@@ -1,7 +1,7 @@
 pkgbase = lapce
        pkgdesc = Lightning-fast and Powerful Code Editor
        pkgver = 0.4.6
-       pkgrel = 3
+       pkgrel = 4
        url = https://lapce.dev
        arch = x86_64
        license = Apache-2.0
@@ -23,7 +23,6 @@ pkgbase = lapce
        depends = openssl
        depends = libcrypto.so
        depends = libssl.so
-       options = !lto
        source = 
https://github.com/lapce/lapce/archive/v0.4.6/lapce-0.4.6.tar.gz
        sha256sums = 
c6790771ed0af5e242d2410d930197412af4c21c07a5a33ae5d6ac596ca7380a
 


=====================================
PKGBUILD
=====================================
@@ -4,7 +4,7 @@
 
 pkgname=lapce
 pkgver=0.4.6
-pkgrel=3
+pkgrel=4
 pkgdesc='Lightning-fast and Powerful Code Editor'
 arch=(x86_64)
 url=https://lapce.dev
@@ -23,30 +23,39 @@ depends=(expat
 makedepends=(cargo
              python
              cmake)
-options=(!lto)
 _archive="$pkgname-$pkgver"
 source=("$_url/archive/v$pkgver/$_archive.tar.gz")
 sha256sums=('c6790771ed0af5e242d2410d930197412af4c21c07a5a33ae5d6ac596ca7380a')
 
-prepare() {
+_srcenv() {
        cd "$_archive"
-       cargo fetch --locked --target host-tuple
-}
-
-build() {
-       cd "$_archive"
-       # See https://github.com/lapce/lapce/pull/2374 and 
https://bugs.archlinux.org/task/78922
-       export RELEASE_TAG_NAME="v$pkgver"
+       export CARGO_HOME="$srcdir"
        export CARGO_PROFILE_RELEASE_DEBUG=2
+       export CARGO_PROFILE_RELEASE_STRIP=false
+       export CARGO_PROFILE_RELEASE_LTO=true
+       export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
+       export CARGO_PROFILE_RELEASE_OPT_LEVEL=3
+       CFLAGS+=' -ffat-lto-objects'
        export LIBGIT2_NO_VENDOR=1
        export LIBSSH2_SYS_USE_PKG_CONFIG=1
        export OPENSSL_NO_VENDOR=true
-       cargo build --frozen --profile release-lto --all-features
+       # See https://github.com/lapce/lapce/pull/2374 and 
https://bugs.archlinux.org/task/78922
+       export RELEASE_TAG_NAME="v$pkgver"
+}
+
+prepare() {
+       _srcenv
+       cargo fetch --locked --target host-tuple
+}
+
+build() {
+       _srcenv
+       cargo build --frozen --release --all-features
 }
 
 package() {
        cd "$_archive"
-       install -Dm0755 -t "$pkgdir/usr/bin/" 
"target/release-lto/$pkgname"{,-proxy}
+       install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"{,-proxy}
        local lname=dev.lapce.lapce
        install -Dm0644 -t "$pkgdir/usr/share/applications/" 
extra/linux/$lname.desktop
        install -Dm0644 -t "$pkgdir/usr/share/metainfo/" 
extra/linux/$lname.metainfo.xml



View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/lapce/-/commit/34442c4f5a2b86f9fb4c44c4b76a199f14193abc

-- 
View it on GitLab: 
https://gitlab.archlinux.org/archlinux/packaging/packages/lapce/-/commit/34442c4f5a2b86f9fb4c44c4b76a199f14193abc
You're receiving this email because of your account on gitlab.archlinux.org. 
Manage all notifications: https://gitlab.archlinux.org/-/profile/notifications 
| Help: https://gitlab.archlinux.org/help


Reply via email to