Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/emacs:master commit in: app-editors/emacs/
Date: Wed, 02 Oct 2013 18:57:00
Message-Id: 1380740180.4f0c087c8fcc877346e0b701bc659904dda2536e.ulm@gentoo
1 commit: 4f0c087c8fcc877346e0b701bc659904dda2536e
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Wed Oct 2 18:56:20 2013 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Wed Oct 2 18:56:20 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/emacs.git;a=commit;h=4f0c087c
7
8 Copied from Portage tree. Bump ebuild to EAPI 5. Depend on multilib-enabled ncurses on amd64.
9
10 Package-Manager: portage-2.2.7
11
12 ---
13 app-editors/emacs/ChangeLog | 11 +++
14 app-editors/emacs/Manifest | 3 +
15 app-editors/emacs/emacs-18.59-r9.ebuild | 165 ++++++++++++++++++++++++++++++++
16 app-editors/emacs/metadata.xml | 5 +
17 4 files changed, 184 insertions(+)
18
19 diff --git a/app-editors/emacs/ChangeLog b/app-editors/emacs/ChangeLog
20 new file mode 100644
21 index 0000000..53af279
22 --- /dev/null
23 +++ b/app-editors/emacs/ChangeLog
24 @@ -0,0 +1,11 @@
25 +# ChangeLog for app-editors/emacs
26 +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
27 +# $Header: $
28 +
29 +*emacs-18.59-r9 (02 Oct 2013)
30 +
31 + 02 Oct 2013; Ulrich Müller <ulm@g.o> +emacs-18.59-r9.ebuild,
32 + +metadata.xml:
33 + Copied from Portage tree. Bump ebuild to EAPI 5. Depend on multilib-enabled
34 + ncurses on amd64.
35 +
36
37 diff --git a/app-editors/emacs/Manifest b/app-editors/emacs/Manifest
38 new file mode 100644
39 index 0000000..79460b2
40 --- /dev/null
41 +++ b/app-editors/emacs/Manifest
42 @@ -0,0 +1,3 @@
43 +DIST emacs-18.59-linux22x-elf-glibc21.diff.gz 15671 SHA256 fb810d893938883d50a3a8d7c43fbeb1604d5454f760b8f1f700326c8ee659dd SHA512 c6c6ea33850dadf08d68fff56fc6aacc80ad1aa36661260715d50b95438942d56e6244094427d50356cfe716f26559feb885254c436399bff7be639637d605b6 WHIRLPOOL cafaa0fb0d06058cac8e445a7a1b5cba145d23186477a9c681efdab8ca0f18a9675dec3a93851fd7138890701f83fab83300c28a548c8fc22478a0cfff95d5da
44 +DIST emacs-18.59-patches-8.tar.bz2 19667 SHA256 637542bf5ee07d4abac11b76e742598a60787f3869dbf377eed99ae005fbc59d SHA512 a6564bc16724bfdb22f77b0e21b6064ca5e0e1bc91f3223c1037c26f8a048f28ac7a5da6817dc940a5f00f1f39bbfcda2277645409cd7e143a55fabdc3d3fe5d WHIRLPOOL 6b81f978aef2b429262e79ab1d995cca9237dc9c9d98144d2dc3de07bc2cdcec8547adbaf5ad41d9cce3239554918c04c7b9ff783b7931582a3a7398eb2b66f1
45 +DIST emacs-18.59.tar.gz 2962652 SHA256 1e27e33f91984a91e9b4c1f21433f931aba03670960ecc147bb6d7b0de0f051e SHA512 03ce565e346e89b7aacb1852f4783e8907f394de7da0c543b475cb038eb89b87f980d0f7ca1841b1d2108b20f211e95113c7214e4a33e5767a1827ff43173f33 WHIRLPOOL 5e98e71518f665e2a8278afe54e0ace6d7fdd9df23ff0a3354ffc1d5cc25cd21b0dd4d82766fcb436d4f24e9291c933295e956e1ffea43cfeedf915175763be6
46
47 diff --git a/app-editors/emacs/emacs-18.59-r9.ebuild b/app-editors/emacs/emacs-18.59-r9.ebuild
48 new file mode 100644
49 index 0000000..5fdb2c4
50 --- /dev/null
51 +++ b/app-editors/emacs/emacs-18.59-r9.ebuild
52 @@ -0,0 +1,165 @@
53 +# Copyright 1999-2013 Gentoo Foundation
54 +# Distributed under the terms of the GNU General Public License v2
55 +# $Header: $
56 +
57 +EAPI=5
58 +
59 +inherit eutils toolchain-funcs flag-o-matic multilib
60 +
61 +DESCRIPTION="The extensible self-documenting text editor"
62 +HOMEPAGE="http://www.gnu.org/software/emacs/"
63 +SRC_URI="mirror://gnu/old-gnu/emacs/${P}.tar.gz
64 + ftp://ftp.splode.com/pub/users/friedman/emacs/${P}-linux22x-elf-glibc21.diff.gz
65 + mirror://gentoo/${P}-patches-8.tar.bz2"
66 +
67 +LICENSE="GPL-1+ GPL-2+ BSD" #HPND
68 +SLOT="18"
69 +KEYWORDS="~amd64 ~x86"
70 +IUSE="+abi_x86_32 abi_x86_x32"
71 +REQUIRED_USE="amd64? ( || ( abi_x86_32 abi_x86_x32 ) )"
72 +
73 +RDEPEND="sys-libs/ncurses
74 + >=app-admin/eselect-emacs-1.2
75 + amd64? (
76 + sys-libs/ncurses[abi_x86_x32(-)?]
77 + !abi_x86_x32? ( sys-libs/ncurses[abi_x86_32(-)?] )
78 + )"
79 +# X? ( x11-libs/libX11[-xcb] )
80 +DEPEND="${RDEPEND}
81 + virtual/pkgconfig"
82 +
83 +src_prepare() {
84 + epatch "${WORKDIR}/${P}-linux22x-elf-glibc21.diff"
85 + EPATCH_SUFFIX=patch epatch
86 + epatch_user
87 +}
88 +
89 +src_configure() {
90 + # autoconf? What's autoconf? We are living in 1992. ;-)
91 + local arch
92 + case ${ARCH} in
93 + amd64)
94 + if use abi_x86_x32; then
95 + arch=x86-x32
96 + multilib_toolchain_setup x32
97 + elif use abi_x86_32; then
98 + arch=intel386
99 + multilib_toolchain_setup x86
100 + else
101 + die "Need 32 bit ABI on amd64"
102 + fi
103 + ;;
104 + x86) arch=intel386 ;;
105 + *) die "Architecture ${ARCH} not yet supported" ;;
106 + esac
107 + local cmd="s/\"s-.*\.h\"/\"s-linux.h\"/;s/\"m-.*\.h\"/\"m-${arch}.h\"/"
108 + #use X && cmd="${cmd};s/.*\(#define HAVE_X_WINDOWS\).*/\1/"
109 + sed -e "${cmd}" src/config.h-dist >src/config.h || die
110 +
111 + cat <<-END >src/paths.h
112 + #define PATH_LOADSEARCH "/usr/share/emacs/${PV}/lisp"
113 + #define PATH_EXEC "/usr/share/emacs/${PV}/etc"
114 + #define PATH_LOCK "/var/lib/emacs/lock/"
115 + #define PATH_SUPERLOCK "/var/lib/emacs/lock/!!!SuperLock!!!"
116 + END
117 +
118 + sed -i -e "s:/usr/lib/\([^ ]*\).o:/usr/$(get_libdir)/\1.o:g" \
119 + -e "s:-lncurses:$("$(tc-getPKG_CONFIG)" --libs ncurses):" \
120 + src/s-linux.h || die
121 +
122 + # -O3 and -finline-functions cause segmentation faults at run time.
123 + filter-flags -finline-functions
124 + replace-flags -O[3-9] -O2
125 + strip-flags
126 +}
127 +
128 +src_compile() {
129 + # Do not use the sandbox, or the dumped Emacs will be twice as large
130 + export SANDBOX_ON=0
131 + emake --jobs=1 \
132 + CC="$(tc-getCC)" CFLAGS="${CFLAGS} -Demacs" \
133 + LD="$(tc-getCC) -nostdlib" LDFLAGS="${LDFLAGS}"
134 +}
135 +
136 +src_install() {
137 + local basedir="/usr/share/emacs/${PV}" i
138 +
139 + dodir ${basedir}
140 + dodir /usr/share/man/man1
141 + emake --jobs=1 \
142 + LIBDIR="${D}"${basedir} \
143 + BINDIR="${D}"/usr/bin \
144 + MANDIR="${D}"/usr/share/man/man1 \
145 + install
146 +
147 + rmdir "${D}"${basedir}/lock || die
148 + find "${D}"${basedir} -type f \( -name "*.c" -o -name ChangeLog \
149 + -o -name COPYING ! -path "*/etc/COPYING" \) -exec rm "{}" + || die
150 + fperms -R go-w ${basedir}
151 +
152 + # remove duplicate DOC file
153 + rm "${D}"${basedir}/etc/DOC || die
154 +
155 + # move executables to the correct place
156 + mv "${D}"/usr/bin/emacs{,-${SLOT}} || die
157 + for i in etags ctags emacsclient; do
158 + mv "${D}"/usr/bin/${i}{,-emacs-${SLOT}} || die
159 + rm "${D}"${basedir}/etc/${i} || die
160 + done
161 +
162 + dodir /usr/libexec/emacs/${PV}
163 + for i in wakeup digest-doc sorted-doc movemail cvtmail fakemail \
164 + yow env server
165 + do
166 + mv "${D}"${basedir}/etc/${i} "${D}"/usr/libexec/emacs/${PV}/${i} || die
167 + dosym ../../../../libexec/emacs/${PV}/${i} ${basedir}/etc/${i}
168 + done
169 + for i in test-distrib make-docfile; do
170 + rm "${D}"${basedir}/etc/${i} || die
171 + done
172 +
173 + # move man page
174 + mv "${D}"/usr/share/man/man1/emacs{,-emacs-${SLOT}}.1 || die
175 +
176 + # move Info files
177 + dodir /usr/share/info
178 + mv "${D}"${basedir}/info "${D}"/usr/share/info/emacs-${SLOT} || die
179 + dosym ../../info/emacs-${SLOT} "${basedir}"/info
180 + docompress -x /usr/share/info
181 +
182 + # move Info dir to avoid collisions with the dir file generated by portage
183 + mv "${D}"/usr/share/info/emacs-${SLOT}/dir{,.orig} || die
184 + touch "${D}"/usr/share/info/emacs-${SLOT}/.keepinfodir
185 +
186 + dodir /var/lib/emacs
187 + diropts -m0777
188 + keepdir /var/lib/emacs/lock
189 +
190 + dodoc README PROBLEMS
191 +}
192 +
193 +pkg_preinst() {
194 + # move Info dir file to correct name
195 + if [[ -d "${D}"/usr/share/info ]]; then
196 + mv "${D}"/usr/share/info/emacs-${SLOT}/dir{.orig,} || die
197 + fi
198 +
199 + # remove symlink and directory installed by -r6 and earlier
200 + if [[ -L "${ROOT}"/usr/share/info/emacs-${SLOT} ]]; then
201 + ewarn "Removing old symlink /usr/share/info/emacs-${SLOT}"
202 + rm "${ROOT}"/usr/share/info/emacs-${SLOT} || die
203 + fi
204 + if [[ -d "${ROOT}"/usr/share/emacs/${PV}/info \
205 + && ! -L "${ROOT}"/usr/share/emacs/${PV}/info ]]; then
206 + ewarn "Removing old directory /usr/share/emacs/${PV}/info"
207 + rm -r "${ROOT}"/usr/share/emacs/${PV}/info || die
208 + fi
209 +}
210 +
211 +pkg_postinst() {
212 + eselect emacs update ifunset
213 +}
214 +
215 +pkg_postrm() {
216 + eselect emacs update ifunset
217 +}
218
219 diff --git a/app-editors/emacs/metadata.xml b/app-editors/emacs/metadata.xml
220 new file mode 100644
221 index 0000000..bc306fe
222 --- /dev/null
223 +++ b/app-editors/emacs/metadata.xml
224 @@ -0,0 +1,5 @@
225 +<?xml version="1.0" encoding="UTF-8"?>
226 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
227 +<pkgmetadata>
228 +<herd>emacs</herd>
229 +</pkgmetadata>