Changeset - 3bd101344e8e
[Not reviewed]
default
0 2 2
Nathan Brink (binki) - 16 years ago 2009-08-01 18:08:09
ohnobinki@ohnopublishing.net
added confuse with relative includes patch
4 files changed with 123 insertions and 2 deletions:
0 comments (0 inline, 0 general)
dev-libs/confuse/ChangeLog
Show inline comments
 
# ChangeLog for dev-libs/confuse
 
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
 
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
 
# $Header: /var/cvsroot/gentoo-x86/dev-libs/confuse/ChangeLog,v 1.39 2008/12/17 22:09:10 maekke Exp $
 

	
 
  01 Aug 2009; Nathan Brink <ohnobinki@gentoo.org> +confuse-2.6-r4.ebuild,
 
  +files/confuse-2.6-relativeincludes.patch:
 
  Added relative includes patch
 

	
 
  28 Feb 2009; Nathan Phillip Brink <ohnobinki@ohnopublishing.net> -confuse-2.6.ebuild, -confuse-2.6-r2.ebuild, 
 
  Initial import into ohnobinki_overlay from Gentoo Portage, disabled building of non-installed/unused examples to support crosscompiling to mingw32
 
	
 
  17 Dec 2008; Markus Meier <maekke@gentoo.org> confuse-2.6-r3.ebuild:
 
  amd64 stable, bug #246143
 

	
 
  10 Dec 2008; Jeroen Roovers <jer@gentoo.org> confuse-2.6-r3.ebuild:
 
  Stable for HPPA (bug #246143).
 

	
 
  09 Dec 2008; Raúl Porcel <armin76@gentoo.org> confuse-2.6-r3.ebuild:
 
  alpha/ia64/sparc/x86 stable wrt #246143
 

	
 
  08 Dec 2008; Brent Baude <ranger@gentoo.org> confuse-2.6-r3.ebuild:
 
  stable ppc64, bug 246143
 

	
 
  06 Dec 2008; Tobias Scherbaum <dertobi123@gentoo.org>
 
  confuse-2.6-r3.ebuild:
 
  ppc stable, bug #246143
 

	
 
*confuse-2.6-r3 (30 Sep 2008)
 

	
 
  30 Sep 2008; MATSUU Takuto <matsuu@gentoo.org>
 
  +files/confuse-2.6-solaris.patch, -confuse-2.6-r1.ebuild,
 
  +confuse-2.6-r3.ebuild:
 
  Fixed test building on OpenSolaris issue, bug #239020.
 

	
 
*confuse-2.6-r2 (15 Sep 2008)
 

	
 
  15 Sep 2008; MATSUU Takuto <matsuu@gentoo.org>
 
  +files/confuse-2.6-O0.patch, +confuse-2.6-r2.ebuild:
 
  Fixed optimization issue, bug #236347.
 

	
 
  17 May 2008; MATSUU Takuto <matsuu@gentoo.org>
 
  -files/confuse-2.5-libintl.patch, -files/confuse-2.5-maketest.patch,
 
  -confuse-2.5.ebuild, confuse-2.6.ebuild, confuse-2.6-r1.ebuild:
 
  Added sys-devel/flex to DEPEND, bug #221379.
 
  Removed old version.
 

	
 
  12 May 2008; Markus Meier <maekke@gentoo.org> confuse-2.6.ebuild:
 
  amd64 stable, bug #217815
 

	
 
  17 Apr 2008; nixnut <nixnut@gentoo.org> confuse-2.6.ebuild:
 
  Stable on ppc wrt bug 217815
 

	
 
  17 Apr 2008; Raúl Porcel <armin76@gentoo.org> confuse-2.6.ebuild:
 
  ia64/x86 stable wrt #217815
 

	
 
  16 Apr 2008; Tobias Klausmann <klausman@gentoo.org> confuse-2.6.ebuild:
 
  Stable on alpha, bug #217815
 

	
 
  16 Apr 2008; Markus Rothe <corsair@gentoo.org> confuse-2.6.ebuild:
 
  Stable on ppc64; bug #217815
 

	
 
  15 Apr 2008; Ferris McCormick <fmccor@gentoo.org> confuse-2.6.ebuild:
 
  Sparc stable --- Bug #217815 --- all tests pass.
 

	
 
  15 Apr 2008; Jeroen Roovers <jer@gentoo.org> confuse-2.6.ebuild:
 
  Stable for HPPA (bug #217815).
 

	
 
*confuse-2.6-r1 (15 Apr 2008)
 

	
 
  15 Apr 2008; MATSUU Takuto <matsuu@gentoo.org> +confuse-2.6-r1.ebuild:
 
  Removed -Werror for gcc-4.3, bug #208095.
 

	
 
*confuse-2.6 (21 Jan 2008)
 

	
 
  21 Jan 2008; MATSUU Takuto <matsuu@gentoo.org> metadata.xml,
 
  +confuse-2.6.ebuild:
 
  Version bumped.
 
  maintainership takeover. bug #203832.
 

	
 
  13 Sep 2007; Roy Marples <uberlord@gentoo.org>
 
  +files/confuse-2.5-libintl.patch, confuse-2.5.ebuild:
 
  Link to libintl correctly on non glibc systems
 

	
 
  08 May 2007; Fabian Groffen <grobian@gentoo.org> confuse-2.5.ebuild:
 
  Dropped ppc-macos keyword, see you in prefix
 

	
 
  09 Apr 2007; Peter Weller <welp@gentoo.org> confuse-2.5.ebuild:
 
  Stable on amd64 wrt bug 172329
 

	
 
  17 Nov 2006; Diego Pettenò <flameeyes@gentoo.org> confuse-2.5.ebuild:
 
  Add ~sparc-fbsd keyword.
 

	
 
  12 Sep 2006; Gustavo Zacarias <gustavoz@gentoo.org> confuse-2.5.ebuild:
 
  Stable on hppa
 

	
 
  30 Jun 2006; Gustavo Zacarias <gustavoz@gentoo.org> confuse-2.5.ebuild:
 
  Keyworded ~hppa
 

	
 
  16 May 2006; Emanuele Giaquinta <exg@gentoo.org> confuse-2.5.ebuild:
 
  Stable on ppc.
 

	
 
  30 Mar 2006; Diego Pettenò <flameeyes@gentoo.org> confuse-2.5.ebuild:
 
  Add ~x86-fbsd keyword.
 

	
 
  28 Feb 2006; Sandro Bonazzola <sanchan@gentoo.org> confuse-2.5.ebuild:
 
  Adding dependency on pkgconfig, adding doins confuse-config for
 
  compatibility with other packages that still depends on it. Updating ebuild
 
  header. Fix bug# 124329, thanks to Diego Pettenò.
 

	
 
  31 Dec 2005; Diego Pettenò <flameeyes@gentoo.org> confuse-2.5.ebuild:
 
  Remove conditional libtoolize (without re-autoconf) and just call
 
  elibtoolize for sanity checks.
 

	
 
  28 Nov 2005; Tom Gall <tgall@gentoo.org> confuse-2.5.ebuild:
 
  stable on ppc64
 

	
 
  02 Oct 2005; Aron Griffis <agriffis@gentoo.org> confuse-2.5.ebuild:
 
  Mark 2.5 stable on alpha
 

	
 
  02 Oct 2005; Aron Griffis <agriffis@gentoo.org> confuse-2.5.ebuild:
 
  Mark 2.5 stable on ia64
 

	
 
  19 Sep 2005; Gustavo Zacarias <gustavoz@gentoo.org> confuse-2.5.ebuild:
 
  Stable on sparc
 

	
 
  25 Aug 2005; Aron Griffis <agriffis@gentoo.org> confuse-2.5.ebuild:
 
  add ~alpha ~ia64
 

	
 
  01 Aug 2005; Gustavo Zacarias <gustavoz@gentoo.org> confuse-2.5.ebuild:
 
  ~sparc wrt #100058
 

	
 
  31 Jul 2005; Markus Rothe <corsair@gentoo.org> confuse-2.5.ebuild:
 
  added ~ppc64 (bug #100058)
 

	
 
  30 Jul 2005; Kito <kito@gentoo.org> confuse-2.5.ebuild:
 
  make libtoolize conditional for Darwin and add ~ppc-macos keyword
 

	
 
  26 Jun 2005; David Holm <dholm@gentoo.org> confuse-2.5.ebuild:
 
  Added to ~ppc.
 

	
 
  12 Jun 2005; Danny van Dyk <kugelfang@gentoo.org> confuse-2.5.ebuild:
 
  Marked ~amd64.
 

	
 
*confuse-2.5 (05 Dec 2004)
 

	
 
  05 Dec 2004; Daniel Black <dragonheart@gentoo.org> +metadata.xml,
 
  +files/confuse-2.5-maketest.patch, +confuse-2.5.ebuild:
 
  initial import bug #47812. Thanks to maj <maj@jamers.net>
 

	
dev-libs/confuse/Manifest
Show inline comments
 
AUX confuse-2.6-O0.patch 492 RMD160 29fd2ba5a9c2fec7d23f1586b25de4fdda30e720 SHA1 1a6c59611dd013e429e44ebf886a60e0a30ecec1 SHA256 64a6d0df44f72d3f514a4678a16f1f887e417250f7990b64631fe0a3999215ff
 
AUX confuse-2.6-noexamples.patch 1097 RMD160 77dc01c65b1f7c00e4d460ab8feb15af88bf4685 SHA1 eb278dfb91a3c707517acc3772b08eb198ff4d23 SHA256 860b1459e499588186d5b0e0d8e614ffe160ff935dd3a4db461a1b9071df90f7
 
AUX confuse-2.6-relativeincludes.patch 1562 RMD160 099b59694450e377fe057bed1b6150cde1dac24f SHA1 fb53dce15875c34d081cfbb6accf97cf88ba73c8 SHA256 17f23a048492fa6b038c7ec114fb6d477cfc411eefc88ffcc2c7b28dbf460a84
 
AUX confuse-2.6-solaris.patch 572 RMD160 e43927f1688fb99e283d919b4d6f7bce7de18bb2 SHA1 bbe8a4071c8961b965cd37f2ce9b295ff17129dc SHA256 00dc757a617db9fc5832ec4435ef581b49286621cf300a89b318151a1bfd15c5
 
DIST confuse-2.6.tar.gz 504017 RMD160 11f987089c533573482a427c7ad2ae8e155389b7 SHA1 e9e5510abf1eb3159a6439fd52aa5cec94811aff SHA256 e8d653159b152f3850a7224b3eb604955795dbd3fd6603816ee46411ea53e84a
 
EBUILD confuse-2.6-r3.ebuild 1191 RMD160 033c7062f7ce617aef42b19294c1024b3af138f9 SHA1 91574a27afc4cd0d5a31d0e777089c01951daf11 SHA256 7c1b910922cac96acfaa0a90eab55661071dcc382ffcb9529ae7730e74afb5c7
 
MISC ChangeLog 5162 RMD160 8054505e53247f43cf2145c6b59fa4d7d688de2a SHA1 3f7548ffabe04a204ff13756884ed78d225fc3ba SHA256 4c84192f67ad33061c7eff3dfecf211d85bfedae581d59b9e43db215fb7a3d89
 
EBUILD confuse-2.6-r4.ebuild 1581 RMD160 37c99b72457bc2a9cbd1fb68d73f8f049eef0859 SHA1 5a39c860d218363d6f35a7e1f1f57b65d6a98199 SHA256 9af50fa8d4d0aecdbed609be27110206d0be934f9f83ca2800a168cb008935ca
 
MISC ChangeLog 5315 RMD160 2ac751fcab57d0de0e2ddc30201c09f5fb40e783 SHA1 8f827df311f972601a6144339f51bb8cf52355c1 SHA256 c159c0360277a8ab10e5af1bb1746d0b9661a4d3ecbc7a9a1abb5295f3aa1d58
 
MISC metadata.xml 222 RMD160 23efe87c16ebc9fbeb91e894ab372cc3bb66bc49 SHA1 a5d1e2317ae207bbd664aebe986687948fdd984a SHA256 38ef3457fd14e6872985f0e100fde79d0b8a9dbc4fc39ceef780c8c5abc5f337
dev-libs/confuse/confuse-2.6-r4.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2009 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/dev-libs/confuse/confuse-2.6-r3.ebuild,v 1.6 2008/12/17 22:09:10 maekke Exp $
 

	
 
inherit eutils autotools
 

	
 
DESCRIPTION="a configuration file parser library"
 
HOMEPAGE="http://www.nongnu.org/confuse/"
 
SRC_URI="http://bzero.se/confuse/${P}.tar.gz"
 

	
 
LICENSE="LGPL-2"
 
SLOT="0"
 
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~sparc-fbsd x86 ~x86-fbsd"
 
IUSE="nls"
 

	
 
DEPEND="sys-devel/flex
 
	sys-devel/libtool
 
	dev-util/pkgconfig
 
	nls? ( sys-devel/gettext )"
 
RDEPEND="nls? ( virtual/libintl )"
 

	
 
pkg_setup() {
 
	ewarn "This copy of confuse has a patch that causes cfg_include"
 
	ewarn "to include files relative to the file calling cfg_include."
 
	ewarn "This may break packages designed for vanilla confuse. Please"
 
	ewarn "bug me at https://ohnopublishing.net/bugs/ if you have problems"
 
	ewarn "with this."
 
}
 

	
 
src_unpack() {
 
	unpack ${A}
 
	cd "${S}"
 
	# bug #236347
 
	epatch "${FILESDIR}"/${P}-O0.patch
 
	# bug 239020
 
	epatch "${FILESDIR}"/${P}-solaris.patch
 
	# don't compile examples:
 
	epatch "${FILESDIR}"/${P}-noexamples.patch
 
	#relative cfg_include()s
 
	epatch "${FILESDIR}"/${P}-relativeincludes.patch
 
	# drop -Werror, bug #208095
 
	sed -i -e 's/-Werror//' */Makefile.* || die
 

	
 
	eautoreconf
 
}
 

	
 
src_compile() {
 
	econf --enable-shared --disable-examples || die
 
	emake || die
 
}
 

	
 
src_install() {
 
	emake DESTDIR="${D}" install || die
 

	
 
	doman doc/man/man3/*.3
 
	dodoc AUTHORS NEWS README
 
	dodoc examples/*.c examples/*.conf
 
	dohtml doc/html/* || die
 
}
dev-libs/confuse/files/confuse-2.6-relativeincludes.patch
Show inline comments
 
new file 100644
 
--- a/src/lexer.l
 
+++ b/src/lexer.l
 
@@ -298,12 +298,51 @@ int cfg_lexer_include(cfg_t *cfg, const char *filename)
 
     cfg_include_stack[cfg_include_stack_ptr].line = cfg->line;
 
     cfg_include_stack_ptr++;
 
 
 
-    xfilename = cfg_tilde_expand(filename);
 
+    xfilename = NULL;
 
+
 
+    if(filename[0] != '/'
 
+       && filename[0] != '~'
 
+       /* ensure that the existing file has directories in it */
 
+#ifdef _WIN32
 
+       && (strchr(cfg->filename, '\\')
 
+	   || strchr(cfg->filename, '/'))
 
+#else
 
+       && cfg->filename[0] == '/'
 
+#endif
 
+       )
 
+      /* then this path is relative to the file it was included from */
 
+      {
 
+	char *lastslash;
 
+	size_t prefixlen;
 
+
 
+	lastslash = strrchr(cfg->filename, '/');
 
+#ifdef _WIN32
 
+	{
 
+	  char *win32slash;
 
+
 
+	  win32slash = strrchr(cfg->filename, '\\');
 
+	  if(!lastslash
 
+	     || win32slash > lastslash)
 
+	    lastslash = win32slash;
 
+	}
 
+#endif
 
+	assert(lastslash);
 
+	prefixlen = lastslash - cfg->filename + 1; /* length of prefix including slash */
 
+	xfilename = malloc(prefixlen
 
+			   + strlen(filename)
 
+			   + 1); /* NULL terminator */
 
+	assert(xfilename);
 
+	strncpy(xfilename, cfg->filename, prefixlen);
 
+	strcpy(xfilename + prefixlen, filename);
 
+      }
 
+
 
+    if(!xfilename)
 
+      xfilename = cfg_tilde_expand(filename);
 
 
 
     cfg_yyin = fopen(xfilename, "r");
 
 
 
     if(!cfg_yyin) {
 
-        cfg_error(cfg, "%s: %s", xfilename, strerror(errno));
 
+        cfg_error(cfg, "%s (expanded from %s): %s", xfilename, filename, strerror(errno));
 
         free(xfilename);
 
         return 1;
 
     }
0 comments (0 inline, 0 general)