Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 268793 | Differences between
and this patch

Collapse All | Expand All

(-)emacs-cvs-23.0.96.ebuild.orig (-8 / +42 lines)
Lines 31-37 Link Here
31
LICENSE="GPL-3 FDL-1.3 BSD as-is X11 W3C unicode"
31
LICENSE="GPL-3 FDL-1.3 BSD as-is X11 W3C unicode"
32
SLOT="23"
32
SLOT="23"
33
KEYWORDS="~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
33
KEYWORDS="~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~x86-macos"
34
IUSE="alsa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
34
IUSE="alsa cocoa dbus gif gpm gtk gzip-el hesiod jpeg kerberos m17n-lib motif png sound source svg tiff toolkit-scroll-bars X Xaw3d xft +xpm"
35
RESTRICT="strip"
35
RESTRICT="strip"
36
36
37
RDEPEND="sys-libs/ncurses
37
RDEPEND="sys-libs/ncurses
Lines 136-141 Link Here
136
		myconf="${myconf} $(use_with sound)"
136
		myconf="${myconf} $(use_with sound)"
137
	fi
137
	fi
138
138
139
	if use X && use cocoa; then
140
		die "the X and cocoa USE-flags cannot be used together, please use one"
141
	fi
142
139
	if use X; then
143
	if use X; then
140
		myconf="${myconf} --with-x"
144
		myconf="${myconf} --with-x"
141
		myconf="${myconf} $(use_with toolkit-scroll-bars)"
145
		myconf="${myconf} $(use_with toolkit-scroll-bars)"
Lines 177-184 Link Here
177
				&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
181
				&& ewarn "USE flag \"${f}\" ignored (superseded by \"${tk}\")"
178
			tk="${tk}${tk:+ }${f}"
182
			tk="${tk}${tk:+ }${f}"
179
		done
183
		done
184
	elif use cocoa; then
185
		einfo "Configuring to build with Cocoa support"
186
		myconf="${myconf} --without-x"
187
		myconf="${myconf} --with-ns"
188
		myconf="${myconf} --disable-ns-self-contained"
180
	else
189
	else
181
		myconf="${myconf} --without-x"
190
		myconf="${myconf} --without-x"
191
		myconf="${myconf} --without-ns"
182
	fi
192
	fi
183
193
184
	myconf="${myconf} $(use_with hesiod)"
194
	myconf="${myconf} $(use_with hesiod)"
Lines 187-194 Link Here
187
197
188
	econf \
198
	econf \
189
		--program-suffix=-${EMACS_SUFFIX} \
199
		--program-suffix=-${EMACS_SUFFIX} \
190
		--infodir=/usr/share/info/${EMACS_SUFFIX} \
200
		--infodir="${EPREFIX}"/usr/share/info/${EMACS_SUFFIX} \
191
		${myconf} || die "econf emacs failed"
201
		${myconf} || die "econf emacs failed"
202
203
	# very hackish :(
204
	if use cocoa; then
205
		sed -i "s%^\(#define PATH_EXEC\).*%\1 \"${EPREFIX}/usr/libexec/emacs/${PV}/${CHOST}\"%" \
206
			src/epaths.h || die "PATH_EXEC editing failed"
207
	fi 
192
}
208
}
193
209
194
src_compile() {
210
src_compile() {
Lines 204-215 Link Here
204
src_install () {
220
src_install () {
205
	local i m
221
	local i m
206
222
207
	emake install DESTDIR="${D}" || die "make install failed"
223
	# to avoid accidental removal of everything
208
224
	if use cocoa; then
209
	rm "${ED}"/usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
225
		make install-arch-dep
210
		|| die "removing duplicate emacs executable failed"
226
	fi
211
	mv "${ED}"/usr/bin/emacs-${EMACS_SUFFIX} "${ED}"/usr/bin/${EMACS_SUFFIX} \
227
	emake install DESTDIR="${D}" exec_prefix="${EPREFIX}/usr" \
212
		|| die "moving Emacs executable failed"
228
		libexecdir="${EPREFIX}/usr/libexec" \
229
		|| die "make install failed"
230
231
	if [ -e "${ED}"usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} ]; then
232
		rm "${ED}"usr/bin/emacs-${FULL_VERSION}-${EMACS_SUFFIX} \
233
			|| die "removing duplicate emacs executable failed"
234
		mv "${ED}"usr/bin/emacs-${EMACS_SUFFIX} \
235
			"${ED}"usr/bin/${EMACS_SUFFIX} \
236
			|| die "moving Emacs executable failed"
237
	fi
213
238
214
	# move info documentation to the correct place
239
	# move info documentation to the correct place
215
	for i in "${ED}"/usr/share/info/${EMACS_SUFFIX}/*; do
240
	for i in "${ED}"/usr/share/info/${EMACS_SUFFIX}/*; do
Lines 253-258 Link Here
253
	elisp-site-file-install "${SITEFILE}" || die
278
	elisp-site-file-install "${SITEFILE}" || die
254
279
255
	dodoc README BUGS || die "dodoc failed"
280
	dodoc README BUGS || die "dodoc failed"
281
282
	if use cocoa; then
283
		if [ ! -e "${ED}"/Applications/Gentoo ]; then
284
			mkdir -p "${ED}"/Applications/Gentoo
285
		fi
286
		mv "${S}"/nextstep/Emacs.app "${ED}"/Applications/Gentoo/Emacs-${FULL_VERSION}.app
287
		einfo "Emacs-${FULL_VERSION}.app is in $EPREFIX/Applications/Gentoo."
288
		einfo "You may want to copy it into /Applications by yourself."
289
	fi
256
}
290
}
257
291
258
emacs-infodir-rebuild() {
292
emacs-infodir-rebuild() {

Return to bug 268793