Diff xemacs-21.4.24-r10 with a xemacs-21.5.34-r12

/usr/portage/app-editors/xemacs/xemacs-21.5.34-r12.ebuild 2023-10-09 14:52:28.668368329 +0300
1
# Copyright 1999-2023 Gentoo Authors
1
# Copyright 1999-2022 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
# Note: xemacs currently does not work with position independent code
5 5
# so the build forces the use of the -no-pie option
6 6

  
7
EAPI=7
7
EAPI=8
8 8

  
9
WANT_AUTOCONF="2.1"
10
inherit autotools flag-o-matic toolchain-funcs xdg-utils desktop
9
inherit flag-o-matic xdg-utils desktop
11 10

  
12 11
DESCRIPTION="highly customizable open source text editor and application development system"
13 12
HOMEPAGE="https://www.xemacs.org/"
14
SRC_URI="http://ftp.xemacs.org/xemacs-21.4/${P}.tar.gz
13
SRC_URI="http://ftp.xemacs.org/xemacs-21.5/${P}.tar.gz
15 14
	neXt? ( http://www.malfunction.de/afterstep/files/NeXT_XEmacs.tar.gz )"
16 15

  
17
LICENSE="GPL-2+"
16
LICENSE="GPL-3+"
18 17
SLOT="0"
19
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
20
IUSE="eolconv gif gpm pop postgres ldap xface nas dnd X jpeg tiff png mule motif freewnn xim athena neXt Xaw3d gdbm berkdb"
18
KEYWORDS="~alpha ~amd64 ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
19
IUSE="alsa debug gif gpm pop postgres ldap xface nas dnd X jpeg tiff png mule motif freewnn xft xim athena neXt Xaw3d gdbm berkdb"
21 20

  
22 21
X_DEPEND="x11-libs/libXt x11-libs/libXmu x11-libs/libXext x11-misc/xbitmaps"
23 22

  
24 23
RDEPEND="
25
	berkdb? ( sys-libs/db:= )
26
	gdbm? ( >=sys-libs/gdbm-1.8.3:=[berkdb] )
24
	berkdb? ( >=sys-libs/db-4:= !!<sys-libs/db-4 )
25
	gdbm? ( >=sys-libs/gdbm-1.8.3:=[berkdb(+)] )
27 26
	>=sys-libs/zlib-1.1.4
28 27
	>=dev-libs/openssl-0.9.6:0=
29 28
	>=media-libs/audiofile-0.2.3
30 29
	gpm? ( >=sys-libs/gpm-1.19.6 )
31 30
	postgres? ( dev-db/postgresql:= )
32 31
	ldap? ( net-nds/openldap:= )
32
	alsa? ( media-libs/alsa-lib )
33 33
	nas? ( media-libs/nas )
34 34
	X? ( $X_DEPEND !Xaw3d? ( !neXt? ( x11-libs/libXaw ) ) )
35 35
	dnd? ( x11-libs/dnd )
36
	motif? ( >=x11-libs/motif-2.3:0 )
36
	motif? ( >=x11-libs/motif-2.3:0[xft=] )
37 37
	athena? ( x11-libs/libXaw )
38 38
	Xaw3d? ( x11-libs/libXaw3d[unicode(+)] )
39
	xft? ( media-libs/freetype:2 x11-libs/libXft x11-libs/libXrender >=media-libs/fontconfig-2.5.0 )
39 40
	neXt? ( x11-libs/neXtaw )
40 41
	xface? ( media-libs/compface )
41 42
	tiff? ( media-libs/tiff:= )
42 43
	png? ( >=media-libs/libpng-1.2:0 )
43 44
	jpeg? ( media-libs/libjpeg-turbo:= )
44
	!amd64? ( freewnn? ( app-i18n/freewnn ) )
45
	freewnn? ( app-i18n/freewnn )
45 46
	>=sys-libs/ncurses-5.2:=
46 47
	>=app-eselect/eselect-emacs-1.15"
47 48

  
48 49
DEPEND="${RDEPEND}
49
	>=sys-apps/texinfo-5"
50
	virtual/pkgconfig"
50 51

  
51 52
PDEPEND="app-xemacs/xemacs-base
52 53
	mule? ( app-xemacs/mule-base )"
53 54

  
54 55
src_unpack() {
55
	unpack ${P}.tar.gz
56
	use neXt && unpack NeXT_XEmacs.tar.gz
56
	default_src_unpack
57 57
}
58 58

  
59 59
src_prepare() {
60
	# see bug 58350, 102540 and 143580
61
	eapply "${FILESDIR}"/xemacs-21.4.19-db.patch
62
	# see bug 576512
63
	eapply "${FILESDIR}"/xemacs-21.4.24-gcc5.patch
64
	eapply "${FILESDIR}"/xemacs-21.4.24-glibc-macro.patch
65
	# see bug 615544
66
	eapply "${FILESDIR}"/xemacs-21.4.24-ncurses-tinfo.patch
67
	eapply "${FILESDIR}"/xemacs-21.4.24-strsignal.patch
68

  
69
	# Convert to utf-8
70
	iconv -f iso-8859-1 -t utf-8 -o man/xemacs-faq.texi.tmp man/xemacs-faq.texi \
71
	      && mv -f man/xemacs-faq.texi.tmp man/xemacs-faq.texi || die
72
	iconv -f iso-8859-1 -t utf-8 -o man/lispref/ldap.texi.tmp man/lispref/ldap.texi \
73
	      && mv -f man/lispref/ldap.texi.tmp man/lispref/ldap.texi || die
60
	use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* "${S}"/etc/toolbar/
61
	find "${S}"/lisp -name '*.elc' -exec rm {} \; || die
62
	eapply "${FILESDIR}/${P}-ncurses-tinfo.patch"
63
	eapply "${FILESDIR}/${P}-gcc5.patch"
64
	eapply "${FILESDIR}/${P}-glibc-macro.patch"
65
	eapply "${FILESDIR}/${P}-as-needed.patch"
66
	eapply "${FILESDIR}/${P}-configure-libc-version.patch"
67
	eapply "${FILESDIR}/${P}-ar.patch"
68
	eapply "${FILESDIR}/${P}-strsignal.patch"
69
	eapply "${FILESDIR}/${P}-process-test-qa.patch"
70
	eapply "${FILESDIR}/${P}-autoloads-parallell-make.patch"
71
	eapply "${FILESDIR}/${P}-no-lock-on-finder-inf.patch"
72
	eapply "${FILESDIR}/${P}-module-autoloads.patch"
74 73

  
75 74
	eapply_user
76 75

  
......
80 79
	sed -i -e 's/exec gnuclient/&-xemacs/' lib-src/gnudoit || die
81 80
	sed -i -e '/^\.so/s/etags/&-xemacs/' etc/ctags.1 || die
82 81
	sed -i -e '/^\.so/s/gnuserv/&-xemacs/' etc/gnu{client,doit,attach}.1 || die
83

  
84
	# Run autoconf. XEmacs tries to be smart by providing a stub
85
	# configure.ac file for autoconf 2.59 but this throws our
86
	# autotools eclass so it must be removed first.
87
	rm "${S}"/configure.ac || die
88
	eautoconf
89

  
90
	use neXt && cp "${WORKDIR}"/NeXT.XEmacs/xemacs-icons/* "${S}"/etc/toolbar/
91 82
}
92 83

  
93 84
src_configure() {
94 85
	local myconf=""
95 86

  
96
	# Can't build with pie. See bug #75028
87
	# bug #639642
97 88
	test-flags -no-pie >/dev/null && append-flags -no-pie
98 89
	filter-flags -pie
99 90

  
......
109 100
			myconf="${myconf} --with-scrollbars=motif"
110 101
			myconf="${myconf} --with-menubars=lucid"
111 102
		fi
112
		if use athena ; then
103
		if use athena or use Xaw3d ; then
113 104
			myconf="--with-scrollbars=athena"
114 105
		fi
115 106

  
......
121 112
			myconf="${myconf} --with-athena=xaw"
122 113
		fi
123 114

  
124
		use dnd && myconf="${myconf} --with-dragndrop --with-offix"
115
		use dnd && myconf="${myconf} --with-dragndrop"
116

  
117
		myconf="${myconf} $(use_with tiff )"
118
		myconf="${myconf} $(use_with png )"
119
		myconf="${myconf} $(use_with jpeg )"
120
		myconf="${myconf} $(use_with xface )"
121

  
122
		use xft && myconf="${myconf} --with-xft=emacs,tabs,menubars,gauges" ||
123
			myconf="${myconf} --with-xft=no"
125 124

  
126
		myconf="${myconf} $(use_with tiff ) $(use_with png )"
127
		myconf="${myconf} $(use_with jpeg ) $(use_with xface )"
128 125
	else
129 126
		myconf="${myconf}
130 127
			--without-x
131 128
			--without-xpm
132 129
			--without-dragndrop
130
			--with-xft=no
133 131
			--with-gif=no"
134 132
	fi
135 133

  
......
154 152

  
155 153
	# This determines how these sounds should be played
156 154
	use nas	&& soundconf="${soundconf},nas"
155
	use alsa && soundconf="${soundconf},alsa"
157 156

  
158 157
	myconf="${myconf} --with-sound=${soundconf}"
159 158

  
160 159
	if use gdbm || use berkdb ; then
161
		use gdbm && mydb="gdbm"
162

  
160
		use gdbm   && mydb="gdbm"
163 161
		use berkdb && mydb="${mydb},berkdb"
164 162

  
165 163
		myconf="${myconf} --with-database=${mydb}"
......
167 165
		myconf="${myconf} --without-database"
168 166
	fi
169 167

  
170
	# Enabling modules will cause segfaults outside the XEmacs build directory
171
	use ia64  && myconf="${myconf} --without-modules"
172

  
173
	einfo "${myconf}"
174

  
175
	# see bug 576512
176
	append-cflags -fgnu89-inline
168
	use debug && myconf="${myconf} --with-debug" ||
169
		myconf="${myconf} --with-optimization"
177 170

  
178
	use freewnn && append-cppflags "-I. -I${ESYSROOT}/usr/include/wnn"
179

  
180
	# Don't use econf because it uses options which this configure
181
	# script does not understand (like --host).
182
	./configure ${myconf} ${EXTRA_ECONF} \
171
	econf ${myconf} \
183 172
		$(use_with gif ) \
184 173
		$(use_with gpm ) \
185 174
		$(use_with postgres postgresql ) \
186 175
		$(use_with ldap ) \
187
		$(use_with eolconv file-coding ) \
188 176
		$(use_with pop ) \
189
		--compiler="$(tc-getCC)" \
190 177
		--prefix=/usr \
191 178
		--without-canna \
192 179
		--with-ncurses \
193
		--with-system-malloc \
194 180
		--with-msw=no \
195
		--mail-locking=flock \
181
		--with-mail-locking=flock \
196 182
		--with-site-lisp=yes \
197 183
		--with-site-modules=yes \
198
		|| die "The configure script failed to run properly"
184
		--with-system-malloc \
185
		--enable-option-checking=no \
186
		--with-last-packages=/usr/lib/xemacs
187
}
188

  
189
src_compile() {
190
	emake EMACSLOADPATH="${S}"/lisp
199 191
}
200 192

  
201 193
src_install() {
202
	emake prefix="${D}"/usr \
203
		mandir="${D}"/usr/share/man/man1 \
204
		infodir="${D}"/usr/share/info \
205
		install gzip-el || die "emake install failed"
194
	emake prefix="${ED}"/usr \
195
		mandir="${ED}"/usr/share/man/man1 \
196
		infodir="${ED}"/usr/share/info \
197
		libdir="${ED}"/usr/$(get_libdir) \
198
		datadir="${ED}"/usr/share \
199
		install
206 200

  
207 201
	# Rename some applications installed in bin so that it is clear
208 202
	# which application installed them and so that conflicting
209 203
	# packages (emacs) can't clobber the actual applications.
210 204
	# Addresses bug #62991.
211
	for i in b2m ctags etags rcs-checkin gnuclient gnudoit gnuattach; do
212
		mv "${D}"/usr/bin/${i} "${D}"/usr/bin/${i}-xemacs || die "mv ${i} failed"
205
	for i in b2m ctags etags gnuclient gnudoit gnuattach; do
206
		mv "${ED}"/usr/bin/${i} "${ED}"/usr/bin/${i}-xemacs || die "mv ${i} failed"
213 207
	done
214 208

  
215 209
	# rename man pages
216 210
	for i in ctags etags gnuserv gnuclient gnudoit gnuattach; do
217
		mv "${D}"/usr/share/man/man1/${i}{,-xemacs}.1 || die "mv ${i}.1 failed"
211
		mv "${ED}"/usr/share/man/man1/${i}{,-xemacs}.1 || die "mv ${i}.1 failed"
218 212
	done
219 213

  
220 214
	# install base packages directories
......
229 223
	fi
230 224

  
231 225
	# remove extraneous info files
232
	cd "${D}"/usr/share/info
226
	cd "${ED}"/usr/share/info
233 227
	rm -f dir info.info texinfo* termcap* standards*
234 228

  
235 229
	cd "${S}"
236
	dodoc BUGS CHANGES-* ChangeLog GETTING* INSTALL PROBLEMS README*
237
	dodoc "${FILESDIR}"/README.Gentoo
230
	dodoc CHANGES-* ChangeLog INSTALL Installation PROBLEMS README*
238 231

  
239 232
	newicon "${S}"/etc/${PN}-icon.xpm ${PN}.xpm
240 233

  
......
245 238
	eselect emacs update ifunset
246 239
	eselect gnuclient update ifunset
247 240
	xdg_desktop_database_update
241

  
242
	einfo "If you are upgrading from XEmacs 21.4 you should note the following"
243
	einfo "incompatibilities:"
244
	einfo "- Mule-UCS is no longer supported due to proper UTF-8 support in XEmacs 21.5"
245
	einfo "- The X resource class has changed from Emacs to XEmacs,"
246
	einfo "  settings in your .Xdefaults file should be updated accordingly."
247

  
248
	if use xft;
249
	then
250
	  einfo "You have enabled Xft font support. Xft requires font names to be provided"
251
	  einfo "in a different way, so you may need to adjust your .Xdefaults accordingly."
252
	fi
248 253
}
249 254

  
250 255
pkg_postrm() {
Thank you!