summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorAlexander F. Rødseth2020-10-27 15:38:03 +0100
committerAlexander F. Rødseth2020-10-27 15:38:03 +0100
commit6a1ae9c69c2fd4ebe2ac7b76d92bf7781278b04c (patch)
treef76b529b8c389fb7cea39b4ed4c8adc577436f93 /PKGBUILD
parent9c9a4f6d4a4fbe0d616f20e638227e79ebf979d3 (diff)
downloadaur-6a1ae9c69c2fd4ebe2ac7b76d92bf7781278b04c.tar.gz
Cleanup
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD67
1 files changed, 22 insertions, 45 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a991f1298d4c..c1fa5643027a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,65 +7,42 @@ pkgdesc='Lightweight Emacs'
license=('LGPL2.1')
arch=(x86_64)
url='https://bellard.org/qemacs/'
-depends=(libxv)
-makedepends=(setconf texi2html)
source=("https://bellard.org/$pkgname/$pkgname-$pkgver.tar.gz")
sha256sums=('2ffba66a44783849282199acfcc08707debc7169394a8fd0902626222f27df94')
-prepare() {
- cd "$pkgname-$pkgver"
-
- # fix compilation errors
- sed -i 's:static QEDisplay:QEDisplay:' tty.c
- sed -i 's:static QECharset:QECharset:' charset.c
- sed -i 's/ found:/ found: return q - buf_out;/g' unicode_join.c
- sed -i 's:static QEDisplay:QEDisplay:' x11.c
-
- # stop doing ELF-acrobatics
- sed -i 's:GNUC:NOP:' qe.c
-
- export LDFLAGS="$LDFLAGS -Wl,-z,now"
- ./configure --prefix=$pkgdir/usr --disable-png
-
- # fix config before building
- sed -i '/^$/d' config.mak
- sed -i '/^"$/d' config.h
- sed -i 's:\.1:\.1":' config.h
- sed -i "/CONFIG_QE/d" config.h
- echo '#define CONFIG_QE_PREFIX "/usr"' >> config.h
- setconf Makefile CFLAGS "-fno-strict-aliasing -g $CFLAGS"
-}
-
build() {
+ # TODO: Make UTF-8 default
cd "$pkgname-$pkgver"
- make -C libqhtml
- make
+ export CC=gcc
+ export CFLAGS="$CFLAGS \
+ -DQE_VERSION=\"'$pkgver'\" \
+ -DCONFIG_QE_PREFIX=\"'/usr'\" \
+ -DCONFIG_NETWORK=1 \
+ -DCONFIG_UNICODE_JOIN=1 \
+ -DCONFIG_ALL_KMAPS=1 \
+ -D__NOP__=1 \
+ -fno-strict-aliasing -pipe -Os -w"
+ export LDFLAGS="$LDFLAGS -Wl,-z,now -Wl,--as-needed"
+ "$CC" qe.c qe.h qfribidi.h charset.c buffer.c input.c unicode_join.c display.c \
+ util.c hex.c list.c cutils.c unix.c tty.c clang.c latex-mode.c xml.c \
+ bufed.c shell.c dired.c charsetmore.c charset_table.c arabic.c indic.c \
+ qfribidi.c unihex.c qeend.c $CFLAGS $LDFLAGS -o qe
}
package() {
cd "$pkgname-$pkgver"
- install -d "$pkgdir/usr/bin"
- install -d "$pkgdir/usr/share/qe"
- install -d "$pkgdir/usr/man/man1"
-
- # install
- make --silent install
-
- # man page fix
- mkdir -p "$pkgdir/usr/share/man"
- mv "$pkgdir/usr/man/man1" "$pkgdir/usr/share/man/man1"
- rmdir "$pkgdir/usr/man"
- ln -s "/usr/share/man/man1/qe.1.gz" "$pkgdir/usr/share/man/man1/qemacs.1.gz"
+ install -Dm755 qe "$pkgdir/usr/bin/qe"
+ ln -s /usr/bin/qe "$pkgdir/usr/bin/qemacs"
# shared files
- install -Dm644 config.eg "$pkgdir/usr/share/qe/config.eg"
- install -Dm644 util.c "$pkgdir/usr/share/doc/$pkgname/util.c"
+ install -Dm644 kmaps "$pkgdir/usr/share/qe/kmaps"
+ install -Dm644 ligatures "$pkgdir/usr/share/qe/ligatures"
- # documentation
- mkdir -p "$pkgdir/usr/share/doc/$pkgname"
+ # man page and HTML documentation
+ install -Dm755 qe.1 "$pkgdir/usr/share/man/man1/qe.1"
+ ln -s /usr/share/man/man1/qe.1.gz "$pkgdir/usr/share/man/man1/qemacs.1.gz"
install -Dm644 qe-doc.html "$pkgdir/usr/share/doc/$pkgname/qemacs.html"
- install -Dm644 config.eg "$pkgdir/usr/share/doc/$pkgname/sample-config"
# license
install -Dm644 COPYING "$pkgdir/usr/share/licenses/$pkgname/COPYING"