summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2011-12-19 07:38:20 +0000
committerUlrich Müller <ulm@gentoo.org>2011-12-19 07:38:20 +0000
commit3c836065fb004dd1f61d9316ce9986d07e14ccfd (patch)
treeda71d0b3839618272ea92bca7e996daed6ec5762 /app-editors
parentVersion Bump (diff)
downloadgentoo-2-3c836065fb004dd1f61d9316ce9986d07e14ccfd.tar.gz
gentoo-2-3c836065fb004dd1f61d9316ce9986d07e14ccfd.tar.bz2
gentoo-2-3c836065fb004dd1f61d9316ce9986d07e14ccfd.zip
Fix linking failure on amd64, bug 395223. Respect LDFLAGS. Move binaries from /usr/share to /usr/libexec. Move GNU Info files to /usr/share/info. Don't install C source files in etc.
(Portage version: 2.1.10.41/cvs/Linux x86_64)
Diffstat (limited to 'app-editors')
-rw-r--r--app-editors/emacs/ChangeLog9
-rw-r--r--app-editors/emacs/emacs-18.59-r7.ebuild145
2 files changed, 153 insertions, 1 deletions
diff --git a/app-editors/emacs/ChangeLog b/app-editors/emacs/ChangeLog
index 24f08411512c..9d513506e9e5 100644
--- a/app-editors/emacs/ChangeLog
+++ b/app-editors/emacs/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-editors/emacs
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.445 2011/12/14 18:31:35 grobian Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/ChangeLog,v 1.446 2011/12/19 07:38:20 ulm Exp $
+
+*emacs-18.59-r7 (19 Dec 2011)
+
+ 19 Dec 2011; Ulrich Mueller <ulm@gentoo.org> +emacs-18.59-r7.ebuild:
+ Fix linking failure on amd64, bug 395223. Respect LDFLAGS. Move binaries
+ from /usr/share to /usr/libexec. Move GNU Info files to /usr/share/info.
+ Don't install C source files in etc.
14 Dec 2011; Fabian Groffen <grobian@gentoo.org> emacs-23.3-r3.ebuild:
Fix out-of-prefix issue due to locallisppath, thanks MATSUI Tetsushi in bug
diff --git a/app-editors/emacs/emacs-18.59-r7.ebuild b/app-editors/emacs/emacs-18.59-r7.ebuild
new file mode 100644
index 000000000000..7436e691b786
--- /dev/null
+++ b/app-editors/emacs/emacs-18.59-r7.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-editors/emacs/emacs-18.59-r7.ebuild,v 1.1 2011/12/19 07:38:20 ulm Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs flag-o-matic multilib
+
+DESCRIPTION="The extensible self-documenting text editor"
+HOMEPAGE="http://www.gnu.org/software/emacs/"
+SRC_URI="mirror://gnu/old-gnu/emacs/${P}.tar.gz
+ ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz
+ mirror://gentoo/${P}-patches-5.tar.bz2"
+
+LICENSE="GPL-1 GPL-2 BSD" #as-is
+SLOT="18"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="sys-libs/ncurses
+ >=app-admin/eselect-emacs-1.2
+ amd64? ( app-emulation/emul-linux-x86-baselibs )"
+# X? ( x11-libs/libX11[-xcb] )
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${WORKDIR}/${P}-linux22x-elf-glibc21.diff"
+ EPATCH_SUFFIX=patch epatch
+}
+
+src_configure() {
+ # autoconf? What's autoconf? We are living in 1992. ;-)
+ local arch
+ case ${ARCH} in
+ amd64) arch=intel386; multilib_toolchain_setup x86 ;;
+ x86) arch=intel386 ;;
+ *) die "Architecture ${arch} not supported" ;;
+ esac
+ local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/"
+ #use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/"
+ sed -e "${cmd}" src/config.h-dist >src/config.h
+
+ cat <<-END >src/paths.h
+ #define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp"
+ #define PATH_EXEC "/usr/share/emacs/${PV}/etc"
+ #define PATH_LOCK "/var/lib/emacs/lock/"
+ #define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!"
+ END
+
+ sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \
+ src/s-linux.h || die
+
+ # -O3 and -finline-functions cause segmentation faults at run time.
+ filter-flags -finline-functions
+ replace-flags -O[3-9] -O2
+ strip-flags
+}
+
+src_compile() {
+ # Do not use the sandbox, or the dumped Emacs will be twice as large
+ export SANDBOX_ON=0
+ emake --jobs=1 CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" etc
+ emake --jobs=1 \
+ CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \
+ LD="$(tc-getCC)" LDFLAGS="-nostdlib ${LDFLAGS}"
+}
+
+src_install() {
+ local basedir="/usr/share/emacs/${PV}" i
+
+ dodir ${basedir}
+ dodir /usr/share/man/man1
+ emake --jobs=1 \
+ LIBDIR="${D}"${basedir} \
+ BINDIR="${D}"/usr/bin \
+ MANDIR="${D}"/usr/share/man/man1 \
+ install
+
+ rmdir "${D}"${basedir}/lock || die
+ find "${D}"${basedir} -type f \
+ \( -name ChangeLog -o -name COPYING -o -name "*.c" \) \
+ -exec rm "{}" + || die
+ fperms -R go-w ${basedir}
+
+ # move executables to the correct place
+ mv "${D}"/usr/bin/emacs{,-${SLOT}} || die
+ for i in etags ctags emacsclient; do
+ mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die
+ rm "${D}"${basedir}/etc/${i} || die
+ done
+
+ dodir /usr/libexec/emacs/${PV}/${CHOST}
+ for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \
+ yow env server
+ do
+ mv "${D}"${basedir}/etc/${i} \
+ "${D}"/usr/libexec/emacs/${PV}/${CHOST}/${i} || die
+ dosym ../../../../libexec/emacs/${PV}/${CHOST}/${i} ${basedir}/etc/${i}
+ done
+ for i in test-distrib make-docfile; do
+ rm "${D}"${basedir}/etc/${i} || die
+ done
+
+ # move man page
+ mv "${D}"/usr/share/man/man1/emacs{,-emacs-${SLOT}}.1 || die
+
+ # move Info files
+ dodir /usr/share/info
+ mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die
+ dosym ../../info/emacs-${SLOT} "${basedir}"/info
+ docompress -x /usr/share/info
+
+ # move Info dir to avoid collisions with the dir file generated by portage
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die
+ touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir
+
+ dodir /var/lib/emacs
+ diropts -m0777
+ keepdir /var/lib/emacs/lock
+
+ dodoc README PROBLEMS
+}
+
+pkg_preinst() {
+ # move Info dir file to correct name
+ mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die
+
+ # remove symlink and directory installed by -r6 and earlier
+ if [[ -L "${ROOT}"/usr/share/info/emacs-${SLOT} ]]; then
+ ewarn "Removing old symlink /usr/share/info/emacs-${SLOT}"
+ rm "${ROOT}"/usr/share/info/emacs-${SLOT} || die
+ fi
+ if [[ -d "${ROOT}"/usr/share/emacs/${PV}/info ]]; then
+ ewarn "Removing old directory /usr/share/emacs/${PV}/info"
+ rm -r "${ROOT}"/usr/share/emacs/${PV}/info || die
+ fi
+}
+
+pkg_postinst() {
+ eselect emacs update ifunset
+}
+
+pkg_postrm() {
+ eselect emacs update ifunset
+}