Exemplo n.º 1
0
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 
Lesser General Public License for more details.
"""
prefix = ""
valac = "valac"
valaflags = ""
cc = "gcc"
cflags = "-g ./build/icon.res -Wl,-subsystem,windows "
ldflags = ""
library_cflags = "-Wl,-subsystem,windows "
library_ldflags = ""
library = "libbirdfont.dll"

import configfile

configfile.write_config(prefix)
configfile.write_compile_parameters(".\\\\", "build", "gcc", "gee-1.0")

import build
from translations import compile_translations

from run import run

compile_translations()
run("windres ./resources/win32/icon.rc -O coff -o ./build/icon.res")
build.libbirdfont(prefix, cc, cflags, library_ldflags, valac, valaflags,
                  library)
build.birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags, library)

print("Done")
Exemplo n.º 2
0
	options.cflags = ""
if not options.ldflags:
	options.ldflags = ""
if not options.valac:
	options.valac = "valac"
if not options.valaflags:
	options.valaflags = ""

prefix = options.prefix
valac = options.valac
valaflags = options.valaflags + " --pkg gdk-pixbuf-2.0 --pkg gtk+-3.0"
cc = options.cc
cflags = options.cflags + " " + "$(pkg-config --cflags gdk-pixbuf-2.0)"
ldflags = options.ldflags + " " + "$(pkg-config --libs gdk-pixbuf-2.0)"
library_cflags = options.cflags
library_ldflags= options.ldflags + " -Wl,-soname," + "libbirdfont.so." + version.SO_VERSION

birdgemslibrary_cflags = options.cflags
birdgemslibrary_ldflags = options.ldflags + " -Wl,-soname," + "birdgems.so." + version.LIBBIRDGEMS_SO_VERSION

configfile.write_config(prefix)
compile_translations()
build.libbirdgems(prefix, cc, birdgemslibrary_cflags, birdgemslibrary_ldflags, valac, valaflags, "libbirdgems.so." + version.LIBBIRDGEMS_SO_VERSION, False)
build.libbirdfont(prefix, cc, library_cflags, library_ldflags, valac, valaflags, "libbirdfont.so." + version.SO_VERSION, False)
build.birdfont_autotrace(prefix, cc, cflags, ldflags, valac, valaflags, False)
build.birdfont_export(prefix, cc, cflags, ldflags, valac, valaflags, False)
build.birdfont_import(prefix, cc, cflags, ldflags, valac, valaflags, False)
build.birdfont_gtk(prefix, cc, cflags, ldflags, valac, valaflags, False)

print ("Done")
Exemplo n.º 3
0
def build(prefix, cc, cflags, ldflags, valac):
	compile_translations ()
	
	#libbirdfont
	run("mkdir -p build/libbirdfont")
	run("mkdir -p build/bin")

	run(valac + """\
		-C \
		--basedir build/libbirdfont/ \
		--enable-experimental-non-null \
		--enable-experimental \
		--define=MAC \
		--library libbirdfont \
		-H build/libbirdfont/birdfont.h \
		libbirdfont/*.vala \
		libbirdfont/OpenFontFormat/*.vala \
		--pkg libxml-2.0 \
		--pkg gio-2.0 \
		--pkg cairo \
		--pkg libsoup-2.4 \
		--pkg gdk-pixbuf-2.0""")

	#copy c sources 
	run("cp libbirdfont/OpenFontFormat/*.c build/libbirdfont/")

	run(cc + " " + cflags + """ \
		-c build/libbirdfont/*.c \
		-fno-common \
		-fPIC \
		-D 'GETTEXT_PACKAGE="birdfont"' \
		$(pkg-config --cflags libxml-2.0) \
		$(pkg-config --cflags gio-2.0) \
		$(pkg-config --cflags cairo) \
		$(pkg-config --cflags glib-2.0) \
		$(pkg-config --cflags gdk-pixbuf-2.0) \
		-I ./build/mac/birdfont""")
	run("mv ./*.o build/libbirdfont/ ")

	run(cc + " " + ldflags + """ \
		-dynamiclib -Wl,-headerpad_max_install_names,-undefined,dynamic_lookup,-compatibility_version,1.0,-current_version,1.0,-install_name,""" + prefix + """/lib/libbirdfont.dylib -shared build/libbirdfont/*.o \
		 $(pkg-config --libs libxml-2.0) \
		 $(pkg-config --libs gio-2.0) \
		 $(pkg-config --libs cairo) \
		 $(pkg-config --libs glib-2.0) \
		 $(pkg-config --libs gdk-pixbuf-2.0) \
		 -shared -o libbirdfont.dylib""")
	run("mv libbirdfont.dylib build/bin/")

	# birdfont
	run("mkdir -p build/birdfont")
	
	run(valac + """\
		-C \
		--enable-experimental-non-null \
		--enable-experimental \
		--define=MAC birdfont/* \
		--vapidir=./ \
		--pkg libxml-2.0 \
		--pkg gio-2.0  \
		--pkg cairo \
		--pkg libsoup-2.4 \
		--pkg gdk-pixbuf-2.0 \
		--pkg webkit-1.0 \
		--pkg gtk+-2.0\
		--pkg libbirdfont""")
	run("mv birdfont/*.c build/birdfont/")

	run(cc + " " + cflags + """\
		-c ./build/libbirdfont/birdfont.h build/birdfont/*.c \
		-D 'GETTEXT_PACKAGE="birdfont"' \
		$(pkg-config --cflags libxml-2.0) \
		$(pkg-config --cflags gio-2.0) \
		$(pkg-config --cflags cairo) \
		$(pkg-config --cflags glib-2.0) \
		$(pkg-config --cflags gdk-pixbuf-2.0) \
		$(pkg-config --cflags webkit-1.0) \
		-I ./build/libbirdfont/""")
	run("mv ./*.o build/birdfont/")

	run(cc + " " + ldflags + """ \
		build/birdfont/*.o ./build/bin/libbirdfont.dylib \
		$(pkg-config --libs libxml-2.0) \
		$(pkg-config --libs gio-2.0) \
		$(pkg-config --libs cairo) \
		$(pkg-config --libs glib-2.0) \
		$(pkg-config --libs gdk-pixbuf-2.0) \
		$(pkg-config --libs webkit-1.0) \
		$(pkg-config --libs gtk+-2.0) \
		-o ./build/bin/birdfont""")

	# birdfont-export
	run("mkdir -p build/birdfont-export")
	
	run(valac + """ \
		-C \
		--enable-experimental-non-null \
		--enable-experimental \
		--define=MAC birdfont-export/* \
		--vapidir=./ \
		--pkg libxml-2.0 \
		--pkg gio-2.0  \
		--pkg cairo \
		--pkg gdk-pixbuf-2.0 \
		--pkg gtk+-2.0 \
		--pkg libbirdfont""")
	run("mv birdfont-export/*.c build/birdfont-export/")

	run(cc + " " + cflags + """ \
		-c ./build/libbirdfont/birdfont.h build/birdfont-export/*.c \
		-D 'GETTEXT_PACKAGE="birdfont"' \
		$(pkg-config --cflags libxml-2.0) \
		$(pkg-config --cflags gio-2.0) \
		$(pkg-config --cflags cairo) \
		$(pkg-config --cflags glib-2.0) \
		$(pkg-config --cflags gdk-pixbuf-2.0) \
		-I ./build/libbirdfont/""")
	run("mv ./*.o build/birdfont-export/")

	run(cc + " " + ldflags + " \
		build/birdfont-export/*.o \
		./build/bin/libbirdfont.dylib \
		$(pkg-config --libs libxml-2.0) \
		$(pkg-config --libs gio-2.0) \
		$(pkg-config --libs cairo) \
		$(pkg-config --libs glib-2.0) \
		$(pkg-config --libs gdk-pixbuf-2.0) \
		-o ./build/bin/birdfont-export")

	run("touch build/installed")
	run("touch build/configured")