# ChangeLog for net-proxy/polipo
-# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/ChangeLog,v 1.10 2006/11/17 21:11:39 mrness Exp $
+# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/ChangeLog,v 1.11 2007/01/15 12:11:03 mrness Exp $
+
+*polipo-0.9.11 (15 Jan 2007)
+
+ 15 Jan 2007; Alin Nastac <mrness@gentoo.org>
+ -files/polipo-0.9.9-gentoo.patch, +files/polipo-0.9.11-gentoo.patch,
+ -polipo-0.9.9-r2.ebuild, +polipo-0.9.11.ebuild:
+ Fix "Range without partial content" error (#162160). Version bump.
17 Nov 2006; Alin Nastac <mrness@gentoo.org> polipo-0.9.10.ebuild:
Stable on x86.
--- /dev/null
+MD5 860f8f5e34be010379aa693e5224f84e polipo-0.9.11.tar.gz 149330
+RMD160 c2e5d2fe591d026e96b32a7b4b2693c6ca2e9b1a polipo-0.9.11.tar.gz 149330
+SHA256 6f7c9ca5b61aeaa926a8ea2f307ed98b35d2fc6249be20b4092d9c97124d8abc polipo-0.9.11.tar.gz 149330
--- /dev/null
+diff -Nru polipo-0.9.11.orig/Makefile polipo-0.9.11/Makefile
+--- polipo-0.9.11.orig/Makefile 2006-12-07 21:08:41.000000000 +0200
++++ polipo-0.9.11/Makefile 2007-01-15 13:41:44.000000000 +0200
+@@ -82,11 +82,6 @@
+ cp -f localindex.html $(TARGET)$(LOCAL_ROOT)/index.html
+
+ install.man: all
+- mkdir -p $(TARGET)$(MANDIR)/man1
+- mkdir -p $(TARGET)$(INFODIR)
+- cp -f polipo.man $(TARGET)$(MANDIR)/man1/polipo.1
+- cp polipo.info $(TARGET)$(INFODIR)/
+- install-info --info-dir=$(INFODIR) polipo.info
+
+
+ polipo.info: polipo.texi
+diff -Nru polipo-0.9.11.orig/polipo.h polipo-0.9.11/polipo.h
+--- polipo-0.9.11.orig/polipo.h 2006-12-07 21:08:41.000000000 +0200
++++ polipo-0.9.11/polipo.h 2007-01-15 13:41:44.000000000 +0200
+@@ -62,7 +62,9 @@
+ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ /* nothing */
+ #elif defined(__GNUC__)
++#ifndef inline
+ #define inline __inline
++#endif
+ #if (__GNUC__ >= 3)
+ #define restrict __restrict
+ #else
+diff -Nru polipo-0.9.11.orig/server.c polipo-0.9.11/server.c
+--- polipo-0.9.11.orig/server.c 2006-12-07 21:08:41.000000000 +0200
++++ polipo-0.9.11/server.c 2007-01-15 13:46:44.000000000 +0200
+@@ -1832,10 +1832,10 @@
+ } else if(code < 400 &&
+ (content_range.from >= 0 || content_range.to >= 0 ||
+ content_range.full_length >= 0)) {
+- do_log(L_ERROR, "Range without partial content.\n");
+- httpServerAbort(connection, 1, 502,
+- internAtom("Range without partial content"));
+- goto fail;
++ do_log(L_WARN, "Range without partial content.\n");
++ content_range.from = -1;
++ content_range.to = -1;
++ content_range.full_length = -1;
+ } else if(code != 304 && code != 412) {
+ full_len = len;
+ }
--- /dev/null
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-proxy/polipo/polipo-0.9.11.ebuild,v 1.1 2007/01/15 12:11:03 mrness Exp $
+
+inherit eutils
+
+DESCRIPTION="A caching web proxy"
+HOMEPAGE="http://www.pps.jussieu.fr/~jch/software/polipo/"
+SRC_URI="http://www.pps.jussieu.fr/~jch/software/files/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="sys-apps/texinfo"
+
+pkg_setup() {
+ enewgroup polipo
+ enewuser polipo -1 -1 /var/cache/polipo polipo
+}
+
+src_unpack() {
+ unpack ${A}
+
+ epatch "${FILESDIR}/${P}-gentoo.patch"
+}
+
+src_compile() {
+ emake "PREFIX=/usr" "CDEBUGFLAGS=${CFLAGS}" all || die "build failed"
+}
+
+src_install() {
+ einstall "PREFIX=/usr" "TARGET=${D}" || die "install failed"
+ mv polipo.man polipo.1
+ doman "${S}/polipo.1"
+ doinfo "${S}/polipo.info"
+
+ exeinto /etc/init.d ; newexe "${FILESDIR}/polipo.initd" polipo
+ insinto /etc/polipo ; doins "${FILESDIR}/config"
+ exeinto /etc/cron.daily ; newexe "${FILESDIR}/polipo.crond" polipo.sh
+
+ diropts -m0750 -o polipo -g polipo
+ dodir /var/cache/polipo
+}
+
+pkg_preinst() {
+ pkg_setup
+}
+
+pkg_postinst() {
+ einfo "Do not forget to read the manual."
+ einfo "Change the config file in /etc/polipo to suit your needs."
+}