Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/proj/emacs:master commit in: app-editors/emacs/
Date: Sun, 30 Aug 2020 20:09:34
Message-Id: 1598818156.e77dba87c30ea9a686700e3b6f67cc96349e78a4.ulm@gentoo
1 commit: e77dba87c30ea9a686700e3b6f67cc96349e78a4
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sun Aug 30 20:09:16 2020 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sun Aug 30 20:09:16 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/proj/emacs.git/commit/?id=e77dba87
7
8 app-editors/emacs: Sync from gentoo repository.
9
10 Package-Manager: Portage-3.0.4, Repoman-3.0.1
11 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
12
13 app-editors/emacs/emacs-24.3-r8.ebuild | 89 +++++++++++++++-------------------
14 1 file changed, 39 insertions(+), 50 deletions(-)
15
16 diff --git a/app-editors/emacs/emacs-24.3-r8.ebuild b/app-editors/emacs/emacs-24.3-r8.ebuild
17 index cc464f1..48fcc03 100644
18 --- a/app-editors/emacs/emacs-24.3-r8.ebuild
19 +++ b/app-editors/emacs/emacs-24.3-r8.ebuild
20 @@ -1,9 +1,9 @@
21 -# Copyright 1999-2019 Gentoo Authors
22 +# Copyright 1999-2020 Gentoo Authors
23 # Distributed under the terms of the GNU General Public License v2
24
25 EAPI=7
26
27 -inherit autotools elisp-common eutils flag-o-matic multilib readme.gentoo-r1
28 +inherit autotools elisp-common flag-o-matic readme.gentoo-r1
29
30 DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
31 HOMEPAGE="https://www.gnu.org/software/emacs/"
32 @@ -15,14 +15,12 @@ SRC_URI="mirror://gnu/emacs/${P}.tar.xz
33
34 LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
35 SLOT="24.3"
36 -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
37 -IUSE="alsa aqua athena dbus gconf gif gpm gsettings gtk gtk2 gzip-el imagemagick jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int X Xaw3d xft +xpm"
38 -REQUIRED_USE="?? ( aqua X )"
39 +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
40 +IUSE="alsa aqua athena dbus gconf gif gpm gsettings gtk gtk2 gui gzip-el imagemagick jpeg kerberos libxml2 livecd m17n-lib motif png selinux sound source ssl svg tiff toolkit-scroll-bars wide-int Xaw3d xft +xpm"
41
42 -RDEPEND="sys-libs/ncurses:0=
43 - >=app-eselect/eselect-emacs-1.16
44 - >=app-emacs/emacs-common-gentoo-1.5[X?]
45 +RDEPEND="app-emacs/emacs-common-gentoo[gui(-)?]
46 net-libs/liblockfile
47 + sys-libs/ncurses:0=
48 alsa? ( media-libs/alsa-lib )
49 dbus? ( sys-apps/dbus )
50 gpm? ( sys-libs/gpm )
51 @@ -30,7 +28,7 @@ RDEPEND="sys-libs/ncurses:0=
52 libxml2? ( >=dev-libs/libxml2-2.2.0 )
53 selinux? ( sys-libs/libselinux )
54 ssl? ( net-libs/gnutls:0= )
55 - X? (
56 + gui? ( !aqua? (
57 x11-libs/libICE
58 x11-libs/libSM
59 x11-libs/libX11
60 @@ -81,17 +79,20 @@ RDEPEND="sys-libs/ncurses:0=
61 ) )
62 )
63 )
64 - )"
65 + ) )"
66
67 DEPEND="${RDEPEND}
68 - X? ( x11-base/xorg-proto )"
69 + gui? ( !aqua? ( x11-base/xorg-proto ) )"
70
71 -BDEPEND="virtual/pkgconfig
72 +BDEPEND="app-eselect/eselect-emacs
73 + virtual/pkgconfig
74 gzip-el? ( app-arch/gzip )"
75 -# pax_kernel? ( sys-apps/attr )
76
77 -EMACS_SUFFIX="${PN/emacs/emacs-${SLOT}}"
78 -SITEFILE="20${PN}-${SLOT}-gentoo.el"
79 +RDEPEND="${RDEPEND}
80 + app-eselect/eselect-emacs"
81 +
82 +EMACS_SUFFIX="emacs-${SLOT}"
83 +SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
84 # FULL_VERSION keeps the full version number, which is needed in
85 # order to determine some path information correctly for copy/move
86 # operations later on
87 @@ -145,9 +146,7 @@ src_configure() {
88 filter-flags -pie #526948
89 append-ldflags $(test-flags -no-pie) #639570
90
91 - if use sh; then
92 - replace-flags "-O[1-9]" -O0 #262359
93 - elif use ia64; then
94 + if use ia64; then
95 replace-flags "-O[2-9]" -O1 #325373
96 else
97 replace-flags "-O[3-9]" -O2
98 @@ -166,7 +165,14 @@ src_configure() {
99 myconf+=" $(use_with sound)"
100 fi
101
102 - if use X; then
103 + if ! use gui; then
104 + einfo "Configuring to build without window system support"
105 + myconf+=" --without-x --without-ns"
106 + elif use aqua; then
107 + einfo "Configuring to build with Nextstep (Macintosh Cocoa) support"
108 + myconf+=" --with-ns --disable-ns-self-contained"
109 + myconf+=" --without-x"
110 + else
111 myconf+=" --with-x --without-ns"
112 myconf+=" $(use_with gconf)"
113 myconf+=" $(use_with gsettings)"
114 @@ -223,12 +229,6 @@ src_configure() {
115 fi
116 ! use gtk && use gtk2 && ewarn \
117 "USE flag \"gtk2\" has no effect if \"gtk\" is not set."
118 - elif use aqua; then
119 - einfo "Configuring to build with Nextstep (Cocoa) support"
120 - myconf+=" --with-ns --disable-ns-self-contained"
121 - myconf+=" --without-x"
122 - else
123 - myconf+=" --without-x --without-ns"
124 fi
125
126 econf \
127 @@ -254,7 +254,7 @@ src_compile() {
128 emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
129 }
130
131 -src_install () {
132 +src_install() {
133 emake DESTDIR="${D}" NO_BIN_LINK=t install
134
135 mv "${ED}"/usr/bin/{emacs-${FULL_VERSION}-,}${EMACS_SUFFIX} \
136 @@ -292,16 +292,16 @@ src_install () {
137
138 sed -e "${cdir:+#}/^Y/d" -e "s/^[XY]//" >"${T}/${SITEFILE}" <<-EOF || die
139 X
140 - ;;; ${PN}-${SLOT} site-lisp configuration
141 + ;;; ${EMACS_SUFFIX} site-lisp configuration
142 X
143 (when (string-match "\\\\\`${FULL_VERSION//./\\\\.}\\\\>" emacs-version)
144 Y (setq find-function-C-source-directory
145 Y "${EPREFIX}${cdir}")
146 X (let ((path (getenv "INFOPATH"))
147 X (dir "${EPREFIX}/usr/share/info/${EMACS_SUFFIX}")
148 - X (re "\\\\\`${EPREFIX}/usr/share/info\\\\>"))
149 + X (re "\\\\\`${EPREFIX}/usr/share\\\\>"))
150 X (and path
151 - X ;; move Emacs Info dir before anything else in /usr/share/info
152 + X ;; move Emacs Info dir before anything else in /usr/share
153 X (let* ((p (cons nil (split-string path ":" t))) (q p))
154 X (while (and (cdr q) (not (string-match re (cadr q))))
155 X (setq q (cdr q)))
156 @@ -314,24 +314,24 @@ src_install () {
157
158 if use aqua; then
159 dodir /Applications/Gentoo
160 - rm -rf "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app
161 + rm -rf "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app
162 mv nextstep/Emacs.app \
163 - "${ED}"/Applications/Gentoo/Emacs${EMACS_SUFFIX#emacs}.app || die
164 + "${ED}"/Applications/Gentoo/${EMACS_SUFFIX^}.app || die
165 fi
166
167 - DOC_CONTENTS="You can set the version to be started by /usr/bin/emacs
168 - through the Emacs eselect module, which also redirects man and info
169 - pages. Therefore, several Emacs versions can be installed at the
170 - same time. \"man emacs.eselect\" for details.
171 + local DOC_CONTENTS="You can set the version to be started by
172 + /usr/bin/emacs through the Emacs eselect module, which also
173 + redirects man and info pages. Therefore, several Emacs versions can
174 + be installed at the same time. \"man emacs.eselect\" for details.
175 \\n\\nIf you upgrade from Emacs version 24.2 or earlier, then it is
176 strongly recommended that you use app-admin/emacs-updater to rebuild
177 all byte-compiled elisp files of the installed Emacs packages."
178 - use X && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
179 + use gui && DOC_CONTENTS+="\\n\\nYou need to install some fonts for Emacs.
180 Installing media-fonts/font-adobe-{75,100}dpi on the X server's
181 machine would satisfy basic Emacs requirements under X11.
182 See also https://wiki.gentoo.org/wiki/Xft_support_for_GNU_Emacs
183 for how to enable anti-aliased fonts."
184 - use aqua && DOC_CONTENTS+="\\n\\nEmacs${EMACS_SUFFIX#emacs}.app is in
185 + use aqua && DOC_CONTENTS+="\\n\\n${EMACS_SUFFIX^}.app is in
186 \"${EPREFIX}/Applications/Gentoo\". You may want to copy or symlink
187 it into /Applications by yourself."
188 readme.gentoo_create_doc
189 @@ -339,19 +339,8 @@ src_install () {
190
191 pkg_preinst() {
192 # move Info dir file to correct name
193 - local infodir=/usr/share/info/${EMACS_SUFFIX} f
194 - if [[ -f ${ED}${infodir}/dir.orig ]]; then
195 - mv "${ED}"${infodir}/dir{.orig,} || die "moving info dir failed"
196 - elif [[ -d "${ED}"${infodir} ]]; then
197 - # this should not happen in EAPI 4
198 - ewarn "Regenerating Info directory index in ${infodir} ..."
199 - rm -f "${ED}"${infodir}/dir{,.*}
200 - for f in "${ED}"${infodir}/*; do
201 - if [[ ${f##*/} != *-[0-9]* && -e ${f} ]]; then
202 - install-info --info-dir="${ED}"${infodir} "${f}" \
203 - || die "install-info failed"
204 - fi
205 - done
206 + if [[ -d ${ED}/usr/share/info ]]; then
207 + mv "${ED}"/usr/share/info/${EMACS_SUFFIX}/dir{.orig,} || die
208 fi
209 }