1 |
commit: f477575082960a9612844415a2a7fdf7cac8c4ce |
2 |
Author: Mats Lidell <matsl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Oct 8 11:52:22 2015 +0000 |
4 |
Commit: Mats Lidell <matsl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Oct 8 11:52:22 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f4775750 |
7 |
|
8 |
app-editors/xemacs: Apply upstream patch for gcc5. |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
app-editors/xemacs/files/xemacs-21.5.34-gcc5.patch | 35 +++ |
13 |
app-editors/xemacs/xemacs-21.5.34-r4.ebuild | 252 +++++++++++++++++++++ |
14 |
2 files changed, 287 insertions(+) |
15 |
|
16 |
diff --git a/app-editors/xemacs/files/xemacs-21.5.34-gcc5.patch b/app-editors/xemacs/files/xemacs-21.5.34-gcc5.patch |
17 |
new file mode 100644 |
18 |
index 0000000..025a390 |
19 |
--- /dev/null |
20 |
+++ b/app-editors/xemacs/files/xemacs-21.5.34-gcc5.patch |
21 |
@@ -0,0 +1,35 @@ |
22 |
+diff --git a/src/lisp.h b/src/lisp.h |
23 |
+--- a/src/lisp.h |
24 |
++++ b/src/lisp.h |
25 |
+@@ -1154,6 +1154,8 @@ |
26 |
+ |
27 |
+ /* ------------------------ alignment definitions ------------------- */ |
28 |
+ |
29 |
++#if (!defined (__STDC_VERSION__) || __STDC_VERSION__ < 201112L) && \ |
30 |
++ (!defined (__cplusplus) || __cplusplus < 201103L) |
31 |
+ /* No type has a greater alignment requirement than max_align_t. |
32 |
+ (except perhaps for types we don't use, like long double) */ |
33 |
+ typedef union |
34 |
+@@ -1163,6 +1165,7 @@ |
35 |
+ struct { void (*f)(void); } f; |
36 |
+ struct { double d; } d; |
37 |
+ } max_align_t; |
38 |
++#endif |
39 |
+ |
40 |
+ /* ALIGNOF returns the required alignment of a type -- i.e. a value such |
41 |
+ that data of this type must begin at a memory address which is a |
42 |
+@@ -1170,7 +1173,11 @@ |
43 |
+ as the type itself. */ |
44 |
+ |
45 |
+ #ifndef ALIGNOF |
46 |
+-# if defined (__GNUC__) && (__GNUC__ >= 2) |
47 |
++# if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L |
48 |
++# define ALIGNOF(type) _Alignof(type) |
49 |
++# elif defined (__cplusplus) && __cplusplus >= 201103L |
50 |
++# define ALIGNOF(type) alignof(type) |
51 |
++# elif defined (__GNUC__) && (__GNUC__ >= 2) |
52 |
+ /* gcc has an extension that gives us exactly what we want. */ |
53 |
+ # define ALIGNOF(type) __alignof__ (type) |
54 |
+ # elif ! defined (__cplusplus) |
55 |
+ |
56 |
+ |
57 |
|
58 |
diff --git a/app-editors/xemacs/xemacs-21.5.34-r4.ebuild b/app-editors/xemacs/xemacs-21.5.34-r4.ebuild |
59 |
new file mode 100644 |
60 |
index 0000000..4756c65 |
61 |
--- /dev/null |
62 |
+++ b/app-editors/xemacs/xemacs-21.5.34-r4.ebuild |
63 |
@@ -0,0 +1,252 @@ |
64 |
+# Copyright 1999-2015 Gentoo Foundation |
65 |
+# Distributed under the terms of the GNU General Public License v2 |
66 |
+# $Id$ |
67 |
+ |
68 |
+# Note: xemacs currently does not work with a hardened profile. If you |
69 |
+# want to use xemacs on a hardened profile then compile with the |
70 |
+# -nopie flag in CFLAGS or help fix bug #75028. |
71 |
+ |
72 |
+EAPI=4 |
73 |
+ |
74 |
+WANT_AUTOCONF="2.5" |
75 |
+inherit eutils flag-o-matic multilib |
76 |
+ |
77 |
+DESCRIPTION="highly customizable open source text editor and application development system" |
78 |
+HOMEPAGE="http://www.xemacs.org/" |
79 |
+SRC_URI="http://ftp.xemacs.org/xemacs-21.5/${P}.tar.gz |
80 |
+ http://www.malfunction.de/afterstep/files/NeXT_XEmacs.tar.gz" |
81 |
+ |
82 |
+LICENSE="GPL-3+" |
83 |
+SLOT="0" |
84 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd" |
85 |
+IUSE="alsa debug eolconv gif gpm pop postgres ldap libressl xface nas dnd X jpeg tiff png mule motif freewnn canna xft xim athena neXt Xaw3d gdbm berkdb" |
86 |
+ |
87 |
+X_DEPEND="x11-libs/libXt x11-libs/libXmu x11-libs/libXext x11-misc/xbitmaps" |
88 |
+ |
89 |
+RDEPEND=" |
90 |
+ berkdb? ( >=sys-libs/db-4 !!<sys-libs/db-4 ) |
91 |
+ gdbm? ( >=sys-libs/gdbm-1.8.3[berkdb(+)] ) |
92 |
+ >=sys-libs/zlib-1.1.4 |
93 |
+ !libressl? ( >=dev-libs/openssl-0.9.6:0 ) |
94 |
+ libressl? ( dev-libs/libressl ) |
95 |
+ >=media-libs/audiofile-0.2.3 |
96 |
+ gpm? ( >=sys-libs/gpm-1.19.6 ) |
97 |
+ postgres? ( dev-db/postgresql ) |
98 |
+ ldap? ( net-nds/openldap ) |
99 |
+ alsa? ( media-libs/alsa-lib ) |
100 |
+ nas? ( media-libs/nas ) |
101 |
+ X? ( $X_DEPEND !Xaw3d? ( !neXt? ( x11-libs/libXaw ) ) ) |
102 |
+ dnd? ( x11-libs/dnd ) |
103 |
+ motif? ( >=x11-libs/motif-2.3:0[xft=] ) |
104 |
+ athena? ( x11-libs/libXaw ) |
105 |
+ Xaw3d? ( x11-libs/libXaw3d ) |
106 |
+ xft? ( media-libs/freetype:2 x11-libs/libXft x11-libs/libXrender >=media-libs/fontconfig-2.5.0 ) |
107 |
+ neXt? ( x11-libs/neXtaw ) |
108 |
+ xface? ( media-libs/compface ) |
109 |
+ tiff? ( media-libs/tiff:0 ) |
110 |
+ png? ( >=media-libs/libpng-1.2:0 ) |
111 |
+ jpeg? ( virtual/jpeg:0 ) |
112 |
+ canna? ( app-i18n/canna ) |
113 |
+ freewnn? ( app-i18n/freewnn ) |
114 |
+ >=sys-libs/ncurses-5.2 |
115 |
+ >=app-eselect/eselect-emacs-1.15" |
116 |
+ |
117 |
+DEPEND="${RDEPEND} |
118 |
+ virtual/pkgconfig" |
119 |
+ |
120 |
+PDEPEND="app-xemacs/xemacs-base |
121 |
+ mule? ( app-xemacs/mule-base )" |
122 |
+ |
123 |
+src_unpack() { |
124 |
+ default_src_unpack |
125 |
+ |
126 |
+ use neXt && unpack NeXT_XEmacs.tar.gz |
127 |
+} |
128 |
+ |
129 |
+src_prepare() { |
130 |
+ use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* "${S}"/etc/toolbar/ |
131 |
+ find "${S}"/lisp -name '*.elc' -exec rm {} \; || die |
132 |
+ epatch "${FILESDIR}/${P}-ncurses-tinfo.patch" |
133 |
+ epatch "${FILESDIR}/${P}-gcc5.patch" |
134 |
+ |
135 |
+ # Some binaries and man pages are installed under suffixed names |
136 |
+ # to avoid collions with their GNU Emacs counterparts (see below). |
137 |
+ # Fix internal filename references. |
138 |
+ sed -i -e 's/exec gnuclient/&-xemacs/' lib-src/gnudoit || die |
139 |
+ sed -i -e '/^\.so/s/etags/&-xemacs/' etc/ctags.1 || die |
140 |
+ sed -i -e '/^\.so/s/gnuserv/&-xemacs/' etc/gnu{client,doit,attach}.1 || die |
141 |
+} |
142 |
+ |
143 |
+src_configure() { |
144 |
+ local myconf="" |
145 |
+ |
146 |
+ if use X; then |
147 |
+ |
148 |
+ myconf="${myconf} --with-widgets=athena" |
149 |
+ myconf="${myconf} --with-dialogs=athena" |
150 |
+ myconf="${myconf} --with-menubars=lucid" |
151 |
+ myconf="${myconf} --with-scrollbars=lucid" |
152 |
+ if use motif ; then |
153 |
+ myconf="--with-widgets=motif" |
154 |
+ myconf="${myconf} --with-dialogs=motif" |
155 |
+ myconf="${myconf} --with-scrollbars=motif" |
156 |
+ myconf="${myconf} --with-menubars=lucid" |
157 |
+ fi |
158 |
+ if use athena or use Xaw3d ; then |
159 |
+ myconf="--with-scrollbars=athena" |
160 |
+ fi |
161 |
+ |
162 |
+ if use Xaw3d; then |
163 |
+ myconf="${myconf} --with-athena=3d" |
164 |
+ elif use neXt; then |
165 |
+ myconf="${myconf} --with-athena=next" |
166 |
+ else |
167 |
+ myconf="${myconf} --with-athena=xaw" |
168 |
+ fi |
169 |
+ |
170 |
+ use dnd && myconf="${myconf} --with-dragndrop --with-offix" |
171 |
+ |
172 |
+ myconf="${myconf} $(use_with tiff )" |
173 |
+ myconf="${myconf} $(use_with png )" |
174 |
+ myconf="${myconf} $(use_with jpeg )" |
175 |
+ myconf="${myconf} $(use_with xface )" |
176 |
+ |
177 |
+ use xft && myconf="${myconf} --with-xft=emacs,tabs,menubars,gauges" || |
178 |
+ myconf="${myconf} --with-xft=no" |
179 |
+ |
180 |
+ else |
181 |
+ myconf="${myconf} |
182 |
+ --without-x |
183 |
+ --without-xpm |
184 |
+ --without-dragndrop |
185 |
+ --with-xft=no |
186 |
+ --with-gif=no" |
187 |
+ fi |
188 |
+ |
189 |
+ if use mule ; then |
190 |
+ myconf="${myconf} --with-mule" |
191 |
+ |
192 |
+ if use xim ; then |
193 |
+ if use motif ; then |
194 |
+ myconf="${myconf} --with-xim=motif" |
195 |
+ else |
196 |
+ myconf="${myconf} --with-xim=xlib" |
197 |
+ fi |
198 |
+ else |
199 |
+ myconf="${myconf} --with-xim=no" |
200 |
+ fi |
201 |
+ |
202 |
+ myconf="${myconf} $(use_with canna )" |
203 |
+ myconf="${myconf} $(use_with freewnn wnn )" |
204 |
+ fi |
205 |
+ |
206 |
+ # This determines the type of sounds we are playing |
207 |
+ local soundconf="native" |
208 |
+ |
209 |
+ # This determines how these sounds should be played |
210 |
+ use nas && soundconf="${soundconf},nas" |
211 |
+ use alsa && soundconf="${soundconf},alsa" |
212 |
+ |
213 |
+ myconf="${myconf} --with-sound=${soundconf}" |
214 |
+ |
215 |
+ if use gdbm || use berkdb ; then |
216 |
+ use gdbm && mydb="gdbm" |
217 |
+ use berkdb && mydb="${mydb},berkdb" |
218 |
+ |
219 |
+ myconf="${myconf} --with-database=${mydb}" |
220 |
+ else |
221 |
+ myconf="${myconf} --without-database" |
222 |
+ fi |
223 |
+ |
224 |
+ use debug && myconf="${myconf} --with-debug" || |
225 |
+ myconf="${myconf} --with-optimization" |
226 |
+ |
227 |
+ econf ${myconf} \ |
228 |
+ $(use_with gif ) \ |
229 |
+ $(use_with gpm ) \ |
230 |
+ $(use_with postgres postgresql ) \ |
231 |
+ $(use_with ldap ) \ |
232 |
+ $(use_with eolconv file-coding ) \ |
233 |
+ $(use_with pop ) \ |
234 |
+ --prefix=/usr \ |
235 |
+ --with-ncurses \ |
236 |
+ --with-msw=no \ |
237 |
+ --with-mail-locking=flock \ |
238 |
+ --with-site-lisp=yes \ |
239 |
+ --with-site-modules=yes \ |
240 |
+ --with-newgc \ |
241 |
+ --enable-option-checking=no \ |
242 |
+ --with-last-packages=/usr/lib/xemacs \ |
243 |
+ || die "configuration failed" |
244 |
+} |
245 |
+ |
246 |
+src_compile() { |
247 |
+ emake EMACSLOADPATH="${S}"/lisp |
248 |
+} |
249 |
+ |
250 |
+src_install() { |
251 |
+ emake prefix="${D}"/usr \ |
252 |
+ mandir="${D}"/usr/share/man/man1 \ |
253 |
+ infodir="${D}"/usr/share/info \ |
254 |
+ libdir="${D}"/usr/$(get_libdir) \ |
255 |
+ datadir="${D}"/usr/share \ |
256 |
+ install || die |
257 |
+ |
258 |
+ # Rename some applications installed in bin so that it is clear |
259 |
+ # which application installed them and so that conflicting |
260 |
+ # packages (emacs) can't clobber the actual applications. |
261 |
+ # Addresses bug #62991. |
262 |
+ for i in b2m ctags etags gnuclient gnudoit gnuattach; do |
263 |
+ mv "${D}"/usr/bin/${i} "${D}"/usr/bin/${i}-xemacs || die "mv ${i} failed" |
264 |
+ done |
265 |
+ |
266 |
+ # rename man pages |
267 |
+ for i in ctags etags gnuserv gnuclient gnudoit gnuattach; do |
268 |
+ mv "${D}"/usr/share/man/man1/${i}{,-xemacs}.1 || die "mv ${i}.1 failed" |
269 |
+ done |
270 |
+ |
271 |
+ # install base packages directories |
272 |
+ dodir /usr/lib/xemacs/xemacs-packages/ |
273 |
+ dodir /usr/lib/xemacs/site-packages/ |
274 |
+ dodir /usr/lib/xemacs/site-modules/ |
275 |
+ dodir /usr/lib/xemacs/site-lisp/ |
276 |
+ |
277 |
+ if use mule; |
278 |
+ then |
279 |
+ dodir /usr/lib/xemacs/mule-packages |
280 |
+ fi |
281 |
+ |
282 |
+ # remove extraneous info files |
283 |
+ cd "${D}"/usr/share/info |
284 |
+ rm -f dir info.info texinfo* termcap* standards* |
285 |
+ |
286 |
+ cd "${S}" |
287 |
+ dodoc CHANGES-* ChangeLog INSTALL Installation PROBLEMS README* |
288 |
+ |
289 |
+ newicon "${S}"/etc/${PN}-icon.xpm ${PN}.xpm |
290 |
+ |
291 |
+ domenu "${FILESDIR}"/${PN}.desktop |
292 |
+} |
293 |
+ |
294 |
+pkg_postinst() { |
295 |
+ eselect emacs update ifunset |
296 |
+ eselect gnuclient update ifunset |
297 |
+ |
298 |
+ einfo "*************************************************" |
299 |
+ einfo "If you are upgrading from XEmacs 21.4 you should note the following" |
300 |
+ einfo "incompatibilities:" |
301 |
+ einfo "- Mule-UCS is no longer supported due to proper UTF-8 support in XEmacs 21.5" |
302 |
+ einfo "- The X resource class has changed from Emacs to XEmacs," |
303 |
+ einfo " settings in your .Xdefaults file should be updated accordingly." |
304 |
+ |
305 |
+ if use xft; |
306 |
+ then |
307 |
+ einfo "You have enabled Xft font support. Xft requires font names to be provided" |
308 |
+ einfo "in a different way, so you may need to adjust your .Xdefaults accordingly." |
309 |
+ fi |
310 |
+} |
311 |
+ |
312 |
+pkg_postrm() { |
313 |
+ eselect emacs update ifunset |
314 |
+ eselect gnuclient update ifunset |
315 |
+} |