Clone in a terminal:
Commit 9b2b670
Johan Mattsson - 2016-06-30T21:39:23+00:00
9b2b670928ab370ab3b62350d5dbd9f354375edfjohan.mattsson.m@gmail.com

Install libsvgbird

Changed files (6)

Diff

diff --git a/dodo.py b/dodo.pyindex 9b3db76..f2d8e8f 100644--- a/dodo.py+++ b/dodo.py@@ -369,6 +369,8 @@ def task_libbirdfont():     yield make_libbirdfont('libbirdfont.so.' + SO_VERSION, ['libbirdgems.so', 'libsvgbird.so'])  def make_libsvgbird(target_binary, deps):+    global version+	     valac_command = config.VALAC + """\         -C \         --vapidir=./ \@@ -384,6 +386,7 @@ def make_libsvgbird(target_binary, deps):         --pkg gio-2.0 \         --pkg cairo \         --pkg xmlbird \+        --vapi=./build/svgbird.vapi \         """      cc_command = config.CC + " " + config.CFLAGS.get("libsvgbird", "") + """ \@@ -419,9 +422,24 @@ def make_libsvgbird(target_binary, deps):                          target_binary,                          link_name,                          deps)-			+    +    f = open('./build/svgbird.pc', 'w+')+    f.write("""prefix=""" + config.PREFIX + """+exec_prefix=${prefix}+includedir=${prefix}/include+libdir=${exec_prefix}/lib++Name: svgbird+Description: SVG library+Version: """ + version.LIBSVGBIRD_VERSION + """+Cflags: -I${includedir}+Libs: -L${libdir} -lsvgbird+Requires: cairo, gobject-2.0, glib-2.0+""")+     yield libsvgbird.build() + def task_libsvgbird():     yield make_libsvgbird('libsvgbird.so.' + LIBSVGBIRD_SO_VERSION, [])     diff --git a/install.py b/install.pyindex d2bf9d5..c662ed5 100755--- a/install.py+++ b/install.py@@ -49,7 +49,6 @@ def install (file, dir, mode): 	print ("install: " + f) 	run ('install -d ' + dest + prefix + dir) 	run ('install -m ' + str(mode) + ' ' + file + ' ' + dest + prefix + dir + '/')-	installed.write (f + "\n")  def install_root (file, dir, mode): 	f = getDestRoot (file, dir)@@ -61,7 +60,6 @@ def link (dir, file, linkname): 	f = getDest (linkname, dir) 	print ("install link: " + f) 	run ('cd ' + dest + prefix + dir + ' && ln -sf ' + file + ' ' + linkname)-	installed.write (f + "\n") 	 if not os.path.exists ("build/configured"): 	print ("Project is not configured")@@ -74,6 +72,7 @@ parser.add_option ("-n", "--manpages-directory", dest="mandir", help="put man pa parser.add_option ("-l", "--libdir", dest="libdir", help="path to directory for shared libraries (lib or lib64).") parser.add_option ("-c", "--skip-command-line-tools", dest="nocli", help="don't install command line tools") parser.add_option ("-a", "--apport", dest="apport", help="install apport scripts", default=True)+parser.add_option ('-v', '--development', dest='development', action="store_true", help='install development files', metavar='DEVELOPMENT')  (options, args) = parser.parse_args() @@ -93,10 +92,6 @@ else: prefix = config.PREFIX dest = options.dest -# create uninstall file-installed = open ('build/installed', 'w')-installed.write ('build/installed\n')- # install it: install ('resources/icons.bf', '/share/birdfont', 644) install ('resources/bright.theme', '/share/birdfont', 644)@@ -144,7 +139,7 @@ else: 	libdir = options.libdir  if "openbsd" in sys.platform:-        install ('build/bin/libbirdfont.so.' + '${LIBbirdfont_VERSION}', '/lib', 644)+	install ('build/bin/libbirdfont.so.' + '${LIBbirdfont_VERSION}', '/lib', 644) elif os.path.isfile ('build/bin/libbirdfont.so.' + version.SO_VERSION): 	install ('build/bin/libbirdfont.so.' + version.SO_VERSION, libdir, 644) 	link (libdir, 'libbirdfont.so.' + version.SO_VERSION, ' libbirdfont.so.' + version.SO_VERSION_MAJOR)@@ -179,9 +174,25 @@ else: 	print ("Can't find libbirdgems, version: " + version.LIBBIRDGEMS_SO_VERSION) 	exit (1) -	-#manpages+if "openbsd" in sys.platform:+        install ('build/bin/libsvgbird.so.' + '${LIBsvgbird_VERSION}', '/lib', 644)+elif os.path.isfile ('build/bin/libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION):+        install ('build/bin/libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, libdir, 644)+        link (libdir, 'libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, ' libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION_MAJOR)+        link (libdir, 'libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, ' libsvgbird.so')+elif os.path.isfile ('build/libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION):+        install ('build/libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, libdir, 644)+        link (libdir, 'libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, ' libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION_MAJOR)+        link (libdir, 'libsvgbird.so.' + version.LIBSVGBIRD_SO_VERSION, ' libsvgbird.so')+elif os.path.isfile ('build/bin/libsvgbird.' + version.LIBSVGBIRD_SO_VERSION + '.dylib'):+        install ('build/bin/libsvgbird.' + version.LIBSVGBIRD_SO_VERSION + '.dylib', libdir, 644)+        link (libdir, 'libsvgbird.' + version.LIBSVGBIRD_SO_VERSION + '.dylib', ' libsvgbird.dylib.' + version.LIBSVGBIRD_SO_VERSION_MAJOR)+        link (libdir, 'libsvgbird.' + version.LIBSVGBIRD_SO_VERSION + '.dylib', ' libsvgbird.dylib')+else:+	print ("Can't find libsvgbird, version: " + version.LIBSVGBIRD_SO_VERSION)+	exit (1) +#manpages if not nogzip:     install ('build/birdfont.1.gz', mandir, 644) @@ -211,4 +222,9 @@ if options.apport == "True": 	install ('resources/source_birdfont.py', '/share/apport/package-hooks', 644) 	install_root ('resources/birdfont-crashdb.conf', '/etc/apport/crashdb.conf.d', 644) -installed.close ()+#install development files+if options.development:+	install ('build/libsvgbird/svgbird.h', '/include', 644)+	install ('build/svgbird.vapi', '/share/vala/vapi', 644)+	install ('svgbird.deps', '/share/vala/vapi', 644)+	install ('build/svgbird.pc', libdir + '/pkgconfig', 644)diff --git a/libbirdfont/BirdFont.vala b/libbirdfont/BirdFont.valaindex 478bb92..9aa93e2 100644--- a/libbirdfont/BirdFont.vala+++ b/libbirdfont/BirdFont.vala@@ -518,33 +518,33 @@ public static void warn_if_test (string message) {  /** Obtain a handle to a file in a folder. */ public static File get_child (File folder, string file_name) {-	string f;-	string s;-	string n;+	string folder_path;+	string separator;+	string name;  	// avoid drive letter problems on windows -	f = (!) folder.get_path ();+	folder_path = (!) folder.get_path ();  #if LINUX-	s = "/";+	separator = "/"; #else-	s = (BirdFont.win32) ? "\\" : "/";+	separator = (BirdFont.win32) ? "\\" : "/"; #endif -	n = file_name;+	name = file_name; 	if (unlikely (BirdFont.win32 && file_name.index_of ("\\") != -1)) { 		warning (@"File name contains path separator: $file_name, Directory: $f");-		n = n.substring (n.last_index_of ("\\")).replace ("\\", "");+		name = name.substring (name.last_index_of ("\\")).replace ("\\", ""); 	} -	if (!f.has_suffix (s)) {-		f += s;+	if (!folder_path.has_suffix (separator)) {+		folder_path += separator; 	}  	printd (@"File in Directory: $f Name: $n\n"); -	return File.new_for_path (f + n);+	return File.new_for_path (folder_path + name); }  public static void set_drawing_callbacks (Drawing callbacks) {diff --git a/libbirdfont/Font.vala b/libbirdfont/Font.valaindex 95caa9d..2fc2ab0 100644--- a/libbirdfont/Font.vala+++ b/libbirdfont/Font.vala@@ -188,17 +188,15 @@ public class Font : GLib.Object { 	}  	public void add_default_characters () {-		GlyphCollection notdef, space;+		GlyphCollection notdef = get_notdef_character (); 		-		notdef = get_notdef_character ();-		-		if (!has_glyph (notdef.get_name ()) {+		if (!has_glyph (notdef.get_name ())) { 			add_glyph_collection (notdef); 		} 		-		space = get_space ();+		GlyphCollection space = get_space (); 		-		if (!has_glyph (space.get_name ()) {+		if (!has_glyph (space.get_name ())) { 			add_glyph_collection (space); 		} 	}diff --git a/scripts/version.py b/scripts/version.pyindex c7d8e91..0f98183 100644--- a/scripts/version.py+++ b/scripts/version.py@@ -22,6 +22,7 @@ LIBBIRDGEMS_SO_VERSION_MAJOR = '0' LIBBIRDGEMS_SO_VERSION_MINOR = '0' LIBBIRDGEMS_SO_VERSION = LIBBIRDGEMS_SO_VERSION_MAJOR + '.' + LIBBIRDGEMS_SO_VERSION_MINOR +LIBSVGBIRD_VERSION = '0.0.0' LIBSVGBIRD_SO_VERSION_MAJOR = '0' LIBSVGBIRD_SO_VERSION_MINOR = '0' LIBSVGBIRD_SO_VERSION = LIBBIRDGEMS_SO_VERSION_MAJOR + '.' + LIBBIRDGEMS_SO_VERSION_MINORdiff --git a/svgbird.deps b/svgbird.depsnew file mode 100644index 0000000..c849d89--- /dev/null+++ b/svgbird.deps@@ -0,0 +1,2 @@+gio-2.0+cairo

Contact

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