summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAseem Athale2024-03-03 15:29:57 +0530
committerAseem Athale2024-03-03 15:29:57 +0530
commit9d6af390d03fd21ea519974ad7569f1ebe3da169 (patch)
tree7ffe8de0e85d715f12480a3d1ae62d40fc82ca78
parenta5a75dcb133ca3d510d45b9bf28602a5a7fc420f (diff)
downloadaur-9d6af390d03fd21ea519974ad7569f1ebe3da169.tar.gz
govarnam-ibus-git: Fix INSTALL_PREFIX and add Wayland fix patch
Signed-off-by: Aseem Athale <athaleaseem@gmail.com>
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD16
-rw-r--r--wayland-fix.patch62
3 files changed, 77 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b1d209887af5..6e9658cdf3b7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = govarnam-ibus-git
pkgdesc = IBus engine for GoVarnam providing Indian language input method - Git version
- pkgver = 1.6.2.r1.g76e9421
+ pkgver = 1.6.2.r3.g38b3d0b
pkgrel = 1
url = https://varnamproject.github.io/
arch = x86_64
@@ -12,7 +12,9 @@ pkgbase = govarnam-ibus-git
provides = govarnam-ibus
source = govarnam-ibus-git::git+https://github.com/varnamproject/govarnam-ibus.git
source = git+https://github.com/varnamproject/govarnam.git
+ source = wayland-fix.patch
sha256sums = SKIP
sha256sums = SKIP
+ sha256sums = 02479dff418290567b2748d6f23124474fe7b8f7eb89694464c4eb0fa843ed4f
pkgname = govarnam-ibus-git
diff --git a/PKGBUILD b/PKGBUILD
index 6855775adeb0..4b0089054e10 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Contributor: Ashwin Vishnu <ashwinvis+arch at pr0t0nm4il dot com>
pkgname=govarnam-ibus-git
-pkgver=1.6.2.r1.g76e9421
+pkgver=1.6.2.r3.g38b3d0b
pkgrel=1
pkgdesc="IBus engine for GoVarnam providing Indian language input method - Git version"
arch=('x86_64')
@@ -11,8 +11,11 @@ license=('AGPL')
makedepends=('go' 'git')
depends=('govarnam' 'ibus')
source=("${pkgname}::git+https://github.com/varnamproject/govarnam-ibus.git"
- "git+https://github.com/varnamproject/govarnam.git")
-sha256sums=('SKIP' 'SKIP')
+ "git+https://github.com/varnamproject/govarnam.git"
+ "wayland-fix.patch")
+sha256sums=('SKIP'
+ 'SKIP'
+ '02479dff418290567b2748d6f23124474fe7b8f7eb89694464c4eb0fa843ed4f')
provides=('govarnam-ibus')
pkgver() {
@@ -20,6 +23,11 @@ pkgver() {
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' | sed 's/^v//g'
}
+prepare() {
+ cd "$pkgname"
+ git am ../wayland-fix.patch
+}
+
build() {
cd "$pkgname"
export CGO_CPPFLAGS="${CPPFLAGS}"
@@ -27,7 +35,7 @@ build() {
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
- PREFIX=/usr make ubuntu-14
+ make INSTALL_PREFIX=/usr ubuntu-14
}
# check() {
diff --git a/wayland-fix.patch b/wayland-fix.patch
new file mode 100644
index 000000000000..9a97b7de9cf6
--- /dev/null
+++ b/wayland-fix.patch
@@ -0,0 +1,62 @@
+From 37b9d2ec9ec9edde5249d46b58fbf6fcc611525f Mon Sep 17 00:00:00 2001
+From: luongthanhlam <ltlam93@gmail.com>
+Date: Sun, 3 Mar 2024 14:42:40 +0530
+Subject: [PATCH 77/77] ibus/common.go: Use WAYLAND_DISPLAY for Ibus socket
+ path on Wayland
+
+IBus on Wayland doesn't use the $DISPLAY environment variable, rather
+uses the $WAYLAND_DISPLAY environment variable to create the socket
+file.
+
+Signed-off-by: Aseem Athale <athaleaseem@gmail.com>
+---
+ ibus/common.go | 27 +++++++++++++++++++--------
+ 1 file changed, 19 insertions(+), 8 deletions(-)
+
+diff --git a/ibus/common.go b/ibus/common.go
+index b507f00..ac408a5 100644
+--- a/ibus/common.go
++++ b/ibus/common.go
+@@ -79,20 +79,31 @@ func GetSocketPath() string {
+ if path != "" {
+ return path
+ }
+- display := os.Getenv("DISPLAY")
++ display := os.Getenv("WAYLAND_DISPLAY")
++ isWayland := true
++ if display == "" {
++ isWayland = false
++ display = os.Getenv("DISPLAY")
++ }
+ if display == "" {
+ fmt.Fprintf(os.Stderr, "DISPLAY is empty! We use default DISPLAY (:0.0)")
+ display = ":0.0"
+ }
+- // format is {hostname}:{displaynumber}.{screennumber}
+ hostname := "unix"
+- HDS := strings.SplitN(display, ":", 2)
+- DS := strings.SplitN(HDS[1], ".", 2)
+-
+- if HDS[0] != "" {
+- hostname = HDS[0]
++ displayNumber := ""
++ if isWayland {
++ displayNumber = display
++ } else {
++ // format is {hostname}:{displaynumber}.{screennumber}
++ HDS := strings.SplitN(display, ":", 2)
++ DS := strings.SplitN(HDS[1], ".", 2)
++
++ if HDS[0] != "" {
++ hostname = HDS[0]
++ }
++ displayNumber = DS[0]
+ }
+- p := fmt.Sprintf("%s-%s-%s", GetLocalMachineId(), hostname, DS[0])
++ p := fmt.Sprintf("%s-%s-%s", GetLocalMachineId(), hostname, displayNumber)
+ path = GetUserConfigDir() + "/ibus/bus/" + p
+
+ return path
+--
+2.44.0
+