From b611b9444ad4b12507505c588163adba6e49bfa6 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 8 Jun 2011 09:54:39 +0200 Subject: [PATCH 01/45] Make reference popup timeout configurable. --- backend/etc/dbtoria.cfg.dist | 1 + backend/lib/DbToRia/Config.pm | 3 +- backend/lib/DbToRia/DBI/base.pm | 6 ++- backend/lib/DbToRia/JsonRpcService.pm | 5 +- backend/lib/DbToRia/Meta/GedafeSQL.pm | 9 ++++ frontend/source/class/dbtoria/data/Config.js | 5 ++ .../dbtoria/module/database/TableWindow.js | 46 +++++++++++++++---- 7 files changed, 61 insertions(+), 14 deletions(-) diff --git a/backend/etc/dbtoria.cfg.dist b/backend/etc/dbtoria.cfg.dist index a4d2324..874560d 100644 --- a/backend/etc/dbtoria.cfg.dist +++ b/backend/etc/dbtoria.cfg.dist @@ -5,6 +5,7 @@ mojo_secret = MyCookieSecret log_file = /tmp/dbtoria.log schema = public encoding = latin1 +ref_delay = 500 # msec *** MetaEngines *** +GedafeSQL diff --git a/backend/lib/DbToRia/Config.pm b/backend/lib/DbToRia/Config.pm index cc10959..58e3a68 100644 --- a/backend/lib/DbToRia/Config.pm +++ b/backend/lib/DbToRia/Config.pm @@ -141,13 +141,14 @@ sub _make_parser { _mandatory => [qw(General)], General => { _doc => 'Global configuration settings for DbToRia', - _vars => [ qw(dsn mojo_secret log_file log_level schema encoding) ], + _vars => [ qw(dsn mojo_secret log_file log_level schema encoding ref_delay) ], _mandatory => [ qw(dsn mojo_secret) ], dsn => { _doc => 'DBI connect string', _example=>'dbi:Pg:dbname=testdb' }, mojo_secret => { _doc => 'secret for signing mojo cookies' }, schema => { _doc => 'which schema should we prowl for data?' }, log_file => { _doc => 'write a log file to this location'}, log_level => { _doc => 'mojo log level'}, + ref_delay => { _doc => 'delay for reference popup' }, }, MetaEngines => { _doc => 'Modules for adding meta information to the database', diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index 839cef9..5fa0441 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -440,11 +440,11 @@ sub prepListView { for my $row (@{$structure->{columns}}){ next if $row->{hidden}; # print STDERR Dumper "row=", $row; - my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; +# my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; + my $fk = defined $row->{references}; $row->{fk} = $fk; push @return, { map { $_ => $row->{$_} } qw (id type name size fk) }; }; -# use Data::Dumper; print STDERR Dumper \@return; return { tableId => $tableId, columns => \@return @@ -455,9 +455,11 @@ sub getListView { my $self = shift; my $tableId = shift; my $view = $self->prepListView($tableId); + use Data::Dumper; print STDERR Dumper "view=", $view; for my $engine (@{$self->metaEngines}){ $engine->massageListView($view); } + print STDERR Dumper "view2=", $view; return $view; } diff --git a/backend/lib/DbToRia/JsonRpcService.pm b/backend/lib/DbToRia/JsonRpcService.pm index 7cb27e7..524bdea 100644 --- a/backend/lib/DbToRia/JsonRpcService.pm +++ b/backend/lib/DbToRia/JsonRpcService.pm @@ -217,7 +217,10 @@ sub getTableStructure { sub getConfig { my $self = shift; - return { filterOps => $self->DBI->getFilterOpsArray(@_) }; + my $gcfg = $self->cfg->{General}; + return { filterOps => $self->DBI->getFilterOpsArray(@_), + refDelay => $gcfg->{ref_delay}, + }; } diff --git a/backend/lib/DbToRia/Meta/GedafeSQL.pm b/backend/lib/DbToRia/Meta/GedafeSQL.pm index b75a231..974d990 100644 --- a/backend/lib/DbToRia/Meta/GedafeSQL.pm +++ b/backend/lib/DbToRia/Meta/GedafeSQL.pm @@ -150,11 +150,20 @@ tabular format. sub massageListView { my $self = shift; my $view = shift; + my $vColumns = $view->{columns}; my $tables = $self->DBI->getAllTables(); if ($tables->{$view->{tableId}.'_list'}){ my $newView = $self->DBI->prepListView($view->{tableId}.'_list'); map { $view->{$_} = $newView->{$_} } keys %$newView; } + use Data::Dumper; print STDERR Dumper "viewCols=", $vColumns; + for my $col (@{$view->{columns}}) { + for my $vCol (@$vColumns) { + if ($col->{id} eq $vCol->{id}) { + $col->{fk} = $vCol->{fk}; + } + } + } } =head2 massageEditView(tableId,editView) diff --git a/frontend/source/class/dbtoria/data/Config.js b/frontend/source/class/dbtoria/data/Config.js index 064f77e..d2d1e6e 100644 --- a/frontend/source/class/dbtoria/data/Config.js +++ b/frontend/source/class/dbtoria/data/Config.js @@ -39,6 +39,10 @@ qx.Class.define( 'dbtoria.data.Config', filterOps: { init: [], // check: "String", nullable: true + }, + refDelay: { init: null, + check: "Integer", + nullable: true } }, @@ -75,6 +79,7 @@ qx.Class.define( 'dbtoria.data.Config', __refreshHandler: function(data,exc,id) { if (exc == null) { this.setFilterOps(data.filterOps); + this.setRefDelay(Number(data.refDelay)); this.fireEvent('configUpdate'); this.__loaded = true; } diff --git a/frontend/source/class/dbtoria/module/database/TableWindow.js b/frontend/source/class/dbtoria/module/database/TableWindow.js index 95a38ff..1bea472 100644 --- a/frontend/source/class/dbtoria/module/database/TableWindow.js +++ b/frontend/source/class/dbtoria/module/database/TableWindow.js @@ -64,6 +64,9 @@ qx.Class.define("dbtoria.module.database.TableWindow", { loading : true }); + this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); + this.debug('refDelay='+this.__refDelay); + this.__rpc = dbtoria.data.Rpc.getInstance(); this.__buildUi(tableId, viewMode, readOnly); if (viewMode) { @@ -98,20 +101,22 @@ qx.Class.define("dbtoria.module.database.TableWindow", { __viewMode: null, __readOnly: null, __filter: null, - + __refDelay: null, + __refTimer: null, __cellChange: function(e) { var data = e.getData(); var row = data.row; var col = data.col; var mouse = data.mouse; // mouse event - this.debug('__cellChange(): row='+row+', col='+col); // close and remove tooltip if not over a table cell if (row == null || row == -1) { this.__table.hideTooltip(); + this.__refTimer.stop(); return; } + this.debug('__cellChange(): row='+row+', col='+col); var tm = this.__table.getTableModel(); var colId = tm.getColumnId(col); @@ -124,9 +129,12 @@ qx.Class.define("dbtoria.module.database.TableWindow", { // check if we are in a column referencing another table var references = this.__table.getTableModel().getColumnReferences(); +// this.debug('references='); // qx.dev.Debug.debugObject(references); - if (references[colId]) { +// this.debug('colId='+colId+', col=',+col); + if (!references[col]) { this.__table.hideTooltip(); + this.__refTimer.stop(); return; } @@ -137,10 +145,19 @@ qx.Class.define("dbtoria.module.database.TableWindow", { }; qx.dev.Debug.debugObject(params); // this.__tooltip.placeToMouse(mouse); - var rpc = dbtoria.data.Rpc.getInstance(); + + this.__refTimer.addListener('interval', function(e) { + this.debug('timer fired'); + this.__refTimer.stop(); + + var rpc = dbtoria.data.Rpc.getInstance(); // Get appropriate row from referenced table - rpc.callAsyncSmart(qx.lang.Function.bind(this.__referenceHandler, this), - 'getReferencedRecord', params); + rpc.callAsyncSmart(qx.lang.Function.bind(this.__referenceHandler, + this), + 'getReferencedRecord', params); + }, this); + this.debug('starting timer'); + this.__refTimer.start(); }, __referenceHandler: function(data) { @@ -306,7 +323,7 @@ qx.Class.define("dbtoria.module.database.TableWindow", { this.add(toolbar); var that = this; - this.__rpc.callAsyncSmart(function(ret){ + this.__rpc.callAsyncSmart(function(ret) { var columns = ret.columns; that.__columns = columns; var tableId = ret.tableId; @@ -314,18 +331,27 @@ qx.Class.define("dbtoria.module.database.TableWindow", { var columnReferences = []; var columnLabels = {}; var i, nCols = columns.length; - for (i=0; i 0) { + that.debug('Creating timer'); + that.__refTimer = new qx.event.Timer(that.__refDelay); + that.__table.addListener('cellChange', that.__cellChange, that); + } + else { + that.debug('Not creating timer'); + } var tcm = that.__table.getTableColumnModel(); for (i=0; i Date: Wed, 8 Jun 2011 11:09:38 +0200 Subject: [PATCH 02/45] Show labels instead of column names in reference popups. --- backend/lib/DbToRia/DBI/base.pm | 20 +++++++++++++------ .../dbtoria/module/database/TableWindow.js | 15 ++++++-------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index 5fa0441..3bffb6c 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -348,11 +348,20 @@ sub getReferencedRecord { }]); my $sth = $dbh->prepare($query); $sth->execute; - + my $fPkVal = $sth->fetchrow_hashref()->{$fPkId}; - warn "fPkVal=$fPkVal"; +# warn "fPkVal=$fPkVal"; my $fRec = $self->getRecordDeref($fTableId, $fPkVal); - use Data::Dumper; print STDERR Dumper $fRec; + use Data::Dumper; print STDERR Dumper "fRec=", $fRec; + my $view = $self->getEditView($fTableId); + print STDERR Dumper "view=", $view; + for my $field (@$view){ + if (exists $fRec->{$field->{name}}) { + $fRec->{$field->{label}} = $fRec->{$field->{name}}; + delete $fRec->{$field->{name}}; + } + } + use Data::Dumper; print STDERR Dumper "fRec2=", $fRec; return $fRec; } @@ -440,8 +449,7 @@ sub prepListView { for my $row (@{$structure->{columns}}){ next if $row->{hidden}; # print STDERR Dumper "row=", $row; -# my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; - my $fk = defined $row->{references}; + my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; $row->{fk} = $fk; push @return, { map { $_ => $row->{$_} } qw (id type name size fk) }; }; @@ -459,7 +467,7 @@ sub getListView { for my $engine (@{$self->metaEngines}){ $engine->massageListView($view); } - print STDERR Dumper "view2=", $view; +# print STDERR Dumper "view2=", $view; return $view; } diff --git a/frontend/source/class/dbtoria/module/database/TableWindow.js b/frontend/source/class/dbtoria/module/database/TableWindow.js index 1bea472..dd8f1a2 100644 --- a/frontend/source/class/dbtoria/module/database/TableWindow.js +++ b/frontend/source/class/dbtoria/module/database/TableWindow.js @@ -105,6 +105,7 @@ qx.Class.define("dbtoria.module.database.TableWindow", { __refTimer: null, __cellChange: function(e) { + this.__refTimer.stop(); var data = e.getData(); var row = data.row; var col = data.col; @@ -113,7 +114,6 @@ qx.Class.define("dbtoria.module.database.TableWindow", { // close and remove tooltip if not over a table cell if (row == null || row == -1) { this.__table.hideTooltip(); - this.__refTimer.stop(); return; } this.debug('__cellChange(): row='+row+', col='+col); @@ -134,7 +134,6 @@ qx.Class.define("dbtoria.module.database.TableWindow", { // this.debug('colId='+colId+', col=',+col); if (!references[col]) { this.__table.hideTooltip(); - this.__refTimer.stop(); return; } @@ -143,11 +142,11 @@ qx.Class.define("dbtoria.module.database.TableWindow", { recordId: recordId, columnId: colId }; - qx.dev.Debug.debugObject(params); +// qx.dev.Debug.debugObject(params); // this.__tooltip.placeToMouse(mouse); this.__refTimer.addListener('interval', function(e) { - this.debug('timer fired'); +// this.debug('timer fired'); this.__refTimer.stop(); var rpc = dbtoria.data.Rpc.getInstance(); @@ -156,7 +155,7 @@ qx.Class.define("dbtoria.module.database.TableWindow", { this), 'getReferencedRecord', params); }, this); - this.debug('starting timer'); +// this.debug('starting timer'); this.__refTimer.start(); }, @@ -345,13 +344,11 @@ qx.Class.define("dbtoria.module.database.TableWindow", { columnReferences); that.__table = new dbtoria.ui.table.Table(model, that.__tableId); if (that.__refDelay > 0) { - that.debug('Creating timer'); +// that.debug('Creating timer'); that.__refTimer = new qx.event.Timer(that.__refDelay); that.__table.addListener('cellChange', that.__cellChange, that); } - else { - that.debug('Not creating timer'); - } + var tcm = that.__table.getTableColumnModel(); for (i=0; i Date: Wed, 8 Jun 2011 23:35:01 +0200 Subject: [PATCH 03/45] Started second demo database (publications). Still missing m:n authorship. --- demo/pubdemo-source.sql | 454 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 454 insertions(+) create mode 100644 demo/pubdemo-source.sql diff --git a/demo/pubdemo-source.sql b/demo/pubdemo-source.sql new file mode 100644 index 0000000..d7e52f9 --- /dev/null +++ b/demo/pubdemo-source.sql @@ -0,0 +1,454 @@ +-- ######################################################################### +-- # SQL source for the PTP demo database ... +-- ######################################################################### + +-- ######################################################################### +-- $Id: pubdemo-source.sql 4206 2011-04-05 14:24:29Z oetiker $ +-- Change Log +-- $Log: $ + +-- ######################################################################### +-- Setup the database +-- ########################################################################## +CREATE GROUP pubdemo_user; +CREATE GROUP pubdemo_admin; +CREATE GROUP pubdemo_reader; + +CREATE USER pubdemo IN GROUP pubdemo_admin,pubdemo_user PASSWORD 'pubdemo'; +CREATE USER ptptest IN GROUP pubdemo_user PASSWORD 'pubtest'; +CREATE USER pubdemo_master IN GROUP pubdemo_admin,pubdemo_user; +CREATE USER pubdemo_read IN GROUP pubdemo_reader; + +DROP DATABASE pubdemo; +CREATE DATABASE pubdemo + WITH OWNER = pubdemo + TEMPLATE = template0 + ENCODING = 'UTF8'; +GRANT ALL ON DATABASE pubdemo TO pubdemo; + +\connect pubdemo +COMMENT ON DATABASE pubdemo IS 'pubdemo'; + +-- our add the language + +-- CREATE FUNCTION plpgsql_call_handler() returns language_handler +-- as '$libdir/plpgsql.so' LANGUAGE 'C'; + +CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql' + HANDLER plpgsql_call_handler150 + lancompiler 'PL/pgSQL'; + +SET search_path = public, pg_catalog; + + +-- ######################################################################### +-- Lock everything UP +-- ########################################################################## +GRANT ALL ON SCHEMA public TO pubdemo; +GRANT USAGE ON SCHEMA public TO GROUP pubdemo_user; +GRANT USAGE ON SCHEMA public TO GROUP pubdemo_admin; +GRANT USAGE ON SCHEMA public TO GROUP pubdemo_reader; + +REVOKE ALL ON DATABASE pubdemo FROM PUBLIC; +REVOKE ALL ON SCHEMA public FROM PUBLIC; + +-- let's loose our superior powers +SET SESSION AUTHORIZATION 'pubdemo'; + +-- ########################################################################### + + +-- get list of our tables --> select * from pg_tables where tableowner='pubdemo'; + +-- SET DateStyle TO 'European'; + +-- ###################### +-- Field Meta Information +-- ###################### + +-- this table lists all fields which have special properties +CREATE TABLE meta_fields ( + meta_fields_table NAME NOT NULL, -- Table Name + meta_fields_field NAME NOT NULL, -- Field Name + meta_fields_attribute TEXT NOT NULL, -- Attribute + meta_fields_value TEXT, -- Value + UNIQUE(meta_fields_table,meta_fields_field,meta_fields_attribute) +); + +GRANT SELECT ON meta_fields TO GROUP pubdemo_user; + +-- ###################### +-- Table Meta Information +-- ###################### + +CREATE TABLE meta_tables ( + -- Table Name + meta_tables_table NAME NOT NULL, + -- Attribute + meta_tables_attribute TEXT NOT NULL, + -- Value + meta_tables_value TEXT, + UNIQUE(meta_tables_table,meta_tables_attribute) +); + +GRANT SELECT ON meta_tables TO GROUP pubdemo_user; + + +-- raise an exception + +CREATE OR REPLACE FUNCTION elog(text) RETURNS BOOLEAN AS + $$ BEGIN RAISE EXCEPTION '%', $1 ; END; $$ LANGUAGE 'plpgsql'; + +CREATE table elog ( elog bool ); +insert into elog values (true); + +INSERT INTO meta_tables VALUES ('elog', 'hide','1'); + +CREATE OR REPLACE FUNCTION ingroup(name) RETURNS BOOLEAN AS $$ +SELECT CASE WHEN (SELECT TRUE + FROM pg_user, pg_group + WHERE groname = $1 + AND usename = CURRENT_USER + AND usesysid = ANY (grolist)) THEN TRUE + ELSE FALSE + END; $$ +LANGUAGE SQL STABLE; + + +CREATE OR REPLACE FUNCTION nicetrim (text, int4) RETURNS text AS $$ + DECLARE + str ALIAS FOR $1; + len ALIAS FOR $2; + BEGIN + IF char_length(str) > len THEN + RETURN substring(str from 1 for len) || ' [...]'; + END IF; + RETURN str; + END; $$ +LANGUAGE 'plpgsql' STABLE; + +-- CREATE AGGREGATE array_accum (anyelement) +-- ( +-- sfunc = array_append, +-- stype = anyarray, +-- initcond = '{}' +-- ); + +-- -- ## access 2010 insists on calling this function eventhough it does not exist +-- -- ## in postgresql ... so here it is and access 2010 is happy ... +-- CREATE OR REPLACE FUNCTION ident_current(name) RETURNS BIGINT AS $$ +-- SELECT currval(regexp_replace($1,'.+public[."]+([^"]+)"?',E'\\1_\\1_id_seq')); +-- $$ LANGUAGE SQL; + + +-- ############ +-- store config information for ptp +-- ############ + +-- CREATE TABLE ptp_config ( +-- ptp_config_id SERIAL NOT NULL PRIMARY KEY, +-- ptp_config_hid NAME NOT NULL UNIQUE, +-- ptp_config_value TEXT NOT NULL, +-- ptp_config_note TEXT +-- ) WITH OIDS; + + +-- grant insert,update,select on ptp_config to group pubdemo_admin; +-- grant select,update on ptp_config to group pubdemo_user; + +-- COMMENT ON TABLE ptp_config IS 'Z PTP Config Table'; +-- COMMENT ON COLUMN ptp_config.ptp_config_id IS 'ID'; +-- COMMENT ON COLUMN ptp_config.ptp_config_hid IS 'Key'; +-- COMMENT ON COLUMN ptp_config.ptp_config_value IS 'Value'; +-- COMMENT ON COLUMN ptp_config.ptp_config_note IS 'Note'; +-- INSERT INTO meta_fields VALUES ('ptp_config','ptp_config_note', 'widget','area'); + + +-- CREATE OR REPLACE FUNCTION get_ptp_config(NAME) RETURNS TEXT AS $$ +-- select ptp_config_value +-- from ptp_config +-- where ptp_config_hid = $1; +-- $$ LANGUAGE 'sql' IMMUTABLE; + +-- ############ +-- Gender Types +-- ############ + +CREATE TABLE gender ( + gender_id SERIAL NOT NULL PRIMARY KEY, -- Unique ID + gender_hid VARCHAR(5) NOT NULL UNIQUE, -- Human Readable ID + gender_name TEXT NOT NULL CHECK (gender_name != '') -- Full Name of Gender +) WITH OIDS; + +GRANT SELECT ON gender TO GROUP pubdemo_user; +GRANT SELECT,UPDATE ON gender_gender_id_seq TO GROUP pubdemo_admin; +GRANT SELECT, INSERT, UPDATE, DELETE ON gender TO GROUP pubdemo_admin; + +COMMENT ON TABLE gender IS 'Z Genders'; +COMMENT ON COLUMN gender.gender_id IS 'ID'; +COMMENT ON COLUMN gender.gender_hid IS 'Gender'; +COMMENT ON COLUMN gender.gender_name IS 'Full Name'; + +CREATE OR REPLACE VIEW gender_combo AS + SELECT gender_id AS id, gender_hid || ' -- ' || gender_name AS text FROM gender ORDER by gender_hid,gender_name; + +GRANT SELECT ON gender_combo TO GROUP pubdemo_user; + +-- ############################################################################## +-- Personnel table. Every worker is listed in this table +-- ############################################################################## + +CREATE TABLE pers ( + pers_id SERIAL NOT NULL PRIMARY KEY, -- Unique ID + pers_hid NAME NOT NULL UNIQUE, -- Human Readable Unique ID + pers_first TEXT NOT NULL CHECK (pers_first != ''), -- First Name of Person + pers_last TEXT NOT NULL CHECK (pers_last != ''), -- Last Name of Person +-- pers_sign VARCHAR(2), -- Ihr Zeichen +-- pers_office_phone TEXT CHECK (pers_office_phone != ''), -- Office Phone Number +-- pers_office_room TEXT CHECK (pers_office_room != ''), -- Office Room Number +-- pers_home_phone TEXT CHECK (pers_home_phone != ''), -- Home Phone Number +-- pers_mobile_phone TEXT CHECK (pers_mobile_phone != ''), -- Mobile Number + pers_desc TEXT CHECK (pers_desc != '') -- Explanation +-- pers_start DATE NOT NULL DEFAULT CURRENT_DATE, -- Is the person active' +-- pers_end DATE CHECK ( pers_end is NULL or pers_end > pers_start ) + +) WITH OIDS; + +GRANT SELECT,UPDATE ON pers_pers_id_seq TO GROUP pubdemo_user; +GRANT SELECT,INSERT,UPDATE,DELETE ON pers TO GROUP pubdemo_user; + +INSERT INTO meta_fields + VALUES ('pers','pers_desc', 'widget','area'); +INSERT INTO meta_fields + VALUES ('pers','pers_home_address', 'widget','area'); + +COMMENT ON TABLE pers IS 'A Persons'; +COMMENT ON COLUMN pers.pers_id IS 'ID'; +COMMENT ON COLUMN pers.pers_hid IS 'Username'; +COMMENT ON COLUMN pers.pers_first IS 'First Name'; +COMMENT ON COLUMN pers.pers_last IS 'Last Name'; +--COMMENT ON COLUMN pers.pers_sign IS 'Sign'; +COMMENT ON COLUMN pers.pers_desc IS 'About'; +--COMMENT ON COLUMN pers.pers_start IS 'Start'; +--COMMENT ON COLUMN pers.pers_end IS 'End (Ex Employee)'; +--COMMENT ON COLUMN pers.pers_office_phone IS 'Office Phone'; +--COMMENT ON COLUMN pers.pers_office_room IS 'Office Room'; +--COMMENT ON COLUMN pers.pers_home_phone IS 'Home Phone'; +--COMMENT ON COLUMN pers.pers_mobile_phone IS 'Mobile Phone'; + +CREATE OR REPLACE VIEW pers_combo AS + SELECT pers_id AS id, + (pers_hid || '--' || pers_last || ', ' || pers_first) AS text + FROM pers + ORDER BY pers_hid, pers_last, pers_first; + +GRANT SELECT ON pers_combo TO GROUP pubdemo_user; + + +CREATE OR REPLACE FUNCTION pers_hid2id(NAME) returns int4 + AS 'SELECT pers_id FROM pers WHERE pers_hid = $1 ' STABLE LANGUAGE 'sql'; + +-- let access figure the current user + +-- CREATE OR REPLACE VIEW current_pers AS +-- SELECT * from pers where pers_hid = current_user; + +-- INSERT INTO meta_tables +-- VALUES ('current_pers', 'hide','1'); + +-- GRANT SELECT ON current_pers TO GROUP pubdemo_user; + + + + +-- ############################################################################## +-- Publisher table. +-- ############################################################################## + +CREATE TABLE publisher ( + publisher_id SERIAL NOT NULL PRIMARY KEY, -- Unique ID + publisher_name TEXT NOT NULL CHECK (publisher_name != ''), -- Publisher Name + publisher_desc TEXT NOT NULL CHECK (publisher_desc != '') -- Description +) WITH OIDS; + + +GRANT SELECT,UPDATE ON publisher_publisher_id_seq TO GROUP pubdemo_user; +GRANT SELECT,INSERT,UPDATE,DELETE ON publisher TO GROUP pubdemo_user; + +COMMENT ON TABLE publisher IS 'B Publishers'; +COMMENT ON COLUMN publisher.publisher_id IS 'ID'; +COMMENT ON COLUMN publisher.publisher_name IS 'Name'; +COMMENT ON COLUMN publisher.publisher_desc IS 'Description'; + + +INSERT INTO meta_fields VALUES ('publisher','publisher_desc', 'widget','area'); + + +-- ######################################################### +-- PublicationType table. List of all types of publications. +-- ######################################################### + +CREATE TABLE pubty ( + pubty_id SERIAL NOT NULL PRIMARY KEY, -- Unique ID + pubty_hid VARCHAR(5) NOT NULL CHECK (pubty_hid ~ '[A-Z]+') UNIQUE, -- Human Readable Unique ID + pubty_name TEXT NOT NULL CHECK (pubty_name != '') -- Full Name of Work Type +) WITH OIDS; + +GRANT SELECT,UPDATE ON pubty_pubty_id_seq TO GROUP pubdemo_admin; +GRANT SELECT ON pubty TO GROUP pubdemo_user; +GRANT SELECT,INSERT,UPDATE,DELETE ON pubty TO GROUP pubdemo_admin; + +COMMENT ON TABLE pubty IS 'Z Publication Types'; +COMMENT ON COLUMN pubty.pubty_id IS 'ID'; +COMMENT ON COLUMN pubty.pubty_hid IS 'Type'; +COMMENT ON COLUMN pubty.pubty_name IS 'Full Name'; + +CREATE OR REPLACE VIEW pubty_combo AS + SELECT pubty_id AS id, pubty_hid || '--' || pubty_name AS text + FROM pubty ORDER BY pubty_hid; + +GRANT SELECT ON pubty_combo TO GROUP pubdemo_user; + +CREATE VIEW pubty_list AS + SELECT pubty_id, pubty_hid, pubty_name + FROM pubty; + +GRANT SELECT ON pubty_list TO GROUP pubdemo_user; + + + +-- ################## +-- Publication table. +-- ################## + +CREATE TABLE pub ( + pub_id SERIAL NOT NULL PRIMARY KEY, -- Unique ID + pub_date DATE NOT NULL DEFAULT CURRENT_DATE, -- Date of Entry + pub_pers INT4 NOT NULL REFERENCES pers DEFAULT pers_hid2id(current_user), -- Who created this entry + pub_pubty INT4 NOT NULL REFERENCES pubty, -- Work Type + pub_publisher INT4 NOT NULL REFERENCES publisher, -- Publisher + pub_desc TEXT NOT NULL CHECK (pub_desc != ''), -- Description of this publication + pub_mod_date DATE, -- last change + pub_mod_user NAME -- by whom +) WITH OIDS; + +GRANT SELECT,UPDATE ON pub_pub_id_seq TO GROUP pubdemo_user; +GRANT SELECT,INSERT,UPDATE,DELETE ON pub TO GROUP pubdemo_user; + +COMMENT ON TABLE pub IS 'A Publications'; +COMMENT ON COLUMN pub.pub_id IS 'ID'; +COMMENT ON COLUMN pub.pub_date IS 'Date'; +COMMENT ON COLUMN pub.pub_pers IS 'Creator'; +COMMENT ON COLUMN pub.pub_pubty IS 'Type'; +COMMENT ON COLUMN pub.pub_publisher IS 'Publisher'; +COMMENT ON COLUMN pub.pub_desc IS 'Description'; +COMMENT ON COLUMN pub.pub_mod_date IS 'Last changed'; +COMMENT ON COLUMN pub.pub_mod_user IS 'Last change by'; + +CREATE INDEX pub_date_key ON pub (pub_date); +CREATE INDEX pub_pubty_key ON pub (pub_pubty); + +INSERT INTO meta_fields + VALUES ('pub','pub_desc','widget','area'); +INSERT INTO meta_fields + VALUES ('pub','pub_date','copy','1'); +INSERT INTO meta_fields + VALUES ('pub','pub_pubty','copy','1'); +INSERT INTO meta_fields + VALUES ('pub','pub_pers','copy','1'); +INSERT INTO meta_fields + VALUES ('pub','pub_publisher','copy','1'); +INSERT INTO "meta_fields" + VALUES ('pub','pub_mod_date','widget','readonly'); +INSERT INTO "meta_fields" + VALUES ('pub','pub_mod_user','widget','readonly'); + +DROP VIEW pub_list; +CREATE OR REPLACE VIEW pub_list AS + SELECT pub_id, + pub_date, + pubty_hid AS pub_pubty, +-- nicetrim(pub_desc, 30) AS pub_desc + pub_desc + FROM pub JOIN pubty ON pub_pubty = pubty_id + JOIN pers ON pub_pers = pers_id + JOIN publisher ON pub_publisher = publisher_id + WHERE (pers_hid=current_user OR ingroup('pubdemo_admin')); + +COMMENT ON COLUMN pub_list.pub_id IS 'ID'; +COMMENT ON COLUMN pub_list.pub_date IS 'Date'; +COMMENT ON COLUMN pub_list.pub_pers IS 'Creator'; +COMMENT ON COLUMN pub_list.pub_pubty IS 'Type'; +COMMENT ON COLUMN pub_list.pub_publisher IS 'Publisher'; +COMMENT ON COLUMN pub_list.pub_desc IS 'Description'; + +GRANT SELECT ON pub_list TO GROUP pubdemo_user; + +CREATE OR REPLACE FUNCTION pub_checker() RETURNS TRIGGER AS $$ +BEGIN + + IF NEW.pub_pers != pers_hid2id(current_user) + AND not ( ingroup('pubdemo_admin') ) + THEN + RAISE EXCEPTION 'Do not change other peoples entries'; + END IF; + + NEW.pub_mod_date := CURRENT_DATE; + NEW.pub_mod_user := getpgusername(); + + IF TG_OP = 'DELETE' THEN + RETURN OLD; + ELSE + RETURN NEW; + END IF; +END; $$ +LANGUAGE 'plpgsql'; + +CREATE TRIGGER pub_trigger BEFORE INSERT OR UPDATE OR DELETE ON pub FOR EACH ROW + EXECUTE PROCEDURE pub_checker(); + + +-- #################### +-- Conversion functions +-- #################### + +DROP FUNCTION pers_id2hid(INT); +CREATE OR REPLACE FUNCTION pers_id2hid(INT) returns NAME + AS 'SELECT pers_hid FROM pers WHERE pers_id = $1 ' STABLE +LANGUAGE 'sql'; + +DROP FUNCTION pubty_hid2id(NAME); +CREATE OR REPLACE FUNCTION pubty_hid2id(NAME) returns int4 + AS 'SELECT pubty_id FROM pubty WHERE pubty_hid = $1 ' STABLE +LANGUAGE 'sql'; + +-- Initial test data + +INSERT INTO gender (gender_hid, gender_name) VALUES +-- ('B', 'Both'), + ('F', 'Female'), + ('M', 'Male'); + +INSERT INTO pubty (pubty_hid, pubty_name) VALUES + ('Journal', 'Article in a peer reviewed journal'), + ('Proceedings', 'Article in conference proceedings'), + ('Book', 'Complete book'), + ('Book chapter', 'Chapter in a book'); + +INSERT INTO pers (pers_hid, pers_first, pers_last) VALUES + ('zaucker', 'Fritz', 'Zaucker'), + ('oetiker', 'Tobias', 'Oetiker'), + ('moetiker', 'Manuel', 'Oetiker'), + ('rplessl', 'Roman', 'Plessl'), + ('pubtest', 'Test', 'User'); + +INSERT INTO publisher ( publisher_name, publisher_desc) VALUES + ('Addison Wesley', 'xx'), + ('American Geological Union', ''); + + + + + + + \ No newline at end of file From c8948c78d741c16ffc06eac69f28262a23a6ab7a Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 8 Jun 2011 23:36:00 +0200 Subject: [PATCH 04/45] Add table name to reference popup. --- frontend/source/class/dbtoria/ui/table/Table.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/source/class/dbtoria/ui/table/Table.js b/frontend/source/class/dbtoria/ui/table/Table.js index f721ce0..65b5d2d 100644 --- a/frontend/source/class/dbtoria/ui/table/Table.js +++ b/frontend/source/class/dbtoria/ui/table/Table.js @@ -50,6 +50,7 @@ qx.Class.define("dbtoria.ui.table.Table", { }, updateTooltip: function(text) { + text = ''+this.__tableId+'
'+text; this.__tooltip.setLabel(text); this.showTooltip(); }, From 89fc4bda051a428a081df67395e1e3c509725a88 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:00:39 +0200 Subject: [PATCH 05/45] Minor cleanup. --- backend/lib/DbToRia/DBI/base.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index 6453cc0..05c0af2 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -29,6 +29,7 @@ use Storable qw(dclone); use Mojo::Base -base; has 'dsn'; +has 'encoding'; has 'username'; has 'password'; has 'schema'; @@ -150,8 +151,9 @@ returns a database handle. The method reconnects as required. sub getDbh { my $self = shift; my $driver = (DBI->parse_dsn($self->dsn))[1]; - my $key = ($self->username||'???').($self->password||'???'); - my $dbh = $self->dbhCache->{$key}; + my $key = ($self->username||'???').($self->password||'???'); + my $dbh = $self->dbhCache->{$key}; + my $utf8 = ($self->encoding eq 'utf8'); if (not defined $dbh){ $self->dbhCache->{$key} = $dbh = DBI->connect($self->dsn,$self->username,$self->password,{ RaiseError => 0, @@ -354,7 +356,7 @@ sub getReferencedRecord { my $fRec = $self->getRecordDeref($fTableId, $fPkVal); # use Data::Dumper; print STDERR Dumper "fRec=", $fRec; my $view = $self->getEditView($fTableId); - print STDERR Dumper "view=", $view; +# print STDERR Dumper "view=", $view; for my $field (@$view){ if (exists $fRec->{$field->{name}}) { $fRec->{$field->{label}} = $fRec->{$field->{name}}; From 46b34f20608c2b955b71c2047204d6e0f03af467 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:01:46 +0200 Subject: [PATCH 06/45] Handle encoding parameter in cfg file to set pg_enable_utf8 in opening DB connection. --- backend/lib/DbToRia/DBI/Pg.pm | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index 0500bdf..ac38cc2 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -48,6 +48,42 @@ sub mapType { return $map->{$type} || die error(9844,'Unknown Database Type: "'.$type.'"'); } +=head2 getDbh + +returns a database handle. The method reconnects as required. Enables +UTF8 handling if encoding=utf8 in cfg file. + +=cut + +sub getDbh { + my $self = shift; + my $driver = (DBI->parse_dsn($self->dsn))[1]; + my $key = ($self->username||'???').($self->password||'???'); + my $dbh = $self->dbhCache->{$key}; + my $utf8 = ($self->encoding eq 'utf8'); + if (not defined $dbh){ + $self->dbhCache->{$key} = $dbh = DBI->connect($self->dsn,$self->username,$self->password,{ + RaiseError => 0, + PrintError => 0, + HandleError => sub { + my ($msg,$h,$ret) = @_; + my $state = $h->state || 9999; + my $code = lc($state); + $code =~ s/[^a-z0-9]//g; + $code =~ s/([a-z])/sprintf("%02d",ord($1)-97)/eg; + $code += 70000000; + delete $self->dbhCache->{$key}; + die error($code,$h->errstr. ( $h->{Statement} ? " (".$h->{Statement}.") ":'')." [${driver}-$state]"); + }, + AutoCommit => 1, + ShowErrorStatement => 1, + LongReadLen=> 5*1024*1024, + pg_enable_utf8 => $utf8, + }); + } + return $dbh; +} + =head2 getDatabaseName Return name of the database connected to. From f72a76f670aed8962bcdd4329a2db3baff34b285 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:03:36 +0200 Subject: [PATCH 07/45] Call refresh in constructor to actually load config from backend. --- frontend/source/class/dbtoria/data/Config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/source/class/dbtoria/data/Config.js b/frontend/source/class/dbtoria/data/Config.js index d2d1e6e..84be3b8 100644 --- a/frontend/source/class/dbtoria/data/Config.js +++ b/frontend/source/class/dbtoria/data/Config.js @@ -32,6 +32,7 @@ qx.Class.define( 'dbtoria.data.Config', */ construct: function () { this.base(arguments); + this.refresh(); }, // construct From ad70d470dae32b8b988a271503a06a42130aaaf5 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:06:17 +0200 Subject: [PATCH 08/45] Pass encoding parameter from cfg file to DB driver. --- backend/lib/DbToRia/JsonRpcService.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/lib/DbToRia/JsonRpcService.pm b/backend/lib/DbToRia/JsonRpcService.pm index 524bdea..7c58dfb 100644 --- a/backend/lib/DbToRia/JsonRpcService.pm +++ b/backend/lib/DbToRia/JsonRpcService.pm @@ -32,15 +32,17 @@ setup a new service =cut sub new { - my $self = shift->SUPER::new(@_); - my $dsn = $self->cfg->{General}{dsn}; - my $driver = (DBI->parse_dsn($dsn))[1]; + my $self = shift->SUPER::new(@_); + my $dsn = $self->cfg->{General}{dsn}; + my $encoding = $self->cfg->{General}{encoding}; + my $driver = (DBI->parse_dsn($dsn))[1]; require 'DbToRia/DBI/'.$driver.'.pm'; do { no strict 'refs'; $self->DBI("DbToRia::DBI::$driver"->new( schema => $self->cfg->{General}{schema}, dsn => $dsn, + encoding => $encoding, metaEnginesCfg => $self->cfg->{MetaEngines} )); }; From 68f93eb2ffe3740818bafb8fdc9e8acb8533cdc7 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:07:44 +0200 Subject: [PATCH 09/45] Add command line handling for running source mode to dbtoria.pl --- backend/bin/dbtoria.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/bin/dbtoria.pl b/backend/bin/dbtoria.pl index 6f0d1d1..3b5c6b3 100755 --- a/backend/bin/dbtoria.pl +++ b/backend/bin/dbtoria.pl @@ -7,6 +7,19 @@ use Mojolicious::Commands; use DbToRia::MojoApp; + +@ARGV = qw( daemon source ) unless @ARGV; + +my $sourceMode = ($ARGV[1] // '') eq 'source'; +if ($sourceMode) { + $ENV{QX_SRC_MODE} = 1; + $ENV{QX_SRC_PATH} = "$FindBin::Bin/../../frontend"; + pop @ARGV; +} +else { + print "Not source mode\n"; +} + $ENV{MOJO_APP} = DbToRia::MojoApp->new; # Start commands From ec8cc56340cc7d98bf59377876067586cd52d914 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 16:18:55 +0200 Subject: [PATCH 10/45] Undid previous change for calling refresh() in constructor (called in Application.js instead). --- frontend/source/class/dbtoria/data/Config.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/source/class/dbtoria/data/Config.js b/frontend/source/class/dbtoria/data/Config.js index 84be3b8..d2d1e6e 100644 --- a/frontend/source/class/dbtoria/data/Config.js +++ b/frontend/source/class/dbtoria/data/Config.js @@ -32,7 +32,6 @@ qx.Class.define( 'dbtoria.data.Config', */ construct: function () { this.base(arguments); - this.refresh(); }, // construct From d10e03fa9cf8b61e5892b0313388b0f62d087b07 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Mon, 23 Jul 2012 21:31:20 +0200 Subject: [PATCH 11/45] Switch from table windows to tabview pages. --- Archive/frontend/Desktop.js | 43 ++ Archive/frontend/HomeTab.js | 30 + Archive/frontend/Main.js | 60 ++ .../frontend}/TableWindow.js | 0 frontend/source/class/dbtoria/module/Main.js | 25 +- .../dbtoria/module/database/TablePage.js | 525 ++++++++++++++++++ .../dbtoria/module/database/TableSelection.js | 3 +- .../class/dbtoria/module/desktop/Desktop.js | 35 +- .../class/dbtoria/module/desktop/Page.js | 108 ++++ .../class/dbtoria/module/desktop/Toolbar.js | 3 +- .../class/dbtoria/module/desktop/Window.js | 2 +- 11 files changed, 802 insertions(+), 32 deletions(-) create mode 100644 Archive/frontend/Desktop.js create mode 100644 Archive/frontend/HomeTab.js create mode 100644 Archive/frontend/Main.js rename {frontend/source/class/dbtoria/module/database => Archive/frontend}/TableWindow.js (100%) create mode 100644 frontend/source/class/dbtoria/module/database/TablePage.js create mode 100644 frontend/source/class/dbtoria/module/desktop/Page.js diff --git a/Archive/frontend/Desktop.js b/Archive/frontend/Desktop.js new file mode 100644 index 0000000..bc74bfc --- /dev/null +++ b/Archive/frontend/Desktop.js @@ -0,0 +1,43 @@ +/* ************************************************************************ + + DbToRia - Database to Rich Internet Application + + http://www.dbtoria.org + + Copyright: + 2009 David Angleitner, Switzerland + 2011 Oetiker+Partner AG, Olten, Switzerland + + License: + GPL: http://www.gnu.org/licenses/gpl-2.0.html + + Authors: + * David Angleitner + * Fritz Zaucker + * Tobi Oetiker (oetiker) + +************************************************************************ */ + +qx.Class.define("dbtoria.module.desktop.Desktop", { + extend : qx.ui.window.Desktop, + type : "singleton", + + construct : function() { + this.base(arguments, new qx.ui.window.Manager()); + var logo = new qx.ui.basic.Label('made with dBtoria').set({ + font: new qx.bom.Font(60,['Amaranth','sans-serif']), + textColor: '#eee', +// alignX: 'center', +// alignY: 'middle', +// textAlign: 'center', +// allowGrowX: true, +// allowShrinkX: true, + cursor: 'pointer' + }); + logo.addListener('mouseover',function(){logo.setTextColor('#ddd')}); + logo.addListener('mouseout',function(){logo.setTextColor('#eee')}); + logo.addListener('click',function(){ qx.bom.Window.open('http://dbtoria.org/', '_blank');}); + this.add(logo,{right: 40, bottom: 20 }); + } + +}); diff --git a/Archive/frontend/HomeTab.js b/Archive/frontend/HomeTab.js new file mode 100644 index 0000000..3d2d5b7 --- /dev/null +++ b/Archive/frontend/HomeTab.js @@ -0,0 +1,30 @@ +/* ************************************************************************ + + DbToRia - Database to Rich Internet Application + + http://www.dbtoria.org + + Copyright: + 2009 David Angleitner, Switzerland + 2011 Oetiker+Partner AG, Olten, Switzerland + + License: + GPL: http://www.gnu.org/licenses/gpl-2.0.html + + Authors: + * David Angleitner + * Fritz Zaucker + * Tobi Oetiker (oetiker) + +************************************************************************ */ + +qx.Class.define("dbtoria.module.desktop.HomeTab", { + extend : qx.ui.tabview.Page, + type : "singleton", + + construct : function() { + this.base(arguments); + this.setLabel(this.tr('Home')); + } + +}); diff --git a/Archive/frontend/Main.js b/Archive/frontend/Main.js new file mode 100644 index 0000000..f445111 --- /dev/null +++ b/Archive/frontend/Main.js @@ -0,0 +1,60 @@ +/* ************************************************************************ + + DbToRia - Database to Rich Internet Application + + http://www.dbtoria.org + + Copyright: + 2009 David Angleitner, Switzerland + 2011 Oetiker+Partner AG, Olten, Switzerland + + License: + GPL: http://www.gnu.org/licenses/gpl-2.0.html + + Authors: + * David Angleitner + * Fritz Zaucker + +************************************************************************ */ + +/* ************************************************************************ + +#asset(dbtoria/*) +#asset(qx/icon/${qx.icontheme}/16/places/folder.png) +#asset(qx/icon/${qx.icontheme}/16/actions/application-exit.png) + +************************************************************************ */ + +/** + * This class provides the main window for dbtoria. + * + * The main window consists of a menu bar, a desktop where the windows are + * located and a taskbar where minimized windows are held. + */ +qx.Class.define("dbtoria.module.Main", { + extend : qx.ui.container.Composite, + + construct : function() { + var containerLayout = new qx.ui.layout.VBox(); + containerLayout.setSeparator("separator-vertical"); + this.base(arguments, containerLayout); + // the desktop area is the largest part of dbtoria, make sure it is + // scrollable + var desktopContainer = new qx.ui.container.Scroll(); + + // the desktop holds all other windows + var desktop = dbtoria.module.desktop.Desktop.getInstance(); + + desktopContainer.add(desktop, { + width : '100%', + height : '100%' + }); + var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); + this.add(toolbar); + this.add(desktopContainer, { flex : 1 }); + + var taskbar = dbtoria.module.desktop.Taskbar.getInstance(); + this.add(taskbar); + + } +}); diff --git a/frontend/source/class/dbtoria/module/database/TableWindow.js b/Archive/frontend/TableWindow.js similarity index 100% rename from frontend/source/class/dbtoria/module/database/TableWindow.js rename to Archive/frontend/TableWindow.js diff --git a/frontend/source/class/dbtoria/module/Main.js b/frontend/source/class/dbtoria/module/Main.js index f445111..f55828a 100644 --- a/frontend/source/class/dbtoria/module/Main.js +++ b/frontend/source/class/dbtoria/module/Main.js @@ -38,23 +38,22 @@ qx.Class.define("dbtoria.module.Main", { var containerLayout = new qx.ui.layout.VBox(); containerLayout.setSeparator("separator-vertical"); this.base(arguments, containerLayout); - // the desktop area is the largest part of dbtoria, make sure it is - // scrollable - var desktopContainer = new qx.ui.container.Scroll(); +// // the desktop area is the largest part of dbtoria, make sure it is +// // scrollable +// var desktopContainer = new qx.ui.container.Scroll(); - // the desktop holds all other windows - var desktop = dbtoria.module.desktop.Desktop.getInstance(); + // the table tabview + var tabview = dbtoria.module.desktop.Desktop.getInstance(); +// desktopContainer.add(tabview, { +// width : '100%', +// height : '100%' +// }); - desktopContainer.add(desktop, { - width : '100%', - height : '100%' - }); var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); - this.add(toolbar); - this.add(desktopContainer, { flex : 1 }); - var taskbar = dbtoria.module.desktop.Taskbar.getInstance(); - this.add(taskbar); + this.add(toolbar); + // this.add(desktopContainer, { flex : 1 }); + this.add(tabview, {flex:1}); } }); diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TablePage.js new file mode 100644 index 0000000..33695d7 --- /dev/null +++ b/frontend/source/class/dbtoria/module/database/TablePage.js @@ -0,0 +1,525 @@ +/* ************************************************************************ + + DbToRia - Database to Rich Internet Application + + http://www.dbtoria.org + + Copyright: + 2009 David Angleitner, Switzerland + 2011 Oetiker+Partner AG, Olten, Switzerland + + License: + GPL: http://www.gnu.org/licenses/gpl-2.0.html + + Authors: + * David Angleitner + * Fritz Zaucker + +************************************************************************ */ + +/* + * TODOs: + * - show number of filtered rows in table legend, e.g. x (y) rows + * - change appearance of filter button when filter active + * - perhaps integrate filter configuration into TableWindow instead of + * using a separate window + */ + +/* ************************************************************************ + +#asset(dbtoria/*) +#asset(qx/icon/${qx.icontheme}/16/mimetypes/text-plain.png) +#asset(qx/icon/${qx.icontheme}/16/actions/contact-new.png) +#asset(qx/icon/${qx.icontheme}/16/actions/edit-delete.png) +#asset(qx/icon/${qx.icontheme}/16/actions/view-refresh.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-save-as.png) +#asset(qx/icon/${qx.icontheme}/16/actions/document-print.png) +#asset(qx/icon/${qx.icontheme}/16/actions/system-search.png) +#asset(qx/icon/${qx.icontheme}/16/actions/edit-copy.png) +#asset(qx/icon/${qx.icontheme}/16/apps/utilities-text-editor.png) + +************************************************************************ */ + +/** + * This class provides the view for a specific table. + * + * It displays a traditional table at first. On clicking on a row it opens a + * form for data editing. This window also allows for searching, creation and + * deletion of entries. + */ +qx.Class.define("dbtoria.module.database.TablePage", { + extend : dbtoria.module.desktop.Page, + construct : function(tableId, tableName, viewMode, readOnly) { + this.__tableName = tableName; + this.__tableId = tableId; + this.__viewMode = viewMode; + this.__readOnly = readOnly; + + this.base(arguments); + this.set({ + layout : new qx.ui.layout.VBox().set({ separator: "separator-vertical"}), +// width : 800, +// height : 500, + loading : true + }); + + this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); + var filterOps = dbtoria.data.Config.getInstance().getFilterOps(); +// this.debug('filterOps='+filterOps); + + this.__rpc = dbtoria.data.Rpc.getInstance(); + this.__buildUi(tableId, viewMode, readOnly); + if (viewMode) { +// this.setCaption(this.tr('View: %1', this.__tableName)); + this.setLabel(this.tr('View: %1', this.__tableName)); + } + else { +// this.setCaption(this.tr('Table: %1', this.__tableName)); + this.setLabel(this.tr('Table: %1', this.__tableName)); + } + this.__recordEdit = new dbtoria.module.database.RecordEdit(tableId, tableName, readOnly); + this.__recordEdit.addListener('navigation', this.__navigation, this); + this.__recordEdit.addListener('refresh', this.__refresh, this); + var root = this.getApplicationRoot(); + this.debug('root='+root); +// root.add(this.__recordEdit); +// this.addListener('close', function() { +// this.__recordEdit.cancel(); +// }, this); +// this.open(); + }, + + members : { + __table: null, + __tbEdit: null, + __tbDelete: null, + __tbClone: null, + __tbNew: null, + __currentId: null, + __tableName: null, + __tableId: null, + __columns: null, + __recordEdit: null, + __rpc: null, + __dataChangedHandler: null, + __viewMode: null, + __readOnly: null, + __filter: null, + __refDelay: null, + __refTimer: null, + + __cellChange: function(e) { + this.__refTimer.stop(); + var data = e.getData(); + var row = data.row; + var col = data.col; + var mouse = data.mouse; // mouse event + + // close and remove tooltip if not over a table cell + if (row == null || row == -1) { + this.__table.hideTooltip(); + return; + } + // this.debug('__cellChange(): row='+row+', col='+col); + + var tm = this.__table.getTableModel(); + var colId = tm.getColumnId(col); + var tableId = this.__tableId; + var rowInfo = tm.getRowData(row); + var recordId; + if (rowInfo) { + recordId = rowInfo['ROWINFO'][0]; + } + + // check if we are in a column referencing another table + var references = this.__table.getTableModel().getColumnReferences(); +// this.debug('references='); +// qx.dev.Debug.debugObject(references); +// this.debug('colId='+colId+', col=',+col); + if (!references[col]) { + this.__table.hideTooltip(); + return; + } + + var params = { + tableId: tableId, + recordId: recordId, + columnId: colId + }; +// qx.dev.Debug.debugObject(params); +// this.__tooltip.placeToMouse(mouse); + + this.__refTimer.addListener('interval', function(e) { +// this.debug('timer fired'); + this.__refTimer.stop(); + + var rpc = dbtoria.data.Rpc.getInstance(); + // Get appropriate row from referenced table + rpc.callAsyncSmart(qx.lang.Function.bind(this.__referenceHandler, + this), + 'getReferencedRecord', params); + }, this); +// this.debug('starting timer'); + this.__refTimer.start(); + }, + + __referenceHandler: function(data) { + var key, val; + var label = ''; + for (key in data) { + val = data[key]; + label += ''; + } + label += '
'+key+':'+val+'
'; + this.__table.updateTooltip(label); + }, + + close: function() { + if (this.__viewMode || this.__readOnly || + !this.__recordEdit.isVisible()) { + this.__recordEdit.close(); + this.base(arguments); + return; + } + var mbox = dbtoria.ui.dialog.MsgBox.getInstance(); + mbox.info(this.tr('Unsaved data.'), + this.tr('You must first close the record edit window.')); + }, + + __refresh : function(e) { + var tm = this.__table.getTableModel(); + if (this.__dataChangedHandler) { + tm.removeListener('dataChanged', this.__dataChangedHandler, this); + this.__dataChangedHandler = null; + } + + // check if we still have a correct selection + // FIX ME: it would be nicer to actually figure out which row to select. + var sm = this.__table.getSelectionModel(); + var selection = sm.getSelectedRanges()[0]; + var row = null; + var that=this; + if (selection) { + row = selection.minIndex; + this.__dataChangedHandler = function(e) { + var id, rowData = tm.getRowData(row); + if (rowData) { // we found the row + tm.removeListener('dataChanged', this.__dataChangedHandler, this); + this.__dataChangedHandler = null; + that.setLoading(false); + id = rowData['ROWINFO'][0]; + if (id != this.__currentId) { + sm.resetSelection(); + } + } + }; + } + else { + this.__dataChangedHandler = function(e) { + tm.removeListener('dataChanged', this.__dataChangedHandler, this); + this.__dataChangedHandler = null; + that.setLoading(false); + }; + } + + tm.addListener('dataChanged', this.__dataChangedHandler, this); + this.setLoading(true); + tm.reloadData(); + }, + + __navigation : function(e) { + var target = e.getData(); + var sm = this.__table.getSelectionModel(); + var tm = this.__table.getTableModel(); + var selection = sm.getSelectedRanges()[0]; + var row; + if (selection == undefined || selection == null) { + row = 0; // FIX ME: is this sensible? + } + else { + row = selection.minIndex; + } + var oldRow = row; + // switch record + var maxRow = tm.getRowCount(); + this.debug('__navigation(): target='+target+', row='+row+', maxRow='+maxRow); + switch (target) { + case 'first': + row = 0; + break; + case 'back': + if (row>0) { + row--; + } + break; + case 'next': + if (row Date: Thu, 24 Jan 2013 11:03:39 +0100 Subject: [PATCH 12/45] Move to perl 5.14.2 Minor cleanup --- backend/bin/dbtoria.pl | 2 +- backend/lib/DbToRia/DBI/base.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/bin/dbtoria.pl b/backend/bin/dbtoria.pl index 63bb4e3..d51a7f6 100755 --- a/backend/bin/dbtoria.pl +++ b/backend/bin/dbtoria.pl @@ -1,4 +1,4 @@ -#!/usr/sepp/bin/perl-5.12.3 +#!/usr/sepp/bin/perl-5.14.2 #!/usr/bin/env perl use strict; use warnings; diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index 7fe36c7..053b1be 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -465,7 +465,7 @@ sub getListView { my $self = shift; my $tableId = shift; my $view = $self->prepListView($tableId); - use Data::Dumper; print STDERR Dumper "view=", $view; +# use Data::Dumper; print STDERR Dumper "view=", $view; for my $engine (@{$self->metaEngines}){ $engine->massageListView($view); } From 3803f86b124b88195507a9fdc8ac152f102098d0 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 24 Jan 2013 15:32:47 +0100 Subject: [PATCH 13/45] Die if combo view is missing for a comboTable widget --- backend/lib/DbToRia/Meta/GedafeSQL.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/backend/lib/DbToRia/Meta/GedafeSQL.pm b/backend/lib/DbToRia/Meta/GedafeSQL.pm index 974d990..28413fc 100644 --- a/backend/lib/DbToRia/Meta/GedafeSQL.pm +++ b/backend/lib/DbToRia/Meta/GedafeSQL.pm @@ -179,11 +179,10 @@ sub massageEditView { my $tables = $self->DBI->getAllTables(); for my $row (@$editView){ next unless $row->{type} eq 'ComboTable'; - if (exists $tables->{$row->{tableId}.'_combo'}){ - $row->{tableId} .= '_combo'; - $row->{idCol} = 'id'; - $row->{valueCol} = 'text'; - } + die error(90732,"ComboTable view $row->{tableId}_combo not found.") unless exists $tables->{$row->{tableId}.'_combo'}; + $row->{tableId} .= '_combo'; + $row->{idCol} = 'id'; + $row->{valueCol} = 'text'; } for (my $i=0; $i[$i]; From ec2c29c075f94c9d7e50bcbc2d97c61958a935f7 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 24 Jan 2013 15:37:23 +0100 Subject: [PATCH 14/45] Change to standard Mojo module structure. --- backend/bin/dbtoria.pl | 8 ++++---- backend/lib/{DbToRia/MojoApp.pm => DbToRia.pm} | 6 +++--- backend/lib/DbToRia/{JsonRpcService.pm => RpcService.pm} | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) rename backend/lib/{DbToRia/MojoApp.pm => DbToRia.pm} (91%) rename backend/lib/DbToRia/{JsonRpcService.pm => RpcService.pm} (97%) diff --git a/backend/bin/dbtoria.pl b/backend/bin/dbtoria.pl index d51a7f6..b6ab737 100755 --- a/backend/bin/dbtoria.pl +++ b/backend/bin/dbtoria.pl @@ -6,12 +6,12 @@ use lib "$FindBin::Bin/../lib"; use lib "$FindBin::Bin/../../thirdparty/lib/perl5"; use Mojolicious::Commands; -use DbToRia::MojoApp; +use DbToRia; @ARGV = qw( daemon source ) unless @ARGV; - -my $sourceMode = ($ARGV[1] // '') eq 'source'; + +my $sourceMode = ($ARGV[1] // '') eq 'source'; if ($sourceMode) { $ENV{QX_SRC_MODE} = 1; $ENV{QX_SRC_PATH} = "$FindBin::Bin/../../frontend"; @@ -21,7 +21,7 @@ print "Not source mode\n"; } -$ENV{MOJO_APP} = DbToRia::MojoApp->new; +$ENV{MOJO_APP} = DbToRia->new; # Start commands Mojolicious::Commands->start; diff --git a/backend/lib/DbToRia/MojoApp.pm b/backend/lib/DbToRia.pm similarity index 91% rename from backend/lib/DbToRia/MojoApp.pm rename to backend/lib/DbToRia.pm index bab8bbe..6d6d32a 100644 --- a/backend/lib/DbToRia/MojoApp.pm +++ b/backend/lib/DbToRia.pm @@ -1,8 +1,8 @@ -package DbToRia::MojoApp; +package DbToRia; use strict; use warnings; -use DbToRia::JsonRpcService; +use DbToRia::RpcService; use DbToRia::Config; use DbToRia::Session; @@ -38,7 +38,7 @@ sub startup { $self->plugin('qooxdoo_jsonrpc',{ services => { - DbToRia => new DbToRia::JsonRpcService( + DbToRia => new DbToRia::RpcService( cfg => $self->cfg, log => $self->app->log, ) diff --git a/backend/lib/DbToRia/JsonRpcService.pm b/backend/lib/DbToRia/RpcService.pm similarity index 97% rename from backend/lib/DbToRia/JsonRpcService.pm rename to backend/lib/DbToRia/RpcService.pm index 7c58dfb..48c6adc 100644 --- a/backend/lib/DbToRia/JsonRpcService.pm +++ b/backend/lib/DbToRia/RpcService.pm @@ -1,12 +1,12 @@ -package DbToRia::JsonRpcService; +package DbToRia::RpcService; =head1 NAME -DbToRia::JsonRpcService - RPC Service for DbToRia +DbToRia::RpcService - RPC Service for DbToRia =head1 SYNOPSYS -This is used by L to provide access to DbToRia +This is used by L to provide access to DbToRia server functions =head1 DESCRIPTION From 35bd1f2fca3dc7268307667115e163ac032e8267 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 19 Nov 2014 16:05:24 +0100 Subject: [PATCH 15/45] Fix application startup --- backend/bin/dbtoria.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/bin/dbtoria.pl b/backend/bin/dbtoria.pl index b3e2dcc..9087b36 100755 --- a/backend/bin/dbtoria.pl +++ b/backend/bin/dbtoria.pl @@ -24,4 +24,5 @@ $ENV{MOJO_APP} = DbToRia->new; # Start commands -Mojolicious::Commands->start_app('DbToRia::MojoApp'); +#Mojolicious::Commands->start_app('DbToRia::MojoApp'); +Mojolicious::Commands->start_app('DbToRia'); From f83a3e0589b62017da592d1a7bbc8966c74cf523 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 19 Nov 2014 16:53:10 +0100 Subject: [PATCH 16/45] Switch to qx-mojo-app setup --- AUTHORS | 1 + CHANGES | 3 + COPYRIGHT | 7 + LICENSE | 1 + Makefile.am | 19 + Makefile.in | 747 +++++ PERL_MODULES | 5 + README | 65 + VERSION | 1 + aclocal.m4 | 823 ++++++ backend/Makefile.am | 44 + backend/Makefile.in | 505 ++++ backend/bin/dbtoria-source-mode.sh | 5 + backend/bin/dbtoria.pl | 24 +- backend/lib/DbToRia.pm | 12 +- backend/lib/DbToRia/RpcService.pm | 67 +- configure | 4047 ++++++++++++++++++++++++++++ configure.ac | 163 ++ conftools/install-sh | 527 ++++ conftools/missing | 215 ++ frontend/Makefile.am | 25 + frontend/Makefile.in | 394 +++ t/basic.t | 18 + 23 files changed, 7658 insertions(+), 60 deletions(-) create mode 100644 AUTHORS create mode 100644 CHANGES create mode 100644 COPYRIGHT create mode 100644 LICENSE create mode 100644 Makefile.am create mode 100644 Makefile.in create mode 100644 PERL_MODULES create mode 100644 README create mode 100644 VERSION create mode 100644 aclocal.m4 create mode 100644 backend/Makefile.am create mode 100644 backend/Makefile.in create mode 100755 backend/bin/dbtoria-source-mode.sh create mode 100755 configure create mode 100644 configure.ac create mode 100755 conftools/install-sh create mode 100755 conftools/missing create mode 100644 frontend/Makefile.am create mode 100644 frontend/Makefile.in create mode 100644 t/basic.t diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..6a1cfba --- /dev/null +++ b/AUTHORS @@ -0,0 +1 @@ +Fritz Zaucker diff --git a/CHANGES b/CHANGES new file mode 100644 index 0000000..3139439 --- /dev/null +++ b/CHANGES @@ -0,0 +1,3 @@ +0.0.0 2014-12-11/19/14 Fritz Zaucker (fritz.zaucker@oetiker.ch) + +- started project diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..fbda3d0 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,7 @@ +Dbtoria +a cool web app with Mojolicious backend + +Copyright (c) 2014 Fritz Zaucker and the other people listed in the +AUTHORS file. + +All rights reserved. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..04591f4 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +A COOL LICENSE FOR YOUR PROJECT diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..987097c --- /dev/null +++ b/Makefile.am @@ -0,0 +1,19 @@ +AUTOMAKE_OPTIONS = foreign + +SUBDIRS = frontend backend + +EXTRA_DIST = VERSION PERL_MODULES COPYRIGHT LICENSE CHANGES AUTHORS + +YEAR := $(shell date +%Y) +DATE := $(shell date +%Y-%m-%d) +THIRDPARTY := $(shell pwd)/backend/thirdparty +POSTGRES_HOME = @POSTGRES_HOME@ + +dist-hook: + $(PERL) -i -p -e 's/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;s/#DATE#/$(DATE)/g;' $(distdir)/README $(distdir)/COPYRIGHT + +get-thirdparty-modules: + [ -e $(THIRDPARTY)/bin/cpanm ] || mkdir -p $(THIRDPARTY)/bin && wget --no-check-certificate -O $(THIRDPARTY)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY)/bin/cpanm + cat PERL_MODULES | PERL_CPANM_HOME=$(THIRDPARTY) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY)" POSTGRES_HOME=$(POSTGRES_HOME) xargs $(PERL) $(THIRDPARTY)/bin/cpanm + +#END diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..955ba00 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,747 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = . +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) AUTHORS README \ + conftools/install-sh conftools/missing \ + $(top_srcdir)/conftools/install-sh \ + $(top_srcdir)/conftools/missing +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +GMAKE = @GMAKE@ +GREP = @GREP@ +HTDOCSDIR = @HTDOCSDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL5LIB = @PERL5LIB@ +POSTGRES_HOME = @POSTGRES_HOME@ +QOOXDOO_PATH = @QOOXDOO_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_pkgonly = @enable_pkgonly@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +SUBDIRS = frontend backend +EXTRA_DIST = VERSION PERL_MODULES COPYRIGHT LICENSE CHANGES AUTHORS +YEAR := $(shell date +%Y) +DATE := $(shell date +%Y-%m-%d) +THIRDPARTY := $(shell pwd)/backend/thirdparty +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ + && ../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + + +dist-hook: + $(PERL) -i -p -e 's/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;s/#DATE#/$(DATE)/g;' $(distdir)/README $(distdir)/COPYRIGHT + +get-thirdparty-modules: + [ -e $(THIRDPARTY)/bin/cpanm ] || mkdir -p $(THIRDPARTY)/bin && wget --no-check-certificate -O $(THIRDPARTY)/bin/cpanm cpanmin.us && chmod 755 $(THIRDPARTY)/bin/cpanm + cat PERL_MODULES | PERL_CPANM_HOME=$(THIRDPARTY) PERL_CPANM_OPT="--notest --local-lib $(THIRDPARTY)" POSTGRES_HOME=$(POSTGRES_HOME) xargs $(PERL) $(THIRDPARTY)/bin/cpanm + +#END + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/PERL_MODULES b/PERL_MODULES new file mode 100644 index 0000000..fc4d105 --- /dev/null +++ b/PERL_MODULES @@ -0,0 +1,5 @@ +Mojolicious +Mojolicious::Plugin::Qooxdoo +DBI +DBD::Pg +Config::Grammar diff --git a/README b/README new file mode 100644 index 0000000..8ef7efa --- /dev/null +++ b/README @@ -0,0 +1,65 @@ +Dbtoria +=========== +Version: #VERSION# +Date: #DATE# + +Dbtoria is a cool web application. + +You are looking at a template for creating a Qooxdoo application with +a Mojolicious backend. It is a classic "configure - make - install" setup. + +Prerequisite +------------ + +Get a copy of the Qooxdoo sdk from www.qooxdoo.org. If you followed the +"Quickstart" on https://github.com/oetiker/qx-mojo-app you are already set +with a copy of the Qooxdoo sdk in $HOME/sdk/qooxdoo-4.0.1-sdk. In this case +immediately proceed with "Setup". + +Setup +----- + + ./configure --prefix=$HOME/opt/dbtoria --with-qooxdoo-sdk=$HOME/sdk/qooxdoo-4.0.1-sdk + +Configure will check if the necessary items are in place and give +hints on how to fix the situation if something is missing. + +Development +----------- + +While developing the application it is conveniant to NOT have to install it +before runnning. You can actually serve the Qooxdoo source directly +using the built-in Mojo webserver. + + cd frontend && make source + cd backend/bin + ./dbtoria-source-mode.sh daemon + +You can now connect to the Mojolicious server with your web browser. + +Installation +------------ + +To install the application, just run + + make install + +You can now run dbtoria.pl in reverse proxy mode. + +Packaging +--------- + +You can also package the application as a nice tar.gz file by running + + make dist + +Learning +-------- + +To learn more about Qooxdoo, go to their website and read up on Qooxdoo desktop: + + www.qooxdoo.org + +Enjoy! + +Fritz Zaucker diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..77d6f4c --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.0.0 diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..8e1c8bb --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,823 @@ +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. + +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) + +# Copyright (C) 2002-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.14' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.14.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +[AM_AUTOMAKE_VERSION([1.14.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +# AM_AUX_DIR_EXPAND -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is '.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) + +# Do all the work for Automake. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.65])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl +]) +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +# From Jim Meyering + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MAINTAINER_MODE([DEFAULT-MODE]) +# ---------------------------------- +# Control maintainer-specific portions of Makefiles. +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user +# can override the default with the --enable/--disable switch. +AC_DEFUN([AM_MAINTAINER_MODE], +[m4_case(m4_default([$1], [disable]), + [enable], [m4_define([am_maintainer_other], [disable])], + [disable], [m4_define([am_maintainer_other], [enable])], + [m4_define([am_maintainer_other], [enable]) + m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode's default is 'disable' unless 'enable' is passed + AC_ARG_ENABLE([maintainer-mode], + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST([MAINT])dnl +] +) + +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +# Copyright (C) 1997-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + AC_MSG_WARN(['missing' script is too old or missing]) +fi +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# -------------------- +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) + +# _AM_SET_OPTIONS(OPTIONS) +# ------------------------ +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_SILENT_RULES([DEFAULT]) +# -------------------------- +# Enable less verbose build rules; with the default set to DEFAULT +# ("yes" being less verbose, "no" or empty being verbose). +AC_DEFUN([AM_SILENT_RULES], +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl +AC_SUBST([AM_DEFAULT_VERBOSITY])dnl +AM_BACKSLASH='\' +AC_SUBST([AM_BACKSLASH])dnl +_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl +]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor 'install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in "make install-strip", and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +# Copyright (C) 2006-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# -------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) + +# Check how to create a tarball. -*- Autoconf -*- + +# Copyright (C) 2004-2013 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +# +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' + +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR + diff --git a/backend/Makefile.am b/backend/Makefile.am new file mode 100644 index 0000000..61fc20e --- /dev/null +++ b/backend/Makefile.am @@ -0,0 +1,44 @@ +AUTOMAKE_OPTIONS = foreign + +QX_CLASS = dbtoria +MJ_CLASS = Dbtoria +MJ_SCRIPT = dbtoria + +BIN = bin/$(MJ_SCRIPT).pl bin/$(MJ_SCRIPT)-source-mode.sh + +PM := $(shell find lib -name "*.pm") + +THIRDPARTY := $(shell test -f thirdparty && find thirdparty -type f) + +POD := $(shell find lib/ -name "*.pod") + +RES := $(shell test -d public/resource && find public/resource -type f) + +TEMPL := $(shell test -d templates && find templates -type f) + +PUB = public/script/$(QX_CLASS).js public/index.html $(RES) + +EXTRA_DIST = $(wildcard t/*.t) $(ETC) $(BIN) $(PM) $(POD) $(PUB) $(TEMPL) + +YEAR := $(shell date +%Y) +DATE := $(shell date +%Y-%m-%d) + +datadir = $(prefix) +nobase_data_DATA = $(PM) $(POD) $(PUB) $(ETC) $(TEMPL) $(THIRDPARTY) + +dist_bin_SCRIPTS = $(BIN) + +if BUILD_QOOXDOO_APP + +public/script/$(QX_CLASS).js: $(shell find ../frontend/source/class/$(QX_CLASS) -name "*.js") $(QOOXDOO_PATH)/framework/config.json ../configure + cd ../frontend && $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache -m BUILD_PATH:../backend/public build + $(PERL) -i -p -e 's/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;s/#DATE#/$(DATE)/g;' public/index.html public/script/$(QX_CLASS).js + +endif + +install-exec-hook: + [ "$(PERL5LIB)" != "" ] && cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' *.pl || true + cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' *.pl + +dist-hook: + $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(distdir)/lib/$(MJ_CLASS).pm diff --git a/backend/Makefile.in b/backend/Makefile.in new file mode 100644 index 0000000..f1ae278 --- /dev/null +++ b/backend/Makefile.in @@ -0,0 +1,505 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + + +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = backend +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(datadir)" +SCRIPTS = $(dist_bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +DATA = $(nobase_data_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +GMAKE = @GMAKE@ +GREP = @GREP@ +HTDOCSDIR = @HTDOCSDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL5LIB = @PERL5LIB@ +POSTGRES_HOME = @POSTGRES_HOME@ +QOOXDOO_PATH = @QOOXDOO_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = $(prefix) +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_pkgonly = @enable_pkgonly@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +QX_CLASS = dbtoria +MJ_CLASS = Dbtoria +MJ_SCRIPT = dbtoria +BIN = bin/$(MJ_SCRIPT).pl bin/$(MJ_SCRIPT)-source-mode.sh +PM := $(shell find lib -name "*.pm") +THIRDPARTY := $(shell test -f thirdparty && find thirdparty -type f) +POD := $(shell find lib/ -name "*.pod") +RES := $(shell test -d public/resource && find public/resource -type f) +TEMPL := $(shell test -d templates && find templates -type f) +PUB = public/script/$(QX_CLASS).js public/index.html $(RES) +EXTRA_DIST = $(wildcard t/*.t) $(ETC) $(BIN) $(PM) $(POD) $(PUB) $(TEMPL) +YEAR := $(shell date +%Y) +DATE := $(shell date +%Y-%m-%d) +nobase_data_DATA = $(PM) $(POD) $(PUB) $(ETC) $(TEMPL) $(THIRDPARTY) +dist_bin_SCRIPTS = $(BIN) +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign backend/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign backend/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-dist_binSCRIPTS: $(dist_bin_SCRIPTS) + @$(NORMAL_INSTALL) + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n' \ + -e 'h;s|.*|.|' \ + -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) { files[d] = files[d] " " $$1; \ + if (++n[d] == $(am__install_max)) { \ + print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ + else { print "f", d "/" $$4, $$1 } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-dist_binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(dist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 's,.*/,,;$(transform)'`; \ + dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir) +install-nobase_dataDATA: $(nobase_data_DATA) + @$(NORMAL_INSTALL) + @list='$(nobase_data_DATA)'; test -n "$(datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(datadir)" || exit 1; \ + fi; \ + $(am__nobase_list) | while read dir files; do \ + xfiles=; for file in $$files; do \ + if test -f "$$file"; then xfiles="$$xfiles $$file"; \ + else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ + test -z "$$xfiles" || { \ + test "x$$dir" = x. || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(datadir)/$$dir'"; \ + $(MKDIR_P) "$(DESTDIR)$(datadir)/$$dir"; }; \ + echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(datadir)/$$dir'"; \ + $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(datadir)/$$dir" || exit $$?; }; \ + done + +uninstall-nobase_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(nobase_data_DATA)'; test -n "$(datadir)" || list=; \ + $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ + dir='$(DESTDIR)$(datadir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) $(DATA) +installdirs: + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(datadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-nobase_dataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-dist_binSCRIPTS + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_binSCRIPTS uninstall-nobase_dataDATA + +.MAKE: install-am install-exec-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am dist-hook distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dist_binSCRIPTS \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-exec-hook install-html install-html-am install-info \ + install-info-am install-man install-nobase_dataDATA \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_binSCRIPTS \ + uninstall-nobase_dataDATA + + +@BUILD_QOOXDOO_APP_TRUE@public/script/$(QX_CLASS).js: $(shell find ../frontend/source/class/$(QX_CLASS) -name "*.js") $(QOOXDOO_PATH)/framework/config.json ../configure +@BUILD_QOOXDOO_APP_TRUE@ cd ../frontend && $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache -m BUILD_PATH:../backend/public build +@BUILD_QOOXDOO_APP_TRUE@ $(PERL) -i -p -e 's/#VERSION#/$(PACKAGE_VERSION)/g;s/#YEAR#/$(YEAR)/g;s/#DATE#/$(DATE)/g;' public/index.html public/script/$(QX_CLASS).js + +install-exec-hook: + [ "$(PERL5LIB)" != "" ] && cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{.*# PERL5LIB}{use lib qw($(PERL5LIB)); # PERL5LIB}' *.pl || true + cd "$(DESTDIR)$(bindir)" && $(PERL) -i -p -e 's{^#!.*perl.*}{#!$(PERL)};' *.pl + +dist-hook: + $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(distdir)/lib/$(MJ_CLASS).pm + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/backend/bin/dbtoria-source-mode.sh b/backend/bin/dbtoria-source-mode.sh new file mode 100755 index 0000000..d076114 --- /dev/null +++ b/backend/bin/dbtoria-source-mode.sh @@ -0,0 +1,5 @@ +#!/bin/sh +export QX_SRC_MODE=1 +export MOJO_MODE=development +export MOJO_LOG_LEVEL=debug +exec ./dbtoria.pl prefork --listen 'http://*:4542' diff --git a/backend/bin/dbtoria.pl b/backend/bin/dbtoria.pl index 9087b36..a9c5bb4 100755 --- a/backend/bin/dbtoria.pl +++ b/backend/bin/dbtoria.pl @@ -1,28 +1,12 @@ -#!/usr/sepp/bin/perl-5.14.2 #!/usr/bin/env perl + use strict; use warnings; + use FindBin; use lib "$FindBin::Bin/../lib"; -use lib "$FindBin::Bin/../../thirdparty/lib/perl5"; +use lib "$FindBin::Bin/../thirdparty/lib/perl5"; use Mojolicious::Commands; -use DbToRia; - - -@ARGV = qw( daemon source ) unless @ARGV; - -my $sourceMode = ($ARGV[1] // '') eq 'source'; -if ($sourceMode) { - $ENV{QX_SRC_MODE} = 1; - $ENV{QX_SRC_PATH} = "$FindBin::Bin/../../frontend"; - pop @ARGV; -} -else { - print "Not source mode\n"; -} - -$ENV{MOJO_APP} = DbToRia->new; -# Start commands -#Mojolicious::Commands->start_app('DbToRia::MojoApp'); Mojolicious::Commands->start_app('DbToRia'); +__END__ diff --git a/backend/lib/DbToRia.pm b/backend/lib/DbToRia.pm index 8012281..bfe9455 100644 --- a/backend/lib/DbToRia.pm +++ b/backend/lib/DbToRia.pm @@ -36,14 +36,12 @@ sub startup { $self->stash->{'dbtoria.session'} = $session; }); - $self->plugin('qooxdoo_jsonrpc',{ - services => { - DbToRia => new DbToRia::RpcService( - cfg => $self->cfg, - log => $self->app->log, - ) - } + $self->plugin('qooxdoo',{ + prefix => '/', + path => 'jsonrpc', + controller => 'RpcService' }); + } 1; diff --git a/backend/lib/DbToRia/RpcService.pm b/backend/lib/DbToRia/RpcService.pm index 48c6adc..532434e 100644 --- a/backend/lib/DbToRia/RpcService.pm +++ b/backend/lib/DbToRia/RpcService.pm @@ -13,41 +13,44 @@ server functions =cut -use Mojo::Base -base; +use Mojo::Base qw(Mojolicious::Plugin::Qooxdoo::JsonRpcController); -has 'cfg'; -has 'mojo_stash'; -has 'log'; -has 'DBI'; +has service => sub { 'DbToRia' }; -use strict; - -use DBI; -use Try::Tiny; - -=head2 new(cfg=>DbToRia::Config) - -setup a new service - -=cut +has 'cfg' => sub { + my $self = shift; + return $self->app->cfg; +}; +has 'log' => sub { + my $self = shift; + return $self->app->log; +}; -sub new { - my $self = shift->SUPER::new(@_); +has 'DBI' => sub { + my $self = shift; my $dsn = $self->cfg->{General}{dsn}; my $encoding = $self->cfg->{General}{encoding}; my $driver = (DBI->parse_dsn($dsn))[1]; + my $dbi; require 'DbToRia/DBI/'.$driver.'.pm'; do { no strict 'refs'; - $self->DBI("DbToRia::DBI::$driver"->new( + $dbi = "DbToRia::DBI::$driver"->new( schema => $self->cfg->{General}{schema}, dsn => $dsn, - encoding => $encoding, - metaEnginesCfg => $self->cfg->{MetaEngines} - )); + encoding => $encoding, + metaEnginesCfg => $self->cfg->{MetaEngines}, + session => $self->session, + ); }; - return $self; -} + return $dbi; +}; + +use strict; + +use DBI; +use Try::Tiny; + =head2 allow_rpc_access(method) @@ -81,10 +84,9 @@ our %allow_access = ( sub connect_db { my $self = shift; - my $session = $self->mojo_stash->{'dbtoria.session'}; my $dbi = $self->DBI; - $dbi->username($session->param('username')); - $dbi->password($session->param('password')); + $dbi->username($self->session('username')); + $dbi->password($self->session('password')); return try { $dbi->getDbh->ping; for my $engine (@{$self->DBI->metaEngines}){ @@ -116,24 +118,23 @@ sub login { my $param = shift; my $username = $param->{username}; my $password = $param->{password}; - my $session = $self->mojo_stash->{'dbtoria.session'}; - $session->param('username',$username); - $session->param('password',$password); + $self->session('username',$username); + $self->session('password',$password); my $connect = $self->connect_db; return $connect; } sub logout{ my $self = shift; - $self->mojo_stash->{'dbtoria.session'}->delete(); + $self->session('username', undef); + $self->session('password', undef); return 1; } sub getConnectionInfo { my $self = shift; - my $session = $self->mojo_stash->{'dbtoria.session'}; - my $user = $session->param('username') || ''; - $user .= '@' if $user; + my $user = $self->session('username') || ''; + $user .= '@' if $user; return $user.$self->DBI->getDatabaseName(@_); } diff --git a/configure b/configure new file mode 100755 index 0000000..a3ad7ba --- /dev/null +++ b/configure @@ -0,0 +1,4047 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69 for dbtoria 0.0.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org and +$0: fritz.zaucker@oetiker.ch about your system, including +$0: any error possibly output before this message. Then +$0: install a modern shell, or manually run the script +$0: under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='dbtoria' +PACKAGE_TARNAME='dbtoria' +PACKAGE_VERSION='0.0.0' +PACKAGE_STRING='dbtoria 0.0.0' +PACKAGE_BUGREPORT='fritz.zaucker@oetiker.ch' +PACKAGE_URL='' + +ac_default_prefix=/opt/$PACKAGE_NAME-$PACKAGE_VERSION +ac_subst_vars='LTLIBOBJS +LIBOBJS +POSTGRES_HOME +PERL5LIB +BUILD_QOOXDOO_APP_FALSE +BUILD_QOOXDOO_APP_TRUE +QOOXDOO_PATH +HTDOCSDIR +enable_pkgonly +GMAKE +GREP +PERL +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_maintainer_mode +enable_pkgonly +with_htdocs_dir +with_qooxdoo_sdk +' + ac_precious_vars='build_alias +host_alias +target_alias +PERL +GMAKE +PERL5LIB +POSTGRES_HOME' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures dbtoria 0.0.0 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/dbtoria] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of dbtoria 0.0.0:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-pkgonly Skip all checking + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-htdocs-dir=DIR Where to install htdocs [PREFIX/htdocs] + --with-qooxdoo-sdk=DIR Where can we find the qooxdoo sdk (required to + rebuild the web ui) + +Some influential environment variables: + PERL Path to local perl binary + GMAKE Path to local GNU Make binary + PERL5LIB Colon separated list of perl library directories + POSTGRES_HOME + Where to find the include/ and lib/ directories for PostgreSQL + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +dbtoria configure 0.0.0 +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by dbtoria $as_me 0.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +ac_aux_dir= +for ac_dir in conftools "$srcdir"/conftools; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in conftools \"$srcdir\"/conftools" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + + +# need this to allow long path names +am__api_version='1.14' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE='dbtoria' + VERSION='0.0.0' + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar plaintar pax cpio none' + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 + ($_am_tar --version) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && break + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 + ($am__untar &5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir + + if ${am_cv_prog_tar_ustar+:} false; then : + $as_echo_n "(cached) " >&6 +else + am_cv_prog_tar_ustar=$_am_tool +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 +$as_echo "$am_cv_prog_tar_ustar" >&6; } + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + + + + + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_PERL+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="no" + ;; +esac +fi +PERL=$ac_cv_path_PERL +if test -n "$PERL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 +$as_echo "$PERL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + +ac_perl_version="5.10.1" + +if test "x$PERL" != "x"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl version greater than or equal to $ac_perl_version" >&5 +$as_echo_n "checking for perl version greater than or equal to $ac_perl_version... " >&6; } + $PERL -e "use $ac_perl_version;" >/dev/null 2>&1 + if test $? -ne 0; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; }; + as_fn_error $? "at least version 5.10.1 is required to run mojolicious" "$LINENO" 5 + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; }; + fi +else + as_fn_error $? "could not find perl" "$LINENO" 5 +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + + + +for ac_prog in gnumake gmake make +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GMAKE+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GMAKE in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMAKE="$GMAKE" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMAKE="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + ;; +esac +fi +GMAKE=$ac_cv_path_GMAKE +if test -n "$GMAKE"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE" >&5 +$as_echo "$GMAKE" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$GMAKE" && break +done + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking checking for gnu make availablility" >&5 +$as_echo_n "checking checking for gnu make availablility... " >&6; } +if ( $GMAKE --version 2> /dev/null | $GREP GNU > /dev/null 2>&1 ); then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMAKE is GNU make" >&5 +$as_echo "$GMAKE is GNU make" >&6; } +else + as_fn_error $? "GNU make not found. Try setting the GMAKE environment variable." "$LINENO" 5 +fi + +# Check whether --enable-pkgonly was given. +if test "${enable_pkgonly+set}" = set; then : + enableval=$enable_pkgonly; +fi + + + +actual_prefix=$prefix +if test x$actual_prefix = xNONE; then + actual_prefix=$ac_default_prefix +fi + +HTDOCSDIR=${actual_prefix}/htdocs + +# Check whether --with-htdocs-dir was given. +if test "${with_htdocs_dir+set}" = set; then : + withval=$with_htdocs_dir; HTDOCSDIR=$withval +fi + + + +QOOXDOO_PATH= + +# Check whether --with-qooxdoo-sdk was given. +if test "${with_qooxdoo_sdk+set}" = set; then : + withval=$with_qooxdoo_sdk; + if test -d $withval/framework; then + QOOXDOO_PATH=$withval + else + cat <&5 +$as_echo_n "checking checking for perl module '$module'... " >&6; } + if ${PERL} -I$actual_prefix/thirdparty/lib/perl5 -e 'use '$module 2>/dev/null ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Ok" >&5 +$as_echo "Ok" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Failed" >&5 +$as_echo "Failed" >&6; } + mod_ok=0 + fi + done +fi + + +ac_config_files="$ac_config_files Makefile backend/Makefile frontend/Makefile" + + + + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Transform confdefs.h into DEFS. +# Protect against shell expansion while executing Makefile rules. +# Protect against Makefile macro expansion. +# +# If the first sed substitution is executed (which looks for macros that +# take arguments), then branch to the quote section. Otherwise, +# look for a macro that doesn't take arguments. +ac_script=' +:mline +/\\$/{ + N + s,\\\n,, + b mline +} +t clear +:clear +s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g +t quote +s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g +t quote +b any +:quote +s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g +s/\[/\\&/g +s/\]/\\&/g +s/\$/$$/g +H +:any +${ + g + s/^\n// + s/\n/ /g + p +} +' +DEFS=`sed -n "$ac_script" confdefs.h` + + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${BUILD_QOOXDOO_APP_TRUE}" && test -z "${BUILD_QOOXDOO_APP_FALSE}"; then + as_fn_error $? "conditional \"BUILD_QOOXDOO_APP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by dbtoria $as_me 0.0.0, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + +Configuration files: +$config_files + +Report bugs to ." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +dbtoria config.status 0.0.0 +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h | --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "backend/Makefile") CONFIG_FILES="$CONFIG_FILES backend/Makefile" ;; + "frontend/Makefile") CONFIG_FILES="$CONFIG_FILES frontend/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + + +eval set X " :F $CONFIG_FILES " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + + + + esac + +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + + +if test x$QOOXDOO_PATH = x; then + + cat </dev/null 2>&1 + if test $? -ne 0; then + AC_MSG_RESULT(no); + AC_MSG_ERROR(at least version 5.10.1 is required to run mojolicious) + else + AC_MSG_RESULT(ok); + fi +else + AC_MSG_ERROR(could not find perl) +fi + +AC_PROG_GREP + +AC_ARG_VAR(GMAKE, [Path to local GNU Make binary]) +AC_PATH_PROGS(GMAKE, [gnumake gmake make]) + +AC_MSG_CHECKING([checking for gnu make availablility]) +if ( $GMAKE --version 2> /dev/null | $GREP GNU > /dev/null 2>&1 ); then + AC_MSG_RESULT([$GMAKE is GNU make]) +else + AC_MSG_ERROR([GNU make not found. Try setting the GMAKE environment variable.]) +fi + +AC_ARG_ENABLE(pkgonly, + AC_HELP_STRING([--enable-pkgonly], + [Skip all checking])) +AC_SUBST(enable_pkgonly) + +actual_prefix=$prefix +if test x$actual_prefix = xNONE; then + actual_prefix=$ac_default_prefix +fi + +HTDOCSDIR=${actual_prefix}/htdocs +AC_ARG_WITH(htdocs-dir,AC_HELP_STRING([--with-htdocs-dir=DIR],[Where to install htdocs [PREFIX/htdocs]]), [HTDOCSDIR=$withval]) +AC_SUBST(HTDOCSDIR) + +QOOXDOO_PATH= +AC_ARG_WITH(qooxdoo-sdk,AC_HELP_STRING([--with-qooxdoo-sdk=DIR],[Where can we find the qooxdoo sdk (required to rebuild the web ui)]), [ + if test -d $withval/framework; then + QOOXDOO_PATH=$withval + else + cat </dev/null ; then + AC_MSG_RESULT([Ok]) + else + AC_MSG_RESULT([Failed]) + mod_ok=0 + fi + done +fi + + +AC_CONFIG_FILES([ + Makefile + backend/Makefile + frontend/Makefile +]) + +AC_SUBST(VERSION) + +AC_OUTPUT + +if test x$QOOXDOO_PATH = x; then + + cat <&2 + exit 1;; + esac + shift;; + + -o) chowncmd="$chownprog $2" + shift;; + + -s) stripcmd=$stripprog;; + + -t) dst_arg=$2 + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + shift;; + + -T) no_target_directory=true;; + + --version) echo "$0 $scriptversion"; exit $?;; + + --) shift + break;; + + -*) echo "$0: invalid option: $1" >&2 + exit 1;; + + *) break;; + esac + shift +done + +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + # Protect names problematic for 'test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac + done +fi + +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call 'install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi + +if test -z "$dir_arg"; then + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 + + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi + +for src +do + # Protect names problematic for 'test' and other utilities. + case $src in + -* | [=\(\)!]) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + dst=$dst_arg + + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode + else + mkdir_mode= + fi + + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac + + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + [-=\(\)!]*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test X"$d" = X && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done + + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 + + trap '' 0 + fi +done + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/conftools/missing b/conftools/missing new file mode 100755 index 0000000..db98974 --- /dev/null +++ b/conftools/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2013-10-28.13; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program 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 General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/frontend/Makefile.am b/frontend/Makefile.am new file mode 100644 index 0000000..d84c8d5 --- /dev/null +++ b/frontend/Makefile.am @@ -0,0 +1,25 @@ + +AUTOMAKE_OPTIONS=foreign +CLASS=dbtoria + +EXTRA_DIST = config.json Manifest.json source/index.html $(shell find source/class/ -name "*.js") $(wildcard source/translation/*.po source/resource/*/*.png source/resource/*/*.gif) + +if BUILD_QOOXDOO_APP + +GENTARGETS := lint pretty migration translation api + +.PHONY: $(GENTARGETS) source + +source: source/script/$(CLASS).js + +$(GENTARGETS): + $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache $@ + +source/script/$(CLASS).js: $(shell find source/class/ -name "*.js") + $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache source + +endif + +clean-local: + test -d ./cache && rm -r ./cache || true + test -f source/script/$(CLASS).js && rm source/script/* || true diff --git a/frontend/Makefile.in b/frontend/Makefile.in new file mode 100644 index 0000000..d59d1d4 --- /dev/null +++ b/frontend/Makefile.in @@ -0,0 +1,394 @@ +# Makefile.in generated by automake 1.14.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +subdir = frontend +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +GMAKE = @GMAKE@ +GREP = @GREP@ +HTDOCSDIR = @HTDOCSDIR@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MKDIR_P = @MKDIR_P@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PERL5LIB = @PERL5LIB@ +POSTGRES_HOME = @POSTGRES_HOME@ +QOOXDOO_PATH = @QOOXDOO_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build_alias = @build_alias@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +enable_pkgonly = @enable_pkgonly@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +CLASS = dbtoria +EXTRA_DIST = config.json Manifest.json source/index.html $(shell find source/class/ -name "*.js") $(wildcard source/translation/*.po source/resource/*/*.png source/resource/*/*.gif) +@BUILD_QOOXDOO_APP_TRUE@GENTARGETS := lint pretty migration translation api +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign frontend/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign frontend/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-local \ + cscopelist-am ctags-am distclean distclean-generic distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags-am uninstall uninstall-am + + +@BUILD_QOOXDOO_APP_TRUE@.PHONY: $(GENTARGETS) source + +@BUILD_QOOXDOO_APP_TRUE@source: source/script/$(CLASS).js + +@BUILD_QOOXDOO_APP_TRUE@$(GENTARGETS): +@BUILD_QOOXDOO_APP_TRUE@ $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache $@ + +@BUILD_QOOXDOO_APP_TRUE@source/script/$(CLASS).js: $(shell find source/class/ -name "*.js") +@BUILD_QOOXDOO_APP_TRUE@ $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache source + +clean-local: + test -d ./cache && rm -r ./cache || true + test -f source/script/$(CLASS).js && rm source/script/* || true + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/t/basic.t b/t/basic.t new file mode 100644 index 0000000..9135114 --- /dev/null +++ b/t/basic.t @@ -0,0 +1,18 @@ +#!/usr/bin/env perl +use FindBin; +use lib $FindBin::Bin.'/../backend/thirdparty/lib/perl5'; +use lib $FindBin::Bin.'/../backend/lib'; + + +use Test::More tests => 4; +use Test::Mojo; + +use_ok 'Dbtoria'; +use_ok 'Dbtoria::Controller::RpcService'; + +my $t = Test::Mojo->new('Dbtoria'); + +$t->post_ok('/jsonrpc','{"id":1,"service":"dbtoria","method":"ping","params":["hello"]}') + ->json_is('',{id=>1,result=>'got hello'},'post request'); + +exit 0; From 598573d3899a6e6354832cf0d7b0a41b5e1d591f Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 19 Nov 2014 17:06:45 +0100 Subject: [PATCH 17/45] Fix some house keeping files --- .gitignore | 1 - AUTHORS | 5 ++++- LICENSE | 2 +- frontend/Manifest.json | 8 ++++++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index c54d9d1..54514e7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,3 @@ trunk_sync johan_sync *~ backend/public/ -frontend/qooxdoo diff --git a/AUTHORS b/AUTHORS index 6a1cfba..15d931f 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1 +1,4 @@ -Fritz Zaucker +David Angleitner +Fritz Zaucker +Matthias Bloch +Tobias Oetiker diff --git a/LICENSE b/LICENSE index 04591f4..505faa1 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1 @@ -A COOL LICENSE FOR YOUR PROJECT +GPL diff --git a/frontend/Manifest.json b/frontend/Manifest.json index 6b8a111..2efbc19 100644 --- a/frontend/Manifest.json +++ b/frontend/Manifest.json @@ -15,9 +15,13 @@ "name" : "David Angleitner", "email" : "david.angleitner@tet.htwchur.ch" }, + { + "name" : "Fritz Zaucker", + "email" : "fritz.zaucker@oetiker.ch" + }, { "name" : "Matthias Bloch", - "email" : "matthias@puffin.ch" + "email" : "matthias.bloch@oetiker.ch" }, { "name" : "Tobias Oetiker", @@ -26,7 +30,7 @@ ], "version" : "trunk", - "qooxdoo-versions": ["1.4.0"] + "qooxdoo-versions": ["3.5.1"] }, "provides" : From badec1a19529fb494cad5654672b9a3a9800a95c Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Wed, 19 Nov 2014 17:35:49 +0100 Subject: [PATCH 18/45] Make DB connections caching --- backend/lib/DbToRia/DBI/Pg.pm | 37 +++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index ac38cc2..b86cba5 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -55,34 +55,37 @@ UTF8 handling if encoding=utf8 in cfg file. =cut -sub getDbh { +sub db_error_handler { + die error(99999, "Database error:\n" . DBI->errstr); +} + + +has 'getDbh' => sub { my $self = shift; my $driver = (DBI->parse_dsn($self->dsn))[1]; my $key = ($self->username||'???').($self->password||'???'); - my $dbh = $self->dbhCache->{$key}; my $utf8 = ($self->encoding eq 'utf8'); - if (not defined $dbh){ - $self->dbhCache->{$key} = $dbh = DBI->connect($self->dsn,$self->username,$self->password,{ + my $dbh = DBI->connect_cached($self->dsn, $self->username, $self->password, { RaiseError => 0, PrintError => 0, - HandleError => sub { - my ($msg,$h,$ret) = @_; - my $state = $h->state || 9999; - my $code = lc($state); - $code =~ s/[^a-z0-9]//g; - $code =~ s/([a-z])/sprintf("%02d",ord($1)-97)/eg; - $code += 70000000; - delete $self->dbhCache->{$key}; - die error($code,$h->errstr. ( $h->{Statement} ? " (".$h->{Statement}.") ":'')." [${driver}-$state]"); - }, + HandleError => \&db_error_handler, + # HandleError => sub { + # my ($msg,$h,$ret) = @_; + # my $state = $h->state || 9999; + # my $code = lc($state); + # $code =~ s/[^a-z0-9]//g; + # $code =~ s/([a-z])/sprintf("%02d",ord($1)-97)/eg; + # $code += 70000000; + # delete $self->dbhCache->{$key}; + # die error($code,$h->errstr. ( $h->{Statement} ? " (".$h->{Statement}.") ":'')." [${driver}-$state]"); + # }, AutoCommit => 1, ShowErrorStatement => 1, LongReadLen=> 5*1024*1024, pg_enable_utf8 => $utf8, - }); - } + }); return $dbh; -} +}; =head2 getDatabaseName From d935bd6508d72d5b285633d4301366dea887e400 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:00:51 +0100 Subject: [PATCH 19/45] Remove Archive/ folder --- Archive/frontend/Desktop.js | 43 --- Archive/frontend/HomeTab.js | 30 -- Archive/frontend/Main.js | 60 ---- Archive/frontend/TableWindow.js | 520 -------------------------------- frontend/readme.txt | 7 - 5 files changed, 660 deletions(-) delete mode 100644 Archive/frontend/Desktop.js delete mode 100644 Archive/frontend/HomeTab.js delete mode 100644 Archive/frontend/Main.js delete mode 100644 Archive/frontend/TableWindow.js delete mode 100644 frontend/readme.txt diff --git a/Archive/frontend/Desktop.js b/Archive/frontend/Desktop.js deleted file mode 100644 index bc74bfc..0000000 --- a/Archive/frontend/Desktop.js +++ /dev/null @@ -1,43 +0,0 @@ -/* ************************************************************************ - - DbToRia - Database to Rich Internet Application - - http://www.dbtoria.org - - Copyright: - 2009 David Angleitner, Switzerland - 2011 Oetiker+Partner AG, Olten, Switzerland - - License: - GPL: http://www.gnu.org/licenses/gpl-2.0.html - - Authors: - * David Angleitner - * Fritz Zaucker - * Tobi Oetiker (oetiker) - -************************************************************************ */ - -qx.Class.define("dbtoria.module.desktop.Desktop", { - extend : qx.ui.window.Desktop, - type : "singleton", - - construct : function() { - this.base(arguments, new qx.ui.window.Manager()); - var logo = new qx.ui.basic.Label('made with dBtoria').set({ - font: new qx.bom.Font(60,['Amaranth','sans-serif']), - textColor: '#eee', -// alignX: 'center', -// alignY: 'middle', -// textAlign: 'center', -// allowGrowX: true, -// allowShrinkX: true, - cursor: 'pointer' - }); - logo.addListener('mouseover',function(){logo.setTextColor('#ddd')}); - logo.addListener('mouseout',function(){logo.setTextColor('#eee')}); - logo.addListener('click',function(){ qx.bom.Window.open('http://dbtoria.org/', '_blank');}); - this.add(logo,{right: 40, bottom: 20 }); - } - -}); diff --git a/Archive/frontend/HomeTab.js b/Archive/frontend/HomeTab.js deleted file mode 100644 index 3d2d5b7..0000000 --- a/Archive/frontend/HomeTab.js +++ /dev/null @@ -1,30 +0,0 @@ -/* ************************************************************************ - - DbToRia - Database to Rich Internet Application - - http://www.dbtoria.org - - Copyright: - 2009 David Angleitner, Switzerland - 2011 Oetiker+Partner AG, Olten, Switzerland - - License: - GPL: http://www.gnu.org/licenses/gpl-2.0.html - - Authors: - * David Angleitner - * Fritz Zaucker - * Tobi Oetiker (oetiker) - -************************************************************************ */ - -qx.Class.define("dbtoria.module.desktop.HomeTab", { - extend : qx.ui.tabview.Page, - type : "singleton", - - construct : function() { - this.base(arguments); - this.setLabel(this.tr('Home')); - } - -}); diff --git a/Archive/frontend/Main.js b/Archive/frontend/Main.js deleted file mode 100644 index f445111..0000000 --- a/Archive/frontend/Main.js +++ /dev/null @@ -1,60 +0,0 @@ -/* ************************************************************************ - - DbToRia - Database to Rich Internet Application - - http://www.dbtoria.org - - Copyright: - 2009 David Angleitner, Switzerland - 2011 Oetiker+Partner AG, Olten, Switzerland - - License: - GPL: http://www.gnu.org/licenses/gpl-2.0.html - - Authors: - * David Angleitner - * Fritz Zaucker - -************************************************************************ */ - -/* ************************************************************************ - -#asset(dbtoria/*) -#asset(qx/icon/${qx.icontheme}/16/places/folder.png) -#asset(qx/icon/${qx.icontheme}/16/actions/application-exit.png) - -************************************************************************ */ - -/** - * This class provides the main window for dbtoria. - * - * The main window consists of a menu bar, a desktop where the windows are - * located and a taskbar where minimized windows are held. - */ -qx.Class.define("dbtoria.module.Main", { - extend : qx.ui.container.Composite, - - construct : function() { - var containerLayout = new qx.ui.layout.VBox(); - containerLayout.setSeparator("separator-vertical"); - this.base(arguments, containerLayout); - // the desktop area is the largest part of dbtoria, make sure it is - // scrollable - var desktopContainer = new qx.ui.container.Scroll(); - - // the desktop holds all other windows - var desktop = dbtoria.module.desktop.Desktop.getInstance(); - - desktopContainer.add(desktop, { - width : '100%', - height : '100%' - }); - var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); - this.add(toolbar); - this.add(desktopContainer, { flex : 1 }); - - var taskbar = dbtoria.module.desktop.Taskbar.getInstance(); - this.add(taskbar); - - } -}); diff --git a/Archive/frontend/TableWindow.js b/Archive/frontend/TableWindow.js deleted file mode 100644 index dd8f1a2..0000000 --- a/Archive/frontend/TableWindow.js +++ /dev/null @@ -1,520 +0,0 @@ -/* ************************************************************************ - - DbToRia - Database to Rich Internet Application - - http://www.dbtoria.org - - Copyright: - 2009 David Angleitner, Switzerland - 2011 Oetiker+Partner AG, Olten, Switzerland - - License: - GPL: http://www.gnu.org/licenses/gpl-2.0.html - - Authors: - * David Angleitner - * Fritz Zaucker - -************************************************************************ */ - -/* - * TODOs: - * - show number of filtered rows in table legend, e.g. x (y) rows - * - change appearance of filter button when filter active - * - perhaps integrate filter configuration into TableWindow instead of - * using a separate window - */ - -/* ************************************************************************ - -#asset(dbtoria/*) -#asset(qx/icon/${qx.icontheme}/16/mimetypes/text-plain.png) -#asset(qx/icon/${qx.icontheme}/16/actions/contact-new.png) -#asset(qx/icon/${qx.icontheme}/16/actions/edit-delete.png) -#asset(qx/icon/${qx.icontheme}/16/actions/view-refresh.png) -#asset(qx/icon/${qx.icontheme}/16/actions/document-save-as.png) -#asset(qx/icon/${qx.icontheme}/16/actions/document-print.png) -#asset(qx/icon/${qx.icontheme}/16/actions/system-search.png) -#asset(qx/icon/${qx.icontheme}/16/actions/edit-copy.png) -#asset(qx/icon/${qx.icontheme}/16/apps/utilities-text-editor.png) - -************************************************************************ */ - -/** - * This class provides the view for a specific table. - * - * It displays a traditional table at first. On clicking on a row it opens a - * form for data editing. This window also allows for searching, creation and - * deletion of entries. - */ -qx.Class.define("dbtoria.module.database.TableWindow", { - extend : dbtoria.module.desktop.Window, - construct : function(tableId, tableName, viewMode, readOnly) { - this.__tableName = tableName; - this.__tableId = tableId; - this.__viewMode = viewMode; - this.__readOnly = readOnly; - - this.base(arguments); - this.set({ - contentPadding : 0, - layout : new qx.ui.layout.VBox().set({ separator: "separator-vertical"}), - width : 800, - height : 500, - loading : true - }); - - this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); - this.debug('refDelay='+this.__refDelay); - - this.__rpc = dbtoria.data.Rpc.getInstance(); - this.__buildUi(tableId, viewMode, readOnly); - if (viewMode) { - this.setCaption(this.tr('View: %1', this.__tableName)); - } - else { - this.setCaption(this.tr('Table: %1', this.__tableName)); - } - this.__recordEdit = new dbtoria.module.database.RecordEdit(tableId, tableName, readOnly); - this.__recordEdit.addListener('navigation', this.__navigation, this); - this.__recordEdit.addListener('refresh', this.__refresh, this); - -// this.addListener('close', function() { -// this.__recordEdit.cancel(); -// }, this); - this.open(); - }, - - members : { - __table: null, - __tbEdit: null, - __tbDelete: null, - __tbClone: null, - __tbNew: null, - __currentId: null, - __tableName: null, - __tableId: null, - __columns: null, - __recordEdit: null, - __rpc: null, - __dataChangedHandler: null, - __viewMode: null, - __readOnly: null, - __filter: null, - __refDelay: null, - __refTimer: null, - - __cellChange: function(e) { - this.__refTimer.stop(); - var data = e.getData(); - var row = data.row; - var col = data.col; - var mouse = data.mouse; // mouse event - - // close and remove tooltip if not over a table cell - if (row == null || row == -1) { - this.__table.hideTooltip(); - return; - } - this.debug('__cellChange(): row='+row+', col='+col); - - var tm = this.__table.getTableModel(); - var colId = tm.getColumnId(col); - var tableId = this.__tableId; - var rowInfo = tm.getRowData(row); - var recordId; - if (rowInfo) { - recordId = rowInfo['ROWINFO'][0]; - } - - // check if we are in a column referencing another table - var references = this.__table.getTableModel().getColumnReferences(); -// this.debug('references='); -// qx.dev.Debug.debugObject(references); -// this.debug('colId='+colId+', col=',+col); - if (!references[col]) { - this.__table.hideTooltip(); - return; - } - - var params = { - tableId: tableId, - recordId: recordId, - columnId: colId - }; -// qx.dev.Debug.debugObject(params); -// this.__tooltip.placeToMouse(mouse); - - this.__refTimer.addListener('interval', function(e) { -// this.debug('timer fired'); - this.__refTimer.stop(); - - var rpc = dbtoria.data.Rpc.getInstance(); - // Get appropriate row from referenced table - rpc.callAsyncSmart(qx.lang.Function.bind(this.__referenceHandler, - this), - 'getReferencedRecord', params); - }, this); -// this.debug('starting timer'); - this.__refTimer.start(); - }, - - __referenceHandler: function(data) { - var key, val; - var label = ''; - for (key in data) { - val = data[key]; - label += ''; - } - label += '
'+key+':'+val+'
'; - this.__table.updateTooltip(label); - }, - - close: function() { - if (this.__viewMode || this.__readOnly || - !this.__recordEdit.isVisible()) { - this.__recordEdit.close(); - this.base(arguments); - return; - } - var mbox = dbtoria.ui.dialog.MsgBox.getInstance(); - mbox.info(this.tr('Unsaved data.'), - this.tr('You must first close the record edit window.')); - }, - - __refresh : function(e) { - var tm = this.__table.getTableModel(); - if (this.__dataChangedHandler) { - tm.removeListener('dataChanged', this.__dataChangedHandler, this); - this.__dataChangedHandler = null; - } - - // check if we still have a correct selection - // FIX ME: it would be nicer to actually figure out which row to select. - var sm = this.__table.getSelectionModel(); - var selection = sm.getSelectedRanges()[0]; - var row = null; - var that=this; - if (selection) { - row = selection.minIndex; - this.__dataChangedHandler = function(e) { - var id, rowData = tm.getRowData(row); - if (rowData) { // we found the row - tm.removeListener('dataChanged', this.__dataChangedHandler, this); - this.__dataChangedHandler = null; - that.setLoading(false); - id = rowData['ROWINFO'][0]; - if (id != this.__currentId) { - sm.resetSelection(); - } - } - }; - } - else { - this.__dataChangedHandler = function(e) { - tm.removeListener('dataChanged', this.__dataChangedHandler, this); - this.__dataChangedHandler = null; - that.setLoading(false); - }; - } - - tm.addListener('dataChanged', this.__dataChangedHandler, this); - this.setLoading(true); - tm.reloadData(); - }, - - __navigation : function(e) { - var target = e.getData(); - var sm = this.__table.getSelectionModel(); - var tm = this.__table.getTableModel(); - var selection = sm.getSelectedRanges()[0]; - var row; - if (selection == undefined || selection == null) { - row = 0; // FIX ME: is this sensible? - } - else { - row = selection.minIndex; - } - var oldRow = row; - // switch record - var maxRow = tm.getRowCount(); - this.debug('__navigation(): target='+target+', row='+row+', maxRow='+maxRow); - switch (target) { - case 'first': - row = 0; - break; - case 'back': - if (row>0) { - row--; - } - break; - case 'next': - if (row Date: Thu, 20 Nov 2014 08:09:04 +0100 Subject: [PATCH 20/45] Remove debugging to STDERR and use Mojo::Log instead. --- backend/lib/DbToRia/DBI/Pg.pm | 9 +-------- backend/lib/DbToRia/DBI/SQLite.pm | 1 - backend/lib/DbToRia/DBI/base.pm | 13 ------------- backend/lib/DbToRia/Meta/GedafeSQL.pm | 11 +++++------ 4 files changed, 6 insertions(+), 28 deletions(-) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index b86cba5..702f759 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -324,7 +324,6 @@ Returns hash of columns with default values. sub getDefaults { my $self = shift; my $tableId = shift; - # print STDERR "getDefaults($tableId)\n"; my $dbh = $self->getDbh(); my $structure = $self->getTableStructure($tableId); my $columns = $structure->{columns}; @@ -340,7 +339,6 @@ sub getDefaults { $sth->execute(); my $row = $sth->fetchrow_arrayref; $defaults{$id} = $self->dbToFe($row->[0], $typeMap->{$id}); - # print STDERR "default($id)=", $defaults{$id}, "\n"; } # for my $engine (@{$self->metaEngines}){ # $engine->massageRecord($tableId, $recordId, \%newRow); @@ -428,7 +426,6 @@ sub getTableDataChunk { $query .= ' '.$self->buildWhere($filter); $query .= ' ORDER BY ' . $dbh->quote_identifier($sortColumn) . $sortDirection if $sortColumn; $query .= ' LIMIT ' . ($lastRow - $firstRow + 1) . ' OFFSET ' . $firstRow if defined $firstRow; -# warn $query,"\n"; my $sth = $dbh->prepare($query); $sth->execute; my @data; @@ -473,8 +470,6 @@ sub updateTableData { my $recId = shift; my $data = shift; -# use Data::Dumper; -# print STDERR Dumper "updateTableData(): table=$table, record=$recId, data=", $data; my $dbh = $self->getDbh(); my $update = 'UPDATE '.$dbh->quote_identifier($table); @@ -485,7 +480,7 @@ sub updateTableData { my @set; for my $key (keys %$data) { if ($key eq $primaryKey){ - warn "someone is trying to write back the primary ($primaryKey) key in $table. Skipping.\n"; + $self->app->log->warn("Someone is trying to write back the primary ($primaryKey) key in $table, skipping."); next; } push @set, $dbh->quote_identifier($key) . ' = ' . $dbh->quote($self->feToDb($data->{$key},$typeMap->{$key})); @@ -516,8 +511,6 @@ sub insertTableData { my $table = shift; my $data = shift; -# use Data::Dumper; -# print STDERR Dumper "insertTableData(): table=$table, data=", $data; my $dbh = $self->getDbh(); my $insert = 'INSERT INTO '. $dbh->quote_identifier($table); diff --git a/backend/lib/DbToRia/DBI/SQLite.pm b/backend/lib/DbToRia/DBI/SQLite.pm index 16a7b8f..98c3b64 100644 --- a/backend/lib/DbToRia/DBI/SQLite.pm +++ b/backend/lib/DbToRia/DBI/SQLite.pm @@ -299,7 +299,6 @@ sub getTableDataChunk { $query .= ' '.$self->buildWhere($filter); $query .= ' ORDER BY ' . $dbh->quote_identifier($sortColumn) . $sortDirection if $sortColumn; $query .= ' LIMIT ' . ($lastRow - $firstRow + 1) . ' OFFSET ' . $firstRow if defined $firstRow; - warn $query,"\n"; my $sth = $dbh->prepare($query); $sth->execute; my @data; diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index 053b1be..a379f7a 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -320,7 +320,6 @@ sub getReferencedRecord { my $tableId = $params->{tableId}; my $recordId = $params->{recordId}; my $columnId = $params->{columnId}; - # warn "tableId=$tableId, recordId=$recordId, columnId=$columnId"; my $fTableId; my $fKeyId; @@ -336,11 +335,9 @@ sub getReferencedRecord { return undef unless defined $fTableId; my $fKeyVal = $self->getRecord($tableId, $recordId)->{$columnId}; -# warn "fTableId=$fTableId, fKeyId=$fKeyId, fKeyVal=$fKeyVal"; my $fts = $self->getTableStructure($fTableId); my $fPkId = $fts->{meta}{primary}[0]; -# use Data::Dumper; print STDERR Dumper $fts; my $dbh = $self->getDbh(); my $query = "SELECT $fPkId FROM $fTableId "; @@ -352,18 +349,14 @@ sub getReferencedRecord { $sth->execute; my $fPkVal = $sth->fetchrow_hashref()->{$fPkId}; -# warn "fPkVal=$fPkVal"; my $fRec = $self->getRecordDeref($fTableId, $fPkVal); -# use Data::Dumper; print STDERR Dumper "fRec=", $fRec; my $view = $self->getEditView($fTableId); -# print STDERR Dumper "view=", $view; for my $field (@$view){ if (exists $fRec->{$field->{name}}) { $fRec->{$field->{label}} = $fRec->{$field->{name}}; delete $fRec->{$field->{name}}; } } -# use Data::Dumper; print STDERR Dumper "fRec2=", $fRec; return $fRec; } @@ -392,7 +385,6 @@ sub getDefaultsDeref { my $tableId = shift; my $rec = $self->getDefaults($tableId); - # use Data::Dumper; print STDERR Dumper "defaults=", $rec; # resolve foreign key references my $view = $self->getEditView($tableId); for my $field (@$view){ @@ -402,7 +394,6 @@ sub getDefaultsDeref { $rec->{$key} = $self->getRecord($field->{tableId}, $rec->{$key}); } } - # use Data::Dumper; print STDERR Dumper "defaults=", $rec; return $rec; } @@ -446,11 +437,9 @@ sub prepListView { my $self = shift; my $tableId = shift; my $structure = $self->getTableStructure($tableId); -# use Data::Dumper; print STDERR Dumper $tableId, $structure; my @return; for my $row (@{$structure->{columns}}){ next if $row->{hidden}; -# print STDERR Dumper "row=", $row; my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; $row->{fk} = $fk; push @return, { map { $_ => $row->{$_} } qw (id type name size fk) }; @@ -465,11 +454,9 @@ sub getListView { my $self = shift; my $tableId = shift; my $view = $self->prepListView($tableId); -# use Data::Dumper; print STDERR Dumper "view=", $view; for my $engine (@{$self->metaEngines}){ $engine->massageListView($view); } -# print STDERR Dumper "view2=", $view; return $view; } diff --git a/backend/lib/DbToRia/Meta/GedafeSQL.pm b/backend/lib/DbToRia/Meta/GedafeSQL.pm index 28413fc..700389c 100644 --- a/backend/lib/DbToRia/Meta/GedafeSQL.pm +++ b/backend/lib/DbToRia/Meta/GedafeSQL.pm @@ -156,13 +156,12 @@ sub massageListView { my $newView = $self->DBI->prepListView($view->{tableId}.'_list'); map { $view->{$_} = $newView->{$_} } keys %$newView; } - use Data::Dumper; print STDERR Dumper "viewCols=", $vColumns; for my $col (@{$view->{columns}}) { - for my $vCol (@$vColumns) { - if ($col->{id} eq $vCol->{id}) { - $col->{fk} = $vCol->{fk}; - } - } + for my $vCol (@$vColumns) { + if ($col->{id} eq $vCol->{id}) { + $col->{fk} = $vCol->{fk}; + } + } } } From ed11a76a7040dcdfcbaf78fe05082e121845b92d Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:16:22 +0100 Subject: [PATCH 21/45] Use localhost in test config. Use system Perl. --- backend/t/01_simple.cfg | 2 +- backend/t/01_simple.t | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/t/01_simple.cfg b/backend/t/01_simple.cfg index f6c55ba..ebe3f18 100644 --- a/backend/t/01_simple.cfg +++ b/backend/t/01_simple.cfg @@ -1,6 +1,6 @@ *** General *** -dsn = DBI:Pg:database=dbtoria_test_db;host=johan +dsn = DBI:Pg:database=dbtoria_test_db;host=localhost mojo_secret = MyCookieSecret log_file = /tmp/dbtoria.log schema = public diff --git a/backend/t/01_simple.t b/backend/t/01_simple.t index 6ac04a0..5788eb5 100755 --- a/backend/t/01_simple.t +++ b/backend/t/01_simple.t @@ -1,4 +1,4 @@ -#!/usr/sepp/bin/perl-5.12.3 +#!/usr/bin/env perl # some tests to ensure functionality of db driver. @@ -8,6 +8,7 @@ # this requires DBD:Pg to be installed an the respective DB being in place. # otherwise some tests will fail. +use warnings; use strict; use FindBin; From fa14dc95c70a48147a6d72e223488236da7f20ab Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:18:26 +0100 Subject: [PATCH 22/45] Remove unnecessary code for adding window to root --- frontend/source/class/dbtoria/module/desktop/Window.js | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/source/class/dbtoria/module/desktop/Window.js b/frontend/source/class/dbtoria/module/desktop/Window.js index efd31b7..c26fe27 100644 --- a/frontend/source/class/dbtoria/module/desktop/Window.js +++ b/frontend/source/class/dbtoria/module/desktop/Window.js @@ -36,7 +36,6 @@ qx.Class.define("dbtoria.module.desktop.Window", { extend : qx.ui.window.Window, construct : function() { this.base(arguments); - this.getApplicationRoot().add(this); var taskbar = dbtoria.module.desktop.Taskbar.getInstance(); var taskbarButton = new qx.ui.toolbar.Button(null, "icon/16/mimetypes/text-plain.png"); From 2d82ff13a74cbf732b5b01a8356db83e105eecc8 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:24:58 +0100 Subject: [PATCH 23/45] Add bootstrap script to repo --- bootstrap | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 bootstrap diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..4d74fc6 --- /dev/null +++ b/bootstrap @@ -0,0 +1,3 @@ +#!/bin/sh +autoreconf --force --install --verbose --make +# EOF From 3e2d3baf72049d5412d2cc7ac2c8f505952958e7 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:25:21 +0100 Subject: [PATCH 24/45] Fixed .gitignore for qx-mojo-setup --- .gitignore | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 54514e7..29c5e4d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ -dbtoria.cfg -dbtoria-stadler.cfg -dbtoria-opptp2.cfg -frontend/source/script/ -thirdparty/ -trunk_sync -johan_sync *~ +backend/etc/*.cfg backend/public/ +frontend/cache/ +frontend/source/script/ +backend/thirdparty/ +Makefile +config.log +config.status +autom4te.cache From e784bb0b981697dd3035708823eea523437a1d9d Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:38:03 +0100 Subject: [PATCH 25/45] Fix indentation --- backend/lib/DbToRia/Meta/GedafeSQL.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/lib/DbToRia/Meta/GedafeSQL.pm b/backend/lib/DbToRia/Meta/GedafeSQL.pm index 700389c..0886590 100644 --- a/backend/lib/DbToRia/Meta/GedafeSQL.pm +++ b/backend/lib/DbToRia/Meta/GedafeSQL.pm @@ -178,10 +178,10 @@ sub massageEditView { my $tables = $self->DBI->getAllTables(); for my $row (@$editView){ next unless $row->{type} eq 'ComboTable'; - die error(90732,"ComboTable view $row->{tableId}_combo not found.") unless exists $tables->{$row->{tableId}.'_combo'}; - $row->{tableId} .= '_combo'; - $row->{idCol} = 'id'; - $row->{valueCol} = 'text'; + die error(90732,"ComboTable view $row->{tableId}_combo not found.") unless exists $tables->{$row->{tableId}.'_combo'}; + $row->{tableId} .= '_combo'; + $row->{idCol} = 'id'; + $row->{valueCol} = 'text'; } for (my $i=0; $i[$i]; From 614ab5646bfcfba087fbd4515f007a8122917af3 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:38:47 +0100 Subject: [PATCH 26/45] Improve info files --- CHANGES | 2 +- README | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 3139439..5cd33bf 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,3 @@ 0.0.0 2014-12-11/19/14 Fritz Zaucker (fritz.zaucker@oetiker.ch) -- started project +- Moved existing DbToRia project to qx-mojo-app setup. diff --git a/README b/README index 8ef7efa..ad3b2a0 100644 --- a/README +++ b/README @@ -3,7 +3,15 @@ Dbtoria Version: #VERSION# Date: #DATE# -Dbtoria is a cool web application. +DbToRia is generic sql database frontend. Just point it to your +database and get a user friendly web interface. + +By providing DbToRia with additional information about the nature of +your database the userinterface can be further optimized. + +For more information see the README.pod file, the DbToRia website at +www.dbtoria.org or the Github repository. + You are looking at a template for creating a Qooxdoo application with a Mojolicious backend. It is a classic "configure - make - install" setup. From d8e530a6a6967e5f0f374c46245bd4481a8d3018 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:39:17 +0100 Subject: [PATCH 27/45] Fix indentation --- backend/lib/DbToRia/RpcService.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/backend/lib/DbToRia/RpcService.pm b/backend/lib/DbToRia/RpcService.pm index 532434e..e3761da 100644 --- a/backend/lib/DbToRia/RpcService.pm +++ b/backend/lib/DbToRia/RpcService.pm @@ -221,9 +221,10 @@ sub getTableStructure { sub getConfig { my $self = shift; my $gcfg = $self->cfg->{General}; - return { filterOps => $self->DBI->getFilterOpsArray(@_), - refDelay => $gcfg->{ref_delay}, - }; + return { + filterOps => $self->DBI->getFilterOpsArray(@_), + refDelay => $gcfg->{ref_delay}, + }; } From 89ae10bbd7d69150626168a8ad6422f2c57164b5 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:43:20 +0100 Subject: [PATCH 28/45] Added missing returns at end of file --- frontend/source/class/dbtoria/theme/Appearance.js | 2 +- frontend/source/class/dbtoria/theme/Color.js | 2 +- frontend/source/class/dbtoria/theme/Decoration.js | 2 +- frontend/source/class/dbtoria/theme/Font.js | 2 +- frontend/source/class/dbtoria/theme/Theme.js | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/source/class/dbtoria/theme/Appearance.js b/frontend/source/class/dbtoria/theme/Appearance.js index 43366a2..ac36455 100644 --- a/frontend/source/class/dbtoria/theme/Appearance.js +++ b/frontend/source/class/dbtoria/theme/Appearance.js @@ -11,4 +11,4 @@ qx.Theme.define("dbtoria.theme.Appearance", { extend : qx.theme.simple.Appearance, appearances : {} -}); \ No newline at end of file +}); diff --git a/frontend/source/class/dbtoria/theme/Color.js b/frontend/source/class/dbtoria/theme/Color.js index d603424..6e53f61 100644 --- a/frontend/source/class/dbtoria/theme/Color.js +++ b/frontend/source/class/dbtoria/theme/Color.js @@ -11,4 +11,4 @@ qx.Theme.define("dbtoria.theme.Color", { extend : qx.theme.simple.Color, colors : {} -}); \ No newline at end of file +}); diff --git a/frontend/source/class/dbtoria/theme/Decoration.js b/frontend/source/class/dbtoria/theme/Decoration.js index a5b36e3..1957e51 100644 --- a/frontend/source/class/dbtoria/theme/Decoration.js +++ b/frontend/source/class/dbtoria/theme/Decoration.js @@ -11,4 +11,4 @@ qx.Theme.define("dbtoria.theme.Decoration", { extend : qx.theme.simple.Decoration, decorations : {} -}); \ No newline at end of file +}); diff --git a/frontend/source/class/dbtoria/theme/Font.js b/frontend/source/class/dbtoria/theme/Font.js index 8f82f48..bbe1251 100644 --- a/frontend/source/class/dbtoria/theme/Font.js +++ b/frontend/source/class/dbtoria/theme/Font.js @@ -11,4 +11,4 @@ qx.Theme.define("dbtoria.theme.Font", { extend : qx.theme.simple.Font, fonts : {} -}); \ No newline at end of file +}); diff --git a/frontend/source/class/dbtoria/theme/Theme.js b/frontend/source/class/dbtoria/theme/Theme.js index 4234725..3909db4 100644 --- a/frontend/source/class/dbtoria/theme/Theme.js +++ b/frontend/source/class/dbtoria/theme/Theme.js @@ -10,10 +10,10 @@ qx.Theme.define("dbtoria.theme.Theme", { meta : { + appearance : dbtoria.theme.Appearance, color : dbtoria.theme.Color, decoration : dbtoria.theme.Decoration, font : dbtoria.theme.Font, - icon : qx.theme.icon.Tango, - appearance : dbtoria.theme.Appearance + icon : qx.theme.icon.Tango } -}); \ No newline at end of file +}); From b43527df67dbe513ebaa6907410b096b5d293d7f Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:43:59 +0100 Subject: [PATCH 29/45] Show close button on window. Fix indentation. --- .../dbtoria/module/database/TablePage.js | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TablePage.js index 33695d7..c33b259 100644 --- a/frontend/source/class/dbtoria/module/database/TablePage.js +++ b/frontend/source/class/dbtoria/module/database/TablePage.js @@ -58,13 +58,12 @@ qx.Class.define("dbtoria.module.database.TablePage", { this.base(arguments); this.set({ layout : new qx.ui.layout.VBox().set({ separator: "separator-vertical"}), -// width : 800, -// height : 500, + showCloseButton: true, loading : true }); - this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); - var filterOps = dbtoria.data.Config.getInstance().getFilterOps(); + this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); + var filterOps = dbtoria.data.Config.getInstance().getFilterOps(); // this.debug('filterOps='+filterOps); this.__rpc = dbtoria.data.Rpc.getInstance(); @@ -80,8 +79,8 @@ qx.Class.define("dbtoria.module.database.TablePage", { this.__recordEdit = new dbtoria.module.database.RecordEdit(tableId, tableName, readOnly); this.__recordEdit.addListener('navigation', this.__navigation, this); this.__recordEdit.addListener('refresh', this.__refresh, this); - var root = this.getApplicationRoot(); - this.debug('root='+root); + var root = this.getApplicationRoot(); + this.debug('root='+root); // root.add(this.__recordEdit); // this.addListener('close', function() { // this.__recordEdit.cancel(); @@ -101,15 +100,15 @@ qx.Class.define("dbtoria.module.database.TablePage", { __columns: null, __recordEdit: null, __rpc: null, + __viewMode: null, + __readOnly: null, + __filter: null, + __refDelay: null, + __refTimer: null, __dataChangedHandler: null, - __viewMode: null, - __readOnly: null, - __filter: null, - __refDelay: null, - __refTimer: null, __cellChange: function(e) { - this.__refTimer.stop(); + this.__refTimer.stop(); var data = e.getData(); var row = data.row; var col = data.col; @@ -132,7 +131,7 @@ qx.Class.define("dbtoria.module.database.TablePage", { } // check if we are in a column referencing another table - var references = this.__table.getTableModel().getColumnReferences(); + var references = this.__table.getTableModel().getColumnReferences(); // this.debug('references='); // qx.dev.Debug.debugObject(references); // this.debug('colId='+colId+', col=',+col); @@ -160,7 +159,7 @@ qx.Class.define("dbtoria.module.database.TablePage", { 'getReferencedRecord', params); }, this); // this.debug('starting timer'); - this.__refTimer.start(); + this.__refTimer.start(); }, __referenceHandler: function(data) { @@ -337,21 +336,20 @@ qx.Class.define("dbtoria.module.database.TablePage", { for (i=0; i Date: Thu, 20 Nov 2014 08:50:14 +0100 Subject: [PATCH 30/45] Fix copyright --- COPYRIGHT | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/COPYRIGHT b/COPYRIGHT index fbda3d0..0df7d7c 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -1,7 +1,7 @@ Dbtoria a cool web app with Mojolicious backend -Copyright (c) 2014 Fritz Zaucker and the other people listed in the +Copyright (c) 2014 Oetiker+Partner AG and the people listed in the AUTHORS file. All rights reserved. From c65cfcae40bf54932d580b13a7ccdc5763f78786 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:50:53 +0100 Subject: [PATCH 31/45] Cleanup Main module (using tabview instead of a desktop) --- frontend/source/class/dbtoria/module/Main.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/frontend/source/class/dbtoria/module/Main.js b/frontend/source/class/dbtoria/module/Main.js index f55828a..2ed4825 100644 --- a/frontend/source/class/dbtoria/module/Main.js +++ b/frontend/source/class/dbtoria/module/Main.js @@ -5,14 +5,12 @@ http://www.dbtoria.org Copyright: - 2009 David Angleitner, Switzerland 2011 Oetiker+Partner AG, Olten, Switzerland License: GPL: http://www.gnu.org/licenses/gpl-2.0.html Authors: - * David Angleitner * Fritz Zaucker ************************************************************************ */ @@ -28,8 +26,8 @@ /** * This class provides the main window for dbtoria. * - * The main window consists of a menu bar, a desktop where the windows are - * located and a taskbar where minimized windows are held. + * The main window consists of a menu bar and a tabview on which the + * tables are placed. */ qx.Class.define("dbtoria.module.Main", { extend : qx.ui.container.Composite, @@ -38,22 +36,12 @@ qx.Class.define("dbtoria.module.Main", { var containerLayout = new qx.ui.layout.VBox(); containerLayout.setSeparator("separator-vertical"); this.base(arguments, containerLayout); -// // the desktop area is the largest part of dbtoria, make sure it is -// // scrollable -// var desktopContainer = new qx.ui.container.Scroll(); // the table tabview var tabview = dbtoria.module.desktop.Desktop.getInstance(); -// desktopContainer.add(tabview, { -// width : '100%', -// height : '100%' -// }); - var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); this.add(toolbar); - // this.add(desktopContainer, { flex : 1 }); - this.add(tabview, {flex:1}); - + this.add(tabview, {flex:1}); } }); From 418ee1d72c32b94d5da70db399bded97dd020c39 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:52:48 +0100 Subject: [PATCH 32/45] Remove useless comment --- frontend/source/class/dbtoria/module/Main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/source/class/dbtoria/module/Main.js b/frontend/source/class/dbtoria/module/Main.js index 2ed4825..b25a979 100644 --- a/frontend/source/class/dbtoria/module/Main.js +++ b/frontend/source/class/dbtoria/module/Main.js @@ -37,11 +37,10 @@ qx.Class.define("dbtoria.module.Main", { containerLayout.setSeparator("separator-vertical"); this.base(arguments, containerLayout); - // the table tabview var tabview = dbtoria.module.desktop.Desktop.getInstance(); var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); this.add(toolbar); - this.add(tabview, {flex:1}); + this.add(tabview, {flex:1}); } }); From c43e7d4e42abaa7adfe6c1f006fe364ad8349a7b Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:54:51 +0100 Subject: [PATCH 33/45] Make more compact --- frontend/source/class/dbtoria/module/Main.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/frontend/source/class/dbtoria/module/Main.js b/frontend/source/class/dbtoria/module/Main.js index b25a979..758fe2e 100644 --- a/frontend/source/class/dbtoria/module/Main.js +++ b/frontend/source/class/dbtoria/module/Main.js @@ -37,10 +37,7 @@ qx.Class.define("dbtoria.module.Main", { containerLayout.setSeparator("separator-vertical"); this.base(arguments, containerLayout); - var tabview = dbtoria.module.desktop.Desktop.getInstance(); - var toolbar = dbtoria.module.desktop.Toolbar.getInstance(); - - this.add(toolbar); - this.add(tabview, {flex:1}); + this.add(dbtoria.module.desktop.Toolbar.getInstance()); + this.add(dbtoria.module.desktop.Desktop.getInstance(), {flex:1}); } }); From 204c3414f859f5b1ec610d2c4279328dc3618612 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 08:58:55 +0100 Subject: [PATCH 34/45] Remove commented out code --- .../dbtoria/module/database/TablePage.js | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TablePage.js index c33b259..f96a558 100644 --- a/frontend/source/class/dbtoria/module/database/TablePage.js +++ b/frontend/source/class/dbtoria/module/database/TablePage.js @@ -58,34 +58,24 @@ qx.Class.define("dbtoria.module.database.TablePage", { this.base(arguments); this.set({ layout : new qx.ui.layout.VBox().set({ separator: "separator-vertical"}), - showCloseButton: true, + showCloseButton: true, loading : true }); this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); var filterOps = dbtoria.data.Config.getInstance().getFilterOps(); -// this.debug('filterOps='+filterOps); this.__rpc = dbtoria.data.Rpc.getInstance(); this.__buildUi(tableId, viewMode, readOnly); if (viewMode) { -// this.setCaption(this.tr('View: %1', this.__tableName)); this.setLabel(this.tr('View: %1', this.__tableName)); } else { -// this.setCaption(this.tr('Table: %1', this.__tableName)); this.setLabel(this.tr('Table: %1', this.__tableName)); } this.__recordEdit = new dbtoria.module.database.RecordEdit(tableId, tableName, readOnly); this.__recordEdit.addListener('navigation', this.__navigation, this); this.__recordEdit.addListener('refresh', this.__refresh, this); - var root = this.getApplicationRoot(); - this.debug('root='+root); -// root.add(this.__recordEdit); -// this.addListener('close', function() { -// this.__recordEdit.cancel(); -// }, this); -// this.open(); }, members : { @@ -132,9 +122,6 @@ qx.Class.define("dbtoria.module.database.TablePage", { // check if we are in a column referencing another table var references = this.__table.getTableModel().getColumnReferences(); -// this.debug('references='); -// qx.dev.Debug.debugObject(references); -// this.debug('colId='+colId+', col=',+col); if (!references[col]) { this.__table.hideTooltip(); return; @@ -145,20 +132,16 @@ qx.Class.define("dbtoria.module.database.TablePage", { recordId: recordId, columnId: colId }; -// qx.dev.Debug.debugObject(params); -// this.__tooltip.placeToMouse(mouse); this.__refTimer.addListener('interval', function(e) { -// this.debug('timer fired'); this.__refTimer.stop(); var rpc = dbtoria.data.Rpc.getInstance(); - // Get appropriate row from referenced table + // Get appropriate row from referenced table rpc.callAsyncSmart(qx.lang.Function.bind(this.__referenceHandler, this), 'getReferencedRecord', params); }, this); -// this.debug('starting timer'); this.__refTimer.start(); }, @@ -337,8 +320,6 @@ qx.Class.define("dbtoria.module.database.TablePage", { columnIds.push(columns[i].id); columnLabels[columns[i].id] = columns[i].name; columnReferences.push(columns[i].fk); -// that.debug('columns: i='+i); -// qx.dev.Debug.debugObject(columns[i]); } var model = new dbtoria.data.RemoteTableModel(tableId, columnIds, @@ -346,7 +327,6 @@ qx.Class.define("dbtoria.module.database.TablePage", { columnReferences); that.__table = new dbtoria.ui.table.Table(model, that.__tableId); if (that.__refDelay > 0) { -// that.debug('Creating timer'); that.__refTimer = new qx.event.Timer(that.__refDelay); that.__table.addListener('cellChange', that.__cellChange, that); } From 9b1dbf9698ba77028c0ddaac7b6f4118b4899280 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 09:01:35 +0100 Subject: [PATCH 35/45] Removed commented out code --- .../class/dbtoria/module/desktop/Desktop.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/frontend/source/class/dbtoria/module/desktop/Desktop.js b/frontend/source/class/dbtoria/module/desktop/Desktop.js index ee270e8..8af2306 100644 --- a/frontend/source/class/dbtoria/module/desktop/Desktop.js +++ b/frontend/source/class/dbtoria/module/desktop/Desktop.js @@ -25,22 +25,6 @@ qx.Class.define("dbtoria.module.desktop.Desktop", { construct : function() { this.base(arguments); this.setContentPadding(0,0,0,0); - this.debug('Tabview'); - -// var logo = new qx.ui.basic.Label('made with dBtoria').set({ -// font: new qx.bom.Font(60,['Amaranth','sans-serif']), -// textColor: '#eee', -// // alignX: 'center', -// // alignY: 'middle', -// // textAlign: 'center', -// // allowGrowX: true, -// // allowShrinkX: true, -// cursor: 'pointer' -// }); -// logo.addListener('mouseover',function(){logo.setTextColor('#ddd')}); -// logo.addListener('mouseout',function(){logo.setTextColor('#eee')}); -// logo.addListener('click',function(){ qx.bom.Window.open('http://dbtoria.org/', '_blank');}); -// this.add(logo,{right: 40, bottom: 20 }); } }); From 7c4933694754a324e489abe6d0ae0307de40ed8b Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 09:28:04 +0100 Subject: [PATCH 36/45] Rename file temporarily to make pull request work better --- .../dbtoria/module/database/{TablePage.js => TableWindow.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/source/class/dbtoria/module/database/{TablePage.js => TableWindow.js} (100%) diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TableWindow.js similarity index 100% rename from frontend/source/class/dbtoria/module/database/TablePage.js rename to frontend/source/class/dbtoria/module/database/TableWindow.js From 52e13fbad1ca0c738ec447da0bdc913b4928d130 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Thu, 20 Nov 2014 09:30:04 +0100 Subject: [PATCH 37/45] Rename file again to fit with rest of the code --- .../dbtoria/module/database/{TableWindow.js => TablePage.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename frontend/source/class/dbtoria/module/database/{TableWindow.js => TablePage.js} (100%) diff --git a/frontend/source/class/dbtoria/module/database/TableWindow.js b/frontend/source/class/dbtoria/module/database/TablePage.js similarity index 100% rename from frontend/source/class/dbtoria/module/database/TableWindow.js rename to frontend/source/class/dbtoria/module/database/TablePage.js From 80a264e57ccea5e3fd68bbce55ad50ad14674c93 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 08:34:45 +0100 Subject: [PATCH 38/45] Fix indentation --- frontend/source/class/dbtoria/module/database/TablePage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TablePage.js index f96a558..d176f17 100644 --- a/frontend/source/class/dbtoria/module/database/TablePage.js +++ b/frontend/source/class/dbtoria/module/database/TablePage.js @@ -323,8 +323,8 @@ qx.Class.define("dbtoria.module.database.TablePage", { } var model = new dbtoria.data.RemoteTableModel(tableId, columnIds, - columnLabels, - columnReferences); + columnLabels, + columnReferences); that.__table = new dbtoria.ui.table.Table(model, that.__tableId); if (that.__refDelay > 0) { that.__refTimer = new qx.event.Timer(that.__refDelay); From 0b3f07e2b80a2efff1a6d058d33e705e01e529e1 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 09:42:09 +0100 Subject: [PATCH 39/45] Replace all calls to die with die error(). Return sub name for subs that must be overwritten. --- backend/lib/DbToRia/DBI/Pg.pm | 10 +++++----- backend/lib/DbToRia/DBI/base.pm | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index 702f759..966eca0 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -93,7 +93,7 @@ Return name of the database connected to. =cut -sub getDatabaseName { +sub getDatabaseName1 { my $self = shift; my $dsn = $self->{dsn}; @@ -107,15 +107,15 @@ sub getDatabaseName { my $dbh = $self->getDbh(); my $query = "SELECT oid FROM pg_database WHERE datname = '$databaseName'"; my $sth = $dbh->prepare($query); - $sth->execute() or die $sth->errstr; - my $data = $sth->fetchrow_arrayref() or die $sth->errstr; + $sth->execute() or die error(235, $sth->errstr); + my $data = $sth->fetchrow_arrayref() or die error(236, $sth->errstr); my $oid = $data->[0]; $sth->finish; # read database comment $query = "SELECT shobj_description($oid, 'pg_database')"; $sth = $dbh->prepare($query); - $sth->execute() or die $sth->errstr; + $sth->execute() or die error(237, $sth->errstr); $data = $sth->fetchrow_arrayref(); my $databaseRemark = $data->[0]; $sth->finish; @@ -298,7 +298,7 @@ sub getRecord { my $tableIdQ = $dbh->quote_identifier($tableId); my $primaryKey = $dbh->quote_identifier($self->getTableStructure($tableId)->{meta}{primary}[0]); - die "Primary key undefined for table $tableId" unless $primaryKey; + die error(453, "Primary key undefined for table $tableId") unless $primaryKey; my $sth = $dbh->prepare("SELECT * FROM $tableIdQ WHERE $primaryKey = $recordIdQ"); $sth->execute(); my $row = $sth->fetchrow_hashref; diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index a379f7a..ca8e738 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -84,7 +84,7 @@ sub getTableDataChunk { my $lastRow = shift; my $columns = shift; my $opts = shift || {}; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 getRowCount(table,filter) @@ -97,7 +97,7 @@ sub getRowCount { my $self = shift; my $table = shift; my $filter = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 updateTableData(table,selection,data) @@ -111,7 +111,7 @@ sub updateTableData { my $tableId = shift; my $recordId = shift; my $data = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 insertTableData(table,data) @@ -124,7 +124,7 @@ sub insertTableData { my $self = shift; my $tableId = shift; my $data = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 deleteTableData(table,selection) @@ -137,7 +137,7 @@ sub deleteTableData { my $self = shift; my $tableId = shift; my $recordId = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head1 CORE METHODS @@ -185,7 +185,7 @@ Returns a map of tables with associated meta information. sub getAllTables { my $self = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); return $self->{tableList}; } @@ -227,7 +227,7 @@ datatypes to DbToRia compatible datatypes. sub getTableStructureRaw { my $self = shift; my $tableId = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 getTableStructure(table) @@ -277,7 +277,7 @@ sub getRecord { my $self = shift; my $tableId = shift; my $recordId = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 getRecordDeref (table,recordId) @@ -370,7 +370,7 @@ Returns hash of columns with default values. sub getDefaults { my $self = shift; my $tableId = shift; - die "Override in Driver"; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 getDefaultsDeref (table) @@ -408,7 +408,7 @@ Return name of the database connected to. sub getDatabaseName { my $self = shift; - die "Must be overwritten."; + die error(654, (caller(0))[3] . ' must be overwritten in driver'); } =head2 getTables From 46c5b122dbeb46b97ec7ea93a5549c056095b12e Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 09:50:05 +0100 Subject: [PATCH 40/45] Fix sub name --- backend/lib/DbToRia/DBI/Pg.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index 966eca0..624ec2d 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -93,7 +93,7 @@ Return name of the database connected to. =cut -sub getDatabaseName1 { +sub getDatabaseName { my $self = shift; my $dsn = $self->{dsn}; From 547aa816354c132fa3529f2b9e7a740679fd611d Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 09:58:21 +0100 Subject: [PATCH 41/45] Make source-hybrid target available --- frontend/Makefile.am | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/frontend/Makefile.am b/frontend/Makefile.am index d84c8d5..7dc83de 100644 --- a/frontend/Makefile.am +++ b/frontend/Makefile.am @@ -6,18 +6,13 @@ EXTRA_DIST = config.json Manifest.json source/index.html $(shell find source/cla if BUILD_QOOXDOO_APP -GENTARGETS := lint pretty migration translation api +GENTARGETS := lint pretty migration translation api source source-hybrid -.PHONY: $(GENTARGETS) source - -source: source/script/$(CLASS).js +.PHONY: $(GENTARGETS) $(GENTARGETS): $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache $@ -source/script/$(CLASS).js: $(shell find source/class/ -name "*.js") - $(QOOXDOO_PATH)/tool/bin/generator.py -m QOOXDOO_PATH:$(QOOXDOO_PATH) -m CACHE:./cache source - endif clean-local: From 1261f6bd5b2b5172f8e196c63fb6eb66be68095e Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 11:25:48 +0100 Subject: [PATCH 42/45] Code layout --- frontend/source/class/dbtoria/ui/dialog/Login.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/source/class/dbtoria/ui/dialog/Login.js b/frontend/source/class/dbtoria/ui/dialog/Login.js index b400c45..cfc0655 100644 --- a/frontend/source/class/dbtoria/ui/dialog/Login.js +++ b/frontend/source/class/dbtoria/ui/dialog/Login.js @@ -114,8 +114,7 @@ qx.Class.define("dbtoria.ui.dialog.Login", { username : username.getValue(), password : password.getValue() }); - }, - this); + }, this); this.addListener('appear', function() { password.setValue(''); From aa4cd48b9a250ac4901ad427679283f1aa496b05 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 11:27:52 +0100 Subject: [PATCH 43/45] Handle potential backend error --- .../class/dbtoria/module/desktop/Taskbar.js | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/frontend/source/class/dbtoria/module/desktop/Taskbar.js b/frontend/source/class/dbtoria/module/desktop/Taskbar.js index ae476a8..fd40725 100644 --- a/frontend/source/class/dbtoria/module/desktop/Taskbar.js +++ b/frontend/source/class/dbtoria/module/desktop/Taskbar.js @@ -24,16 +24,21 @@ qx.Class.define("dbtoria.module.desktop.Taskbar", { construct : function() { this.base(arguments); - var partInfo = new qx.ui.toolbar.Part(); + var partInfo = new qx.ui.toolbar.Part(); this.add(partInfo); - dbtoria.data.Rpc.getInstance().callAsyncSmart( function(name){ - var databaseName = new qx.ui.basic.Label().set({ - alignY: 'middle', - value: name, - padding: 5 - }); - partInfo.add(databaseName); - },'getConnectionInfo'); + dbtoria.data.Rpc.getInstance().callAsyncSmart( function(name, exc){ + if (exc) { + dbtoria.ui.dialog.MsgBox.getInstance().exc(exc); + } + else { + var databaseName = new qx.ui.basic.Label().set({ + alignY: 'middle', + value: name, + padding: 5 + }); + partInfo.add(databaseName); + } + }, 'getConnectionInfo'); this.add(new qx.ui.toolbar.Separator()); From 800b1aae671edc097cfaa4c45abac5cce7380605 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 11:42:03 +0100 Subject: [PATCH 44/45] Make ref_popup disabled by default and make enabling explicit --- backend/lib/DbToRia/Config.pm | 7 +++++-- backend/lib/DbToRia/RpcService.pm | 5 ++++- frontend/source/class/dbtoria/data/Config.js | 5 ++--- frontend/source/class/dbtoria/module/database/TablePage.js | 7 +++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/backend/lib/DbToRia/Config.pm b/backend/lib/DbToRia/Config.pm index 58e3a68..f63d266 100644 --- a/backend/lib/DbToRia/Config.pm +++ b/backend/lib/DbToRia/Config.pm @@ -141,14 +141,17 @@ sub _make_parser { _mandatory => [qw(General)], General => { _doc => 'Global configuration settings for DbToRia', - _vars => [ qw(dsn mojo_secret log_file log_level schema encoding ref_delay) ], + _vars => [ qw(dsn mojo_secret log_file log_level schema encoding ref_popup_enabled ref_popup_delay) ], _mandatory => [ qw(dsn mojo_secret) ], dsn => { _doc => 'DBI connect string', _example=>'dbi:Pg:dbname=testdb' }, mojo_secret => { _doc => 'secret for signing mojo cookies' }, schema => { _doc => 'which schema should we prowl for data?' }, log_file => { _doc => 'write a log file to this location'}, log_level => { _doc => 'mojo log level'}, - ref_delay => { _doc => 'delay for reference popup' }, + ref_popup_enabled => { _doc => 'Reference popup enabled if true', _default => 0 }, + ref_popup_delay => { _doc => 'Delay for reference popup in msec', _default => 500, + _re => '[0-9]+', _re_error => 'ref_popup_delay must be an integer >=0' + }, }, MetaEngines => { _doc => 'Modules for adding meta information to the database', diff --git a/backend/lib/DbToRia/RpcService.pm b/backend/lib/DbToRia/RpcService.pm index e3761da..753f319 100644 --- a/backend/lib/DbToRia/RpcService.pm +++ b/backend/lib/DbToRia/RpcService.pm @@ -14,6 +14,7 @@ server functions =cut use Mojo::Base qw(Mojolicious::Plugin::Qooxdoo::JsonRpcController); +use Mojo::JSON; has service => sub { 'DbToRia' }; @@ -223,7 +224,9 @@ sub getConfig { my $gcfg = $self->cfg->{General}; return { filterOps => $self->DBI->getFilterOpsArray(@_), - refDelay => $gcfg->{ref_delay}, + refPopup => { enabled => $gcfg->{ref_popup_enabled} ? Mojo::JSON->true : Mojo::JSON->false, + delay => $gcfg->{ref_popup_delay}, + } }; } diff --git a/frontend/source/class/dbtoria/data/Config.js b/frontend/source/class/dbtoria/data/Config.js index d2d1e6e..719731c 100644 --- a/frontend/source/class/dbtoria/data/Config.js +++ b/frontend/source/class/dbtoria/data/Config.js @@ -40,8 +40,7 @@ qx.Class.define( 'dbtoria.data.Config', // check: "String", nullable: true }, - refDelay: { init: null, - check: "Integer", + refPopup: { init: null, nullable: true } }, @@ -79,7 +78,7 @@ qx.Class.define( 'dbtoria.data.Config', __refreshHandler: function(data,exc,id) { if (exc == null) { this.setFilterOps(data.filterOps); - this.setRefDelay(Number(data.refDelay)); + this.setRefPopup(data.refPopup); this.fireEvent('configUpdate'); this.__loaded = true; } diff --git a/frontend/source/class/dbtoria/module/database/TablePage.js b/frontend/source/class/dbtoria/module/database/TablePage.js index d176f17..8afb6ef 100644 --- a/frontend/source/class/dbtoria/module/database/TablePage.js +++ b/frontend/source/class/dbtoria/module/database/TablePage.js @@ -62,7 +62,6 @@ qx.Class.define("dbtoria.module.database.TablePage", { loading : true }); - this.__refDelay = dbtoria.data.Config.getInstance().getRefDelay(); var filterOps = dbtoria.data.Config.getInstance().getFilterOps(); this.__rpc = dbtoria.data.Rpc.getInstance(); @@ -93,7 +92,6 @@ qx.Class.define("dbtoria.module.database.TablePage", { __viewMode: null, __readOnly: null, __filter: null, - __refDelay: null, __refTimer: null, __dataChangedHandler: null, @@ -321,13 +319,14 @@ qx.Class.define("dbtoria.module.database.TablePage", { columnLabels[columns[i].id] = columns[i].name; columnReferences.push(columns[i].fk); } + var refPopup = dbtoria.data.Config.getInstance().getRefPopup(); var model = new dbtoria.data.RemoteTableModel(tableId, columnIds, columnLabels, columnReferences); that.__table = new dbtoria.ui.table.Table(model, that.__tableId); - if (that.__refDelay > 0) { - that.__refTimer = new qx.event.Timer(that.__refDelay); + if (refPopup.enabled) { + that.__refTimer = new qx.event.Timer(Number(refPopup.delay)); that.__table.addListener('cellChange', that.__cellChange, that); } From 220627bb4034817d12179326e8bd6c42f54c1417 Mon Sep 17 00:00:00 2001 From: Fritz Zaucker Date: Fri, 21 Nov 2014 11:45:56 +0100 Subject: [PATCH 45/45] Use published interface for Mojo::JSON true/false instead of accessing internal variables --- backend/lib/DbToRia/DBI/Pg.pm | 4 ++-- backend/lib/DbToRia/DBI/SQLite.pm | 2 +- backend/lib/DbToRia/DBI/base.pm | 9 +++++---- backend/lib/DbToRia/Meta/GedafeMeta.pm | 4 ++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/backend/lib/DbToRia/DBI/Pg.pm b/backend/lib/DbToRia/DBI/Pg.pm index 624ec2d..8819aad 100644 --- a/backend/lib/DbToRia/DBI/Pg.pm +++ b/backend/lib/DbToRia/DBI/Pg.pm @@ -154,7 +154,7 @@ sub getAllTables { type => $tableType, name => $tableName, remark => $table->{REMARKS}, - readOnly => $readOnly ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE, + readOnly => $readOnly ? Mojo::JSON->true : Mojo::JSON->false, }; } @@ -431,7 +431,7 @@ sub getTableDataChunk { my @data; while ( my @row = $sth->fetchrow_array ) { my @new_row; - $new_row[0] = [ $row[0], $Mojo::JSON::TRUE, $Mojo::JSON::TRUE ]; + $new_row[0] = [ $row[0], Mojo::JSON->true, Mojo::JSON->true ]; for (my $i=1;$i<=$#row;$i++){ $new_row[$i] = $self->dbToFe($row[$i],$typeMap->{$sth->{NAME}[$i]}); } diff --git a/backend/lib/DbToRia/DBI/SQLite.pm b/backend/lib/DbToRia/DBI/SQLite.pm index 98c3b64..67e0a85 100644 --- a/backend/lib/DbToRia/DBI/SQLite.pm +++ b/backend/lib/DbToRia/DBI/SQLite.pm @@ -304,7 +304,7 @@ sub getTableDataChunk { my @data; while ( my @row = $sth->fetchrow_array ) { my @new_row; - $new_row[0] = [ $row[0], $Mojo::JSON::TRUE, $Mojo::JSON::TRUE ]; + $new_row[0] = [ $row[0], Mojo::JSON->true, Mojo::JSON->true ]; for (my $i=1;$i<=$#row;$i++){ $new_row[$i] = $self->dbToFe($row[$i],$typeMap->{$sth->{NAME}[$i]}); } diff --git a/backend/lib/DbToRia/DBI/base.pm b/backend/lib/DbToRia/DBI/base.pm index ca8e738..3020f53 100644 --- a/backend/lib/DbToRia/DBI/base.pm +++ b/backend/lib/DbToRia/DBI/base.pm @@ -27,6 +27,7 @@ use warnings; use DbToRia::Exception qw(error); use Storable qw(dclone); use Mojo::Base -base; +use Mojo::JSON; has 'dsn'; has 'encoding'; @@ -440,7 +441,7 @@ sub prepListView { my @return; for my $row (@{$structure->{columns}}){ next if $row->{hidden}; - my $fk = defined $row->{references} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; + my $fk = defined $row->{references} ? Mojo::JSON->true : Mojo::JSON->false; $row->{fk} = $fk; push @return, { map { $_ => $row->{$_} } qw (id type name size fk) }; }; @@ -487,9 +488,9 @@ sub getEditView { label => $col->{name}, }; # can never edit a primary key - $c->{readOnly} = $Mojo::JSON::TRUE if $col->{primary}; + $c->{readOnly} = Mojo::JSON->true if $col->{primary}; # tell the FE we have a primary key - $c->{primaryKey} = $col->{primary} ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; + $c->{primaryKey} = $col->{primary} ? Mojo::JSON->true : Mojo::JSON->false; $c->{required} = $col->{required}; $c->{check} = $col->{check}; if ($col->{references}){ @@ -662,7 +663,7 @@ sub dbToFe { my $type = shift; my $ourtype = $self->mapType($type); if ($ourtype eq 'boolean' and defined $value){ - $value = int($value) ? $Mojo::JSON::TRUE : $Mojo::JSON::FALSE; + $value = int($value) ? Mojo::JSON->true : Mojo::JSON->false; } return $value; } diff --git a/backend/lib/DbToRia/Meta/GedafeMeta.pm b/backend/lib/DbToRia/Meta/GedafeMeta.pm index a9fc0b7..e5baff4 100644 --- a/backend/lib/DbToRia/Meta/GedafeMeta.pm +++ b/backend/lib/DbToRia/Meta/GedafeMeta.pm @@ -179,14 +179,14 @@ sub massageEditView { $row->{type} = 'TimeField'; } elsif ($widget eq 'readonly') { - $row->{readOnly} = $Mojo::JSON::TRUE; + $row->{readOnly} = Mojo::JSON->true; } } for my $table (keys %{$self->{metaFields}}) { next unless exists $self->{metaFields}{$table}{$field}{copy}; my $copy = $self->{metaFields}{$table}{$field}{copy}; if ($copy) { - $row->{copyForward} = $Mojo::JSON::TRUE; + $row->{copyForward} = Mojo::JSON->true; } } }