summaryrefslogtreecommitdiff
path: root/~lukeshu
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-07-29 18:17:33 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-07-29 18:17:33 -0400
commit126d73453c3a886c58a627517f9f796f5a8123c9 (patch)
tree6615357ccd36eb346046b946bb4f14c7331329ca /~lukeshu
parent02c2ba4478fda77b3f2363434774d455b240d984 (diff)
downloadabslibre-126d73453c3a886c58a627517f9f796f5a8123c9.tar.gz
abslibre-126d73453c3a886c58a627517f9f796f5a8123c9.tar.bz2
abslibre-126d73453c3a886c58a627517f9f796f5a8123c9.zip
add ~lukeshu/emacs-lucid
Diffstat (limited to '~lukeshu')
-rw-r--r--~lukeshu/emacs-lucid/PKGBUILD53
-rw-r--r--~lukeshu/emacs-lucid/emacs.install32
-rw-r--r--~lukeshu/emacs-lucid/gnulib.patch105
3 files changed, 190 insertions, 0 deletions
diff --git a/~lukeshu/emacs-lucid/PKGBUILD b/~lukeshu/emacs-lucid/PKGBUILD
new file mode 100644
index 000000000..af8e755c4
--- /dev/null
+++ b/~lukeshu/emacs-lucid/PKGBUILD
@@ -0,0 +1,53 @@
+# $Id: PKGBUILD 161437 2012-06-11 15:10:57Z juergen $
+# Maintainer: Juergen Hoetzel <juergen@archlinux.org>
+# Contributor: Renchi Raju <renchi@green.tam.uiuc.edu>
+
+_pkgname=emacs
+pkgname=emacs-lucid
+pkgver=24.1
+pkgrel=2
+pkgdesc="emacs, with the lucid toolkit rather than GTK2"
+
+provides=("$_pkgname=$pkgver")
+conflicts=("$_pkgname")
+
+arch=('i686' 'x86_64')
+url="http://www.gnu.org/software/emacs/emacs.html"
+license=('GPL3')
+depends=('librsvg' 'gpm' 'giflib' 'libxpm' 'gtk-update-icon-cache' 'libxaw' 'hicolor-icon-theme' 'gconf' 'desktop-file-utils' 'alsa-lib' 'imagemagick')
+install=emacs.install
+source=(ftp://ftp.gnu.org/gnu/emacs/$_pkgname-$pkgver.tar.bz2{,.sig} gnulib.patch)
+
+build() {
+ cd "$srcdir"/$_pkgname-$pkgver
+
+ # This is from Gentoo, to deal with a newer version of gnulib
+ patch -p1 -i "$srcdir/gnulib.patch"
+ # This is to deal with a newer version of autoconf
+ autoreconf -i -I m4
+
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
+ --localstatedir=/var --with-x-toolkit=lucid --with-xft
+ make
+}
+
+package() {
+ cd "$srcdir"/$_pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+
+ # remove conflict with ctags package
+ mv "$pkgdir"/usr/bin/{ctags,ctags.emacs}
+ mv "$pkgdir"/usr/share/man/man1/{ctags.1.gz,ctags.emacs.1}
+ # fix all the 777 perms on directories
+ find "$pkgdir"/usr/share/emacs -type d -exec chmod 755 {} \;
+ # fix user/root permissions on usr/share files
+ find "$pkgdir"/usr/share/emacs -exec chown root:root {} \;
+ # 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=('8ba0932c498bc8fb10d7ddba52227e5b'
+ 'c303d5c0bd0f7ea28acd14c9738faff4'
+ 'f9192850960902d90504150f08be4a81')
diff --git a/~lukeshu/emacs-lucid/emacs.install b/~lukeshu/emacs-lucid/emacs.install
new file mode 100644
index 000000000..d84f1de14
--- /dev/null
+++ b/~lukeshu/emacs-lucid/emacs.install
@@ -0,0 +1,32 @@
+ICON_PATH=usr/share/icons/hicolor
+INFO_DIR=usr/share/info
+
+INFO_FILES=(ada-mode auth autotype calc ccmode cl dbus dired-x ebrowse
+ede ediff edt efaq eieio eintr elisp emacs emacs-mime epa erc eshell eudc flymake
+forms gnus idlwave info mairix-el message mh-e newsticker nxml-mode
+org pcl-cvs pgg rcirc reftex remember sasl sc semantic ses sieve smtpmail
+speedbar tramp url vip viper widget woman)
+
+post_install() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+pre_remove() {
+ gtk-update-icon-cache -q -t -f ${ICON_PATH}
+ update-desktop-database -q
+
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${INFO_FILES[@]}; do
+ install-info --delete ${INFO_DIR}/$f.gz ${INFO_DIR}/dir 2> /dev/null
+ done
+}
diff --git a/~lukeshu/emacs-lucid/gnulib.patch b/~lukeshu/emacs-lucid/gnulib.patch
new file mode 100644
index 000000000..2fd685c80
--- /dev/null
+++ b/~lukeshu/emacs-lucid/gnulib.patch
@@ -0,0 +1,105 @@
+Fix compilation with glibc-2.16.
+https://bugs.gentoo.org/424755
+
+Patch backported from gnulib upstream:
+
+From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
+From: Eric Blake <eblake@redhat.com>
+Date: Thu, 29 Mar 2012 13:30:41 -0600
+Subject: [PATCH 1/1] stdio: don't assume gets any more
+
+Gnulib intentionally does not have a gets module, and now that C11
+and glibc have dropped it, we should be more proactive about warning
+any user on a platform that still has a declaration of this dangerous
+interface.
+
+--- emacs-24.1-orig/lib/gnulib.mk
++++ emacs-24.1/lib/gnulib.mk
+@@ -599,7 +624,6 @@
+ -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \
+ -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \
+ -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \
+- -e 's/@''GNULIB_GETS''@/$(GNULIB_GETS)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \
+ -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \
+ -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \
+--- emacs-24.1-orig/lib/stdio.in.h
++++ emacs-24.1/lib/stdio.in.h
+@@ -699,22 +699,11 @@
+ # endif
+ #endif
+
+-#if @GNULIB_GETS@
+-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@
+-# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+-# undef gets
+-# define gets rpl_gets
+-# endif
+-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1)));
+-_GL_CXXALIAS_RPL (gets, char *, (char *s));
+-# else
+-_GL_CXXALIAS_SYS (gets, char *, (char *s));
+-# undef gets
+-# endif
+-_GL_CXXALIASWARN (gets);
+ /* It is very rare that the developer ever has full control of stdin,
+- so any use of gets warrants an unconditional warning. Assume it is
+- always declared, since it is required by C89. */
++ so any use of gets warrants an unconditional warning; besides, C11
++ removed it. */
++#undef gets
++#if HAVE_RAW_DECL_GETS
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+ #endif
+
+@@ -1054,9 +1043,9 @@
+ # endif
+ #endif
+
+-/* Some people would argue that sprintf should be handled like gets
+- (for example, OpenBSD issues a link warning for both functions),
+- since both can cause security holes due to buffer overruns.
++/* Some people would argue that all sprintf uses should be warned about
++ (for example, OpenBSD issues a link warning for it),
++ since it can cause security holes due to buffer overruns.
+ However, we believe that sprintf can be used safely, and is more
+ efficient than snprintf in those safe cases; and as proof of our
+ belief, we use sprintf in several gnulib modules. So this header
+--- emacs-24.1-orig/m4/stdio_h.m4
++++ emacs-24.1/m4/stdio_h.m4
+@@ -1,4 +1,4 @@
+-# stdio_h.m4 serial 40
++# stdio_h.m4 serial 41
+ dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
+ dnl This file is free software; the Free Software Foundation
+ dnl gives unlimited permission to copy and/or distribute it,
+@@ -18,7 +18,6 @@
+ GNULIB_GETC=1
+ GNULIB_GETCHAR=1
+ GNULIB_FGETS=1
+- GNULIB_GETS=1
+ GNULIB_FREAD=1
+ dnl This ifdef is necessary to avoid an error "missing file lib/stdio-read.c"
+ dnl "expected source file, required through AC_LIBSOURCES, not found". It is
+@@ -72,10 +71,10 @@
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+- dnl guaranteed by C89.
++ dnl guaranteed by both C89 and C11.
+ gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+- ]], [dprintf fpurge fseeko ftello getdelim getline pclose popen renameat
+- snprintf tmpfile vdprintf vsnprintf])
++ ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen
++ renameat snprintf tmpfile vdprintf vsnprintf])
+ ])
+
+ AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+@@ -113,7 +112,6 @@
+ GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR])
+ GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
+ GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+- GNULIB_GETS=0; AC_SUBST([GNULIB_GETS])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE])