This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project gfxprim.git.
The branch, master has been updated via a9124caa3f7c756fc3c7bdba6ffadd4307222454 (commit) via 1a1deab3f85d569bdac0c221b1924c1080b6c054 (commit) via ad9c55f95d4a092aa12b9212294d87d2d57b29ae (commit) via 5b78a3437eb7f15c79b8add4a1deffc57a67839d (commit) from 8c1e7985a175989be85334919aac053c290933a3 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- http://repo.or.cz/w/gfxprim.git/commit/a9124caa3f7c756fc3c7bdba6ffadd4307222...
commit a9124caa3f7c756fc3c7bdba6ffadd4307222454 Author: Cyril Hrubis metan@ucw.cz Date: Sat Apr 7 20:00:28 2012 +0200
build: Don't build SDL tests when SDL is not available.
diff --git a/tests/SDL/Makefile b/tests/SDL/Makefile index 7c91120..529dd83 100644 --- a/tests/SDL/Makefile +++ b/tests/SDL/Makefile @@ -5,9 +5,11 @@ CSOURCES=$(shell echo *.c) INCLUDE=core gfx SDL backends LDLIBS+=-lGP -L$(TOPDIR)/build/ -lGP_SDL -lSDL
+ifeq ($(HAVE_LIBSDL),yes) APPS=pixeltest fileview fonttest linetest randomshapetest shapetest sierpinsky symbolstest textaligntest trianglefps input blittest subcontext showimage aatest mixpixeltest +endif
include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk
http://repo.or.cz/w/gfxprim.git/commit/1a1deab3f85d569bdac0c221b1924c1080b6c...
commit 1a1deab3f85d569bdac0c221b1924c1080b6c054 Author: Cyril Hrubis metan@ucw.cz Date: Sat Apr 7 19:59:57 2012 +0200
build: Allow for empty APP in app.mk.
diff --git a/app.mk b/app.mk index d852703..c743505 100644 --- a/app.mk +++ b/app.mk @@ -1,7 +1,3 @@ -ifndef APPS -$(error APPS not defined, fix your library Makefile) -endif - LDLIBS+=-lm -ldl
ALL+=$(APPS)
http://repo.or.cz/w/gfxprim.git/commit/ad9c55f95d4a092aa12b9212294d87d2d57b2...
commit ad9c55f95d4a092aa12b9212294d87d2d57b29ae Author: Cyril Hrubis metan@ucw.cz Date: Sat Apr 7 19:51:00 2012 +0200
configure: Propagage HAVE_LIBFOO into config.gen.mk too.
diff --git a/configure b/configure index 51840ea..f26c95e 100755 --- a/configure +++ b/configure @@ -124,8 +124,12 @@ class libraries: # def write_config_mk(self, f): for i in self.libraries: + f.write("# %s - %sn" % (i[0], i[1])) if self.results[i[0]]: - f.write("# %snCFLAGS+=%snLDFLAGS+=%sn" % (i[0], i[3], i[4])) + f.write("HAVE_%s=yesn" % i[0].upper()) + f.write("CFLAGS+=%snLDFLAGS+=%sn" % (i[3], i[4])) + else: + f.write("HAVE_%s=non" % i[0].upper())
def basic_checks(cfg): sys.stderr.write("Basic checksn")
http://repo.or.cz/w/gfxprim.git/commit/5b78a3437eb7f15c79b8add4a1deffc57a678...
commit 5b78a3437eb7f15c79b8add4a1deffc57a67839d Author: Cyril Hrubis metan@ucw.cz Date: Sat Apr 7 19:38:52 2012 +0200
configure: reformat the code to use 4 spaces.
diff --git a/configure b/configure index 60d6e14..51840ea 100755 --- a/configure +++ b/configure @@ -1,220 +1,222 @@ #!/usr/bin/env python # -# This is simple script to detect libraries and configure -# standard features. +# This is simple script to detect libraries and configure standard features. # import os import sys from optparse import OptionParser
def header_exists(cfg, filename): - fpath = cfg['include_path'][0] + '/' + filename - - sys.stderr.write("Checking for '%s' ... " % fpath) - - try: - st = os.stat(fpath) - sys.stderr.write("Yesn") - return True - except os.error: - sys.stderr.write("Non") - return False + fpath = cfg['include_path'][0] + '/' + filename + + sys.stderr.write("Checking for '%s' ... " % fpath) + + try: + st = os.stat(fpath) + sys.stderr.write("Yesn") + return True + except os.error: + sys.stderr.write("Non") + return False
def c_try_compile(cfg, code, msg): - sys.stderr.write(msg) - - ret = os.system("echo '%s' | %s -x c -o /dev/null - > /dev/null 2>&1" % (code, cfg["CC"][0])) - - if ret: - sys.stderr.write("Non") - return False - else: - sys.stderr.write("Yesn") - return True + sys.stderr.write(msg) + + ret = os.system("echo '%s' | %s -x c -o /dev/null - > /dev/null 2>&1" % + (code, cfg["CC"][0])) + + if ret: + sys.stderr.write("Non") + return False + else: + sys.stderr.write("Yesn") + return True
def c_compiler_exists(cfg): - return c_try_compile(cfg, "int main(void) { return 0; }", - "Checking for working compiler (%s) ... " % cfg["CC"][0]) + return c_try_compile(cfg, "int main(void) { return 0; }", + "Checking for working compiler (%s) ... " % + cfg["CC"][0])
def python_module_installed(cfg, module): - sys.stderr.write("Checking for python module %s ... " % module) + sys.stderr.write("Checking for python module %s ... " % module)
- ret = os.system("echo 'import %s' | %s > /dev/null 2>&1" % (module, cfg['PYTHON_BIN'][0])) + ret = os.system("echo 'import %s' | %s > /dev/null 2>&1" % + (module, cfg['PYTHON_BIN'][0]))
- if ret: - sys.stderr.write('Non') - return False - else: - sys.stderr.write('Yesn') - return True + if ret: + sys.stderr.write('Non') + return False + else: + sys.stderr.write('Yesn') + return True
def check_for_swig(cfg): - sys.stderr.write("Checking for working swig ... ") + sys.stderr.write("Checking for working swig ... ")
- ret = os.system("%s -version > /dev/null 2>&1" % cfg['SWIG'][0]) + ret = os.system("%s -version > /dev/null 2>&1" % cfg['SWIG'][0])
- if ret: - sys.stderr.write('Non') - cfg['SWIG'][0] = '' - else: - sys.stderr.write("Yesn") + if ret: + sys.stderr.write('Non') + cfg['SWIG'][0] = '' + else: + sys.stderr.write("Yesn")
# # Library checking api # class libraries: - def __init__(self, libraries, cfg): - self.libraries = libraries - self.cfg = cfg; - # Create dictionary for check results - self.results = dict() - # - # Print summary - # - def print_summary(self): - sys.stderr.write("Libraries to link againstn") - sys.stderr.write("-------------------------n") - - for i in self.libraries: - sys.stderr.write("%10s" % i[0]) - - if (self.results[i[0]]): - sys.stderr.write(" : Enabledn") - else: - sys.stderr.write(" : Disabledn") - - sys.stderr.write(" - %snn" % i[1]) - # - # Enable/Disable library - # - def set(self, name, val): - if name not in map(lambda s: s[0], self.libraries): - sys.stderr.write("ERROR: Invalid library '%s'n" % name) - exit(1) - else: - self.results[name] = val - # - # Calls a function on arguments, all is stored in array if - # not set previously - # (I know this smells like a lisp, but I can't help myself) - # - def check(self): - sys.stderr.write("Checking for librariesn") - sys.stderr.write("----------------------n") - for i in self.libraries: - if i[0] not in self.results: - self.results[i[0]] = i[2][0](self.cfg, *i[2][1:]) - sys.stderr.write("n") - # - # Writes '#define HAVE_XXX_H' into passed file - # - def write_config_h(self, f): - for i in self.libraries: - f.write("/*n * %sn */n" % i[1]) - if self.results[i[0]]: - f.write("#define HAVE_%sn" % i[0].upper()) - else: - f.write("//#define HAVE_%sn" % i[0].upper()) - f.write("n") - - # - # Writes LDFLAGS and CFLAGS into passed file - # - def write_config_mk(self, f): - for i in self.libraries: - if self.results[i[0]]: - f.write("# %snCFLAGS+=%snLDFLAGS+=%sn" % (i[0], i[3], i[4])) + def __init__(self, libraries, cfg): + self.libraries = libraries + self.cfg = cfg; + # Create dictionary for check results + self.results = dict() + # + # Print summary + # + def print_summary(self): + sys.stderr.write("Libraries to link againstn") + sys.stderr.write("-------------------------n") + + for i in self.libraries: + sys.stderr.write("%10s" % i[0]) + + if (self.results[i[0]]): + sys.stderr.write(" : Enabledn") + else: + sys.stderr.write(" : Disabledn") + + sys.stderr.write(" - %snn" % i[1]) + # + # Enable/Disable library + # + def set(self, name, val): + if name not in map(lambda s: s[0], self.libraries): + sys.stderr.write("ERROR: Invalid library '%s'n" % name) + exit(1) + else: + self.results[name] = val + # + # Calls a function on arguments, all is stored in array if + # not set previously + # (I know this smells like a lisp, but I can't help myself) + # + def check(self): + sys.stderr.write("Checking for librariesn") + sys.stderr.write("----------------------n") + for i in self.libraries: + if i[0] not in self.results: + self.results[i[0]] = i[2][0](self.cfg, *i[2][1:]) + sys.stderr.write("n") + # + # Writes '#define HAVE_XXX_H' into passed file + # + def write_config_h(self, f): + for i in self.libraries: + f.write("/*n * %sn */n" % i[1]) + if self.results[i[0]]: + f.write("#define HAVE_%sn" % i[0].upper()) + else: + f.write("//#define HAVE_%sn" % i[0].upper()) + f.write("n") + + # + # Writes LDFLAGS and CFLAGS into passed file + # + def write_config_mk(self, f): + for i in self.libraries: + if self.results[i[0]]: + f.write("# %snCFLAGS+=%snLDFLAGS+=%sn" % (i[0], i[3], i[4]))
def basic_checks(cfg): - sys.stderr.write("Basic checksn") - sys.stderr.write("------------n") - if not c_compiler_exists(cfg): - exit(1) - if not python_module_installed(cfg, 'jinja2'): - exit(1) - check_for_swig(cfg) - sys.stderr.write("n") + sys.stderr.write("Basic checksn") + sys.stderr.write("------------n") + if not c_compiler_exists(cfg): + exit(1) + if not python_module_installed(cfg, 'jinja2'): + exit(1) + check_for_swig(cfg) + sys.stderr.write("n")
# # Write configuration files # def write_config_h(cfg, libs): - f = open("config.h", "w") - f.write("#ifndef CONFIG_Hn#define CONFIG_Hnn") - libs.write_config_h(f); - f.write("#endif /* CONFIG_H */n"); - sys.stderr.write("Config 'config.h' writtenn") - f.close() + f = open("config.h", "w") + f.write("#ifndef CONFIG_Hn#define CONFIG_Hnn") + libs.write_config_h(f); + f.write("#endif /* CONFIG_H */n"); + sys.stderr.write("Config 'config.h' writtenn") + f.close()
def write_config_mk(cfg, libs): - f = open('config.gen.mk', 'w') - for i in cfg: - f.write("# %sn%s=%sn" % (cfg[i][1], i, cfg[i][0])) - libs.write_config_mk(f); - f.close() - sys.stderr.write("Config 'config.gen.mk' writtenn") + f = open('config.gen.mk', 'w') + for i in cfg: + f.write("# %sn%s=%sn" % (cfg[i][1], i, cfg[i][0])) + libs.write_config_mk(f); + f.close() + sys.stderr.write("Config 'config.gen.mk' writtenn")
if __name__ == '__main__': - # - # Dictionary for default configuration parameters - # - cfg = {'CC' : ['gcc', 'Path/name of the C compiler'], - 'CFLAGS' : ['-W -Wall -Wextra -fPIC -O2 -ggdb', 'C compiler flags'], - 'PYTHON_BIN' : ['python', 'Path/name of python interpreter'], - 'SWIG' : ['swig', 'Simplified Wrapper and Interface Generator'], - 'include_path': ['/usr/include', 'Path to the system headers']} - - # - # Library detection/enable disable - # - # name, description, [detection], cflags, ldflags - # - l = libraries([["libpng", - "Portable Network Graphics Library", - [header_exists, "png.h"], "", "-lpng"], - ["libsdl", - "Simple Direct Media Layer", - [header_exists, "SDL/SDL.h"], "", ""], - ["jpeg", - "Library to load, handle and manipulate images in the JPEG format", - [header_exists, "jpeglib.h"], "", "-ljpeg"], - ["freetype", - "A high-quality and portable font engine", - [header_exists, "ft2build.h"], "", "`freetype-config --libs`"]], cfg) - - parser = OptionParser(); - - # Enable disable libraries for linking - parser.add_option("-e", "--enable", dest="enable", action="append", - help="force enable library linking", metavar="libfoo") - parser.add_option("-d", "--disable", dest="disable", action="append", - help="disable library linking", metavar="libfoo") - - # Add cfg config options - for i in cfg: - parser.add_option("", "--"+i, dest=i, metavar=cfg[i][0], help=cfg[i][1]) - - (options, args) = parser.parse_args(); - - # - # Enable/Disable libraries as user requested - # These are not checked later - # - if options.enable: - for i in options.enable: - l.set(i, True); - if options.disable: - for i in options.disable: - l.set(i, False); - - for i in cfg: - if getattr(options, i): - cfg[i][0] = getattr(options, i) - - basic_checks(cfg); - - l.check() - l.print_summary() - - write_config_h(cfg, l); - write_config_mk(cfg, l); + # + # Dictionary for default configuration parameters + # + cfg = {'CC' : ['gcc', 'Path/name of the C compiler'], + 'CFLAGS' : ['-W -Wall -Wextra -fPIC -O2 -ggdb', 'C compiler flags'], + 'PYTHON_BIN' : ['python', 'Path/name of python interpreter'], + 'SWIG' : ['swig', 'Simplified Wrapper and Interface Generator'], + 'include_path': ['/usr/include', 'Path to the system headers']} + + # + # Library detection/enable disable + # + # name, description, [detection], cflags, ldflags + # + l = libraries([["libpng", + "Portable Network Graphics Library", + [header_exists, "png.h"], "", "-lpng"], + ["libsdl", + "Simple Direct Media Layer", + [header_exists, "SDL/SDL.h"], "", ""], + ["jpeg", + "Library to load, handle and manipulate images in the JPEG format", + [header_exists, "jpeglib.h"], "", "-ljpeg"], + ["freetype", + "A high-quality and portable font engine", + [header_exists, "ft2build.h"], "", "`freetype-config --libs`"]], cfg) + + parser = OptionParser(); + + # Enable disable libraries for linking + parser.add_option("-e", "--enable", dest="enable", action="append", + help="force enable library linking", metavar="libfoo") + parser.add_option("-d", "--disable", dest="disable", action="append", + help="disable library linking", metavar="libfoo") + + # Add cfg config options + for i in cfg: + parser.add_option("", "--"+i, dest=i, metavar=cfg[i][0], help=cfg[i][1]) + + (options, args) = parser.parse_args(); + + # + # Enable/Disable libraries as user requested + # These are not checked later + # + if options.enable: + for i in options.enable: + l.set(i, True); + if options.disable: + for i in options.disable: + l.set(i, False); + + for i in cfg: + if getattr(options, i): + cfg[i][0] = getattr(options, i) + + basic_checks(cfg); + + l.check() + l.print_summary() + + write_config_h(cfg, l); + write_config_mk(cfg, l);
-----------------------------------------------------------------------
Summary of changes: app.mk | 4 - configure | 374 ++++++++++++++++++++++++++-------------------------- tests/SDL/Makefile | 2 + 3 files changed, 192 insertions(+), 188 deletions(-)
repo.or.cz automatic notification. Contact project admin jiri.bluebear.dluhos@gmail.com if you want to unsubscribe, or site admin admin@repo.or.cz if you receive no reply.