summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2010-10-20 19:44:47 +0000
committerTiziano Müller <dev-zero@gentoo.org>2010-10-20 19:44:47 +0000
commit9dcdaedd8cd0013371a0c3ad084e82412f6fb366 (patch)
tree1ff6106442579f5d1af54faf387a4f9b3cad4d4a /dev-cpp/xsd
parentAdd -lpthread to LIBS (#341241) (diff)
downloadgentoo-2-9dcdaedd8cd0013371a0c3ad084e82412f6fb366.tar.gz
gentoo-2-9dcdaedd8cd0013371a0c3ad084e82412f6fb366.tar.bz2
gentoo-2-9dcdaedd8cd0013371a0c3ad084e82412f6fb366.zip
Initial commit (ebuild written by me).
(Portage version: 2.2_rc94/cvs/Linux x86_64)
Diffstat (limited to 'dev-cpp/xsd')
-rw-r--r--dev-cpp/xsd/ChangeLog12
-rw-r--r--dev-cpp/xsd/files/3.3.0-disable_examples_and_tests.patch55
-rw-r--r--dev-cpp/xsd/files/3.3.0-fix_include.patch13
-rw-r--r--dev-cpp/xsd/files/3.3.0-fix_tests.patch13
-rw-r--r--dev-cpp/xsd/files/3.3.0-xsdcxx-rename.patch121
-rw-r--r--dev-cpp/xsd/metadata.xml12
-rw-r--r--dev-cpp/xsd/xsd-3.3.0.ebuild151
7 files changed, 377 insertions, 0 deletions
diff --git a/dev-cpp/xsd/ChangeLog b/dev-cpp/xsd/ChangeLog
new file mode 100644
index 000000000000..003098246bf1
--- /dev/null
+++ b/dev-cpp/xsd/ChangeLog
@@ -0,0 +1,12 @@
+# ChangeLog for dev-cpp/xsd
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-cpp/xsd/ChangeLog,v 1.1 2010/10/20 19:44:47 dev-zero Exp $
+
+*xsd-3.3.0 (20 Oct 2010)
+
+ 20 Oct 2010; Tiziano Müller <dev-zero@gentoo.org>
+ +files/3.3.0-disable_examples_and_tests.patch,
+ +files/3.3.0-fix_include.patch, +files/3.3.0-fix_tests.patch,
+ +files/3.3.0-xsdcxx-rename.patch, +xsd-3.3.0.ebuild, +metadata.xml:
+ Initial commit (ebuild written by me).
+
diff --git a/dev-cpp/xsd/files/3.3.0-disable_examples_and_tests.patch b/dev-cpp/xsd/files/3.3.0-disable_examples_and_tests.patch
new file mode 100644
index 000000000000..605d16354704
--- /dev/null
+++ b/dev-cpp/xsd/files/3.3.0-disable_examples_and_tests.patch
@@ -0,0 +1,55 @@
+diff --git a/makefile b/makefile
+index 0c07b0d..32c2c93 100644
+--- a/makefile
++++ b/makefile
+@@ -14,8 +14,6 @@ clean := $(out_base)/.clean
+ cleandoc := $(out_base)/.cleandoc
+
+ $(default): $(out_base)/xsd/ \
+- $(out_base)/tests/ \
+- $(out_base)/examples/ \
+ $(out_base)/documentation/
+
+ # Test.
+@@ -27,7 +25,6 @@ $(test): $(out_base)/tests/.test
+ #
+ $(install): $(out_base)/xsd/.install \
+ $(out_base)/libxsd/.install \
+- $(out_base)/examples/.install \
+ $(out_base)/documentation/.install
+ $(call install-dir,$(src_base)/dist/examples/build,$(install_doc_dir)/xsd/examples/build)
+ $(call install-dir,$(src_base)/dist/examples/cxx,$(install_doc_dir)/xsd/examples/cxx,-name makefile)
+@@ -43,7 +40,6 @@ $(install): $(out_base)/xsd/.install \
+ #
+ $(dist): $(out_base)/xsd/.dist \
+ $(out_base)/libxsd/.dist \
+- $(out_base)/examples/.dist \
+ $(out_base)/documentation/.dist
+ $(call install-dir,$(src_base)/dist/examples/build,$(dist_prefix)/examples/build)
+ $(call install-dir,$(src_base)/dist/examples/cxx,$(dist_prefix)/examples/cxx,-name makefile)
+@@ -57,7 +53,6 @@ $(dist): $(out_base)/xsd/.dist \
+
+ $(dist-win): $(out_base)/xsd/.dist-win \
+ $(out_base)/libxsd/.dist-win \
+- $(out_base)/examples/.dist-win \
+ $(out_base)/documentation/.dist-win
+ $(call install-dir,$(src_base)/dist/etc,$(dist_prefix)/etc)
+ $(call install-dir,$(src_base)/dist/examples/build,$(dist_prefix)/examples/build)
+@@ -81,9 +76,7 @@ $(dist-win): $(out_base)/xsd/.dist-win \
+
+ # Clean.
+ #
+-$(clean): $(out_base)/xsd/.clean \
+- $(out_base)/tests/.clean \
+- $(out_base)/examples/.clean
++$(clean): $(out_base)/xsd/.clean
+
+ $(cleandoc): $(out_base)/documentation/.cleandoc
+
+@@ -91,6 +84,4 @@ $(call include,$(bld_root)/install.make)
+
+ $(call import,$(src_base)/xsd/makefile)
+ $(call import,$(src_base)/libxsd/makefile)
+-$(call import,$(src_base)/tests/makefile)
+-$(call import,$(src_base)/examples/makefile)
+ $(call import,$(src_base)/documentation/makefile)
diff --git a/dev-cpp/xsd/files/3.3.0-fix_include.patch b/dev-cpp/xsd/files/3.3.0-fix_include.patch
new file mode 100644
index 000000000000..5ba742018484
--- /dev/null
+++ b/dev-cpp/xsd/files/3.3.0-fix_include.patch
@@ -0,0 +1,13 @@
+diff --git a/xsd/xsd.cxx b/xsd/xsd.cxx
+index 1c66a8a..dbbfed9 100644
+--- a/xsd/xsd.cxx
++++ b/xsd/xsd.cxx
+@@ -18,7 +18,7 @@
+
+ #include <xsd-frontend/parser.hxx>
+ #include <xsd-frontend/transformations/anonymous.hxx>
+-#include <xsd-frontend/transformations/enum-synthesis.cxx>
++#include <xsd-frontend/transformations/enum-synthesis.hxx>
+ #include <xsd-frontend/transformations/restriction.hxx>
+ #include <xsd-frontend/transformations/schema-per-type.hxx>
+ #include <xsd-frontend/transformations/simplifier.hxx>
diff --git a/dev-cpp/xsd/files/3.3.0-fix_tests.patch b/dev-cpp/xsd/files/3.3.0-fix_tests.patch
new file mode 100644
index 000000000000..f8de00d371fd
--- /dev/null
+++ b/dev-cpp/xsd/files/3.3.0-fix_tests.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/cxx/tree/prefix/makefile b/tests/cxx/tree/prefix/makefile
+index 3317161..77b4b0a 100644
+--- a/tests/cxx/tree/prefix/makefile
++++ b/tests/cxx/tree/prefix/makefile
+@@ -35,7 +35,7 @@ gen := $(addprefix $(out_base)/,$(genf))
+
+ $(gen): xsd := $(out_root)/xsd/xsd
+ $(gen): xsd_options := --generate-serialization --generate-polymorphic \
+---polymorphic-type foo\\\#base --root-element root
++--polymorphic-type foo\\\\\#base --root-element root
+ $(gen): $(out_root)/xsd/xsd
+
+ $(call include-dep,$(dep))
diff --git a/dev-cpp/xsd/files/3.3.0-xsdcxx-rename.patch b/dev-cpp/xsd/files/3.3.0-xsdcxx-rename.patch
new file mode 100644
index 000000000000..b99a44eab29c
--- /dev/null
+++ b/dev-cpp/xsd/files/3.3.0-xsdcxx-rename.patch
@@ -0,0 +1,121 @@
+diff --git a/documentation/xsd.1 b/documentation/xsd.1
+index 8b97b14..213f6f6 100644
+--- a/documentation/xsd.1
++++ b/documentation/xsd.1
+@@ -1,16 +1,16 @@
+ .\" Process this file with
+-.\" groff -man -Tascii xsd.1
++.\" groff -man -Tascii xsdcxx.1
+ .\"
+ .TH XSD 1 "April 2010" "XSD 3.3.0"
+ .SH NAME
+-xsd \- W3C XML Schema to C++ Compiler
++xsdcxx \- W3C XML Schema to C++ Compiler
+ .\"
+ .\"
+ .\"
+ .\"--------------------------------------------------------------------
+ .SH SYNOPSIS
+ .\"--------------------------------------------------------------------
+-.B xsd
++.B xsdcxx
+ .I command
+ .B [
+ .I options
+@@ -20,19 +20,19 @@ xsd \- W3C XML Schema to C++ Compiler
+ .I file
+ .B ...]
+ .in
+-.B xsd help
++.B xsdcxx help
+ .B [
+ .I command
+ .B ]
+ .in
+-.B xsd version
++.B xsdcxx version
+ .\"
+ .\"
+ .\"
+ .\"--------------------------------------------------------------------
+ .SH DESCRIPTION
+ .\"--------------------------------------------------------------------
+-.B xsd
++.B xsdcxx
+ generates vocabulary-specific, statically-typed C++ mapping from W3C XML
+ Schema definitions. Particular mapping to produce is selected by a
+ .IR command .
+@@ -203,7 +203,7 @@ For example, if you have file
+ with namespace
+ .B http://example.com/hello
+ and you run
+-.B xsd
++.B xsdcxx
+ on this file, then the string in question will be:
+
+ .B hello.xsd. http://example.com/hello
+@@ -1877,7 +1877,7 @@ option. With this approach you don't need to worry about shell quoting.
+ .\"
+ .SH DIAGNOSTICS
+ If the input file is not a valid W3C XML Schema definition,
+-.B xsd
++.B xsdcxx
+ will issue diagnostic messages to
+ .B STDERR
+ and exit with non-zero exit code.
+diff --git a/documentation/xsd.xhtml b/documentation/xsd.xhtml
+index 4acf822..af630bf 100644
+--- a/documentation/xsd.xhtml
++++ b/documentation/xsd.xhtml
+@@ -50,19 +50,19 @@
+
+ <h1>NAME</h1>
+
+- <p>xsd - W3C XML Schema to C++ Compiler</p>
++ <p>xsdcxx - W3C XML Schema to C++ Compiler</p>
+
+ <h1>SYNOPSIS</h1>
+
+ <dl id="synopsis">
+- <dt><code><b>xsd</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
+- <dt><code><b>xsd help</b> [<i>command</i>]</code></dt>
+- <dt><code><b>xsd version</b></code></dt>
++ <dt><code><b>xsdcxx</b> <i>command</i> [<i>options</i>] <i>file</i> [<i>file</i> ...]</code></dt>
++ <dt><code><b>xsdcxx help</b> [<i>command</i>]</code></dt>
++ <dt><code><b>xsdcxx version</b></code></dt>
+ </dl>
+
+ <h1>DESCRIPTION</h1>
+
+- <p><code><b>xsd</b></code> generates vocabulary-specific, statically-typed
++ <p><code><b>xsdcxx</b></code> generates vocabulary-specific, statically-typed
+ C++ mapping from W3C XML Schema definitions. Particular mapping to
+ produce is selected by a <code><i>command</i></code>. Each mapping has
+ a number of mapping-specific <code><i>options</i></code> that should
+@@ -104,7 +104,7 @@
+
+ <dt><code><b>help</b></code></dt>
+ <dd>Print usage information and exit. Use
+- <p><code><b>xsd help</b> <i>command</i></code></p>
++ <p><code><b>xsdcxx help</b> <i>command</i></code></p>
+ for command-specific help.
+ </dd>
+
+@@ -174,7 +174,7 @@
+
+ <p>For example, if you have file <code><b>hello.xsd</b></code>
+ with namespace <code><b>http://example.com/hello</b></code> and you run
+- <code><b>xsd</b></code> on this file, then the string in question
++ <code><b>xsdcxx</b></code> on this file, then the string in question
+ will be:</p>
+
+ <p><code><b>hello.xsd. http://example.com/hello</b></code></p>
+@@ -1575,7 +1575,7 @@ namespace .*
+ <h1>DIAGNOSTICS</h1>
+
+ <p>If the input file is not a valid W3C XML Schema definition,
+- <code><b>xsd</b></code> will issue diagnostic messages to STDERR
++ <code><b>xsdcxx</b></code> will issue diagnostic messages to STDERR
+ and exit with non-zero exit code.</p>
+
+ <h1>BUGS</h1>
diff --git a/dev-cpp/xsd/metadata.xml b/dev-cpp/xsd/metadata.xml
new file mode 100644
index 000000000000..68cc8254d7e3
--- /dev/null
+++ b/dev-cpp/xsd/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>no-herd</herd>
+ <maintainer>
+ <email>dev-zero@gentoo.org</email>
+ <name>Tiziano Müller</name>
+</maintainer>
+<use>
+ <flag name="ace">Enable support for serializing to/from an ACE CDR stream</flag>
+</use>
+</pkgmetadata>
diff --git a/dev-cpp/xsd/xsd-3.3.0.ebuild b/dev-cpp/xsd/xsd-3.3.0.ebuild
new file mode 100644
index 000000000000..abb949c961cb
--- /dev/null
+++ b/dev-cpp/xsd/xsd-3.3.0.ebuild
@@ -0,0 +1,151 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-cpp/xsd/xsd-3.3.0.ebuild,v 1.1 2010/10/20 19:44:47 dev-zero Exp $
+
+EAPI="2"
+
+inherit toolchain-funcs eutils versionator
+
+DESCRIPTION="An open-source, cross-platform W3C XML Schema to C++ data binding compiler."
+HOMEPAGE="http://www.codesynthesis.com/products/xsd/"
+SRC_URI="http://www.codesynthesis.com/download/${PN}/$(get_version_component_range 1-2)/${P}.tar.bz2"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ace doc examples zlib"
+
+RDEPEND=">=dev-libs/xerces-c-3
+ >=dev-libs/boost-1.40.0
+ >=dev-cpp/libcult-1.4.6
+ >=dev-cpp/libxsd-frontend-1.17.0
+ >=dev-cpp/libbackend-elements-1.7.2
+ ace? ( dev-libs/ace )
+ zlib? ( sys-libs/zlib )"
+DEPEND="${RDEPEND}
+ dev-util/build
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${PV}-disable_examples_and_tests.patch" \
+ "${FILESDIR}/${PV}-xsdcxx-rename.patch" \
+ "${FILESDIR}/${PV}-fix_include.patch" \
+ "${FILESDIR}/${PV}-fix_tests.patch"
+}
+
+use_yesno() {
+ use $1 && echo "y" || echo "n"
+}
+
+src_configure() {
+ BOOST_PKG="$(best_version ">=dev-libs/boost-1.40.0")"
+ BOOST_VER="$(get_version_component_range 1-2 "${BOOST_PKG/*boost-/}")"
+ BOOST_VER="$(replace_all_version_separators _ "${BOOST_VER}")"
+ BOOST_INC="/usr/include/boost-${BOOST_VER}"
+
+ # Maintainer notes:
+ # * xqilla is not required, this is only whether or not to include the xpath
+ # examples which require xqilla
+ mkdir -p \
+ build/cxx/gnu \
+ build/import/lib{ace,boost,cult,backend-elements,xerces-c,xqilla,xsd-frontend,z}
+
+ cat >> build/configuration-dynamic.make <<- EOF
+xsd_with_zlib := $(use_yesno zlib)
+xsd_with_ace := $(use_yesno ace)
+xsd_with_xdr := y
+xsd_with_dbxml := n
+xsd_with_xqilla := y
+xsd_with_boost_date_time := y
+xsd_with_boost_serialization := y
+ EOF
+
+ cat >> build/cxx/configuration-dynamic.make <<- EOF
+cxx_id := gnu
+cxx_optimize := n
+cxx_debug := n
+cxx_rpath := n
+cxx_pp_extra_options :=
+cxx_extra_options := ${CXXFLAGS} -I${BOOST_INC}
+cxx_ld_extra_options := ${LDFLAGS}
+cxx_extra_libs :=
+cxx_extra_lib_paths :=
+ EOF
+
+ cat >> build/cxx/gnu/configuration-dynamic.make <<- EOF
+cxx_gnu := $(tc-getCXX)
+cxx_gnu_libraries :=
+cxx_gnu_optimization_options :=
+ EOF
+
+ cat >> build/import/libace/configuration-dynamic.make <<- EOF
+libace_installed := y
+ EOF
+
+ cat >> build/import/libbackend-elements/configuration-dynamic.make <<- EOF
+libbackend_elements_installed := y
+ EOF
+
+ cat >> build/import/libboost/configuration-dynamic.make <<- EOF
+libboost_installed := y
+libboost_suffix := -mt-${BOOST_VER}
+libboost_system := n
+ EOF
+
+ cat >> build/import/libcult/configuration-dynamic.make <<- EOF
+libcult_installed := y
+ EOF
+
+ cat >> build/import/libxerces-c/configuration-dynamic.make <<- EOF
+libxerces_c_installed := y
+ EOF
+
+ cat >> build/import/libxqilla/configuration-dynamic.make <<- EOF
+libxqilla_installed := y
+ EOF
+
+ cat >> build/import/libxsd-frontend/configuration-dynamic.make <<- EOF
+libxsd_frontend_installed := y
+ EOF
+
+ cat >> build/import/libz/configuration-dynamic.make <<- EOF
+libz_installed := y
+ EOF
+
+ MAKEOPTS+=" verbose=1"
+}
+
+src_compile() {
+ default
+ if use doc ; then
+ emake -C "${S}/documentation/cxx/tree/reference" || die "generating reference docs failed"
+ fi
+ if use test ; then
+ XERCESC_NLS_HOME="${ROOT}usr/share/xerces-c/msg" emake -C "${S}/tests" || die "building tests failed"
+ fi
+}
+
+src_install() {
+ emake install_prefix="${D}/usr" install || die "emake install failed"
+
+ # Renaming binary/manpage to avoid collision with mono-2.0's xsd/xsd2
+ mv "${D}"/usr/bin/xsd{,cxx}
+ mv "${D}"/usr/share/man/man1/xsd{,cxx}.1
+
+ rm -rf "${D}/usr/share/doc"
+
+ dohtml -r -A xhtml -A pdf documentation/*
+
+ dodoc NEWS README FLOSSE
+ newdoc libxsd/README README.libxsd
+ newdoc libxsd/FLOSSE FLOSSE.libxsd
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}
+ doins -r examples
+ fi
+}
+
+src_test() {
+ XERCESC_NLS_HOME="${ROOT}usr/share/xerces-c/msg" emake -C "${S}/tests" test || die "tests failed"
+}