Clone in a terminal:
Commit e92210f
Johan Mattsson - 2015-05-19T07:28:12+00:00
e92210f8c3b3db202f871ddfb83b001d8150e120johan.mattsson.m@gmail.com

Add BDS specific changes to build scripts

Changed files (4)

Diff

diff --git a/configure b/configureindex d4e2b58..c6ae395 100755--- a/configure+++ b/configure@@ -119,7 +119,10 @@ parser.add_option("-x", "--posix", dest="posix", help="Use posixvala", metavar=" (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.pyindex 4ef47c2..4013767 100644--- a/dodo.py+++ b/dodo.py@@ -18,6 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. import os import glob import subprocess+import sys  from optparse import OptionParser from doit.tools import run_once@@ -101,7 +102,13 @@ valac_options = [ 	'--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 @@ def task_libbirdxml():     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"'"""])diff --git a/install.py b/install.pyindex 16f5bb6..0e01c69 100755--- a/install.py+++ b/install.py@@ -20,6 +20,7 @@ import os import subprocess import glob import platform+import sys from optparse import OptionParser from scripts import config from scripts import version@@ -173,7 +174,11 @@ else: 	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')diff --git a/scripts/bavala.py b/scripts/bavala.pyindex cd0d0ee..86eea28 100644--- a/scripts/bavala.py+++ b/scripts/bavala.py@@ -226,7 +226,10 @@ class Vala(object):     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,

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112