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 53c95916722f2cf7bf6bf0c768cf4e9ec79d6fb3 (commit) from 2bf4d0ec1f74e70434a7d93cf643bcbe7b855c78 (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/53c95916722f2cf7bf6bf0c768cf4e9ec79d6...
commit 53c95916722f2cf7bf6bf0c768cf4e9ec79d6fb3 Author: Cyril Hrubis metan@ucw.cz Date: Sun May 6 14:01:38 2012 +0200
build: Make configure genereate gfxprim-config script.
diff --git a/configure b/configure index 6011867..a83d654 100755 --- a/configure +++ b/configure @@ -131,6 +131,17 @@ class libraries: else: f.write("HAVE_%s=non" % i[0].upper())
+ # + # Return list of linker flags needed to build particular module + # (module may be core, loaders, backends, etc... + # + def get_linker_flags(self, module): + res = "" + for i in self.libraries: + if module in i[5] and self.results[i[0]]: + res += " " + i[4] + return res + def basic_checks(cfg): sys.stderr.write("Basic checksn") sys.stderr.write("------------n") @@ -160,6 +171,39 @@ def write_config_mk(cfg, libs): f.close() sys.stderr.write("Config 'config.gen.mk' writtenn")
+# +# Generate app compilation helper +# +def write_gfxprim_config(cfg, libs): + modules = ['loaders', 'backends'] + + f = open('gfxprim-config', 'w') + f.write('#!/bin/shn' + '#n# Generated by configure, do not edit directlyn#nn' + 'USAGE="Usage: $0 --list-modules --cflags --libs --libs-module_foo"n' + 'nif test $# -eq 0; thenn' + 'techo "$USAGE"n' + 'texit 1n' + 'finn' + 'while test -n "$1"; don' + 'tcase "$1" inn') + + # General switches cflags and ldflags + f.write('t--help) echo "$USAGE"; exit 0;;n') + f.write('t--list-modules) echo "%s"; exit 0;;n' % ' '.join(modules)) + f.write('t--cflags) echo -n "-I/usr/include/GP/";;n') + f.write('t--libs) echo -n "-lGP";;n') + + + # ldflags for specific modules + for i in modules: + f.write('t--libs-%s) echo -n "%s";;n' % + (i, libs.get_linker_flags(i))) + + f.write('tesacntshiftndonenechon') + f.close() + os.system('chmod +x gfxprim-config') + if __name__ == '__main__': # # Dictionary for default configuration parameters @@ -173,26 +217,26 @@ if __name__ == '__main__': # # Library detection/enable disable # - # name, description, [detection], cflags, ldflags + # name, description, [detection], cflags, ldflags, dict of modules library is needed for # l = libraries([["libpng", "Portable Network Graphics Library", - [header_exists, "png.h"], "", "-lpng"], + [header_exists, "png.h"], "", "-lpng", {"loaders"}], ["libsdl", "Simple Direct Media Layer", - [header_exists, "SDL/SDL.h"], "", ""], + [header_exists, "SDL/SDL.h"], "", "`sdl-config --libs`", {"backends"}], ["jpeg", "Library to load, handle and manipulate images in the JPEG format", - [header_exists, "jpeglib.h"], "", "-ljpeg"], + [header_exists, "jpeglib.h"], "", "-ljpeg", {"loaders"}], ["giflib", "Library to handle, display and manipulate GIF images", - [header_exists, "gif_lib.h"], "", "-lgif"], + [header_exists, "gif_lib.h"], "", "-lgif", {"loaders"}], ["libX11", "X11 library", - [header_exists, "X11/Xlib.h"], "", "-lX11"], + [header_exists, "X11/Xlib.h"], "", "-lX11", {"backends"}], ["freetype", "A high-quality and portable font engine", - [header_exists, "ft2build.h"], "", "`freetype-config --libs`"]], cfg) + [header_exists, "ft2build.h"], "", "`freetype-config --libs`", {"text"}]], cfg)
parser = OptionParser();
@@ -228,5 +272,6 @@ if __name__ == '__main__': l.check() l.print_summary()
- write_config_h(cfg, l); - write_config_mk(cfg, l); + write_config_h(cfg, l) + write_config_mk(cfg, l) + write_gfxprim_config(cfg, l) diff --git a/install.sh b/install.sh index ee5403f..c0273e0 100755 --- a/install.sh +++ b/install.sh @@ -2,8 +2,13 @@
INSTALL_PREFIX="$1"
-HEADER_LOC="$INSTALL_PREFIX/usr/include/" -LIB_LOC="$INSTALL_PREFIX/usr/lib/" +if test -z "$INSTALL_PREFIX"; then + INSTALL_PREFIX="/usr/" +fi + +HEADER_LOC="$INSTALL_PREFIX/include/" +LIB_LOC="$INSTALL_PREFIX/lib/" +BIN_LOC="$INSTALL_PREFIX/bin/"
# Headers echo "INSTALL headers" @@ -22,3 +27,7 @@ done echo "INSTALL libraries" install -m 775 -d "$LIB_LOC" install -m 664 build/*.so build/*.so.0 build/*.a "$LIB_LOC" + +# Binaries +echo "INSTALL binaries" +install -m 755 gfxprim-config "$BIN_LOC"
-----------------------------------------------------------------------
Summary of changes: configure | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- install.sh | 13 ++++++++++- 2 files changed, 65 insertions(+), 11 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.