Сравнение emacs-26.3-r15 с emacs-27.2-r13

/usr/portage/app-editors/emacs/emacs-27.2-r13.ebuild 2023-10-09 14:52:28.276368319 +0300
3 3

  
4 4
EAPI=8
5 5

  
6
inherit autotools elisp-common flag-o-matic readme.gentoo-r1
6
inherit autotools elisp-common readme.gentoo-r1 toolchain-funcs
7

  
8
if [[ ${PV##*.} = 9999 ]]; then
9
	inherit git-r3
10
	EGIT_REPO_URI="https://git.savannah.gnu.org/git/emacs.git"
11
	EGIT_BRANCH="emacs-27"
12
	EGIT_CHECKOUT_DIR="${WORKDIR}/emacs"
13
	S="${EGIT_CHECKOUT_DIR}"
14
	SLOT="${PV%%.*}-vcs"
15
else
16
	# FULL_VERSION keeps the full version number, which is needed in
17
	# order to determine some path information correctly for copy/move
18
	# operations later on
19
	FULL_VERSION="${PV%%_*}"
20
	SRC_URI="mirror://gnu/emacs/${P}.tar.xz"
21
	S="${WORKDIR}/emacs-${FULL_VERSION}"
22
	# PV can be in any of the following formats:
23
	# 27.1                 released version (slot 27)
24
	# 27.1_rc1             upstream release candidate (27)
25
	# 27.0.9999            live ebuild (slot 27-vcs)
26
	# 27.0.90              upstream prerelease snapshot (27-vcs)
27
	# 27.0.50_pre20191223  snapshot by Gentoo developer (27-vcs)
28
	if [[ ${PV} == *_pre* ]]; then
29
		SRC_URI="https://dev.gentoo.org/~ulm/distfiles/${P}.tar.xz"
30
		S="${WORKDIR}/emacs"
31
	elif [[ ${PV//[0-9]} != "." ]]; then
32
		SRC_URI="https://alpha.gnu.org/gnu/emacs/pretest/${PN}-${PV/_/-}.tar.xz"
33
	fi
34
	# Patchset from proj/emacs-patches.git
35
	SRC_URI+=" https://dev.gentoo.org/~ulm/emacs/${P}-patches-6.tar.xz"
36
	PATCHES=("${WORKDIR}/patch")
37
	SLOT="${PV%%.*}"
38
	[[ ${PV} == *.*.* ]] && SLOT+="-vcs"
39
	KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
40
fi
7 41

  
8 42
DESCRIPTION="The extensible, customizable, self-documenting real-time display editor"
9 43
HOMEPAGE="https://www.gnu.org/software/emacs/"
10
SRC_URI="mirror://gnu/emacs/${P}.tar.xz
11
	https://dev.gentoo.org/~ulm/emacs/${P}-patches-5.tar.xz"
12 44

  
13 45
LICENSE="GPL-3+ FDL-1.3+ BSD HPND MIT W3C unicode PSF-2"
14
SLOT="26"
15
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos"
16
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif gpm gsettings gtk gui gzip-el imagemagick +inotify jpeg kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars valgrind wide-int Xaw3d xft +xpm xwidgets zlib"
46
IUSE="acl alsa aqua athena cairo dbus dynamic-loading games gfile gif +gmp gpm gsettings gtk gui gzip-el harfbuzz imagemagick +inotify jpeg json kerberos lcms libxml2 livecd m17n-lib mailutils motif png selinux sound source ssl svg systemd +threads tiff toolkit-scroll-bars valgrind wide-int Xaw3d xft +xpm xwidgets zlib"
47
RESTRICT="test"
17 48

  
18 49
RDEPEND="app-emacs/emacs-common[games?,gui(-)?]
19 50
	sys-libs/ncurses:0=
......
21 52
	alsa? ( media-libs/alsa-lib )
22 53
	dbus? ( sys-apps/dbus )
23 54
	games? ( acct-group/gamestat )
55
	gmp? ( dev-libs/gmp:0= )
24 56
	gpm? ( sys-libs/gpm )
25 57
	!inotify? ( gfile? ( >=dev-libs/glib-2.28.6 ) )
58
	json? ( dev-libs/jansson:= )
26 59
	kerberos? ( virtual/krb5 )
27 60
	lcms? ( media-libs/lcms:2 )
28 61
	libxml2? ( >=dev-libs/libxml2-2.2.0 )
......
54 87
		xft? (
55 88
			media-libs/fontconfig
56 89
			media-libs/freetype
57
			x11-libs/libXft
58 90
			x11-libs/libXrender
59 91
			cairo? ( >=x11-libs/cairo-1.12.18[X] )
92
			!cairo? ( x11-libs/libXft )
93
			harfbuzz? ( media-libs/harfbuzz:0= )
60 94
			m17n-lib? (
61 95
				>=dev-libs/libotf-0.9.4
62 96
				>=dev-libs/m17n-lib-1.5.1
......
94 128
DEPEND="${RDEPEND}
95 129
	gui? ( !aqua? ( x11-base/xorg-proto ) )"
96 130

  
97
BDEPEND="virtual/pkgconfig
131
BDEPEND="sys-apps/texinfo
132
	virtual/pkgconfig
98 133
	gzip-el? ( app-arch/gzip )"
99 134

  
100 135
IDEPEND="app-eselect/eselect-emacs"
......
103 138

  
104 139
EMACS_SUFFIX="emacs-${SLOT}"
105 140
SITEFILE="20${EMACS_SUFFIX}-gentoo.el"
106
# FULL_VERSION keeps the full version number, which is needed in
107
# order to determine some path information correctly for copy/move
108
# operations later on
109
FULL_VERSION="${PV%%_*}"
110
S="${WORKDIR}/emacs-${FULL_VERSION}"
111
PATCHES=("${WORKDIR}/patch")
112 141

  
113 142
src_prepare() {
143
	if [[ ${PV##*.} = 9999 ]]; then
144
		FULL_VERSION=$(sed -n 's/^AC_INIT([^,]*,[ \t]*\([^ \t,)]*\).*/\1/p' \
145
			configure.ac)
146
		[[ ${FULL_VERSION} ]] || die "Cannot determine current Emacs version"
147
		einfo "Emacs branch: ${EGIT_BRANCH}"
148
		einfo "Commit: ${EGIT_VERSION}"
149
		einfo "Emacs version number: ${FULL_VERSION}"
150
		[[ ${FULL_VERSION} =~ ^${PV%.*}(\..*)?$ ]] \
151
			|| die "Upstream version number changed to ${FULL_VERSION}"
152
	fi
153

  
114 154
	default
115 155

  
116 156
	# Fix filename reference in redirected man page
......
120 160
}
121 161

  
122 162
src_configure() {
123
	strip-flags
124
	filter-flags -pie					#526948
125

  
126
	if use ia64; then
127
		replace-flags "-O[2-9]" -O1		#325373
128
	else
129
		replace-flags "-O[3-9]" -O2
130
	fi
131

  
132 163
	local myconf
133 164

  
134 165
	if use alsa; then
......
162 193
		if use xft; then
163 194
			myconf+=" --with-xft"
164 195
			myconf+=" $(use_with cairo)"
196
			myconf+=" $(use_with harfbuzz)"
165 197
			myconf+=" $(use_with m17n-lib libotf)"
166 198
			myconf+=" $(use_with m17n-lib m17n-flt)"
167 199
		else
......
210 242
			"USE flag \"xwidgets\" has no effect if \"gtk\" is not set."
211 243
	fi
212 244

  
245
	if tc-is-cross-compiler; then
246
		# Configure a CBUILD directory when cross-compiling to make tools
247
		mkdir "${S}-build" && pushd "${S}-build" >/dev/null || die
248
		ECONF_SOURCE="${S}" econf_build --without-all --without-x-toolkit
249
		popd >/dev/null || die
250
		# Don't try to execute the binary for dumping during the build
251
		myconf+=" --with-dumping=none"
252
	elif use m68k; then
253
		# Workaround for https://debbugs.gnu.org/44531
254
		myconf+=" --with-dumping=unexec"
255
	else
256
		myconf+=" --with-dumping=pdumper"
257
	fi
258

  
213 259
	econf \
214 260
		--program-suffix="-${EMACS_SUFFIX}" \
215 261
		--includedir="${EPREFIX}"/usr/include/${EMACS_SUFFIX} \
......
220 266
		--without-hesiod \
221 267
		--without-pop \
222 268
		--with-file-notification=$(usev inotify || usev gfile || echo no) \
269
		--with-pdumper \
223 270
		$(use_enable acl) \
224 271
		$(use_with dbus) \
225 272
		$(use_with dynamic-loading modules) \
226 273
		$(use_with games gameuser ":gamestat") \
274
		$(use_with gmp libgmp) \
227 275
		$(use_with gpm) \
276
		$(use_with json) \
228 277
		$(use_with kerberos) $(use_with kerberos kerberos5) \
229 278
		$(use_with lcms lcms2) \
230 279
		$(use_with libxml2 xml2) \
......
241 290
src_compile() {
242 291
	export ac_cv_header_valgrind_valgrind_h=$(usex valgrind)
243 292

  
244
	# Disable sandbox when dumping. For the unbelievers, see bug #131505
245
	emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs"
293
	if tc-is-cross-compiler; then
294
		# Build native tools for compiling lisp etc.
295
		emake -C "${S}-build" src
296
		emake lib	   # Cross-compile dependencies first for timestamps
297
		# Save native build tools in the cross-directory
298
		cp "${S}-build"/lib-src/make-{docfile,fingerprint} lib-src || die
299
		# Specify the native Emacs to compile lisp
300
		emake -C lisp all EMACS="${S}-build/src/emacs"
301
	fi
302

  
303
	emake
246 304
}
247 305

  
248 306
src_install() {
......
348 406
			\"${EPREFIX}/Applications/Gentoo\". You may want to copy or
349 407
			symlink it into /Applications by yourself."
350 408
	fi
409
	tc-is-cross-compiler && DOC_CONTENTS+="\\n\\nEmacs did not write
410
		a portable dump file due to being cross-compiled.
411
		To create this file at run time, execute the following command:
412
		\\n${EMACS_SUFFIX} --batch -Q --eval='(dump-emacs-portable
413
		\"/usr/libexec/emacs/${FULL_VERSION}/${CHOST}/emacs.pdmp\")'"
351 414
	readme.gentoo_create_doc
352 415
}
353 416

  
Спасибо!