aboutsummaryrefslogtreecommitdiffstats
path: root/unmaintained/emacs-xorg/APKBUILD
blob: 9837643f9b10ca1a940244aae850f699c44d0aed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# Contributor: stef <l0ls0fo2i@ctrlc.hu>
# Contributor: Timo Teräs <timo.teras@iki.fi>

pkgname=emacs-xorg
pkgver=24.99
pkgrel=4
gitver=7eb2077f9dd14ae9d70a12c621151afd50ea6e96
pkgdesc="The extensible, customizable, self-documenting real-time display editor"
arch="x86_64"
url="http://www.gnu.org/software/emacs/emacs.html"
license="GPL3"
depends="hicolor-icon-theme desktop-file-utils"
makedepends="autoconf automake linux-headers paxmark
	librsvg-dev giflib-dev libxpm-dev gtk+3.0-dev gconf-dev alsa-lib-dev
	imagemagick-dev gnutls-dev glib-dev fontconfig-dev libpng-dev
	libxml2-dev pango-dev gpm-dev libjpeg-turbo-dev ncurses-dev
	ncurses-libs"
#source="ftp://ftp.gnu.org/gnu/emacs/emacs-$pkgver.tar.xz
source="http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-$gitver.tar.xz
        gamedir.patch
        noaslr-dump.patch
        musl.patch"

_builddir="$srcdir/emacs-$gitver"
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./autogen.sh || return 1
	CFLAGS=-fno-pie \
	LDFLAGS=-nopie \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib \
		--localstatedir=/var \
		--without-makeinfo \
		--with-gameuser=:games \
		--with-x-toolkit=gtk3 \
		--with-xft \
		--with-jpeg=no \
		--with-tiff=no \
		|| return 1
	make
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install

	# remove conflict with ctags package
	mv "$pkgdir"/usr/bin/ctags "$pkgdir"/usr/bin/ctags.emacs
	mv "$pkgdir"/usr/share/man/man1/ctags.1.gz "$pkgdir"/usr/share/man/man1/ctags.emacs.1.gz
	# remove conflict with texinfo
	rm "$pkgdir"/usr/share/info/info.info.gz

	# fix user/root permissions on usr/share files
	find "$pkgdir"/usr/share/emacs/ -exec chown root:root {} \;
	find "$pkgdir"/usr/lib -perm -g+s,g+x ! -type d -exec chmod g-s {} \;
	# fix perms on /var/games
	chmod 775 "$pkgdir"/var/games
	chmod 775 "$pkgdir"/var/games/emacs
	chmod 664 "$pkgdir"/var/games/emacs/*
	chown -R root:games "$pkgdir"/var/games
}

md5sums="d771a8c9163f2118de565e679838c907  emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96.tar.xz
82a3275fba6535e129c08b6941caf028  gamedir.patch
0decc074823fc66f155dd9559420be3d  noaslr-dump.patch
d753f727439ba68ae848a72535b021a4  musl.patch"
sha256sums="0931fc1a4f5ab4baa73e18985781228f8ad7323b9bbcaf7eefe302d86f64f2c8  emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96.tar.xz
38b3cdf3736b200d033d9e6e9188bcaaf819bf7b47b3231a533cca370f945ee3  gamedir.patch
2af8d971caa73843fd1f6793dbc9b0fb701186dcb01845eac3c68373f4a570d1  noaslr-dump.patch
c6b6037fcc0abe3c973e9200ba6b9ad8e313b6bbd47a5d74a835892f0338c045  musl.patch"
sha512sums="59a2d7f947c79d59462dc9a0fcdd2ed992ae18ee284ece3508a009fe31a485ab276425d724a580023481318a88b81801660c17cb3bc118edc3b563a7c3a63dd7  emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96.tar.xz
7bd0acd610c07cb0cee2ceec8770c51b97e05a69c8c32e771f6ced83c1906bd87af842939a294a16757a4ad24e052228068944efa5adfc47776ca28b8da3555a  gamedir.patch
c04213a271008f7413677c95442188d744736abd28994aac616ac2e35924ca2a1c5cb55b95072e0011e891f1db054f07960b1753167f50c2e6d80d7c5b33e338  noaslr-dump.patch
c02bea143a221bc186e44f7eb12edb93d3d7564a39db656c888930ad69a6d40c86918bbe12acd2dbff19ff88a67a06a65e68467def8aa443e52d3b149d8ba2f2  musl.patch"