The Birdfont Source Code


All Repositories / birdfont.git / commitdiff – RSS feed

Add BDS specific changes to build scripts

These changes was commited to the Birdfont repository Tue, 19 May 2015 07:28:12 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
[Tue, 19 May 2015 07:28:12 +0000]

Updated Files

configure
dodo.py
install.py
scripts/bavala.py
--- a/configure +++ b/configure @@ -119,7 +119,10 @@ (options, args) = parser.parse_args() if not options.prefix: - options.prefix = "/usr" + if "bsd" in sys.platform: + options.prefix = "${DESTDIR}${PREFIX}" + else: + options.prefix = "/usr" if not options.dest: options.dest = "" if not options.cc:
diff --git a/dodo.py b/dodo.py
--- a/dodo.py +++ b/dodo.py @@ -18,6 +18,7 @@ import os import glob import subprocess + import sys from optparse import OptionParser from doit.tools import run_once @@ -101,7 +102,13 @@ '--define=LINUX' ] - libbirdxml = Vala(src='libbirdxml', build='build', library='birdxml', so_version=version.LIBBIRDXML_SO_VERSION, pkg_libs=LIBBIRD_XML_LIBS) + + if "bsd" in sys.platform: + LIBBIRDXML_SO_VERSION='${LIBbirdxml_VERSION}' + else: + LIBBIRDXML_SO_VERSION=version.LIBBIRDXML_SO_VERSION + + libbirdxml = Vala(src='libbirdxml', build='build', library='birdxml', so_version=LIBBIRDXML_SO_VERSION, pkg_libs=LIBBIRD_XML_LIBS) def task_libbirdxml(): if config.POSIXVALA == True: @@ -114,15 +121,24 @@ yield libbirdxml.gen_ln() - libbirdgems = Vala(src='libbirdgems', build='build', library='birdgems', so_version=version.LIBBIRDGEMS_SO_VERSION, pkg_libs=LIBBIRD_LIBS, vala_deps=[]) + if "bsd" in sys.platform: + LIBBIRDGEMS_SO_VERSION='${LIBbirdgems_VERSION}' + else: + LIBBIRDGEMS_SO_VERSION=version.LIBBIRDGEMS_SO_VERSION + + libbirdgems = Vala(src='libbirdgems', build='build', library='birdgems', so_version=LIBBIRDGEMS_SO_VERSION, pkg_libs=LIBBIRD_LIBS, vala_deps=[]) def task_libbirdgems(): yield libbirdgems.gen_c(valac_options) yield libbirdgems.gen_o(['-fPIC']) yield libbirdgems.gen_so('-shared -L ./build -l m') yield libbirdgems.gen_ln() + if "bsd" in sys.platform: + SO_VERSION='${LIBbirdfont_VERSION}' + else: + SO_VERSION=version.SO_VERSION - libbird = Vala(src='libbirdfont', build='build', library='birdfont', so_version=version.SO_VERSION, pkg_libs=LIBS, vala_deps=[libbirdgems, libbirdxml]) + libbird = Vala(src='libbirdfont', build='build', library='birdfont', so_version=SO_VERSION, pkg_libs=LIBS, vala_deps=[libbirdgems, libbirdxml]) def task_libbirdfont(): yield libbird.gen_c(valac_options) yield libbird.gen_o(['-fPIC -I./build/', """-D 'GETTEXT_PACKAGE="birdfont"'"""])
--- a/install.py +++ b/install.py @@ -20,6 +20,7 @@ import subprocess import glob import platform + import sys from optparse import OptionParser from scripts import config from scripts import version @@ -173,7 +174,11 @@ exit (1) - if os.path.isfile ('build/bin/libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION): + if "bsd" in sys.platform: + install ('build/libbirdfont.so.' + '${LIBbirdfont_VERSION}', '/lib', 644) + install ('build/libbirdxml.so.' + '${LIBbirdxml_VERSION}', '/lib', 644) + install ('build/libbirdgems.so.' + '${LIBbirdgems_VERSION}', '/lib', 644) + elif os.path.isfile ('build/bin/libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION): install ('build/bin/libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION, libdir, 644) link (libdir, 'libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION, ' libbirdgems.so.' + version.LIBBIRDXML_SO_VERSION_MAJOR) link (libdir, 'libbirdgems.so.' + version.LIBBIRDGEMS_SO_VERSION, ' libbirdgems.so')
--- a/scripts/bavala.py +++ b/scripts/bavala.py @@ -226,7 +226,10 @@ def gen_ln(self): """generate a symbolic link to the generated ".so" file""" so_file = self.so.rsplit('/')[-1] - create_link = "ln -s -T " + so_file + " " + self.so_link_name + " " + + if not "bsd" in sys.platform: + create_link = "ln -s -T " + so_file + " " + self.so_link_name + " " + create_link += "&& mv " + self.so_link_name + " " + self.build + "/" return { 'name': self.so_link_name,