public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/gnome:gnome-next commit in: dev-libs/gobject-introspection/files/, dev-libs/gobject-introspection/
@ 2011-08-22 10:33 Alexandre Restovtsev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Restovtsev @ 2011-08-22 10:33 UTC (permalink / raw
  To: gentoo-commits

commit:     7fe7d9e2c037624ad98a0f7107b17dd9a7b6941c
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Mon Aug 22 10:30:07 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Mon Aug 22 10:30:07 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=7fe7d9e2

dev-libs/gobject-introspection: don't build tests when FEATURES=-test (#379929)

Add a patch to build tests only when FEATURES=test. Addresses Gentoo
bug #379929. Patch submitted upstream at
https://bugzilla.gnome.org/show_bug.cgi?id=657066

Also, drop unused libtool inherit.

---
 .../gobject-introspection-0.10.8-make-check.patch  |  110 ++++++++++++++++++++
 .../gobject-introspection-1.29.16.ebuild           |    6 +-
 2 files changed, 115 insertions(+), 1 deletions(-)

diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch b/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch
new file mode 100644
index 0000000..546c9c6
--- /dev/null
+++ b/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch
@@ -0,0 +1,110 @@
+From a71d73bf633d83c6a7f457c1f0acba378289f4c8 Mon Sep 17 00:00:00 2001
+From: Alexandre Rostovtsev <tetromino@gmail.com>
+Date: Mon, 22 Aug 2011 02:49:51 -0400
+Subject: [PATCH] tests: build tests only on make check
+
+Use automake's check_ prefix and avoid putting anything nontrivial in
+BUILT_SOURCES so that tests are build only on make check.
+
+The dummy -rpath in AM_LDFLAGS in tests/scanner/Makefile.am is needed to
+force libtool to build shared libraries for check_LTLIBRARIESS targets
+(automake builds check_LTLIBRARIES as static by default); see
+http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
+
+Addresses https://bugzilla.gnome.org/show_bug.cgi?id=657066
+---
+ tests/Makefile.am            |    6 ++----
+ tests/repository/Makefile.am |    2 +-
+ tests/scanner/Makefile.am    |   16 ++++++----------
+ 3 files changed, 9 insertions(+), 15 deletions(-)
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 20ecc17..2d395a3 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -16,16 +16,14 @@ tests_DATA =		    \
+     gimarshallingtests.c    \
+     gimarshallingtests.h
+ 
+-testlib_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
+-testlibdir=$(prefix)/unused
+-install-testlibLTLIBRARIES: # prevent it from being installed
++check_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
+ 
+ libeverything_1_0_la_SOURCES = everything.c
+ libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
+ 
+ EXTRA_DIST += gimarshallingtests.h
+ 
+-BUILT_SOURCES += everything.c everything.h Everything-1.0.gir GIMarshallingTests-1.0.gir
++BUILT_SOURCES += everything.c everything.h
+ 
+ CLEANFILES += \
+     $(BUILT_SOURCES) \
+diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am
+index 268d9f9..ffc635f 100644
+--- a/tests/repository/Makefile.am
++++ b/tests/repository/Makefile.am
+@@ -2,7 +2,7 @@ AM_CFLAGS = $(GOBJECT_CFLAGS)
+ AM_LDFLAGS = -module -avoid-version
+ LIBS = $(GOBJECT_LIBS)
+ 
+-noinst_PROGRAMS = gitestrepo gitestthrows gitypelibtest
++check_PROGRAMS = gitestrepo gitestthrows gitypelibtest
+ 
+ gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
+ gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
+diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
+index 6b78ee7..fc2e260 100644
+--- a/tests/scanner/Makefile.am
++++ b/tests/scanner/Makefile.am
+@@ -3,24 +3,21 @@ include $(top_srcdir)/Makefile.introspection
+ 
+ INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error -I.
+ 
+-# We need to build a shared library, which can be dlopened
+-# it does not work with noinst_LTLIBRARIES
+-testlib_LTLIBRARIES = \
++check_LTLIBRARIES = \
+ 	libannotation.la \
+ 	libtestinherit.la \
+ 	libfoo.la \
+ 	libutility.la \
+ 	libgtkfrob.la
+ if HAVE_CAIRO
+-testlib_LTLIBRARIES += libregress.la
++check_LTLIBRARIES += libregress.la
+ endif
+ 
+-testlibdir = $(prefix)/unused
+-install-testlibLTLIBRARIES: # prevent it from being installed
+-
+ AM_CPPFLAGS = -I$(top_srcdir)/girepository
+ AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS)
+-AM_LDFLAGS = -avoid-version
++# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
++# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
++AM_LDFLAGS = -rpath /unused -avoid-version
+ LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
+ 
+ libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
+@@ -49,7 +46,6 @@ CHECKGIRS = $(GIRS:.gir=.gir.check)
+ EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
+ INTROSPECTION_GIRS = $(GIRS)
+ CLEANFILES = $(TYPELIBS) $(GIRS)
+-BUILT_SOURCES = $(TYPELIBS) $(GIRS)
+ EXTRA_DIST = $(EXPECTEDGIRS)
+ 
+ Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
+@@ -102,7 +98,7 @@ GtkFrob_1_0_gir_FILES = $(libgtkfrob_la_SOURCES)
+ GtkFrob_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gtk --symbol-prefix=gtk_frob
+ GIRS += GtkFrob-1.0.gir
+ 
+-noinst_PROGRAMS = barapp
++check_PROGRAMS = barapp
+ 
+ barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
+ barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
+-- 
+1.7.6
+

diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild
index 70739cc..2b3aa4b 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild
@@ -8,7 +8,7 @@ GNOME_TARBALL_SUFFIX="xz"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2:2.5"
 
-inherit gnome2 python libtool
+inherit autotools eutils gnome2 python
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -51,6 +51,10 @@ src_prepare() {
 	# Don't pre-compile .py
 	ln -sf $(type -P true) py-compile
 
+	# Don't build tests when FEATURES=-test; bug #379929
+	epatch "${FILESDIR}/${PN}-0.10.8-make-check.patch"
+	eautoreconf
+
 	gnome2_src_prepare
 }
 



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/gnome:gnome-next commit in: dev-libs/gobject-introspection/files/, dev-libs/gobject-introspection/
@ 2011-08-30 10:03 Alexandre Restovtsev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Restovtsev @ 2011-08-30 10:03 UTC (permalink / raw
  To: gentoo-commits

commit:     059cf1665a99c6d65ad836a65464ec38a8b3d4b9
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Tue Aug 30 09:36:35 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Tue Aug 30 10:02:03 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=059cf166

dev-libs/gobject-introspection: 1.29.16 → 1.29.17

Version bump with numerous changes, including a new documentation
generator tool. Tests patch was applied upstream.

For some reason, the docbookdescription.py file is missing from the
tarball, so we have to ship it in FILESDIR. See upstream bug 657686.

---
 .../files/1.29.17-docbookdescription.py            |  185 ++++++++++++++++++++
 .../gobject-introspection-0.10.8-make-check.patch  |  110 ------------
 ...ebuild => gobject-introspection-1.29.17.ebuild} |   16 +-
 .../gobject-introspection-9999.ebuild              |    8 +-
 4 files changed, 197 insertions(+), 122 deletions(-)

diff --git a/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py b/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py
new file mode 100644
index 0000000..9ec7219
--- /dev/null
+++ b/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py
@@ -0,0 +1,185 @@
+
+TAG_PROGRAM_LISTING = '<programlisting'
+TAG_CDATA = '<![CDATA['
+TAGS = {TAG_PROGRAM_LISTING, TAG_CDATA, ']]>', '</programlisting>'}
+
+def get_formatted_description(description):
+    desc = description.replace("|[", "<informalexample><programlisting>") \
+                          .replace("]|", "</programlisting></informalexample>")
+
+    desc = "<para>%s</para>" % desc
+
+# we still need to handle this case
+#    # Handle "#include <xxxxx>"
+#    $text =~ s/#include(\s+)<([^>]+)>/#include$1&lt;$2&gt;/g;
+
+    formatted_desc = ""
+
+    inside_tags = []
+    last_offset = 0
+    for start, end, tag in _find_xml_tag_matches(desc):
+        if len(inside_tags) == 0:
+            new_desc = "\n</para>\n<para>\n".join(desc[last_offset:start].split('\n\n'))
+        else:
+            new_desc = desc[last_offset:start]
+
+        if TAG_CDATA not in inside_tags:
+            new_desc = _escape_non_cdata_section(new_desc)
+
+        formatted_desc += new_desc
+        formatted_desc += tag
+        if tag == TAG_PROGRAM_LISTING:
+            formatted_desc += '>'
+
+        if tag in (TAG_CDATA, TAG_PROGRAM_LISTING):
+            inside_tags.append(tag)
+        else:
+            try:
+                inside_tags.pop()
+            except IndexError:
+                print "Error: mismatched tag:", tag
+        last_offset = end
+
+    formatted_desc += _escape_non_cdata_section(desc[last_offset:])
+    return formatted_desc
+
+def _find_xml_tag_matches(string):
+    offset = 0
+    while True:
+        indexes = []
+        for tag in TAGS:
+            pos = string.find(tag, offset)
+            if pos != -1:
+                indexes.append((tag, pos))
+
+        if indexes:
+            tag, first = min(indexes, key=lambda x: x[1])
+            if tag == TAG_PROGRAM_LISTING:
+                end = string.find('>', first + len(tag) - 1) + 1
+            else:
+                end = first + len(tag)
+            offset = end
+            yield first, end, tag
+        else:
+            return
+
+def _escape_non_cdata_section(string):
+    string = _escape_ampersand_not_in_entity(string)
+    string = _escape_lt_not_in_xml_tag(string)
+    return _escape_gt_not_in_xml_tag(string)
+
+def _escape_ampersand_not_in_entity(string):
+    parts = string.split('&')
+
+    output = parts[0]
+    for part in parts[1:]:
+        end = part.find(';')
+        if end == -1 or not part[:end].isalpha():
+            output += "&amp;"
+        else:
+            output += "&"
+        output += part
+
+    return output
+
+def _is_valid_xml_tag_name(name):
+    if len(name) < 1:
+        return False
+    elif name.isalpha() or (name[0].isalpha() and name[1:].isalnum()):
+        return True
+
+def _is_valid_xml_tag(string):
+    # handle case where line end is between tag name and first argument.
+    # ie. <link\nlinkend="link-id">My Link</link>
+    string = string.replace('\n', ' ')
+
+    if string[-1] == '/':
+        string = string[:-1]
+
+    # string is the inner part of the tag, without < and >
+    if string[0] == '/' and _is_valid_xml_tag_name(string[1:]):
+        #valid end tag
+        return True
+    elif _is_valid_xml_tag_name(string):
+        #valid start tag with not params
+        return True
+    elif " " in string:
+        # we are looking for: <tagname arg="value" arg2="value2">
+        # TODO: handle spaces in values (between quotations)
+        tagname, rest = string.split(" ", 1)
+        if not _is_valid_xml_tag_name(tagname):
+            return False
+
+        while rest.strip():
+            rest = rest.lstrip()
+
+            if not '=' in rest:
+                return False
+            argname, rest = rest.split('=', 1)
+            if not _is_valid_xml_tag_name(argname):
+                return False
+            if rest[0] != '"':
+                return False
+            value, rest = rest[1:].split('"', 1)
+
+        return True
+
+def _escape_lt_not_in_xml_tag(string):
+    parts = string.split('<')
+
+    output = parts[0]
+    for part in parts[1:]:
+        end = part.find('>')
+        if end == -1 or not _is_valid_xml_tag(part[:end]):
+            output += "&lt;"
+        else:
+            output += "<"
+        output += part
+
+    return output
+
+def _escape_gt_not_in_xml_tag(string):
+    parts = string.split('>')
+
+    output = parts[0]
+    for part in parts[1:]:
+        start = output.rfind('<')
+        if start == -1 or not _is_valid_xml_tag(output[start+1:]):
+            output += "&gt;"
+        else:
+            output += ">"
+        output += part
+
+    return output
+
+
+def test():
+    assert _is_valid_xml_tag_name('a')
+    assert _is_valid_xml_tag_name('refsect1')
+    assert not _is_valid_xml_tag_name('1refsect')
+    assert not _is_valid_xml_tag_name('1')
+
+    assert _is_valid_xml_tag('/a')
+    assert _is_valid_xml_tag('/refsect1')
+    assert not _is_valid_xml_tag('/1')
+    assert _is_valid_xml_tag('link')
+    assert _is_valid_xml_tag('link linkend="value"')
+    assert _is_valid_xml_tag('link  linkend="value"')
+    assert _is_valid_xml_tag('link/')
+    assert _is_valid_xml_tag('link linkend="value"/')
+    assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue"')
+    assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue with spaces"')
+    assert not _is_valid_xml_tag('link linkend="value arg23="anothervalue with spaces"')
+    assert not _is_valid_xml_tag('link linkend')
+    assert _is_valid_xml_tag('link\nlinkend="link-id"')
+    assert _is_valid_xml_tag('xref linkend="gtkstylecontext-classes"/')
+
+    assert _is_valid_xml_tag('a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website"')
+    assert _is_valid_xml_tag('ulink \nurl="http://www.freedesktop.org/Standards/wm-spec"')
+
+    string = 'gtk_label_set_markup (label, "Go to the <a href="http://www.gtk.org" ' \
+        + 'title="&lt;i&gt;Our&lt;/i&gt; website">GTK+ website</a> for more...");'
+    assert _escape_lt_not_in_xml_tag(string) == string
+
+if __name__ == '__main__':
+    test()

diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch b/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch
deleted file mode 100644
index 546c9c6..0000000
--- a/dev-libs/gobject-introspection/files/gobject-introspection-0.10.8-make-check.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From a71d73bf633d83c6a7f457c1f0acba378289f4c8 Mon Sep 17 00:00:00 2001
-From: Alexandre Rostovtsev <tetromino@gmail.com>
-Date: Mon, 22 Aug 2011 02:49:51 -0400
-Subject: [PATCH] tests: build tests only on make check
-
-Use automake's check_ prefix and avoid putting anything nontrivial in
-BUILT_SOURCES so that tests are build only on make check.
-
-The dummy -rpath in AM_LDFLAGS in tests/scanner/Makefile.am is needed to
-force libtool to build shared libraries for check_LTLIBRARIESS targets
-(automake builds check_LTLIBRARIES as static by default); see
-http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
-
-Addresses https://bugzilla.gnome.org/show_bug.cgi?id=657066
----
- tests/Makefile.am            |    6 ++----
- tests/repository/Makefile.am |    2 +-
- tests/scanner/Makefile.am    |   16 ++++++----------
- 3 files changed, 9 insertions(+), 15 deletions(-)
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 20ecc17..2d395a3 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -16,16 +16,14 @@ tests_DATA =		    \
-     gimarshallingtests.c    \
-     gimarshallingtests.h
- 
--testlib_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
--testlibdir=$(prefix)/unused
--install-testlibLTLIBRARIES: # prevent it from being installed
-+check_LTLIBRARIES = libeverything-1.0.la libgimarshallingtests-1.0.la
- 
- libeverything_1_0_la_SOURCES = everything.c
- libgimarshallingtests_1_0_la_SOURCES = gimarshallingtests.c
- 
- EXTRA_DIST += gimarshallingtests.h
- 
--BUILT_SOURCES += everything.c everything.h Everything-1.0.gir GIMarshallingTests-1.0.gir
-+BUILT_SOURCES += everything.c everything.h
- 
- CLEANFILES += \
-     $(BUILT_SOURCES) \
-diff --git a/tests/repository/Makefile.am b/tests/repository/Makefile.am
-index 268d9f9..ffc635f 100644
---- a/tests/repository/Makefile.am
-+++ b/tests/repository/Makefile.am
-@@ -2,7 +2,7 @@ AM_CFLAGS = $(GOBJECT_CFLAGS)
- AM_LDFLAGS = -module -avoid-version
- LIBS = $(GOBJECT_LIBS)
- 
--noinst_PROGRAMS = gitestrepo gitestthrows gitypelibtest
-+check_PROGRAMS = gitestrepo gitestthrows gitypelibtest
- 
- gitestrepo_SOURCES = $(srcdir)/gitestrepo.c
- gitestrepo_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-diff --git a/tests/scanner/Makefile.am b/tests/scanner/Makefile.am
-index 6b78ee7..fc2e260 100644
---- a/tests/scanner/Makefile.am
-+++ b/tests/scanner/Makefile.am
-@@ -3,24 +3,21 @@ include $(top_srcdir)/Makefile.introspection
- 
- INTROSPECTION_SCANNER_ARGS += --warn-all --warn-error -I.
- 
--# We need to build a shared library, which can be dlopened
--# it does not work with noinst_LTLIBRARIES
--testlib_LTLIBRARIES = \
-+check_LTLIBRARIES = \
- 	libannotation.la \
- 	libtestinherit.la \
- 	libfoo.la \
- 	libutility.la \
- 	libgtkfrob.la
- if HAVE_CAIRO
--testlib_LTLIBRARIES += libregress.la
-+check_LTLIBRARIES += libregress.la
- endif
- 
--testlibdir = $(prefix)/unused
--install-testlibLTLIBRARIES: # prevent it from being installed
--
- AM_CPPFLAGS = -I$(top_srcdir)/girepository
- AM_CFLAGS = $(GIO_CFLAGS) $(GOBJECT_CFLAGS) $(GTHREAD_CFLAGS)
--AM_LDFLAGS = -avoid-version
-+# -rpath needed to force libtool to build a shared library for a check_LTLIBRARIES
-+# target. See http://lists.gnu.org/archive/html/automake/2005-10/msg00107.html
-+AM_LDFLAGS = -rpath /unused -avoid-version
- LIBS = $(GOBJECT_LIBS) $(GTHREAD_LIBS)
- 
- libannotation_la_SOURCES = $(srcdir)/annotation.c $(srcdir)/annotation.h
-@@ -49,7 +46,6 @@ CHECKGIRS = $(GIRS:.gir=.gir.check)
- EXPECTEDGIRS = $(GIRS:.gir=-expected.gir)
- INTROSPECTION_GIRS = $(GIRS)
- CLEANFILES = $(TYPELIBS) $(GIRS)
--BUILT_SOURCES = $(TYPELIBS) $(GIRS)
- EXTRA_DIST = $(EXPECTEDGIRS)
- 
- Regress-1.0.gir: $(top_builddir)/Gio-2.0.gir libregress.la
-@@ -102,7 +98,7 @@ GtkFrob_1_0_gir_FILES = $(libgtkfrob_la_SOURCES)
- GtkFrob_1_0_gir_SCANNERFLAGS = --identifier-prefix=Gtk --symbol-prefix=gtk_frob
- GIRS += GtkFrob-1.0.gir
- 
--noinst_PROGRAMS = barapp
-+check_PROGRAMS = barapp
- 
- barapp_SOURCES = $(srcdir)/barapp.c $(srcdir)/barapp.h
- barapp_LDADD = $(top_builddir)/libgirepository-1.0.la
--- 
-1.7.6
-

diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild
similarity index 81%
rename from dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild
rename to dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild
index 2b3aa4b..0346999 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-1.29.16.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild
@@ -8,7 +8,7 @@ GNOME_TARBALL_SUFFIX="xz"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2:2.5"
 
-inherit autotools eutils gnome2 python
+inherit gnome2 python
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -32,7 +32,7 @@ DEPEND="${RDEPEND}
 	dev-util/pkgconfig
 	sys-devel/bison
 	sys-devel/flex
-	doc? ( >=dev-util/gtk-doc-1.12 )
+	doc? ( >=dev-util/gtk-doc-1.15 )
 	test? ( x11-libs/cairo )"
 
 pkg_setup() {
@@ -50,18 +50,18 @@ src_prepare() {
 
 	# Don't pre-compile .py
 	ln -sf $(type -P true) py-compile
-
-	# Don't build tests when FEATURES=-test; bug #379929
-	epatch "${FILESDIR}/${PN}-0.10.8-make-check.patch"
-	eautoreconf
+	ln -sf $(type -P true) build-aux/py-compile
 
 	gnome2_src_prepare
 }
 
 src_install() {
 	gnome2_src_install
-	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-scanner
-	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-annotation-tool
+	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-{annotation-tool,doc-tool,scanner}
+
+	# https://bugzilla.gnome.org/show_bug.cgi?id=657686
+	insinto /usr/$(get_libdir)/${PN}/giscanner
+	newins "${FILESDIR}/${PV}-docbookdescription.py" docbookdescription.py
 }
 
 pkg_postinst() {

diff --git a/dev-libs/gobject-introspection/gobject-introspection-9999.ebuild b/dev-libs/gobject-introspection/gobject-introspection-9999.ebuild
index 70739cc..423d424 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-9999.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-9999.ebuild
@@ -8,7 +8,7 @@ GNOME_TARBALL_SUFFIX="xz"
 GNOME2_LA_PUNT="yes"
 PYTHON_DEPEND="2:2.5"
 
-inherit gnome2 python libtool
+inherit gnome2 python
 if [[ ${PV} = 9999 ]]; then
 	inherit gnome2-live
 fi
@@ -32,7 +32,7 @@ DEPEND="${RDEPEND}
 	dev-util/pkgconfig
 	sys-devel/bison
 	sys-devel/flex
-	doc? ( >=dev-util/gtk-doc-1.12 )
+	doc? ( >=dev-util/gtk-doc-1.15 )
 	test? ( x11-libs/cairo )"
 
 pkg_setup() {
@@ -50,14 +50,14 @@ src_prepare() {
 
 	# Don't pre-compile .py
 	ln -sf $(type -P true) py-compile
+	ln -sf $(type -P true) build-aux/py-compile
 
 	gnome2_src_prepare
 }
 
 src_install() {
 	gnome2_src_install
-	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-scanner
-	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-annotation-tool
+	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-{annotation-tool,doc-tool,scanner}
 }
 
 pkg_postinst() {



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/gnome:gnome-next commit in: dev-libs/gobject-introspection/files/, dev-libs/gobject-introspection/
@ 2011-09-26  2:51 Alexandre Restovtsev
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandre Restovtsev @ 2011-09-26  2:51 UTC (permalink / raw
  To: gentoo-commits

commit:     00a6d4dd64014ea46a5a86e36c06ea836fc171a8
Author:     Alexandre Rostovtsev <tetromino <AT> gmail <DOT> com>
AuthorDate: Mon Sep 26 01:38:18 2011 +0000
Commit:     Alexandre Restovtsev <tetromino <AT> gmail <DOT> com>
CommitDate: Mon Sep 26 01:38:18 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gnome.git;a=commit;h=00a6d4dd

dev-libs/gobject-introspection: 1.29.17 → 1.30.0

Version bump. Add upstream patch to fix g_irepository_fix_c_prefix().

---
 .../files/1.29.17-docbookdescription.py            |  185 --------------------
 .../gobject-introspection-1.30.0-c_prefix.patch    |   47 +++++
 ....ebuild => gobject-introspection-1.30.0.ebuild} |    7 +-
 3 files changed, 50 insertions(+), 189 deletions(-)

diff --git a/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py b/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py
deleted file mode 100644
index 9ec7219..0000000
--- a/dev-libs/gobject-introspection/files/1.29.17-docbookdescription.py
+++ /dev/null
@@ -1,185 +0,0 @@
-
-TAG_PROGRAM_LISTING = '<programlisting'
-TAG_CDATA = '<![CDATA['
-TAGS = {TAG_PROGRAM_LISTING, TAG_CDATA, ']]>', '</programlisting>'}
-
-def get_formatted_description(description):
-    desc = description.replace("|[", "<informalexample><programlisting>") \
-                          .replace("]|", "</programlisting></informalexample>")
-
-    desc = "<para>%s</para>" % desc
-
-# we still need to handle this case
-#    # Handle "#include <xxxxx>"
-#    $text =~ s/#include(\s+)<([^>]+)>/#include$1&lt;$2&gt;/g;
-
-    formatted_desc = ""
-
-    inside_tags = []
-    last_offset = 0
-    for start, end, tag in _find_xml_tag_matches(desc):
-        if len(inside_tags) == 0:
-            new_desc = "\n</para>\n<para>\n".join(desc[last_offset:start].split('\n\n'))
-        else:
-            new_desc = desc[last_offset:start]
-
-        if TAG_CDATA not in inside_tags:
-            new_desc = _escape_non_cdata_section(new_desc)
-
-        formatted_desc += new_desc
-        formatted_desc += tag
-        if tag == TAG_PROGRAM_LISTING:
-            formatted_desc += '>'
-
-        if tag in (TAG_CDATA, TAG_PROGRAM_LISTING):
-            inside_tags.append(tag)
-        else:
-            try:
-                inside_tags.pop()
-            except IndexError:
-                print "Error: mismatched tag:", tag
-        last_offset = end
-
-    formatted_desc += _escape_non_cdata_section(desc[last_offset:])
-    return formatted_desc
-
-def _find_xml_tag_matches(string):
-    offset = 0
-    while True:
-        indexes = []
-        for tag in TAGS:
-            pos = string.find(tag, offset)
-            if pos != -1:
-                indexes.append((tag, pos))
-
-        if indexes:
-            tag, first = min(indexes, key=lambda x: x[1])
-            if tag == TAG_PROGRAM_LISTING:
-                end = string.find('>', first + len(tag) - 1) + 1
-            else:
-                end = first + len(tag)
-            offset = end
-            yield first, end, tag
-        else:
-            return
-
-def _escape_non_cdata_section(string):
-    string = _escape_ampersand_not_in_entity(string)
-    string = _escape_lt_not_in_xml_tag(string)
-    return _escape_gt_not_in_xml_tag(string)
-
-def _escape_ampersand_not_in_entity(string):
-    parts = string.split('&')
-
-    output = parts[0]
-    for part in parts[1:]:
-        end = part.find(';')
-        if end == -1 or not part[:end].isalpha():
-            output += "&amp;"
-        else:
-            output += "&"
-        output += part
-
-    return output
-
-def _is_valid_xml_tag_name(name):
-    if len(name) < 1:
-        return False
-    elif name.isalpha() or (name[0].isalpha() and name[1:].isalnum()):
-        return True
-
-def _is_valid_xml_tag(string):
-    # handle case where line end is between tag name and first argument.
-    # ie. <link\nlinkend="link-id">My Link</link>
-    string = string.replace('\n', ' ')
-
-    if string[-1] == '/':
-        string = string[:-1]
-
-    # string is the inner part of the tag, without < and >
-    if string[0] == '/' and _is_valid_xml_tag_name(string[1:]):
-        #valid end tag
-        return True
-    elif _is_valid_xml_tag_name(string):
-        #valid start tag with not params
-        return True
-    elif " " in string:
-        # we are looking for: <tagname arg="value" arg2="value2">
-        # TODO: handle spaces in values (between quotations)
-        tagname, rest = string.split(" ", 1)
-        if not _is_valid_xml_tag_name(tagname):
-            return False
-
-        while rest.strip():
-            rest = rest.lstrip()
-
-            if not '=' in rest:
-                return False
-            argname, rest = rest.split('=', 1)
-            if not _is_valid_xml_tag_name(argname):
-                return False
-            if rest[0] != '"':
-                return False
-            value, rest = rest[1:].split('"', 1)
-
-        return True
-
-def _escape_lt_not_in_xml_tag(string):
-    parts = string.split('<')
-
-    output = parts[0]
-    for part in parts[1:]:
-        end = part.find('>')
-        if end == -1 or not _is_valid_xml_tag(part[:end]):
-            output += "&lt;"
-        else:
-            output += "<"
-        output += part
-
-    return output
-
-def _escape_gt_not_in_xml_tag(string):
-    parts = string.split('>')
-
-    output = parts[0]
-    for part in parts[1:]:
-        start = output.rfind('<')
-        if start == -1 or not _is_valid_xml_tag(output[start+1:]):
-            output += "&gt;"
-        else:
-            output += ">"
-        output += part
-
-    return output
-
-
-def test():
-    assert _is_valid_xml_tag_name('a')
-    assert _is_valid_xml_tag_name('refsect1')
-    assert not _is_valid_xml_tag_name('1refsect')
-    assert not _is_valid_xml_tag_name('1')
-
-    assert _is_valid_xml_tag('/a')
-    assert _is_valid_xml_tag('/refsect1')
-    assert not _is_valid_xml_tag('/1')
-    assert _is_valid_xml_tag('link')
-    assert _is_valid_xml_tag('link linkend="value"')
-    assert _is_valid_xml_tag('link  linkend="value"')
-    assert _is_valid_xml_tag('link/')
-    assert _is_valid_xml_tag('link linkend="value"/')
-    assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue"')
-    assert _is_valid_xml_tag('link linkend="value" arg23="anothervalue with spaces"')
-    assert not _is_valid_xml_tag('link linkend="value arg23="anothervalue with spaces"')
-    assert not _is_valid_xml_tag('link linkend')
-    assert _is_valid_xml_tag('link\nlinkend="link-id"')
-    assert _is_valid_xml_tag('xref linkend="gtkstylecontext-classes"/')
-
-    assert _is_valid_xml_tag('a href="http://www.gtk.org" title="&lt;i&gt;Our&lt;/i&gt; website"')
-    assert _is_valid_xml_tag('ulink \nurl="http://www.freedesktop.org/Standards/wm-spec"')
-
-    string = 'gtk_label_set_markup (label, "Go to the <a href="http://www.gtk.org" ' \
-        + 'title="&lt;i&gt;Our&lt;/i&gt; website">GTK+ website</a> for more...");'
-    assert _escape_lt_not_in_xml_tag(string) == string
-
-if __name__ == '__main__':
-    test()

diff --git a/dev-libs/gobject-introspection/files/gobject-introspection-1.30.0-c_prefix.patch b/dev-libs/gobject-introspection/files/gobject-introspection-1.30.0-c_prefix.patch
new file mode 100644
index 0000000..d15dcd1
--- /dev/null
+++ b/dev-libs/gobject-introspection/files/gobject-introspection-1.30.0-c_prefix.patch
@@ -0,0 +1,47 @@
+From e8b336cc0747b528263ec809d142f4803dcbdf35 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters@verbum.org>
+Date: Wed, 21 Sep 2011 17:13:45 +0000
+Subject: repository: Fix g_irepository_get_c_prefix()
+
+It was returning the wrong data.
+
+https://bugzilla.gnome.org/show_bug.cgi?id=659749
+---
+diff --git a/girepository/girepository.c b/girepository/girepository.c
+index cc81107..b5cd4c7 100644
+--- a/girepository/girepository.c
++++ b/girepository/girepository.c
+@@ -929,7 +929,7 @@ g_irepository_get_c_prefix (GIRepository *repository,
+   g_return_val_if_fail (typelib != NULL, NULL);
+ 
+   header = (Header *) typelib->data;
+-  if (header->shared_library)
++  if (header->c_prefix)
+     return g_typelib_get_string (typelib, header->c_prefix);
+   else
+     return NULL;
+diff --git a/tests/repository/gitestrepo.c b/tests/repository/gitestrepo.c
+index cdaeb4c..05ea5d9 100644
+--- a/tests/repository/gitestrepo.c
++++ b/tests/repository/gitestrepo.c
+@@ -46,6 +46,7 @@ main(int argc, char **argv)
+   GIBaseInfo *siginfo;
+   GIEnumInfo *errorinfo;
+   GType gtype;
++  const char *prefix;
+ 
+   g_type_init ();
+ 
+@@ -55,6 +56,10 @@ main(int argc, char **argv)
+   if (!ret)
+     g_error ("%s", error->message);
+ 
++  prefix = g_irepository_get_c_prefix (repo, "Gio");
++  g_assert (prefix != NULL);
++  g_assert_cmpstr (prefix, ==, "G");
++
+   info = g_irepository_find_by_name (repo, "Gio", "Cancellable");
+   g_assert (info != NULL);
+   g_assert (g_base_info_get_type (info) == GI_INFO_TYPE_OBJECT);
+--
+cgit v0.9.0.2

diff --git a/dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild b/dev-libs/gobject-introspection/gobject-introspection-1.30.0.ebuild
similarity index 91%
rename from dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild
rename to dev-libs/gobject-introspection/gobject-introspection-1.30.0.ebuild
index 0346999..83b78fa 100644
--- a/dev-libs/gobject-introspection/gobject-introspection-1.29.17.ebuild
+++ b/dev-libs/gobject-introspection/gobject-introspection-1.30.0.ebuild
@@ -45,6 +45,9 @@ pkg_setup() {
 }
 
 src_prepare() {
+	# Patch from upstream git master to fix g_irepository_get_c_prefix
+	epatch "${FILESDIR}/${P}-c_prefix.patch"
+
 	# FIXME: Parallel compilation failure with USE=doc
 	use doc && MAKEOPTS="-j1"
 
@@ -58,10 +61,6 @@ src_prepare() {
 src_install() {
 	gnome2_src_install
 	python_convert_shebangs 2 "${ED}"usr/bin/g-ir-{annotation-tool,doc-tool,scanner}
-
-	# https://bugzilla.gnome.org/show_bug.cgi?id=657686
-	insinto /usr/$(get_libdir)/${PN}/giscanner
-	newins "${FILESDIR}/${PV}-docbookdescription.py" docbookdescription.py
 }
 
 pkg_postinst() {



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-26  2:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 10:33 [gentoo-commits] proj/gnome:gnome-next commit in: dev-libs/gobject-introspection/files/, dev-libs/gobject-introspection/ Alexandre Restovtsev
  -- strict thread matches above, loose matches on Subject: below --
2011-08-30 10:03 Alexandre Restovtsev
2011-09-26  2:51 Alexandre Restovtsev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox