The Birdfont Source Code


All Repositories / xmlbird.git / commit – RSS feed

Merge branch 'master' of github.com:johanmattssonm/xmlbird

These changes was commited to the Birdfont repository Sat, 18 Jun 2016 23:48:12 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/xmlbird.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 18 Jun 2016 23:48:12 +0000 (01:48 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Sat, 18 Jun 2016 23:48:12 +0000 (01:48 +0200)
commit baf4f61bf5c3eb2b087bbfc715daabbfa9e1bc31
tree 788a982310434d8b281101d6988ae43fb240d4f0
parent 7dc07454114d8cfd0a543f169e5d282861a705eb
parent aa80a4f751026754a6bca3245c02c29649932711
Merge branch 'master' of github.com:johanmattssonm/xmlbird

build.py
configure
dodo.py
install.py
libxmlbird/XmlElement.vala
libxmlbird/XmlString.vala
libxmlbird/XmlTree.vala
scripts/tests.py
diff --git a/build.py b/build.py
--- a/build.py +++ b/build.py @@ -11,8 +11,8 @@ if platform == 'msys': process_tasks(dodo.make_libxmlbird('libbirdgems.dll', [])) elif platform == 'darwin': - lib = "libxmlbird." + str(version.LIBXMLBIRD_SO_VERSION_MAJOR) + '.dylib' - process_tasks(dodo.make_libxmlbird(lib, [])) + lib = "libxmlbird-" + str(version.LIBXMLBIRD_SO_VERSION_MAJOR) + '.dylib' + process_tasks(dodo.make_libxmlbird(lib)) elif "openbsd" in platform: process_tasks(dodo.make_libxmlbird('libxmlbird.so.${LIBxmlbird_VERSION}')) else:
--- a/configure +++ b/configure @@ -44,8 +44,8 @@ process.communicate()[0] return process.returncode == 0 - def configure (): - if not test_program_version ("valac", 0, 16, 0): + def configure(valac): + if not test_program_version(valac, 0, 16, 0): print (FAIL + "valac is too old." + ENDC) exit (1) @@ -105,7 +105,7 @@ else: options.nonnull = True - configure() + configure(options.valac) configfile.write_compile_parameters(options.prefix, options.dest,
diff --git a/dodo.py b/dodo.py
--- a/dodo.py +++ b/dodo.py @@ -51,6 +51,7 @@ """ + soname(target_binary) + """ \ build/libxmlbird/*.o \ $(pkg-config --libs glib-2.0) \ + $(pkg-config --libs gobject-2.0) \ -o ./build/bin/""" + target_binary libxmlbird = Builder('libxmlbird',
--- a/install.py +++ b/install.py @@ -73,7 +73,9 @@ prefix = config.PREFIX dest = options.dest - if not options.libdir: + if sys.platform == 'darwin': + libdir = '/lib' + elif not options.libdir: if platform.dist()[0] == 'Ubuntu' or platform.dist()[0] == 'Debian': process = subprocess.Popen(['dpkg-architecture', '-qDEB_HOST_MULTIARCH'], stdout=subprocess.PIPE) out, err = process.communicate() @@ -96,18 +98,18 @@ link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') elif os.path.isfile ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION): - install ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, libdir, 644) - link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) - link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') - elif os.path.isfile ('build/bin/libxmlbird.' + version.LIBXMLBIRD_SO_VERSION + '.dylib'): - install ('build/bin/libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', libdir, 644) - link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) - link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION + '.dylib', ' libxmlbird.dylib') + install ('build/libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, libdir, 644) + link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) + link (libdir, 'libxmlbird.so.' + version.LIBXMLBIRD_SO_VERSION, ' libxmlbird.so') + elif os.path.isfile ('build/bin/libxmlbird-' + version.LIBXMLBIRD_SO_VERSION_MAJOR + '.dylib'): + install ('build/bin/libxmlbird-' + version.LIBXMLBIRD_SO_VERSION_MAJOR + '.dylib', libdir, 644) + link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION_MAJOR + '.dylib', ' libxmlbird.dylib.' + version.LIBXMLBIRD_SO_VERSION_MAJOR) + link (libdir, 'libxmlbird-' + version.LIBXMLBIRD_SO_VERSION_MAJOR + '.dylib', ' libxmlbird.dylib') else: - print ("Can't find libxmlbird.") - exit (1) + print("Can't find libxmlbird, so-version: " + str(version.LIBXMLBIRD_SO_VERSION)) + exit (1) install ('build/xmlbird/xmlbird.h', '/include', 644) install ('build/xmlbird.vapi', '/share/vala/vapi', 644) install ('build/xmlbird.pc', libdir + '/pkgconfig', 644)
--- a/libxmlbird/XmlElement.vala +++ b/libxmlbird/XmlElement.vala @@ -15,7 +15,7 @@ namespace B { /** - * A representation of a tags and content in an XML document. + * Representation of tags and content in an XML document. */ public class XmlElement : GLib.Object { string name = "";
--- a/libxmlbird/XmlString.vala +++ b/libxmlbird/XmlString.vala @@ -126,7 +126,7 @@ return false; } - if (likely ((int) (d[i] & first_bit) == 0)) { + if ((int) (d[i] & first_bit) == 0) { c = d[i]; index++; return c != '\0';
--- a/libxmlbird/XmlTree.vala +++ b/libxmlbird/XmlTree.vala @@ -15,7 +15,7 @@ namespace B { /** - * A representation of an XML tree. + * A representation of a XML tree. * * All XML elements are owned by the tree and will be deleted when the * tree is deleted.
--- a/scripts/tests.py +++ b/scripts/tests.py @@ -2,5 +2,5 @@ import subprocess - from scripts.config import PREFIX + from scripts.config import (PREFIX, VALAC) from scripts.run import run from scripts.version import LIBXMLBIRD_SO_VERSION @@ -32,7 +32,7 @@ run ("mkdir -p build/tests"); for test in tests: - run ("valac --ccode --pkg=posix --pkg=xmlbird --vapidir=./build " + run (VALAC + " --ccode --pkg=posix --pkg=xmlbird --vapidir=./build " + "--directory=./build tests/" + test + ".vala tests/Test.vala"); run ("""gcc -fPIC -c \