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

Collapse All | Expand All

(-)lighttpd-1.4.20.ebuild (-30 / +14 lines)
Lines 2-9 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.20.ebuild,v 1.8 2009/02/03 12:46:51 betelgeuse Exp $
3
# $Header: /var/cvsroot/gentoo-x86/www-servers/lighttpd/lighttpd-1.4.20.ebuild,v 1.8 2009/02/03 12:46:51 betelgeuse Exp $
4
4
5
WANT_AUTOCONF=latest
5
EAPI="2"
6
WANT_AUTOMAKE=latest
6
7
inherit eutils autotools depend.php
7
inherit eutils autotools depend.php
8
8
9
DESCRIPTION="Lightweight high-performance web server"
9
DESCRIPTION="Lightweight high-performance web server"
Lines 12-24 Link Here
12
12
13
LICENSE="BSD"
13
LICENSE="BSD"
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="alpha amd64 ~arm hppa ia64 ~mips ppc ppc64 ~sh sparc ~sparc-fbsd x86 ~x86-fbsd"
15
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
16
IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr"
16
IUSE="bzip2 doc fam fastcgi gdbm ipv6 ldap lua minimal memcache mysql pcre php rrdtool ssl test webdav xattr"
17
17
18
# cherokee block should be resolved properly
19
# http://bugs.gentoo.org/show_bug.cgi?id=224781
20
RDEPEND="
18
RDEPEND="
21
	!www-servers/cherokee
22
	>=sys-libs/zlib-1.1
19
	>=sys-libs/zlib-1.1
23
	bzip2?    ( app-arch/bzip2 )
20
	bzip2?    ( app-arch/bzip2 )
24
	fam?      ( virtual/fam )
21
	fam?      ( virtual/fam )
Lines 28-35 Link Here
28
	memcache? ( dev-libs/libmemcache )
25
	memcache? ( dev-libs/libmemcache )
29
	mysql?    ( >=virtual/mysql-4.0 )
26
	mysql?    ( >=virtual/mysql-4.0 )
30
	pcre?     ( >=dev-libs/libpcre-3.1 )
27
	pcre?     ( >=dev-libs/libpcre-3.1 )
31
	php?      ( virtual/httpd-php )
28
	php?      ( virtual/httpd-php[cgi] )
32
	rrdtool? ( net-analyzer/rrdtool )
29
	rrdtool?  ( net-analyzer/rrdtool )
30
	fastcgi?  ( www-servers/spawn-fcgi )
33
	ssl?    ( >=dev-libs/openssl-0.9.7 )
31
	ssl?    ( >=dev-libs/openssl-0.9.7 )
34
	webdav? (
32
	webdav? (
35
		dev-libs/libxml2
33
		dev-libs/libxml2
Lines 61-67 Link Here
61
# remove non-essential stuff (for USE=minimal)
59
# remove non-essential stuff (for USE=minimal)
62
remove_non_essential() {
60
remove_non_essential() {
63
	local libdir="${D}/usr/$(get_libdir)/${PN}"
61
	local libdir="${D}/usr/$(get_libdir)/${PN}"
64
65
	# text docs
62
	# text docs
66
	use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt
63
	use doc || rm -fr "${D}"/usr/share/doc/${PF}/txt
67
64
Lines 76-85 Link Here
76
	use lua     || rm -f ${libdir}/mod_{cml,magnet}.*
73
	use lua     || rm -f ${libdir}/mod_{cml,magnet}.*
77
	use rrdtool || rm -f ${libdir}/mod_rrdtool.*
74
	use rrdtool || rm -f ${libdir}/mod_rrdtool.*
78
75
79
	if ! use fastcgi ; then
80
		rm -f ${libdir}/mod_fastcgi.* "${D}"/usr/bin/spawn-fcgi \
81
			"${D}"/usr/share/man/man1/spawn-fcgi.*
82
	fi
83
}
76
}
84
77
85
pkg_setup() {
78
pkg_setup() {
Lines 98-107 Link Here
98
	enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
91
	enewuser lighttpd -1 -1 /var/www/localhost/htdocs lighttpd
99
}
92
}
100
93
101
src_unpack() {
94
src_prepare() {
102
	unpack ${A}
103
	cd "${S}"
104
105
	EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch "${FILESDIR}"/"${PVR}" || die "Patching failed!"
95
	EPATCH_SUFFIX="diff" EPATCH_OPTS="-l" epatch "${FILESDIR}"/"${PVR}" || die "Patching failed!"
106
96
107
	eautoreconf || die
97
	eautoreconf || die
Lines 115-121 Link Here
115
		die "sed doc/cml.txt failed"
105
		die "sed doc/cml.txt failed"
116
}
106
}
117
107
118
src_compile() {
108
src_configure() {
119
	econf --libdir=/usr/$(get_libdir)/${PN} \
109
	econf --libdir=/usr/$(get_libdir)/${PN} \
120
		--enable-lfs \
110
		--enable-lfs \
121
		$(use_enable ipv6) \
111
		$(use_enable ipv6) \
Lines 132-138 Link Here
132
		$(use_with webdav webdav-locks) \
122
		$(use_with webdav webdav-locks) \
133
		$(use_with xattr attr) \
123
		$(use_with xattr attr) \
134
		|| die "econf failed"
124
		|| die "econf failed"
125
}
135
126
127
src_compile() {
136
	emake || die "emake failed"
128
	emake || die "emake failed"
137
129
138
	if use doc ; then
130
	if use doc ; then
Lines 151-161 Link Here
151
	use fam && has_version app-admin/fam && \
143
	use fam && has_version app-admin/fam && \
152
		sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd
144
		sed -i 's/after famd/need famd/g' "${D}"/etc/init.d/lighttpd
153
145
154
	if use php || use fastcgi ; then
155
		newinitd "${FILESDIR}"/spawn-fcgi.initd spawn-fcgi || die
156
		newconfd "${FILESDIR}"/spawn-fcgi.confd spawn-fcgi || die
157
	fi
158
159
	# configs
146
	# configs
160
	insinto /etc/lighttpd
147
	insinto /etc/lighttpd
161
	doins "${FILESDIR}"/conf/lighttpd.conf
148
	doins "${FILESDIR}"/conf/lighttpd.conf
Lines 187-199 Link Here
187
	fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
174
	fowners lighttpd:lighttpd /var/l{ib,og}/lighttpd
188
	fperms 0750 /var/l{ib,og}/lighttpd
175
	fperms 0750 /var/l{ib,og}/lighttpd
189
176
177
	#spawn-fcgi is installed by a separate package
178
	rm -f "${D}"/usr/$(get_libdir)/${PN}/mod_fastcgi.* "${D}"/usr/bin/spawn-fcgi \
179
		"${D}"/usr/share/man/man1/spawn-fcgi.*
180
190
	use minimal && remove_non_essential
181
	use minimal && remove_non_essential
191
}
182
}
192
183
193
pkg_postinst () {
184
pkg_postinst () {
194
	echo
185
	echo
195
	if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
186
	if [[ -f ${ROOT}etc/conf.d/spawn-fcgi.conf ]] ; then
196
		einfo "spawn-fcgi is now included with lighttpd"
197
		einfo "spawn-fcgi's init script configuration is now located"
187
		einfo "spawn-fcgi's init script configuration is now located"
198
		einfo "at /etc/conf.d/spawn-fcgi."
188
		einfo "at /etc/conf.d/spawn-fcgi."
199
		echo
189
		echo
Lines 205-214 Link Here
205
		ewarn "existing configuration."
195
		ewarn "existing configuration."
206
		ebeep 5
196
		ebeep 5
207
	fi
197
	fi
208
209
	if use fam ; then
210
		einfo "Remember to re-emerge lighttpd should you switch from"
211
		einfo "app-admin/famd to app-admin/gamin or vice versa."
212
	fi
213
	echo
214
}
198
}

Return to bug 260174