[gtk+/wip/ebassi/gsk-1: 353/354] gsk: Initial commit / build environment



commit 9150ee24f96d1250bbcbc84415adf25468c56f24
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Jan 14 13:01:35 2014 +0000

    gsk: Initial commit / build environment

 Makefile.am               |    5 ++-
 configure.ac              |   26 ++++++++++++++-
 gsk-3.0.pc.in             |   13 +++++++
 gsk/Makefile.am           |   81 +++++++++++++++++++++++++++++++++++++++++++++
 testsuite/Makefile.am     |    2 +-
 testsuite/gsk/Makefile.am |   39 +++++++++++++++++++++
 6 files changed, 162 insertions(+), 4 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index a4c56a7..00c04fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Makefile.am for GTK+
 include $(top_srcdir)/Makefile.decl
 
-SRC_SUBDIRS = gdk gtk libgail-util modules demos tests testsuite examples
+SRC_SUBDIRS = gdk gsk gtk libgail-util modules demos tests testsuite examples
 SUBDIRS = po po-properties $(SRC_SUBDIRS) docs m4macros build
 
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
@@ -45,7 +45,7 @@ gdk-x11-3.0.pc gdk-win32-3.0.pc gdk-quartz-3.0.pc gdk-broadway-3.0.pc gdk-waylan
        cp gdk-3.0.pc $@
 
 pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = gdk-3.0.pc gtk+-3.0.pc gail-3.0.pc
+pkgconfig_DATA = gdk-3.0.pc gsk-3.0.pc gtk+-3.0.pc gail-3.0.pc
 pkgconfig_DATA += ${GDK_BACKENDS:%=gtk+-%-3.0.pc}
 pkgconfig_DATA += ${GDK_BACKENDS:%=gdk-%-3.0.pc}
 
@@ -62,6 +62,7 @@ DISTCLEANFILES = \
        gtk+-broadway-3.0.pc            \
        gtk+-wayland-3.0.pc             \
        gtk+-mir-3.0.pc                 \
+       gsk-3.0.pc                      \
        gdk-3.0.pc                      \
        gdk-x11-3.0.pc                  \
        gdk-win32-3.0.pc                \
diff --git a/configure.ac b/configure.ac
index 0d72724..c3a005b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -64,6 +64,7 @@ m4_define([wayland_protocols_required_version], [1.0])
 m4_define([mirclient_required_version], [0.11.0])
 m4_define([mircookie_required_version], [0.17.0])
 m4_define([epoxy_required_version], [1.0])
+m4_define([graphene_required_version], [1.2])
 GLIB_REQUIRED_VERSION=glib_required_version
 PANGO_REQUIRED_VERSION=pango_required_version
 ATK_REQUIRED_VERSION=atk_required_version
@@ -1346,6 +1347,26 @@ AC_SUBST(GDK_EXTRA_CFLAGS)
 AC_SUBST(GDK_DEP_LIBS)
 AC_SUBST(GDK_DEP_CFLAGS)
 
+########################################
+# Check for GSK flags
+########################################
+
+GSK_EXTRA_LIBS=
+GSK_EXTRA_CFLAGS=
+
+GSK_PACKAGES="gdk-pixbuf-2.0 >= gdk_pixbuf_required_version cairo >= cairo_required_version cairo-gobject >= 
cairo_required_version graphene-1.0 >= graphene_required_version"
+GSK_PRIVATE_PACKAGES="epoxy >= epoxy_required_version"
+
+PKG_CHECK_MODULES(GSK_DEP, $PANGO_PACKAGES $GSK_PACKAGES $GSK_PRIVATE_PACKAGES)
+GSK_DEP_LIBS="$GSK_EXTRA_LIBS $GSK_DEP_LIBS $MATH_LIB"
+GSK_DEP_CFLAGS="$GSK_DEP_CFLAGS $GSK_EXTRA_CFLAGS"
+
+AC_SUBST(GSK_PACKAGES)
+AC_SUBST(GSK_PRIVATE_PACKAGES)
+AC_SUBST(GSK_EXTRA_LIBS)
+AC_SUBST(GSK_EXTRA_CFLAGS)
+AC_SUBST(GSK_DEP_LIBS)
+AC_SUBST(GSK_DEP_CFLAGS)
 
 ########################################
 # Check for Accessibility Toolkit flags
@@ -1360,7 +1381,7 @@ fi
 PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
 
 GTK_PACKAGES="atk >= atk_required_version cairo >= cairo_required_version cairo-gobject >= 
cairo_required_version gdk-pixbuf-2.0 >= gdk_pixbuf_required_version gio-2.0 >= glib_required_version"
-GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version"
+GTK_PRIVATE_PACKAGES="$ATK_PACKAGES $WAYLAND_PACKAGES $MIR_PACKAGES epoxy >= epoxy_required_version 
graphene-1.0 >= graphene_required_version"
 if test "x$enable_x11_backend" = xyes -o "x$enable_wayland_backend" = xyes; then
   GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
 fi
@@ -1873,6 +1894,7 @@ config.h.win32
 gtk-zip.sh
 Makefile
 gdk-3.0.pc
+gsk-3.0.pc
 gtk+-3.0.pc
 gtk+-unix-print-3.0.pc
 gail-3.0.pc
@@ -1906,6 +1928,7 @@ testsuite/css/parser/Makefile
 testsuite/css/nodes/Makefile
 testsuite/css/style/Makefile
 testsuite/gdk/Makefile
+testsuite/gsk/Makefile
 testsuite/gtk/Makefile
 testsuite/reftests/Makefile
 testsuite/tools/Makefile
@@ -1939,6 +1962,7 @@ gdk/quartz/Makefile
 gdk/wayland/Makefile
 gdk/mir/Makefile
 gdk/gdkversionmacros.h
+gsk/Makefile
 gtk/Makefile
 gtk/makefile.msc
 gtk/gtkversion.h
diff --git a/gsk-3.0.pc.in b/gsk-3.0.pc.in
new file mode 100644
index 0000000..a86e29f
--- /dev/null
+++ b/gsk-3.0.pc.in
@@ -0,0 +1,13 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+targets= GDK_BACKENDS@
+
+Name: GSK
+Description: GTK+ Scene Graph Kit
+Version: @VERSION@
+Requires: gdk- GTK_API_VERSION@ @GSK_PACKAGES@
+Requires.private: @GSK_PRIVATE_PACKAGES@
+Libs: -L${libdir} -lgsk-3 @GSK_EXTRA_LIBS@
+Cflags: -I${includedir}/gsk- GTK_API_VERSION@ @GSK_EXTRA_CFLAGS@
diff --git a/gsk/Makefile.am b/gsk/Makefile.am
new file mode 100644
index 0000000..2b20fcd
--- /dev/null
+++ b/gsk/Makefile.am
@@ -0,0 +1,81 @@
+include $(top_srcdir)/Makefile.decl
+-include $(INTROSPECTION_MAKEFILE)
+
+# Preamble
+INTROSPECTION_GIRS =
+INTROSPECTION_SCANNER_ARGS = \
+       --add-include-path=../gdk \
+       --warn-all
+INTROSPECTION_COMPILER_ARGS = \
+       --includedir=$(srcdir) \
+       --includedir=. \
+       --includedir=../gdk
+
+AM_CPPFLAGS = \
+       -DG_LOG_DOMAIN=\"Gsk\"                  \
+       -DGSK_COMPILATION                       \
+       -I$(top_builddir)                       \
+       -I$(top_builddir)/gsk                   \
+       -I$(top_srcdir)                         \
+       -I$(top_srcdir)/gdk                     \
+       $(GTK_DEBUG_FLAGS)                      \
+       $(GSK_DEP_CFLAGS)
+
+# libtool stuff: set version and export symbols for resolving
+# since automake doesn't support conditionalized libsomething_la_LDFLAGS
+# we use the general approach here
+LDADD = \
+       $(GTK_LINK_FLAGS) \
+       -version-info $(LT_VERSION_INFO) \
+       -export-dynamic \
+       -rpath $(libdir) \
+       $(no_undefined)
+
+BUILT_SOURCES =
+
+CLEANFILES =
+
+lib_LTLIBRARIES =
+
+gsk_public_source_h =
+gsk_private_source_h =
+gsk_private_source_c =
+gsk_source_c =
+
+libgsk_3_la_SOURCES = $(all_sources)
+libgsk_3_la_CFLAGS = $(AM_CFLAGS) $(GDK_HIDDEN_VISIBILITY_CFLAGS)
+libgsk_3_la_LIBADD = $(GSK_DEP_LIBS) $(top_builddir)/gdk/libgdk-3.la
+libgsk_3_la_LDFLAGS = $(LDADD)
+
+lib_LTLIBRARIES += libgsk-3.la
+
+gskincludedir = $(includedir)/gtk-3.0/gsk
+gskinclude_HEADERS = $(gsk_public_source_h) gsk.h
+
+if HAVE_INTROSPECTION
+
+introspection_files = $(gsk_source_c) $(gsk_public_source_h)
+
+Gsk-3.0.gir: libgsk-3.la Makefile
+Gsk_3_0_gir_SCANNERFLAGS = \
+       --add-include-path=$(top_builddir)/gdk \
+       --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir \
+       --c-include="gsk/gsk.h"
+Gsk_3_0_gir_LIBS = libgsk-3.la
+Gsk_3_0_gir_FILES = $(introspection_files)
+Gsk_3_0_gir_CFLAGS = $(AM_CPPFLAGS)
+Gsk_3_0_gir_EXPORT_PACKAGES = gsk-3.0
+Gsk_3_0_gir_INCLUDES = GObject-2.0 cairo-1.0 Graphene-1.0
+INTROSPECTION_GIRS += Gsk-3.0.gir
+
+girdir = $(datadir)/gir-1.0
+gir_DATA = $(INTROSPECTION_GIRS)
+
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+
+CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+
+endif
+
+-include $(top_srcdir)/git.mk
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index 418aa41..9799983 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,6 +1,6 @@
 include $(top_srcdir)/Makefile.decl
 
-SUBDIRS = gdk gtk a11y css reftests tools
+SUBDIRS = gdk gsk gtk a11y css reftests tools
 
 -include $(top_srcdir)/git.mk
 
diff --git a/testsuite/gsk/Makefile.am b/testsuite/gsk/Makefile.am
new file mode 100644
index 0000000..e4451a2
--- /dev/null
+++ b/testsuite/gsk/Makefile.am
@@ -0,0 +1,39 @@
+include $(top_srcdir)/Makefile.decl
+
+NULL=
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_builddir)/gdk \
+       -I$(top_srcdir)/gdk \
+       -I$(top_builddir)/gsk \
+       -I$(top_srcdir)/gsk \
+       $(GTK_DEBUG_FLAGS) \
+       $(GTK_DEP_CFLAGS)
+
+LDADD = $(GTK_DEP_LIBS) $(top_builddir)/gsk/libgsk-3.la
+
+TEST_PROGS += \
+       $(NULL)
+
+if BUILDOPT_INSTALL_TESTS
+insttestdir=$(pkglibexecdir)/installed-tests
+insttest_PROGRAMS = $(TEST_PROGS)
+
+%.test: %$(EXEEXT) Makefile
+       $(AM_V_GEN) (echo '[Test]' > $  tmp; \
+       echo 'Type=session' >> $  tmp; \
+       echo 'Exec=$(insttestdir)/$<' >> $  tmp; \
+       mv $  tmp $@)
+
+test_files = $(TEST_PROGRS:=.test)
+
+DISTCLEANFILES = $(test_files)
+
+testmetadir = $(datadir)/installed-tests/$(PACKAGE)
+testmeta_DATA = $(test_files)
+endif
+
+-include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]