summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans de Graaff <graaff@gentoo.org>2011-12-04 10:12:59 +0000
committerHans de Graaff <graaff@gentoo.org>2011-12-04 10:12:59 +0000
commit482fd1dc946520a01d38e443d0a3ee2caf47df41 (patch)
treef21b3de81dcf45f8342c6aab85009e802e5ed6e0 /www-servers
parentsplit opts to extra_commands (diff)
downloadhistorical-482fd1dc946520a01d38e443d0a3ee2caf47df41.tar.gz
historical-482fd1dc946520a01d38e443d0a3ee2caf47df41.tar.bz2
historical-482fd1dc946520a01d38e443d0a3ee2caf47df41.zip
Convert to ruby-ng.eclass. Add ruby19 support. Thanks to naota for patches and testing in bug 315487.
Package-Manager: portage-2.1.10.11/cvs/Linux x86_64
Diffstat (limited to 'www-servers')
-rw-r--r--www-servers/gorg/ChangeLog9
-rw-r--r--www-servers/gorg/Manifest11
-rw-r--r--www-servers/gorg/files/gorg-0.6.4-ruby19-date.patch32
-rw-r--r--www-servers/gorg/files/gorg-0.6.4-ruby19.patch161
-rw-r--r--www-servers/gorg/gorg-0.6.4-r1.ebuild63
5 files changed, 271 insertions, 5 deletions
diff --git a/www-servers/gorg/ChangeLog b/www-servers/gorg/ChangeLog
index 56ec1e3d20c4..be50e6487fcc 100644
--- a/www-servers/gorg/ChangeLog
+++ b/www-servers/gorg/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-servers/gorg
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/gorg/ChangeLog,v 1.27 2011/04/09 18:13:34 graaff Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/gorg/ChangeLog,v 1.28 2011/12/04 10:12:59 graaff Exp $
+
+*gorg-0.6.4-r1 (04 Dec 2011)
+
+ 04 Dec 2011; Hans de Graaff <graaff@gentoo.org> +gorg-0.6.4-r1.ebuild,
+ +files/gorg-0.6.4-ruby19-date.patch, +files/gorg-0.6.4-ruby19.patch:
+ Convert to ruby-ng.eclass. Add ruby19 support. Thanks to naota for patches
+ and testing in bug 315487.
09 Apr 2011; Hans de Graaff <graaff@gentoo.org> gorg-0.6.3-r2.ebuild,
gorg-0.6.4.ebuild:
diff --git a/www-servers/gorg/Manifest b/www-servers/gorg/Manifest
index ba10d4669d82..414c61d89d48 100644
--- a/www-servers/gorg/Manifest
+++ b/www-servers/gorg/Manifest
@@ -1,16 +1,19 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
+AUX gorg-0.6.4-ruby19-date.patch 1010 RMD160 3a10f6299cc71a6a4a0ff4b68f5799a7c3883964 SHA1 6425fb286c03a1c7331ca067bdee4c232dff333f SHA256 820a263c3c9081a48bbcf768cab1a076038c41f680cb0115aca46d6a357b775c
+AUX gorg-0.6.4-ruby19.patch 6507 RMD160 705fc3466979f76d4f6e1754cbbfbd4c81ed9b81 SHA1 acf0e374320743945d12255a15196c908744d780 SHA256 da04a3da7112a06e9555d99153625455049392ec4b820a04c2aaebfd031284b9
DIST gorg-0.6.3.tgz 56384 RMD160 dca61e17138763a2785893a83221533eb79ef1fa SHA1 33a306cec67fc208adf5843b272b8e674d1b57bc SHA256 3c4822b6d16a3fb04a772016589c68e6ad5bbcf240a3c621a7a7f8676d6303ce
DIST gorg-0.6.4.tgz 56811 RMD160 ee7fc8d2363dbef654885de6a8383d50242bc51f SHA1 7f8bc3682be295219b0105f526686db7f46e586b SHA256 8ed0fa7da62aa16e58424943d87573bedb3fbab63fdf037eabbbbf470d57c18e
EBUILD gorg-0.6.3-r2.ebuild 1380 RMD160 79eef59aaf1586f218dcc425ea8f5323c359b759 SHA1 051a91fd8796a3bcf3d29160dc70bb1937f810c9 SHA256 a609418147b16eff7e6ee14b76075e91b843246ab619d1f93bac0289b04a0de5
+EBUILD gorg-0.6.4-r1.ebuild 1622 RMD160 708291b7f28aee37392f26d4b083b84673109680 SHA1 1dfcf547ad4676e3a3a5e28187a290a63004aba1 SHA256 e9dca162887c04f8dde7068824cc4564997455bac1b3dc20378bf5a2803d7668
EBUILD gorg-0.6.4.ebuild 1202 RMD160 81d10b8fc0ebb41f78b6bb5919ebfb178ff9e119 SHA1 3eb3d39920bfa68b35c127fab9c4548fa8139976 SHA256 6ea5a571d2bce52b819b189daabe14137535e47cd7ed4a1a0a41c7beea4141e7
-MISC ChangeLog 4092 RMD160 58a2d8be302f4daee17bd696024ba06e26dfc4fe SHA1 8d670a1a78368e8a230c45d761b4585dbc634cc8 SHA256 84d70f6569e3edd4692c608a6a20fbaf2c48f82d381345b1da6797ad80696f4b
+MISC ChangeLog 4373 RMD160 eff218942d719ddf65b0e5bf73cfff8b3744f988 SHA1 42c23bff7319e853d412d1f67ba01ac46307bfe9 SHA256 d584458968abfee59fc5669434a9ba81eada558df546094f62afc7e7d7190704
MISC metadata.xml 663 RMD160 c73e4a58b69b296262f3429b3ed19744ed54fffe SHA1 33d256015499692c85eac2fbebc0751279da170e SHA256 942eae02575f6f4ad751b5939379fa367eb55a081b04ef515aa7627bd97984ac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iF4EAREIAAYFAk2godQACgkQrnu0mw69JkqeFQD+LzrY0xI3pogaytp4SBqOsHtK
-cbmEWnOpZhfcuCmz1OYBAIKBdpfZAN8N1hC+rNMYd6Ui8wSgG+9mOGzcVisWPd5j
-=LTdu
+iF4EAREIAAYFAk7bR7YACgkQiIP6VqMIqNfImQD8DYcSqjl1quHQQ8135PgiLrrJ
+UFDR4cqSEh7vNfpHddYA/25hFdEivJcYacUXg4cUTnCMAq6t50ISugJt3FQYhcMs
+=A9t+
-----END PGP SIGNATURE-----
diff --git a/www-servers/gorg/files/gorg-0.6.4-ruby19-date.patch b/www-servers/gorg/files/gorg-0.6.4-ruby19-date.patch
new file mode 100644
index 000000000000..03b6ef8d10f9
--- /dev/null
+++ b/www-servers/gorg/files/gorg-0.6.4-ruby19-date.patch
@@ -0,0 +1,32 @@
+diff --git a/lib/gorg/cache.rb b/lib/gorg/cache.rb
+index 543b6a2..00ad1ab 100644
+--- a/lib/gorg/cache.rb
++++ b/lib/gorg/cache.rb
+@@ -22,7 +22,13 @@
+ # . a list of parameters as received by a webserver e.g.
+ # . a list of files it depends on
+
+-require "parsedate"
++begin
++ require "parsedate"
++ $haveparsedate = true
++rescue LoadError
++ require "time"
++ $haveparsedate = false
++end
+ require "fileutils"
+ require "find"
+ require "digest"
+@@ -106,7 +112,11 @@ module Cache
+
+ fst = File.stat(f)
+ raise "Size of #{f} has changed from #{fst.size} to #{s.to_i}" unless fst.size == s.to_i
+- raise "Timestamp of #{f} has changed" unless Time.utc(*ParseDate.parsedate(d)) == fst.mtime.utc
++ if $haveparsedate
++ raise "Timestamp of #{f} has changed" unless Time.utc(*ParseDate.parsedate(d)) == fst.mtime.utc
++ else
++ raise "Timestamp of #{f} has changed" unless Time.parse(d) == fst.mtime.utc
++ end
+ end
+ mline = meta.shift
+ end
diff --git a/www-servers/gorg/files/gorg-0.6.4-ruby19.patch b/www-servers/gorg/files/gorg-0.6.4-ruby19.patch
new file mode 100644
index 000000000000..d155ffaad2fb
--- /dev/null
+++ b/www-servers/gorg/files/gorg-0.6.4-ruby19.patch
@@ -0,0 +1,161 @@
+diff --git a/ext/gorg/xsl/xsl.c b/ext/gorg/xsl/xsl.c
+index d8d40b6..58ffc49 100644
+--- a/ext/gorg/xsl/xsl.c
++++ b/ext/gorg/xsl/xsl.c
+@@ -20,6 +20,13 @@
+
+ #include "xsl.h"
+
++#ifndef RARRAY_LEN
++#define RARRAY_LEN(a) RARRAY(a)->len
++#endif
++#ifndef RSTRING_LEN
++#define RSTRING_LEN(str) RSTRING(str)->len
++#endif
++
+ /*
+ * Copied from xmlIO.c from libxml2
+ */
+@@ -156,8 +163,8 @@ void *XRootOpen (const char *filename, const char* rw) {
+
+ if (g_xroot != Qnil)
+ {
+- rbxrootPtr = RSTRING(g_xroot)->ptr;
+- rbxrootLen = RSTRING(g_xroot)->len;
++ rbxrootPtr = RSTRING_PTR(g_xroot);
++ rbxrootLen = RSTRING_LEN(g_xroot);
+ }
+ path = (char *) malloc((strlen(filename) + rbxrootLen + 1) * sizeof(char));
+ if (path == NULL)
+@@ -284,10 +291,10 @@ void xslMessageHandler(void *ctx ATTRIBUTE_UNUSED, const char *msg, ...)
+ */
+ int looksLikeXML(VALUE v)
+ {
+- return (RSTRING(v)->len > FILENAME_MAX)
+- || (!strncmp(RSTRING(v)->ptr, "<?xml", 5))
+- || (!strncmp(RSTRING(v)->ptr, "<?xsl", 5))
+- || (strstr(RSTRING(v)->ptr, "\n"));
++ return (RSTRING_LEN(v) > FILENAME_MAX)
++ || (!strncmp(RSTRING_PTR(v), "<?xml", 5))
++ || (!strncmp(RSTRING_PTR(v), "<?xsl", 5))
++ || (strstr(RSTRING_PTR(v), "\n"));
+ // We could also try with " " but some are stupid enough to use spaces in filenames
+ }
+
+@@ -456,7 +463,7 @@ VALUE check_params(VALUE xparams)
+ // empty array => Qnil
+ // array.length==2, could be 2 params [[p1,v1],[p2,v2]] or 1 param [p,v]
+ // if both items are arrays, we have a list of params, otherwise we have a single param
+- len = RARRAY(ary)->len;
++ len = RARRAY_LEN(ary);
+ switch (len)
+ {
+ case 0:
+@@ -522,17 +529,17 @@ char *build_params(VALUE rbparams)
+
+ // Compute total block size in one go
+ tempval = rb_funcall(rbparams, id.to_s, 0);
+- ret = malloc ( ((RARRAY(rbparams)->len)*2+1) * sizeof(void *) // Two pointers per [param, value] + 1 NULL
+- + (RARRAY(rbparams)->len) * 4 * sizeof(char) // Quotes around values + 1 NULL per value
+- + (RSTRING(tempval)->len) * sizeof(char) // Size of param names & values
++ ret = malloc ( ((RARRAY_LEN(rbparams))*2+1) * sizeof(void *) // Two pointers per [param, value] + 1 NULL
++ + (RARRAY_LEN(rbparams)) * 4 * sizeof(char) // Quotes around values + 1 NULL per value
++ + (RSTRING_LEN(tempval)) * sizeof(char) // Size of param names & values
+ );
+ if ( ret==NULL)
+ return NULL; // out of memory
+
+ paramPtr = (char **)ret;
+- paramData = ret + ((RARRAY(rbparams)->len)*2+1) * sizeof(void *);
++ paramData = ret + ((RARRAY_LEN(rbparams))*2+1) * sizeof(void *);
+ // Copy each param name & value
+- for (i=0; i<RARRAY(rbparams)->len; ++i)
++ for (i=0; i<RARRAY_LEN(rbparams); ++i)
+ {
+ tempval = rb_ary_entry(rbparams, i); // ith param, i.e. [name, value]
+
+@@ -542,9 +549,9 @@ char *build_params(VALUE rbparams)
+ // Add param name address to list of pointers
+ *paramPtr++ = paramData;
+ // Copy param name into data block
+- strcpy(paramData, RSTRING(tempstr)->ptr);
++ strcpy(paramData, RSTRING_PTR(tempstr));
+ // Move data pointer after inserted string
+- paramData += 1+ RSTRING(tempstr)->len;
++ paramData += 1+ RSTRING_LEN(tempstr);
+
+ // 2. Copy param value, quoting it with ' or "
+
+@@ -552,7 +559,7 @@ char *build_params(VALUE rbparams)
+ // Don't bother if param is a mix of ' and ", users should know better :-)
+ // or it's been checked already. Here we expect params to be OK.
+ quotingChar = '"';
+- if ( strchr(RSTRING(tempstr)->ptr, quotingChar) )
++ if ( strchr(RSTRING_PTR(tempstr), quotingChar) )
+ quotingChar = '\''; // Use ' instead of "
+
+ // Add para value address in list of pointers
+@@ -561,9 +568,9 @@ char *build_params(VALUE rbparams)
+ // Start with quoting character
+ *paramData++ = quotingChar;
+ // Copy value
+- strcpy(paramData, RSTRING(tempstr)->ptr);
++ strcpy(paramData, RSTRING_PTR(tempstr));
+ // Move data pointer after inserted string
+- paramData += RSTRING(tempstr)->len;
++ paramData += RSTRING_LEN(tempstr);
+ // Close quote
+ *paramData++ = quotingChar;
+ // End string with \0
+@@ -593,13 +600,13 @@ VALUE xsl_process_real(VALUE none, VALUE self)
+ if (NIL_P(rbxml))
+ rb_raise(rb_eArgError, "No XML data");
+ rbxml = StringValue(rbxml);
+- if (!RSTRING(rbxml)->len)
++ if (!RSTRING_LEN(rbxml))
+ rb_raise(rb_eArgError, "No XML data");
+ rbxsl = rb_iv_get(self, "@xsl");
+ if (NIL_P(rbxsl))
+ rb_raise(rb_eArgError, "No Stylesheet");
+ rbxsl = StringValue(rbxsl);
+- if (!RSTRING(rbxsl)->len)
++ if (!RSTRING_LEN(rbxsl))
+ rb_raise(rb_eArgError, "No Stylesheet");
+ rbxroot = rb_iv_get(self, "@xroot");
+ rbparams = check_params(rb_iv_get(self, "@xparams"));
+@@ -625,7 +632,7 @@ VALUE xsl_process_real(VALUE none, VALUE self)
+ // Parse XSL
+ if (looksLikeXML(rbxsl))
+ {
+- myPointers.docxsl = xmlParseMemory(RSTRING(rbxsl)->ptr, RSTRING(rbxsl)->len);
++ myPointers.docxsl = xmlParseMemory(RSTRING_PTR(rbxsl), RSTRING_LEN(rbxsl));
+ // myPointers.docxsl = xmlReadMemory(RSTRING(rbxsl)->ptr, RSTRING(rbxsl)->len, ".", NULL, 0);
+ if (myPointers.docxsl == NULL)
+ {
+@@ -641,7 +648,7 @@ VALUE xsl_process_real(VALUE none, VALUE self)
+ }
+ else // xsl is a filename
+ {
+- myPointers.xsl = xsltParseStylesheetFile(RSTRING(rbxsl)->ptr);
++ myPointers.xsl = xsltParseStylesheetFile(RSTRING_PTR(rbxsl));
+ if (myPointers.xsl == NULL)
+ {
+ my_raise(self, &myPointers, rb_eSystemCallError, "XSL file loading error");
+@@ -652,7 +659,7 @@ VALUE xsl_process_real(VALUE none, VALUE self)
+ // Parse XML
+ if (looksLikeXML(rbxml))
+ {
+- myPointers.docxml = xmlReadMemory(RSTRING(rbxml)->ptr, RSTRING(rbxml)->len, ".", NULL, xmlOptions);
++ myPointers.docxml = xmlReadMemory(RSTRING_PTR(rbxml), RSTRING_LEN(rbxml), ".", NULL, xmlOptions);
+ if (myPointers.docxml == NULL)
+ {
+ my_raise(self, &myPointers, rb_eSystemCallError, "XML parsing error");
+@@ -661,7 +668,7 @@ VALUE xsl_process_real(VALUE none, VALUE self)
+ }
+ else // xml is a filename
+ {
+- myPointers.docxml = xmlReadFile(RSTRING(rbxml)->ptr, NULL, xmlOptions);
++ myPointers.docxml = xmlReadFile(RSTRING_PTR(rbxml), NULL, xmlOptions);
+ if (myPointers.docxml == NULL)
+ {
+ my_raise(self, &myPointers, rb_eSystemCallError, "XML file parsing error");
diff --git a/www-servers/gorg/gorg-0.6.4-r1.ebuild b/www-servers/gorg/gorg-0.6.4-r1.ebuild
new file mode 100644
index 000000000000..17936e86acf7
--- /dev/null
+++ b/www-servers/gorg/gorg-0.6.4-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/gorg/gorg-0.6.4-r1.ebuild,v 1.1 2011/12/04 10:12:59 graaff Exp $
+
+EAPI=2
+USE_RUBY="ruby18 ruby19"
+
+inherit ruby-ng eutils
+
+DESCRIPTION="Back-end XSLT processor for an XML-based web site"
+HOMEPAGE="http://www.gentoo.org/proj/en/gdp/doc/gorg.xml"
+SRC_URI="http://gentoo.neysx.org/mystuff/gorg/${P}.tgz"
+IUSE="fastcgi mysql"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc ~x86"
+
+CDEPEND="
+ >=dev-libs/libxml2-2.6.16
+ >=dev-libs/libxslt-1.1.12"
+DEPEND="${DEPEND} ${CDEPEND}"
+RDEPEND="${RDEPEND} ${CDEPEND}
+ fastcgi? ( virtual/httpd-fastcgi )"
+
+ruby_add_rdepend "
+ mysql? ( >=dev-ruby/ruby-dbi-0.0.21[mysql] )
+ fastcgi? ( >=dev-ruby/ruby-fcgi-0.8.5-r1 )"
+
+pkg_setup() {
+ enewgroup gorg
+ enewuser gorg -1 -1 -1 gorg
+}
+
+all_ruby_prepare() {
+ epatch "${FILESDIR}/${P}-ruby19.patch"
+ epatch "${FILESDIR}/${P}-ruby19-date.patch"
+}
+
+each_ruby_configure() {
+ ${RUBY} setup.rb config --prefix=/usr || die
+}
+
+each_ruby_compile() {
+ ${RUBY} setup.rb setup || die
+}
+
+each_ruby_install() {
+ ${RUBY} setup.rb config --prefix="${D}"/usr || die
+ ${RUBY} setup.rb install || die
+
+ # install doesn't seem to chmod these correctly, forcing it here
+ SITE_LIB_DIR=$(ruby_rbconfig_value 'sitelibdir')
+ chmod +x "${D}"/${SITE_LIB_DIR}/gorg/cgi-bin/*.cgi
+ chmod +x "${D}"/${SITE_LIB_DIR}/gorg/fcgi-bin/*.fcgi
+}
+
+all_ruby_install() {
+ keepdir /etc/gorg; insinto /etc/gorg ; doins etc/gorg/*
+ diropts -m0770 -o gorg -g gorg; keepdir /var/cache/gorg
+
+ dodoc Changelog README
+}