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 de060ec35891593790612d5492f50c29c63b6248 (commit) via f7b1bfa7d24c44f3e03e6d3e8f20fe5d839964bd (commit) via 0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d4940 (commit) via 2b791b83c7976635a33543e76e1259c5dfb6454c (commit) from 0e5b7fc4ac8116f1037a244c21159e5fd86f114f (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/de060ec35891593790612d5492f50c29c63b6...
commit de060ec35891593790612d5492f50c29c63b6248 Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 14:05:28 2013 +0200
build: Fix linker ordering and build.
* Loaders are now in separate so library
* Linker flags order is fixed and missing flags are added.
This should fix build on Ubuntu.
DON'T FORGET TO RUN ./cofigure BEFORE make
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/app.mk b/app.mk index 77bd5e7..ccfdef1 100644 --- a/app.mk +++ b/app.mk @@ -1,12 +1,10 @@ -LDLIBS+=-lm - ALL+=$(APPS) CLEAN+=$(APPS)
%: %.o ifdef VERBOSE - $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group -o $@ + $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) $(LDLIBS_GP) -Wl,--end-group -o $@ else @echo "LD $@" - @$(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) -Wl,--end-group -o $@ + @$(CC) $(CFLAGS) $(LDFLAGS) -Wl,--start-group $^ $(LDLIBS) $(LDLIBS_GP) -Wl,--end-group -o $@ endif diff --git a/build/get_objs.sh b/build/get_objs.sh index 3519b01..b6f1be5 100755 --- a/build/get_objs.sh +++ b/build/get_objs.sh @@ -1,7 +1,7 @@ #!/bin/sh
TOPDIR=.. -LIBDIRS="core gfx text loaders filters input" +LIBDIRS="core gfx text filters input"
for i in $LIBDIRS; do OBJECTS=`echo $TOPDIR/libs/$i/*.o`; diff --git a/config.mk b/config.mk index c149a0c..4a103d7 100644 --- a/config.mk +++ b/config.mk @@ -1,6 +1,7 @@ include $(TOPDIR)/config.gen.mk
CFLAGS+=-I$(TOPDIR)/include/ +LDFLAGS+=-L$(TOPDIR)/build/
# path to local module directory PYLIBSDIR=$(TOPDIR)/pylib @@ -16,3 +17,9 @@ endif PYTHON=PYTHONPATH=$$PYTHONPATH:${PYLIBSDIR} ${PYTHON_BIN} -Werror
SWIGOPTS=-w322,314 -I/usr/include/ + +# Linker flags +LDLIBS_GP=$(shell $(TOPDIR)/gfxprim-config --libs) +LDLIBS_LOADERS=$(shell $(TOPDIR)/gfxprim-config --libs-loaders) +LDLIBS_BACKENDS=$(shell $(TOPDIR)/gfxprim-config --libs-backends) +LDLIBS_GRABBERS=$(shell $(TOPDIR)/gfxprim-config --libs-grabbers) diff --git a/configure b/configure index 9deeb6c..894664f 100755 --- a/configure +++ b/configure @@ -160,7 +160,7 @@ class libraries: f.write("# %s - %sn" % (i[0], i[1])) if self.results[i[0]]: f.write("HAVE_%s=yesn" % i[0].upper()) - f.write("CFLAGS+=%snLDLIBS+=%sn" % (i[3], i[4])) + # f.write("CFLAGS+=%snLDLIBS+=%sn" % (i[3], i[4])) else: f.write("HAVE_%s=non" % i[0].upper())
@@ -240,20 +240,20 @@ def write_gfxprim_config(cfg, libs): 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') + '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/%s";;n' % libs.get_cflags('core')) - f.write('t--libs) echo -n "-lGP %s ";;n' % libs.get_linker_flags('core')) + f.write('t--libs) echo -n "-lGP -lm %s ";;n' % libs.get_linker_flags('core'))
# ldflags for specific modules for i in modules: @@ -262,6 +262,8 @@ def write_gfxprim_config(cfg, libs): ldflags += '-lGP_backends ' if i == 'grabbers': ldflags += '-lGP_grabbers ' + if i == 'loaders': + ldflags += '-lGP_loaders ' ldflags += libs.get_linker_flags(i) f.write('t--libs-%s) echo -n "%s ";;n' % (i, ldflags))
diff --git a/demos/bogoman/Makefile b/demos/bogoman/Makefile index e90de8e..83d156e 100644 --- a/demos/bogoman/Makefile +++ b/demos/bogoman/Makefile @@ -3,8 +3,7 @@ TOPDIR=../.. CSOURCES=$(shell echo *.c)
INCLUDE= -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=`$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=$(LDLIBS_BACKENDS)
APPS=bogoman
diff --git a/demos/c_simple/Makefile b/demos/c_simple/Makefile index b4a24d2..3ef9ff7 100644 --- a/demos/c_simple/Makefile +++ b/demos/c_simple/Makefile @@ -11,8 +11,7 @@ CSOURCES=$(SOURCES) endif
INCLUDE= -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=-lrt `$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=-lrt
APPS=backend_example loaders_example loaders filters_symmetry gfx_koch virtual_backend_example meta_data meta_data_dump tmp_file showimage@@ -23,10 +22,38 @@ APPS=backend_example loaders_example loaders filters_symmetry gfx_koch ifeq ($(HAVE_LIBSDL),yes) APPS+=SDL_glue + +SDL_glue: LDLIBS+=$(LDLIBS_BACKENDS) endif
-v4l2_show: LDLIBS+=-lGP_grabbers -v4l2_grab: LDLIBS+=-lGP_grabbers +showimage: LDLIBS+=$(LDLIBS_BACKENDS) $(LDLIBS_LOADERS) +backend_example: LDLIBS+=$(LDLIBS_BACKENDS) +virtual_backend_example: LDLIBS+=$(LDLIBS_BACKENDS) +loaders_example: LDLIBS+=$(LDLIBS_LOADERS) +loaders: LDLIBS+=$(LDLIBS_LOADERS) +tmp_file: LDLIBS+=$(LDLIBS_LOADERS) +filters_symmetry: LDLIBS+=$(LDLIBS_LOADERS) +gfx_koch: LDLIBS+=$(LDLIBS_LOADERS) +meta_data: LDLIBS+=$(LDLIBS_LOADERS) +meta_data_dump: LDLIBS+=$(LDLIBS_LOADERS) +v4l2_show: LDLIBS+=$(LDLIBS_GRABBERS) $(LDLIBS_BACKENDS) +v4l2_grab: LDLIBS+=$(LDLIBS_GRABBERS) $(LDLIBS_LOADERS) +convolution: LDLIBS+=$(LDLIBS_LOADERS) +weighted_median: LDLIBS+=$(LDLIBS_LOADERS) +shapetest: LDLIBS+=$(LDLIBS_BACKENDS) +koch: LDLIBS+=$(LDLIBS_BACKENDS) +input_example: LDLIBS+=$(LDLIBS_BACKENDS) +fileview: LDLIBS+=$(LDLIBS_BACKENDS) +linetest: LDLIBS+=$(LDLIBS_BACKENDS) +randomshapetest: LDLIBS+=$(LDLIBS_BACKENDS) +fonttest: LDLIBS+=$(LDLIBS_BACKENDS) +textaligntest: LDLIBS+=$(LDLIBS_BACKENDS) +loaders_register: LDLIBS+=$(LDLIBS_LOADERS) +gaussian_noise: LDLIBS+=$(LDLIBS_LOADERS) +byte_utils: LDLIBS+=$(LDLIBS_LOADERS) +blittest: LDLIBS+=$(LDLIBS_BACKENDS) $(LDLIBS_LOADERS) +sin_AA: LDLIBS+=$(LDLIBS_BACKENDS) +x11_windows: LDLIBS+=$(LDLIBS_BACKENDS)
include $(TOPDIR)/app.mk include $(TOPDIR)/post.mk diff --git a/demos/grinder/Makefile b/demos/grinder/Makefile index 4df5ea8..80e31e2 100644 --- a/demos/grinder/Makefile +++ b/demos/grinder/Makefile @@ -1,15 +1,15 @@ TOPDIR=../.. +include $(TOPDIR)/pre.mk
CSOURCES=$(shell echo *.c) - INCLUDE=core gfx -LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=$(shell $(TOPDIR)/gfxprim-config --libs --libs-backends) -lrt + +LDLIBS+=-lrt -lm +LDLIBS+=$(LDLIBS_LOADERS)
APPS=grinder
grinder: params.o histogram.o
-include $(TOPDIR)/pre.mk include $(TOPDIR)/app.mk include $(TOPDIR)/post.mk diff --git a/demos/spiv/Makefile b/demos/spiv/Makefile index 95e7560..c6747d2 100644 --- a/demos/spiv/Makefile +++ b/demos/spiv/Makefile @@ -4,7 +4,9 @@ CSOURCES=$(shell echo *.c)
INCLUDE= LDFLAGS+=-L$(TOPDIR)/build/ -LDLIBS+=-lrt `$(TOPDIR)/gfxprim-config --libs --libs-backends` +LDLIBS+=-lrt + +LDLIBS+=$(LDLIBS_LOADERS) $(LDLIBS_BACKENDS)
APPS=spiv
diff --git a/demos/ttf2img/Makefile b/demos/ttf2img/Makefile index aab67a7..5fa8100 100644 --- a/demos/ttf2img/Makefile +++ b/demos/ttf2img/Makefile @@ -3,7 +3,8 @@ TOPDIR=../.. CSOURCES=$(shell echo *.c)
INCLUDE= -LDLIBS+=-lGP -L$(TOPDIR)/build/ +LDLIBS+=-lm +LDLIBS+=$(LDLIBS_LOADERS)
APPS=ttf2img
diff --git a/libs/loaders/Makefile b/libs/loaders/Makefile index 076b940..5dc0799 100644 --- a/libs/loaders/Makefile +++ b/libs/loaders/Makefile @@ -4,6 +4,7 @@ include $(TOPDIR)/pre.mk CSOURCES=$(shell ls *.c) INCLUDE=core LIBNAME=loaders +BUILDLIB=yes
include $(TOPDIR)/lib.mk include $(TOPDIR)/post.mk diff --git a/pylib/gfxprim/backends/Makefile b/pylib/gfxprim/backends/Makefile index fd62f34..320165e 100644 --- a/pylib/gfxprim/backends/Makefile +++ b/pylib/gfxprim/backends/Makefile @@ -2,10 +2,10 @@ TOPDIR=../../.. LIBNAME=backends INCLUDE=core
-LDFLAGS+=$(shell $(TOPDIR)/gfxprim-config --libs-backends) - include $(TOPDIR)/pre.mk
+LDLIBS+=$(LDLIBS_BACKENDS) + INSTALL_FILES+=_extend_backend.py
include $(TOPDIR)/pywrap.mk diff --git a/pylib/gfxprim/grabbers/Makefile b/pylib/gfxprim/grabbers/Makefile index b001822..c864378 100644 --- a/pylib/gfxprim/grabbers/Makefile +++ b/pylib/gfxprim/grabbers/Makefile @@ -2,9 +2,10 @@ TOPDIR=../../.. LIBNAME=grabbers INCLUDE=core
-LDFLAGS+=$(shell $(TOPDIR)/gfxprim-config --libs-grabbers) - include $(TOPDIR)/pre.mk + +LDLIBS+=$(LDLIBS_GRABBERS) + include $(TOPDIR)/pywrap.mk include $(TOPDIR)/post.mk
diff --git a/pylib/gfxprim/loaders/Makefile b/pylib/gfxprim/loaders/Makefile index dd23e98..883a266 100644 --- a/pylib/gfxprim/loaders/Makefile +++ b/pylib/gfxprim/loaders/Makefile @@ -3,6 +3,9 @@ LIBNAME=loaders INCLUDE=core
include $(TOPDIR)/pre.mk + +LDLIBS+=$(LDLIBS_LOADERS) + include $(TOPDIR)/pywrap.mk
$(SWIG_C): ../common.i diff --git a/pywrap.mk b/pywrap.mk index 9b4fcba..70bc835 100644 --- a/pywrap.mk +++ b/pywrap.mk @@ -32,10 +32,10 @@ endif # VERBOSE
$(SWIG_LIB): $(SWIG_C) ifdef VERBOSE - $(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + $(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared $(LDLIBS_GP) $(LDLIBS) -L$(TOPDIR)/build/ -o $@ else # VERBOSE @echo "LD $@" - @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared -lGP $(LDLIBS) -L$(TOPDIR)/build/ -o $@ + @$(CC) $< $(CFLAGS) -D_GNU_SOURCE=1 $(LDFLAGS) $(PYTHON_INCLUDE) --shared $(LDLIBS_GP) $(LDLIBS) -L$(TOPDIR)/build/ -o $@ endif # VERBOSE
# Install python libraries into right places diff --git a/tests/Makefile b/tests/Makefile index 71b1004..6eb167d 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -1,7 +1,7 @@ TOPDIR=.. include $(TOPDIR)/pre.mk
-SUBDIRS=core drivers framework loaders gfx filters +SUBDIRS=core framework loaders gfx filters
loaders: framework gfx: framework diff --git a/tests/framework/Makefile b/tests/framework/Makefile index 44ed5e1..bc04fc1 100644 --- a/tests/framework/Makefile +++ b/tests/framework/Makefile @@ -5,7 +5,7 @@ CSOURCES=$(shell echo *.c)
INCLUDE= LDFLAGS+=-L. -LDLIBS+=-ltst_preload -ldl -ltst -lrt +LDLIBS+=-ltst_preload -lm -ldl -ltst -lrt CFLAGS+=
test: libtst.a
http://repo.or.cz/w/gfxprim.git/commit/f7b1bfa7d24c44f3e03e6d3e8f20fe5d83996...
commit f7b1bfa7d24c44f3e03e6d3e8f20fe5d839964bd Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 13:29:21 2013 +0200
backends,input: Move Input drivers to backends.
* These require linking against corresponding libraries and belong to the backends anyway.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/libs/input/GP_InputDriverSDL.c b/libs/backends/GP_InputDriverSDL.c similarity index 99% rename from libs/input/GP_InputDriverSDL.c rename to libs/backends/GP_InputDriverSDL.c index aa3176b..d94272d 100644 --- a/libs/input/GP_InputDriverSDL.c +++ b/libs/backends/GP_InputDriverSDL.c @@ -28,7 +28,7 @@ #include "core/GP_Debug.h"
#include "input/GP_EventQueue.h" -#include "input/GP_InputDriverSDL.h" +#include "GP_InputDriverSDL.h"
/* SDL ascii mapped keys */ static uint16_t keysym_table1[] = { diff --git a/include/input/GP_InputDriverSDL.h b/libs/backends/GP_InputDriverSDL.h similarity index 100% rename from include/input/GP_InputDriverSDL.h rename to libs/backends/GP_InputDriverSDL.h diff --git a/libs/input/GP_InputDriverX11.c b/libs/backends/GP_InputDriverX11.c similarity index 100% rename from libs/input/GP_InputDriverX11.c rename to libs/backends/GP_InputDriverX11.c diff --git a/include/input/GP_InputDriverX11.h b/libs/backends/GP_InputDriverX11.h similarity index 100% rename from include/input/GP_InputDriverX11.h rename to libs/backends/GP_InputDriverX11.h diff --git a/libs/backends/GP_SDL.c b/libs/backends/GP_SDL.c index a4599ac..4dcfeb3 100644 --- a/libs/backends/GP_SDL.c +++ b/libs/backends/GP_SDL.c @@ -29,8 +29,8 @@
#ifdef HAVE_LIBSDL
-#include "input/GP_InputDriverSDL.h" #include "input/GP_Input.h" +#include "GP_InputDriverSDL.h" #include "GP_Backend.h" #include "GP_SDL.h"
diff --git a/libs/backends/GP_X11.c b/libs/backends/GP_X11.c index c81f0dd..0ef7512 100644 --- a/libs/backends/GP_X11.c +++ b/libs/backends/GP_X11.c @@ -41,7 +41,7 @@ #include <X11/extensions/XShm.h> #endif /* HAVE_X_SHM */
-#include "input/GP_InputDriverX11.h" +#include "GP_InputDriverX11.h"
#include "backends/GP_X11.h"
http://repo.or.cz/w/gfxprim.git/commit/0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d4...
commit 0dcd3ddb50bb7ee9fab8ed8b4a21bb9a909d4940 Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 13:23:12 2013 +0200
demos: c_simple: Fix segfault when x11 not compiled in
* This fixes segfault when we are not able to initialize X11 backend.
* Also changes GP_BackendExit() to be no-op for NULL pointer.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/demos/c_simple/x11_windows.c b/demos/c_simple/x11_windows.c index 2c77075..7ed43e4 100644 --- a/demos/c_simple/x11_windows.c +++ b/demos/c_simple/x11_windows.c @@ -89,6 +89,12 @@ int main(void) win_1 = GP_BackendX11Init(NULL, 0, 0, 300, 300, "win 1", 0); win_2 = GP_BackendX11Init(NULL, 0, 0, 300, 300, "win 2", 0);
+ if (win_1 == NULL || win_2 == NULL) { + GP_BackendExit(win_1); + GP_BackendExit(win_2); + return 1; + } + /* Update the backend screen */ redraw(win_1->context); redraw(win_2->context); diff --git a/include/backends/GP_Backend.h b/include/backends/GP_Backend.h index 02c5b29..712f156 100644 --- a/include/backends/GP_Backend.h +++ b/include/backends/GP_Backend.h @@ -173,7 +173,8 @@ static inline void GP_BackendUpdateRectXYWH(GP_Backend *backend, */ static inline void GP_BackendExit(GP_Backend *backend) { - backend->Exit(backend); + if (backend) + backend->Exit(backend); }
/*
http://repo.or.cz/w/gfxprim.git/commit/2b791b83c7976635a33543e76e1259c5dfb64...
commit 2b791b83c7976635a33543e76e1259c5dfb6454c Author: Cyril Hrubis metan@ucw.cz Date: Fri May 3 14:17:10 2013 +0200
doc: Update compilation & installation docs.
Signed-off-by: Cyril Hrubis metan@ucw.cz
diff --git a/doc/compilation.txt b/doc/compilation.txt index cb025e0..1ae82f6 100644 --- a/doc/compilation.txt +++ b/doc/compilation.txt @@ -39,7 +39,7 @@ Compilation ~~~~~~~~~~~
Once devel packages are installed the compilation is as simple as running -'configure' and 'make'. ++configure+ and +make+.
NOTE: The 'configure' script is written in 'Python'.
@@ -60,18 +60,21 @@ TIP: GFXprim supports proper parallel build, you most likely want to add gfxprim # make install -------------------------------------------------------------------------------
-The 'make install' command will install GFXprim libraries and devel headers -into your system. Python bindings are not installable at the moment. +The +make install+ command will install GFXprim libraries and devel headers +into your system.
-OpenSUSE -~~~~~~~~ +OpenSUSE & Fedora +~~~~~~~~~~~~~~~~~
Instruction to install required packages on link:http://www.opensuse.org/%5BOpenSUSE].
+Works for link:http://www.fedoraproject.org/%5BFedora] too if you substitute ++zypper in+ with +yum install+. + .Install basic tools ------------------------------------------------------------------------------- -zypper in gcc make python-Jinja2 +zypper in gcc make python-jinja2 -------------------------------------------------------------------------------
.Install jpeg and png devel libraries
-----------------------------------------------------------------------
Summary of changes: app.mk | 6 +-- build/get_objs.sh | 2 +- config.mk | 7 ++++ configure | 20 ++++++----- demos/bogoman/Makefile | 3 +- demos/c_simple/Makefile | 35 +++++++++++++++++-- demos/c_simple/x11_windows.c | 6 +++ demos/grinder/Makefile | 8 ++-- demos/spiv/Makefile | 4 ++- demos/ttf2img/Makefile | 3 +- doc/compilation.txt | 15 +++++--- include/backends/GP_Backend.h | 3 +- libs/{input => backends}/GP_InputDriverSDL.c | 2 +- .../input => libs/backends}/GP_InputDriverSDL.h | 0 libs/{input => backends}/GP_InputDriverX11.c | 0 .../input => libs/backends}/GP_InputDriverX11.h | 0 libs/backends/GP_SDL.c | 2 +- libs/backends/GP_X11.c | 2 +- libs/loaders/Makefile | 1 + pylib/gfxprim/backends/Makefile | 4 +- pylib/gfxprim/grabbers/Makefile | 5 ++- pylib/gfxprim/loaders/Makefile | 3 ++ pywrap.mk | 4 +- tests/Makefile | 2 +- tests/framework/Makefile | 2 +- 25 files changed, 95 insertions(+), 44 deletions(-) rename libs/{input => backends}/GP_InputDriverSDL.c (99%) rename {include/input => libs/backends}/GP_InputDriverSDL.h (100%) rename libs/{input => backends}/GP_InputDriverX11.c (100%) rename {include/input => libs/backends}/GP_InputDriverX11.h (100%)
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.