summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2023-02-24 19:05:48 -0600
committerLuis Martinez2023-02-24 19:05:48 -0600
commitbab3cfa60fa7411e3942239692bcb8859ea178ae (patch)
treed4f4800813c21a8212803df403cccefa31b90532
parente61da86950574a7a7550e0b53eaaee1b2d09c10a (diff)
downloadaur-bab3cfa60fa7411e3942239692bcb8859ea178ae.tar.gz
fix packaging
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD23
-rw-r--r--in-source-build.diff65
3 files changed, 85 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d44cc4582055..03b240a39dfd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = textadept
pkgdesc = Fast, minimalist, and remarkably extensible cross-platform text editor
pkgver = 11.4
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/orbitalquark/textadept
arch = i686
arch = x86_64
@@ -13,19 +13,21 @@ pkgbase = textadept
makedepends = wget
makedepends = unzip
source = textadept-11.4.tar.gz::https://github.com/orbitalquark/textadept/archive/textadept_11.4.tar.gz
+ source = in-source-build.diff
sha256sums = fe10cbe9949e3a2ec4445ace16e26eb4b905cee2e36de76295ea9a7ca6c3aba8
+ sha256sums = c6ff17408ae788108a4cd298104580b95dd09da9e3f57e360d431daee046049d
pkgname = textadept
depends = gtk2
- provides = textadept-curses
- conflicts = textadept-curses
+ depends = ncurses
pkgname = textadept-gtk3
depends = gtk3
+ depends = ncurses
provides = textadept
- provides = textadept-curses
conflicts = textadept
- conflicts = textadept-curses
pkgname = textadept-curses
depends = ncurses
+ provides = textadept
+ conflicts = textadept
diff --git a/PKGBUILD b/PKGBUILD
index 977eb2085d37..aff006859fe7 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,18 +4,21 @@
pkgname=('textadept' 'textadept-gtk3' 'textadept-curses')
pkgver=11.4
-pkgrel=3
+pkgrel=4
pkgdesc="Fast, minimalist, and remarkably extensible cross-platform text editor"
arch=('i686' 'x86_64' 'aarch64')
url="https://github.com/orbitalquark/textadept"
license=('MIT')
makedepends=('gtk2' 'gtk3' 'ncurses' 'wget' 'unzip')
-source=("$pkgname-$pkgver.tar.gz::$url/archive/${pkgname}_$pkgver.tar.gz")
-sha256sums=('fe10cbe9949e3a2ec4445ace16e26eb4b905cee2e36de76295ea9a7ca6c3aba8')
+source=("$pkgname-$pkgver.tar.gz::$url/archive/${pkgname}_$pkgver.tar.gz"
+ in-source-build.diff)
+sha256sums=('fe10cbe9949e3a2ec4445ace16e26eb4b905cee2e36de76295ea9a7ca6c3aba8'
+ 'c6ff17408ae788108a4cd298104580b95dd09da9e3f57e360d431daee046049d')
prepare() {
cd "$pkgbase-${pkgbase}_${pkgver}"
( cd src
+ patch -p1 -i "$srcdir"/in-source-build.diff
make deps
## thanks lacsaP
sed -i '1008s/volatile//;1099s/volatile//;' scintilla/gtk/ScintillaGTKAccessible.cxx
@@ -32,14 +35,12 @@ prepare() {
build() {
cd "$pkgbase-${pkgbase}_${pkgver}"
(cd src; make GTK2=1)
- (cd src-gtk3; make GTK3=1)
+ (cd src-gtk3; make)
(cd src-curses; make curses)
}
package_textadept() {
- depends=('gtk2')
- provides=('textadept-curses')
- conflicts=('textadept-curses')
+ depends=('gtk2' 'ncurses')
cd "$pkgbase-${pkgbase}_${pkgver}/src"
make GTK2=1 PREFIX=/usr DESTDIR="$pkgdir" install
@@ -56,9 +57,9 @@ package_textadept() {
}
package_textadept-gtk3() {
- depends=('gtk3')
- provides=("$pkgbase" 'textadept-curses')
- conflicts=("$pkgbase" 'textadept-curses')
+ depends=('gtk3' 'ncurses')
+ provides=("$pkgbase")
+ conflicts=("$pkgbase")
cd "$pkgbase-${pkgbase}_${pkgver}/src-gtk3"
make PREFIX=/usr DESTDIR="$pkgdir" install
@@ -76,6 +77,8 @@ package_textadept-gtk3() {
package_textadept-curses() {
depends=('ncurses')
+ provides=("$pkgbase")
+ conflicts=("$pkgbase")
cd "$pkgbase-${pkgbase}_${pkgver}/src-curses"
make curses PREFIX=/usr DESTDIR="$pkgdir" install
diff --git a/in-source-build.diff b/in-source-build.diff
new file mode 100644
index 000000000000..22de2ddd2caf
--- /dev/null
+++ b/in-source-build.diff
@@ -0,0 +1,65 @@
+--- a/Makefile 2023-02-12 11:08:23.133779767 +0800
++++ b/Makefile 2023-02-12 11:13:08.907691463 +0800
+@@ -225,22 +225,22 @@
+
+ # Executables.
+
+-linux_exes := $(addprefix ../, textadept textadept-curses)
++linux_exes := textadept textadept-curses
+ win_exes := $(addprefix ../, textadept.exe textadept-curses.exe)
+ osx_exes := $(addprefix ../, textadept-osx textadept-osx-curses)
+
+ .PHONY: all curses win osx
+ .DEFAULT_GOAL := all
+ all: $(linux_exes)
+-curses: ../textadept-curses
++curses: textadept-curses
+ win: $(win_exes)
+ osx: $(osx_exes)
+
+ # Compile natively for Linux or BSD.
+
+ $(linux_exes): $(common_objs)
+-../textadept: $(gui_objs)
+-../textadept-curses: $(curses_objs) $(termkey_unix_objs)
++textadept: $(gui_objs)
++textadept-curses: $(curses_objs) $(termkey_unix_objs)
+
+ ifeq (Linux, $(shell uname -s))
+ $(linux_exes): CXX := g++
+@@ -252,11 +252,11 @@
+ $(linux_exes): LDFLAGS += -Wl,--retain-symbols-file -Wl,$(shell pwd)/lua.sym
+ endif
+ ifdef GTK2
+-../textadept: LDFLAGS += $(shell pkg-config --libs gtk+-2.0 gmodule-2.0)
++textadept: LDFLAGS += $(shell pkg-config --libs gtk+-2.0 gmodule-2.0)
+ else
+-../textadept: LDFLAGS += $(shell pkg-config --libs gtk+-3.0 gmodule-2.0)
++textadept: LDFLAGS += $(shell pkg-config --libs gtk+-3.0 gmodule-2.0)
+ endif
+-../textadept-curses: LDFLAGS += $(shell pkg-config --silence-errors --libs ncursesw || \
++textadept-curses: LDFLAGS += $(shell pkg-config --silence-errors --libs ncursesw || \
+ pkg-config --silence-errors --libs ncurses || pkg-config --silence-errors --libs curses || \
+ echo -lncursesw) -lpthread
+ ifeq (Linux, $(shell uname -s))
+@@ -312,9 +312,9 @@
+ PIXMAPS_DIR ?= /usr/share/pixmaps
+ desktop_files := $(wildcard *.desktop)
+ ifeq (, $(findstring curses, $(MAKECMDGOALS)))
+- install_targets := ../textadept
++ install_targets := textadept
+ else
+- install_targets := ../textadept-curses
++ install_targets := textadept-curses
+ endif
+
+ .PHONY: install uninstall
+@@ -322,7 +322,7 @@
+ install -d $(DESTDIR)$(bin_dir) $(DESTDIR)$(data_dir)
+ install $^ $(DESTDIR)$(data_dir)
+ cp -rL $| $(DESTDIR)$(data_dir)
+- ln -s $(subst .., $(data_dir), $^) $(DESTDIR)$(bin_dir)
++ ln -s $(data_dir)/$^ $(DESTDIR)$(bin_dir)
+ if [ -d "$(XDG_DATA_DIR)" ]; then \
+ install -d $(DESTDIR)$(XDG_DATA_DIR); \
+ install $(desktop_files) $(DESTDIR)$(XDG_DATA_DIR); \