summaryrefslogtreecommitdiff
blob: 29da76a0e5eb02c1267bc01a70fdc079f1b37cb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-wm/enlightenment-cvs/enlightenment-cvs-0.17.20030205.ebuild,v 1.2 2003/02/10 04:18:03 vapier Exp $

ECVS_SERVER="cvs.enlightenment.sourceforge.net:/cvsroot/enlightenment"
ECVS_MODULE="e17"
ECVS_CVS_OPTIONS="-dP"
ECVS_BRANCH="SPLIT"

inherit cvs eutils

DESCRIPTION="Enlightenment Window Manager"
SRC_URI="mirror://gentoo/${P}.tar.bz2
	http://wh0rd.tk/gentoo/distfiles/${P}.tar.bz2
	mirror://gentoo/gentoo-themes-e17-${PV}.tbz2
	http://wh0rd.tk/gentoo/distfiles/gentoo-themes-e17-${PV}.tbz2"
HOMEPAGE="http://www.enlightenment.org/"

LICENSE="as-is"
SLOT="0"
KEYWORDS="~x86 ~ppc ~sparc ~alpha"
IUSE="pic X mmx truetype opengl directfb fbcon png jpeg oggvorbis"

RDEPEND="sys-libs/pam"
DEPEND="!x11-libs/evas
	app-admin/fam-oss
	dev-libs/libxml2
	dev-libs/libpcre
	dev-lang/ferite
	media-libs/imlib2
	=x11-libs/gtk+-1.2*
	=dev-libs/glib-1.2*
	dev-util/pkgconfig
	>=media-libs/freetype-2.1.3
	directfb? ( >=dev-libs/DirectFB-0.9.16 )
	oggvorbis? ( media-libs/libvorbis )"

S=${WORKDIR}/${ECVS_MODULE}
E_PREFIX=/usr/e17

pkg_setup() {
	einfo "If you experience a problem with the ebuild, then"
	einfo "e-mail me at vapier@gentoo.org and/or file a bug"
	einfo "assigned to me."
	echo
	ewarn "this ebuild moves ${E_PREFIX} to ${E_PREFIX}.old in the case"
	ewarn "that you already have a version installed ..."
	ewarn "this is needed when newer cvs releases depend on newer versions"
	ewarn "of libraries and older versions just cause breakage"

	[ -e ${E_PREFIX}.old -a ! -h ${E_PREFIX} ] && die "do something about ${E_PREFIX}.old"
	dodir ${E_PREFIX}
	[ -e ${E_PREFIX} ] && mv ${E_PREFIX} ${E_PREFIX}.old
	ln -sf ${D}/${E_PREFIX} ${E_PREFIX}
}

src_unpack() {
	unpack ${A}
#	cp -rf ${DISTDIR}/cvs-src/e17 ${WORKDIR}
}

src_install() {
	# anytime you see --> echo "all:"$'\n\t'"echo done">test/Makefile
	# it means i disabled the test building ... i could do a sed on that
	# Makefile to make it work, but its just a test app ... who cares ...
	# for some reason, `make LDFLAGS="-L -L -L"` doesnt work, so its punted

	export baseconf="--prefix=${E_PREFIX} --with-gnu-ld --enable-shared `use_with pic`"
	export addconf=""

	# the stupid gettextize script prevents non-interactive mode, so we hax it
	cp `which gettextize` ${T} || die "could not copy gettextize"
	cp ${T}/gettextize ${T}/gettextize.old
	sed -e 's:read dummy < /dev/tty::' ${T}/gettextize.old > ${T}/gettextize

	# HEAD uses autogen.sh but SPLIT doesnt always ...
	eautogen="
		#!/bin/bash
		if [ -x ./autogen.sh ] ; then
			./autogen.sh \$@
		else
			./configure \$@
		fi"
	echo "${eautogen}" > ${T}/eautogen
	chmod a+x ${T}/eautogen

	# find our haxed script first, the -config scripts 2nd, everything else last
	PATH="${T}:${E_PREFIX}/bin:${PATH}"
	CFLAGS="${CFLAGS} -I${E_PREFIX}/include -I${E_PREFIX}/include/ewd"
	export WANT_AUTOCONF_2_5=1
	export WANT_AUTOMAKE_1_6=1

	############
	### libs ###
	############

	### imlib2 ###
	# mmx support in imlib2 makes other things complain it would seem ...
	# *shrug*, worked for me ;D
	einfo "making libs/imlib2"
	cd ${S}/libs/imlib2
	addconf="--disable-mmx"
	use X		&& addconf="${addconf} --with-x"
#	use mmx		&& addconf="${addconf} --enable-mmx"
	use truetype	&& addconf="${addconf} --with-ttf=/usr"
	env USER=BS eautogen ${baseconf} ${addconf} || die "could not autogen imlib2"
	make || die "could not make imlib2"
	make install DESTDIR=${D} || die "could not install imlib2"

	### edb ###
	einfo "making libs/edb"
	cd ${S}/libs/edb
	addconf="--enable-cxx"
	eautogen ${baseconf} ${addconf} || die "could not autogen edb"
	make || die "could not make edb"
	make install DESTDIR=${D} || die "could not install edb"

	### eet ###
	einfo "making libs/eet"
	cd ${S}/libs/eet
	eautogen ${baseconf} || die "could not autogen eet"
	make || die "could not make eet"
	make install DESTDIR=${D} || die "could not install eet"

	### imlib2_loaders ###
	einfo "making libs/imlib2_loaders"
	cd ${S}/libs/imlib2_loaders
	use X		&& addconf="${addconf} --with-x"
	env -u CFLAGS eautogen ${baseconf} ${addconf} || die "could not autogen imlib2_loaders"
	make || die "could not make imlib2_loaders"
	make install DESTDIR=${D} || die "could not install imlib_loaders"

	### evas ###
	einfo "making libs/evas"
	cd ${S}/libs/evas
	addconf=" \
		--enable-image-loader-eet \
		--enable-image-loader-edb \
		--enable-fmemopen \
		--enable-cpu-c \
		--enable-scale-smooth \
		--enable-scale-sample \
		--enable-convert-8-rgb-332 \
		--enable-convert-8-rgb-666 \
		--enable-convert-8-rgb-232 \
		--enable-convert-8-rgb-222 \
		--enable-convert-8-rgb-221 \
		--enable-convert-8-rgb-121 \
		--enable-convert-8-rgb-111 \
		--enable-convert-16-rgb-565 \
		--enable-convert-16-rgb-555 \
		--enable-convert-16-rgb-rot-0 \
		--enable-convert-32-rgb-8888 \
		--enable-convert-32-rgbx-8888 \
		--enable-convert-32-bgr-8888 \
		--enable-convert-32-bgrx-8888 \
		--enable-convert-32-rgb-rot-0"
	use X		&& addconf="${addconf} --enable-software-x11"
#	use opengl	&& addconf="${addconf} --enable-gl-x11"
#	use directfb	&& addconf="${addconf} --enable-directfb"
#	use fbcon	&& addconf="${addconf} --enable-fb"
	use png		&& addconf="${addconf} --enable-image-loader-png"
	use jpeg	&& addconf="${addconf} --enable-image-loader-jpeg"
#	use mmx		&& addconf="${addconf} --enable-cpu-mmx"
	eautogen ${baseconf} ${addconf} || die "could not autogen evas"
	make || die "could not make evas"
	make install DESTDIR=${D} || die "could not install evas"

	### ewd ###
	einfo "making libs/ewd"
	cd ${S}/libs/ewd
	eautogen ${baseconf} || die "could not autogen ewd"
	make || die "could not make ewd"
	make install DESTDIR=${D} || die "could not install ewd"

	### ebits ###
	einfo "making libs/ebits"
	cd ${S}/libs/ebits
	eautogen ${baseconf} || die "could not autogen ebits"
	make || die "could not make ebits"
	make install DESTDIR=${D} || die "could not install ebits"

	### ecore ###
	einfo "making libs/ecore"
	cd ${S}/libs/ecore
	addconf=
	use X		&& addconf="${addconf} --with-x"
	eautogen ${baseconf} ${addconf} || die "could not autogen ecore"
	make || die "could not make ecore"
	make install DESTDIR=${D} || die "could not install ecore"

	### estyle ###
	einfo "making libs/estyle"
	cd ${S}/libs/estyle
	eautogen ${baseconf} || die "could not autogen estyle"
	make || die "could not make estyle"
	make install DESTDIR=${D} || die "could not install estyle"

	### etox ###
	einfo "making libs/etox"
	cd ${S}/libs/etox
	eautogen ${baseconf} || die "could not autogen etox"
	make || die "could not make etox"
	make install DESTDIR=${D} || die "could not install etox"

	### ebg ###
	einfo "making libs/ebg"
	cd ${S}/libs/ebg
	eautogen ${baseconf} || die "could not autogen ebg"
	make || die "could not make ebg"
	make install DESTDIR=${D} || die "could not install ebg"

	### ewl ###
	einfo "making libs/ewl"
	cd ${S}/libs/ewl
	env USER=BS eautogen ${baseconf} || die "could not autogen ewl"
	make || die "could not make ewl"
	make install DESTDIR=${D} || die "could not install ewl"

	### eprog ###
	einfo "making libs/eprog"
	cd ${S}/libs/eprog
	eautogen ${baseconf} || die "could not autogen eprog"
	make || die "could not make eprog"
	make install DESTDIR=${D} || die "could not install eprog"

	############
	### apps ###
	############

	### entice ###
	einfo "making apps/entice"
	cd ${S}/apps/entice
	addconf="--disable-nls --with-included-gettext"
	eautogen ${baseconf} ${addconf} || die "could not autogen entice"
	make || die "could not make entice"
	make install DESTDIR=${D} || die "could not install entice"

	### esmall ###
	einfo "making apps/esmall"
	cd ${S}/apps/esmall
	eautogen ${baseconf} || die "could not autogen esmall"
	if [ "${ARCH}" == "ppc" ] ; then
		for f in `grep sys/io src/* -l` ; do
			cp ${f}{,.old}
			sed -e 's:sys/io:asm/io:' ${f}.old > ${f}
		done
	fi
	make || die "could not make esmall"
	make install DESTDIR=${D} || die "could not install esmall"

	### ewidgetd ###
# this guy does not build ... doesnt look done anyways
#	einfo "making apps/ewidgetd"
#	cd ${S}/apps/ewidgetd
#	eautogen ${baseconf} || die "could not autogen ewidgetd"
#	./configure ${baseconf}
#	cp libewidget/libewidget.c{,.old}
#	sed -e "s:stdio:stdlib:" libewidget/libewidget.c > libewidget/libewidget.c.old
#	make CFLAGS="${CFLAGS} -I${S}/apps/ewidgetd/libeipc" || die "could not make ewidgetd"
#	make install DESTDIR=${D} || die "could not install ewidgetd"

	### essence ###
# this guy does not build ... doesnt look done anyways
#	einfo "making apps/essence"
#	cd ${S}/apps/essence
#	cp configure.in{,.old}
#	sed -e "s:intl/Makefile::" configure.in.old > configure.in
#	eautogen ${baseconf} || die "could not autogen essence"
#	make || die "could not make essence"
#	make install DESTDIR=${D} || die "could not install essence"

	### elicit ###
	einfo "making apps/elicit"
	cd ${S}/apps/elicit
	cp configure{,.old}
	sed -e "s:^PREFIX.*:PREFIX=${E_PREFIX}:" \
		configure.old > configure
	./configure || die "could not make elicit"
	echo "PREFIX=${D}${E_PREFIX}" > .config
	./configure install || die "could not install elicit"

	### efileinfo ###
# this guy does not build ... needs to be updated to new evas
#	einfo "making apps/efileinfo"
#	cd ${S}/apps/efileinfo
#	cp Makefile.am{,.old}
#	sed -e "s:intl po::" Makefile.am.old > Makefile.am
#	cp configure.in{,.old}
#	sed -e "s:po/Makefile.in::" \
#	 -e "s:intl/Makefile::" \
#	 -e "s:po/Makefile::" \
#		configure.in.old > configure.in
#	eautogen ${baseconf} || die "could not autogen efileinfo"
#	make || die "could not make efileinfo"
#	make install DESTDIR=${D} || die "could not install efileinfo"

	### imlib2_tools ###
	einfo "making apps/imlib2_tools"
	cd ${S}/apps/imlib2_tools
	env USER=BS eautogen ${baseconf} || die "could not autogen imlib2_tools"
	make || die "could not make imlib2_tools"
	make install DESTDIR=${D} || die "could not install imlib2_tools"

	### etcher ###
	einfo "making apps/etcher"
	cd ${S}/apps/etcher
	addconf="--disable-nls --with-included-gettext --disable-gtktest"
	cp Makefile.am Makefile.am.old
	sed -e 's:intl::' \
		-e 's:po::' \
		 Makefile.am.old > Makefile.am
	cp configure.in configure.in.old
	sed -e 's:intl/Makefile::' \
		-e 's:po/Makefile.in::' \
		-e 's:m4/Makefile::' \
		configure.in.old > configure.in
	eautogen ${baseconf} ${addconf} || die "could not autogen etcher"
	make || die "could not make etcher"
	make install DESTDIR="${D}" || die "could not install etcher"

	### ebony ###
	einfo "making apps/ebony"
	cd ${S}/apps/ebony
	eautogen ${baseconf} || die "could not autogen ebony"
	make || die "could not make ebony"
	make install DESTDIR="${D}" || die "could not install ebony"

	### med ###
	einfo "making apps/med"
	cd ${S}/apps/med
	addconf=
	use X           && addconf="${addconf} --with-x"
	eautogen ${baseconf} ${addconf} || die "could not autogen med"
	make || die "could not build med"
	make install DESTDIR="${D}" || die "could not install med"

	### efsd ###
	einfo "making apps/efsd"
	cd ${S}/apps/efsd
	eautogen ${baseconf} || die "could not autogen efsd"
	make || die "could not build efsd"
	make install DESTDIR="${D}" || die "could not install efsd"

	### ebindings ###
	einfo "making apps/ebindings"
	cd ${S}/apps/ebindings
	addconf="--disable-gtktest"
	eautogen ${baseconf} ${addconf} || die "could not autogen ebindings"
	make || die "could not build ebindings"
	make install DESTDIR="${D}" || die "could not install ebindings"

	### entrance ###
	einfo "making apps/entrance"
	cd ${S}/apps/entrance
	eautogen ${baseconf} || die "could not autogen entrance"
	make || die "could not build entrance"
	make install DESTDIR="${D}" || die "could not install entrance"
	insinto /etc/pam.d
	doins data/pam.d/entrance

	### e ###
	einfo "making apps/e"
	cd ${S}/apps/e
	addconf="--disable-nls"
	# hack it a little ;D
	cp configure.ac configure.ac.old
	sed -e 's:AC_MSG_ERROR(Cannot detect:#:' \
		-e 's:intl/Makefile::' \
		-e 's:po/Makefile.in::' \
		configure.ac.old > configure.ac
	cp Makefile.am Makefile.am.old
	sed -e 's:po::' Makefile.am.old > Makefile.am
	eautogen ${baseconf} ${addconf} || die "could not autogen e"
	cp Makefile Makefile.old
	sed -e 's:m4   ::' Makefile.old > Makefile
	make || die "could not build e"
	make install DESTDIR="${D}" >& /dev/null
	make install DESTDIR="${D}" || die "could not install e"

	############
	### misc ###
	############

	### elogin ###
	einfo "making misc/elogin"
	cd ${S}/misc/elogin
	eautogen ${baseconf} || die "could not autogen elogin"
	# now lets hax it to make it Gentoo style
	cd ${S}/misc/elogin/src/daemon && cp spawner.h{,.old}
	sed -e "s:.*ELOGIN.*:#define ELOGIN \"${E_PREFIX}/bin/elogin\":" \
		spawner.h.old > spawner.h
	cd ${S}/misc/elogin/src/client && cp callbacks.c{,.old}
	sed -e 's:/etc/X11/Xsession %s:%s:' \
		callbacks.c.old > callbacks.c
	cd ${S}/misc/elogin/data/config && cp build_config.sh{,.old}
	sed -e "s:/usr/local/e17:${E_PREFIX}:" \
	 -e 's:failsafe:/etc/X11/Sessions/Xsession:' \
	 -e 's:/usr/bin/kde:/usr/kde/3/bin/startkde:' \
		build_config.sh.old > build_config.sh
	rm build_config.sh.old
	./build_config.sh
	cd ${S}/misc/elogin
	make || die "could not build elogin"
	make install DESTDIR="${D}" || die "could not install elogin"
	insinto /etc/pam.d
	doins config/elogin

	### enotes ###
	einfo "making misc/enotes"
	cd ${S}/misc/enotes
	make || die "could not build enotes"
	insinto ${E_PREFIX}/share/enotes
	doins data/*
	exeinto ${E_PREFIX}/bin
	newexe ${FILESDIR}/enotes_wrapper enotes
	newexe enotes enotes_exe || die "could not install enotes"

	### evidence ###
	einfo "making misc/evidence"
	cd ${S}/misc/evidence
	addconf="--enable-canvas-evas2 --enable-extra-themes"
	use oggvorbis && addconf="${addconf} --enable-plugin-vorbis"
	epatch ${FILESDIR}/evidence-destdir.patch
	eautogen ${baseconf} || die "could not autogen evidence"
	make || die "could not build evidence"
	make install DESTDIR="${D}" || die "could not install evidence"

	############
	### fine ###
	############

	# add some Gentoo theme stuff
	dodir ${E_PREFIX}/share/enlightenment/data/backgrounds
	cd ${D}/${E_PREFIX}/share/enlightenment/data/backgrounds
	mv default.bg.db default-e17.bg.db
	mv ${WORKDIR}/gentoo-themes/background.db default.bg.db

	# remove improper stuff
	cd ${D}
	rm -rf `find -name CVS`
	rm -rf '@aclocaldir@'

	# make an env.d entry
	insinto /etc/env.d
	echo "PATH=${E_PREFIX}/bin:${E_PREFIX}/sbin" > e.env.d
	echo "ROOTPATH=${E_PREFIX}/bin:${E_PREFIX}/sbin" >> e.env.d
	echo "LDPATH=${E_PREFIX}/lib" >> e.env.d
	newins e.env.d 50enlightenment
	rm -f e.env.d
}

pkg_preinst() {
	[ -h ${E_PREFIX} ] && rm ${E_PREFIX}
}

pkg_postinst() {
	if [ -e ${E_PREFIX}.old ] ; then
		ewarn "Remember, your old e17 is at ${E_PREFIX}.old"
		ewarn "be sure to do something with it !"
		echo
	fi
}