From 220773f2139321cc59355e01e40983f532d907b3 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 3 Jan 2014 13:15:12 -0500 Subject: [PATCH] Import some code for using GJS This is forked from gnome-continuous. --- .gitmodules | 3 ++ Makefile-autobuilder.am | 75 +++++++++++++++++++++++++++++++ Makefile-decls.am | 51 +++++++++++++++++++++ Makefile-gsystem-introspection.am | 16 +++++++ Makefile.am | 57 +++++++++-------------- autogen.sh | 28 +++++++++++- configure.ac | 2 + libgsystem | 1 + 8 files changed, 196 insertions(+), 37 deletions(-) create mode 100644 .gitmodules create mode 100644 Makefile-autobuilder.am create mode 100644 Makefile-decls.am create mode 100644 Makefile-gsystem-introspection.am create mode 160000 libgsystem diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..e93bbea6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libgsystem"] + path = libgsystem + url = git://git.gnome.org/libgsystem diff --git a/Makefile-autobuilder.am b/Makefile-autobuilder.am new file mode 100644 index 00000000..708a7d61 --- /dev/null +++ b/Makefile-autobuilder.am @@ -0,0 +1,75 @@ +# Copyright (C) 2011,2014 Colin Walters +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +substitutions= \ + -e s,@libdir\@,$(libdir), \ + -e s,@pkglibdir\@,$(pkglibdir), \ + -e s,@datarootdir\@,$(datarootdir), \ + -e s,@pkgdatadir\@,$(pkgdatadir), \ + $(NULL) + +rpm-ostree-autobuilder: src/rpm-ostree-autobuilder.in Makefile + sed $(substitutions) $< > $@.tmp && mv $@.tmp $@ +EXTRA_DIST += src/rpm-ostree-autobuilder.in + +bin_SCRIPTS += rpm-ostree-autobuilder \ + $(NULL) + +jsautobuilderdir=$(pkgdatadir)/js +jsautobuilder_DATA= \ + src/js/argparse.js \ + src/js/asyncutil.js \ + src/js/buildutil.js \ + src/js/builtin.js \ + src/js/fileutil.js \ + src/js/task.js \ + src/js/jsonutil.js \ + src/js/jsutil.js \ + src/js/main.js \ + src/js/libqa.js \ + src/js/guestfish.js \ + src/js/params.js \ + src/js/procutil.js \ + src/js/snapshot.js \ + src/js/streamutil.js \ + src/js/vcs.js \ + src/js/versioneddir.js \ + $(NULL) + +jsautobuiltinsdir=$(jsautobuilderdir)/builtins +jsautobuiltins_DATA= \ + src/js/builtins/autobuilder.js \ + src/js/builtins/checkout.js \ + src/js/builtins/git_mirror.js \ + src/js/builtins/make.js \ + src/js/builtins/qa_make_disk.js \ + src/js/builtins/run_task.js \ + src/js/builtins/shell.js \ + $(NULL) + +jsautotasksdir=$(jsautobuilderdir)/tasks +jsautotasks_DATA= \ + src/js/tasks/task-build.js \ + src/js/tasks/task-bdiff.js \ + src/js/tasks/task-builddisks.js \ + src/js/tasks/task-smoketest.js \ + src/js/tasks/task-integrationtest.js \ + src/js/tasks/task-memusage.js \ + src/js/tasks/task-applicationstest.js \ + src/js/tasks/task-zdisks.js \ + src/js/tasks/testbase.js \ + $(NULL) diff --git a/Makefile-decls.am b/Makefile-decls.am new file mode 100644 index 00000000..cd28ba24 --- /dev/null +++ b/Makefile-decls.am @@ -0,0 +1,51 @@ +# Copyright (C) 2011,2014 Colin Walters +# +# This library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the +# Free Software Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# Common variables +ACLOCAL_AMFLAGS = +AM_CPPFLAGS = +AM_CFLAGS = +DISTCHECK_CONFIGURE_FLAGS = +SUBDIRS = +NULL = +BUILT_SOURCES = +MANPAGES = +CLEANFILES = +EXTRA_DIST = +bin_PROGRAMS = +sbin_PROGRAMS = +bin_SCRIPTS = +lib_LTLIBRARIES = +libexec_PROGRAMS = +noinst_LTLIBRARIES = +noinst_PROGRAMS = +privlibdir = $(pkglibdir) +privlib_LTLIBRARIES = +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = +INTROSPECTION_GIRS = +girdir = $(datadir)/gir-1.0 +gir_DATA = +typelibdir = $(libdir)/girepository-1.0 +typelib_DATA = +gsettings_SCHEMAS = +# git.mk +GITIGNOREFILES = + +# This is a special facility to chain together hooks easily +INSTALL_DATA_HOOKS = +install-data-hook: $(INSTALL_DATA_HOOKS) diff --git a/Makefile-gsystem-introspection.am b/Makefile-gsystem-introspection.am new file mode 100644 index 00000000..3f7d7637 --- /dev/null +++ b/Makefile-gsystem-introspection.am @@ -0,0 +1,16 @@ +INTROSPECTION_GIRS += GSystem-1.0.gir + +GSystem-1.0.gir: libgsystem.la Makefile +GSystem_1_0_gir_NAMESPACE = GSystem +GSystem_1_0_gir_VERSION = 1.0 +GSystem_1_0_gir_LIBS = libgsystem.la +GSystem_1_0_gir_CFLAGS = $(libgsystem_cflags) +GSystem_1_0_gir_SCANNERFLAGS = \ + --warn-all \ + --warn-error \ + --symbol-prefix=gs_ \ + --identifier-prefix=GS \ + --c-include="libgsystem.h" \ + $(NULL) +GSystem_1_0_gir_INCLUDES = Gio-2.0 +GSystem_1_0_gir_FILES = $(libgsystem_la_SOURCES) diff --git a/Makefile.am b/Makefile.am index 77fd35bc..5a983ae6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -15,45 +15,30 @@ # Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. -ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -AM_CPPFLAGS = -DDATADIR='"$(datadir)"' \ +include Makefile-decls.am + +ACLOCAL_AMFLAGS += -I m4 ${ACLOCAL_FLAGS} +AM_CPPFLAGS += -DDATADIR='"$(datadir)"' \ -DLIBEXECDIR='"$(libexecdir)"' \ -DLOCALEDIR=\"$(datadir)/locale\" \ - -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_34 -AM_CFLAGS = $(WARN_CFLAGS) -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --disable-maintainer-mode - -# Subdirectories -SUBDIRS = . - -#if ENABLE_GTK_DOC -#SUBDIRS += doc -#endif - -# Common variables -NULL = -INSTALL_DATA_HOOKS = -BUILT_SOURCES = -MANPAGES = -CLEANFILES = -EXTRA_DIST = -bin_PROGRAMS = -sbin_PROGRAMS = -bin_SCRIPTS = -lib_LTLIBRARIES = -libexec_PROGRAMS = -noinst_LTLIBRARIES = -noinst_PROGRAMS = -privlibdir = $(pkglibdir) -privlib_LTLIBRARIES = -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = -INTROSPECTION_GIRS = -girdir = $(datadir)/gir-1.0 -gir_DATA = -typelibdir = $(libdir)/girepository-1.0 -typelib_DATA = + -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_36 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36 +AM_CFLAGS += $(WARN_CFLAGS) EXTRA_DIST += autogen.sh COPYING +libgsystem_srcpath := libgsystem +libgsystem_cflags = $(PKGDEP_GIO_UNIX_CFLAGS) -I$(srcdir)/libgsystem +libgsystem_libs = $(PKGDEP_GIO_UNIX_LIBS) +include libgsystem/Makefile-libgsystem.am +privlib_LTLIBRARIES += libgsystem.la + +include $(INTROSPECTION_MAKEFILE) + include Makefile-rpm-ostree.am +include Makefile-gsystem-introspection.am + +girdir = $(pkgdatadir)/gir-1.0 +typelibdir = $(pkglibdir)/girepository-1.0 + +gir_DATA = $(INTROSPECTION_GIRS) +typelib_DATA = $(gir_DATA:.gir=.typelib) diff --git a/autogen.sh b/autogen.sh index c5cade7c..f7d8cd34 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,3 +1,29 @@ #!/bin/sh +set -e + +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd $srcdir + +AUTORECONF=`which autoreconf` +if test -z $AUTORECONF; then + echo "*** No autoreconf found, please intall it ***" + exit 1 +fi + mkdir -p m4 -exec autoreconf --force --install --verbose + +# Fetch submodules if needed +if test ! -f src/libgsystem/README; +then + echo "+ Setting up submodules" + git submodule init + git submodule update +fi + +autoreconf --force --install --verbose + +cd $olddir +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@" diff --git a/configure.ac b/configure.ac index 6401c125..336ac23d 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,8 @@ PKG_CHECK_MODULES(PKGDEP_GIO_UNIX, [gio-unix-2.0]) PKG_CHECK_MODULES(PKGDEP_OSTREE, [ostree-1]) AC_PATH_PROG([XSLTPROC], [xsltproc]) +GOBJECT_INTROSPECTION_REQUIRE([1.34.0]) + AM_PATH_PYTHON(2.7) AC_CONFIG_FILES([ diff --git a/libgsystem b/libgsystem new file mode 160000 index 00000000..4ea458ab --- /dev/null +++ b/libgsystem @@ -0,0 +1 @@ +Subproject commit 4ea458abb5f0db4c2fd51b000a0a7b9e8f510721