aboutsummaryrefslogtreecommitdiffstats
path: root/testing/emacs-xorg
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-02-10 10:53:07 +0000
committerTimo Teräs <timo.teras@iki.fi>2015-02-10 10:53:07 +0000
commit59e10ba0bbe2aae2d28897b763c1158b47fdeb99 (patch)
tree43847601c4881d3ac6d89117430f7dbf1ac64d99 /testing/emacs-xorg
parent1964efae661787a7828e42901708d098df07c664 (diff)
downloadaports-59e10ba0bbe2aae2d28897b763c1158b47fdeb99.tar.bz2
aports-59e10ba0bbe2aae2d28897b763c1158b47fdeb99.tar.xz
testing/emacs-xorg: new aport
The extensible, customizable, self-documenting real-time display editor http://www.gnu.org/software/emacs/emacs.html build with xorg support [tteras: fixed some dependencies, configure options and indenting]
Diffstat (limited to 'testing/emacs-xorg')
-rw-r--r--testing/emacs-xorg/APKBUILD86
-rw-r--r--testing/emacs-xorg/gamedir.patch11
-rw-r--r--testing/emacs-xorg/musl.patch87
-rw-r--r--testing/emacs-xorg/noaslr-dump.patch19
4 files changed, 203 insertions, 0 deletions
diff --git a/testing/emacs-xorg/APKBUILD b/testing/emacs-xorg/APKBUILD
new file mode 100644
index 0000000000..ddb40a44cb
--- /dev/null
+++ b/testing/emacs-xorg/APKBUILD
@@ -0,0 +1,86 @@
+# Contributor: stef <l0ls0fo2i@ctrlc.hu>
+# Contributor: Timo Teräs <timo.teras@iki.fi>
+
+pkgname=emacs-xorg
+pkgver=24.99
+pkgrel=0
+gitver=7eb2077f9dd14ae9d70a12c621151afd50ea6e96
+pkgdesc="The extensible, customizable, self-documenting real-time display editor"
+arch="i686 x86_64"
+url="http://www.gnu.org/software/emacs/emacs.html"
+license="GPL3"
+depends="hicolor-icon-theme desktop-file-utils"
+makedepends="linux-headers paxctl 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
+00a871b77cafce8d36823dc9da09f3b0 noaslr-dump.patch
+d753f727439ba68ae848a72535b021a4 musl.patch"
+sha256sums="0931fc1a4f5ab4baa73e18985781228f8ad7323b9bbcaf7eefe302d86f64f2c8 emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96.tar.xz
+38b3cdf3736b200d033d9e6e9188bcaaf819bf7b47b3231a533cca370f945ee3 gamedir.patch
+0352f487b703f5eaa285752ad0c1508157473075ab5547f753a34e835a0a5044 noaslr-dump.patch
+c6b6037fcc0abe3c973e9200ba6b9ad8e313b6bbd47a5d74a835892f0338c045 musl.patch"
+sha512sums="59a2d7f947c79d59462dc9a0fcdd2ed992ae18ee284ece3508a009fe31a485ab276425d724a580023481318a88b81801660c17cb3bc118edc3b563a7c3a63dd7 emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96.tar.xz
+7bd0acd610c07cb0cee2ceec8770c51b97e05a69c8c32e771f6ced83c1906bd87af842939a294a16757a4ad24e052228068944efa5adfc47776ca28b8da3555a gamedir.patch
+c2c0d6120cb770616d9f715c1f2a8445ffc205be071fbe7bd66080c71c9cecb239eac1a5b3be26164e6211dd1721ebc1725fe47bdcbdb989678f2786146e7234 noaslr-dump.patch
+c02bea143a221bc186e44f7eb12edb93d3d7564a39db656c888930ad69a6d40c86918bbe12acd2dbff19ff88a67a06a65e68467def8aa443e52d3b149d8ba2f2 musl.patch"
diff --git a/testing/emacs-xorg/gamedir.patch b/testing/emacs-xorg/gamedir.patch
new file mode 100644
index 0000000000..899404ba98
--- /dev/null
+++ b/testing/emacs-xorg/gamedir.patch
@@ -0,0 +1,11 @@
+diff -urw emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96/lib-src/Makefile.in emacs-7eb2077f9dd14ae9d70a12c621151afd50ea6e96/lib-src/Makefile.in
+--- orig/lib-src/Makefile.in 2015-02-06 20:37:24.297691017 +0000
++++ src/lib-src/Makefile.in 2015-02-06 20:38:05.006592590 +0000
+@@ -414,7 +414,6 @@
+
+ update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h)
+ $(AM_V_CCLD)$(CC) ${ALL_CFLAGS} \
+- -DHAVE_SHARED_GAME_DIR="\"$(gamedir)\"" \
+ $< $(NTLIB) $(LOADLIBES) -o $@
+
+ emacsclient.res: ../nt/emacsclient.rc $(NTINC)/../icons/emacs.ico
diff --git a/testing/emacs-xorg/musl.patch b/testing/emacs-xorg/musl.patch
new file mode 100644
index 0000000000..835d3cd248
--- /dev/null
+++ b/testing/emacs-xorg/musl.patch
@@ -0,0 +1,87 @@
+--- emacs-4188e3cc2bc69e75d4387b369e72e89fecc46a86/configure.ac
++++ emacs/configure.ac
+@@ -2092,7 +2092,7 @@
+
+ system_malloc=$emacs_cv_sanitize_address
+
+-hybrid_malloc=
++hybrid_malloc=yes
+
+ case "$opsys" in
+ ## darwin ld insists on the use of malloc routines in the System framework.
+--- emacs-4188e3cc2bc69e75d4387b369e72e89fecc46a86/src/Makefile.in
++++ emacs/src/Makefile.in
+@@ -373,6 +373,7 @@
+ region-cache.o sound.o atimer.o \
+ doprnt.o intervals.o textprop.o composite.o xml.o $(NOTIFY_OBJ) \
+ profiler.o decompress.o \
++ sheap.o \
+ $(MSDOS_OBJ) $(MSDOS_X_OBJ) $(NS_OBJ) $(CYGWIN_OBJ) $(FONT_OBJ) \
+ $(W32_OBJ) $(WINDOW_SYSTEM_OBJ) $(XGSELOBJ)
+ obj = $(base_obj) $(NS_OBJC_OBJ)
+--- emacs-4188e3cc2bc69e75d4387b369e72e89fecc46a86/src/gmalloc.c
++++ emacs/src/gmalloc.c
+@@ -72,7 +72,7 @@
+ #define free gfree
+ #endif /* HYBRID_MALLOC */
+
+-#ifdef CYGWIN
++//#ifdef CYGWIN
+ extern void *bss_sbrk (ptrdiff_t size);
+ extern int bss_sbrk_did_unexec;
+ extern char bss_sbrk_buffer[];
+@@ -80,7 +80,7 @@
+ #define DUMPED bss_sbrk_did_unexec
+ #define ALLOCATED_BEFORE_DUMPING(P) \
+ ((P) < bss_sbrk_buffer_end && (P) >= (void *) bss_sbrk_buffer)
+-#endif
++//#endif
+
+ #ifdef __cplusplus
+ extern "C"
+@@ -1525,16 +1525,19 @@
+ __default_morecore (ptrdiff_t increment)
+ {
+ void *result;
+-#if defined (CYGWIN)
++//#if defined (CYGWIN)
+ if (!DUMPED)
+ {
+ return bss_sbrk (increment);
+ }
+-#endif
++//#endif
++#if 0
+ result = (void *) __sbrk (increment);
+ if (result == (void *) -1)
+ return NULL;
+ return result;
++#endif
++ return NULL;
+ }
+ /* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
+
+--- emacs-4188e3cc2bc69e75d4387b369e72e89fecc46a86/src/print.c
++++ emacs/src/print.c
+@@ -755,7 +755,7 @@
+ print_output_debug_flag = x;
+ }
+
+-#if defined (GNU_LINUX)
++#if defined (GNU_LINUX) && defined (__GLIBC__)
+
+ /* This functionality is not vitally important in general, so we rely on
+ non-portable ability to use stderr as lvalue. */
+--- emacs-4188e3cc2bc69e75d4387b369e72e89fecc46a86/src/unexelf.c
++++ emacs/src/unexelf.c
+@@ -632,6 +632,9 @@
+ off_t new_file_size;
+ void *new_break;
+
++ extern int bss_sbrk_did_unexec;
++ bss_sbrk_did_unexec = 1;
++
+ /* Pointers to the base of the image of the two files. */
+ caddr_t old_base, new_base;
+
+
diff --git a/testing/emacs-xorg/noaslr-dump.patch b/testing/emacs-xorg/noaslr-dump.patch
new file mode 100644
index 0000000000..b3baa4e5a3
--- /dev/null
+++ b/testing/emacs-xorg/noaslr-dump.patch
@@ -0,0 +1,19 @@
+diff -urw orig/src/Makefile.in src/src/Makefile.in
+--- orig/src/Makefile.in 2015-02-09 14:14:38.576648826 +0000
++++ src/src/Makefile.in 2015-02-09 14:15:11.662322918 +0000
+@@ -455,6 +455,7 @@
+ ifeq ($(CANNOT_DUMP),yes)
+ ln -f temacs$(EXEEXT) $@
+ else
++ paxctl -rC temacs$(EXEEXT)
+ LC_ALL=C $(RUN_TEMACS) -batch -l loadup dump
+ $(PAXCTL_if_present) -zex $@
+ ln -f $@ bootstrap-emacs$(EXEEXT)
+@@ -659,6 +660,7 @@
+ ifeq ($(CANNOT_DUMP),yes)
+ ln -f temacs$(EXEEXT) $@
+ else
++ paxctl -rC temacs$(EXEEXT)
+ $(RUN_TEMACS) --batch --load loadup bootstrap
+ $(PAXCTL_if_present) -zex emacs$(EXEEXT)
+ mv -f emacs$(EXEEXT) $@