[gnome-calculator/60-split-out-a-backend-library] Fixing main app build
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calculator/60-split-out-a-backend-library] Fixing main app build
- Date: Sat, 5 Jan 2019 16:32:39 +0000 (UTC)
commit 788f02a7fc6e39e35a515562831d2455faef77e2
Author: Daniel Espinosa Ortiz <esodan gmail com>
Date: Sat Jan 5 10:30:27 2019 -0600
Fixing main app build
* internal lib namespace changed to Calc
* Added dependencies to all other using GCalc
* Fixing Flatpak build
gcalc/gcalc.deps.in | 2 +-
gcalc/meson.build | 2 +-
lib/currency.vala | 2 +-
lib/equation-lexer.vala | 2 +-
lib/equation-parser.vala | 2 +-
lib/equation.vala | 2 +-
lib/financial.vala | 2 +-
lib/function-manager.vala | 2 +-
lib/math-equation.vala | 2 +-
lib/math-function.vala | 2 +-
lib/math-variables.vala | 2 +-
lib/number.vala | 2 +-
lib/serializer.vala | 2 +-
lib/unit-manager.vala | 2 +-
meson_options.txt | 3 ++-
org.gnome.Calculator.json | 16 ++++++++++++++++
search-provider/meson.build | 1 +
src/gcalccmd.vala | 2 +-
src/gnome-calculator.vala | 1 +
src/math-buttons.vala | 2 +-
src/math-converter.vala | 2 +-
src/math-display.vala | 2 +-
src/math-function-popover.vala | 2 +-
src/math-history.vala | 2 +-
src/math-preferences.vala | 2 +-
src/math-variable-popover.vala | 2 +-
src/meson.build | 2 ++
tests/test-equation.vala | 2 +-
tests/test-number.vala | 2 +-
tests/test-serializer.vala | 2 +-
30 files changed, 47 insertions(+), 26 deletions(-)
---
diff --git a/gcalc/gcalc.deps.in b/gcalc/gcalc.deps.in
index a93f7664..23d423ce 100644
--- a/gcalc/gcalc.deps.in
+++ b/gcalc/gcalc.deps.in
@@ -1,3 +1,3 @@
gio-2.0
-gee
+gee-0.8
libvala-@VALA_API_VERSION@
diff --git a/gcalc/meson.build b/gcalc/meson.build
index cf90d38c..eb487e09 100644
--- a/gcalc/meson.build
+++ b/gcalc/meson.build
@@ -171,7 +171,7 @@ lib = library(VERSIONED_PROJECT_NAME,
])
g_ir_compiler = find_program('g-ir-compiler', required: false)
-if g_ir_compiler.found()
+if g_ir_compiler.found() and not get_option('disable-introspection')
custom_target('typelib',
command: [
g_ir_compiler,
diff --git a/lib/currency.vala b/lib/currency.vala
index f81fa9cf..90ddee2f 100644
--- a/lib/currency.vala
+++ b/lib/currency.vala
@@ -16,7 +16,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
static bool downloading_imf_rates = false;
static bool downloading_ecb_rates = false;
static bool loaded_rates = false;
diff --git a/lib/equation-lexer.vala b/lib/equation-lexer.vala
index ec8cd5db..a1b45f80 100644
--- a/lib/equation-lexer.vala
+++ b/lib/equation-lexer.vala
@@ -17,7 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
/* Enum for tokens generated by pre-lexer and lexer. */
public enum LexerTokenType
{
diff --git a/lib/equation-parser.vala b/lib/equation-parser.vala
index d43f1eeb..6e14485b 100644
--- a/lib/equation-parser.vala
+++ b/lib/equation-parser.vala
@@ -17,7 +17,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
/* Operator Associativity. */
public enum Associativity
{
diff --git a/lib/equation.vala b/lib/equation.vala
index 4004c54c..c214083e 100644
--- a/lib/equation.vala
+++ b/lib/equation.vala
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
public int sub_atoi (string data)
{
const unichar digits[] = {'₀', '₁', '₂', '₃', '₄', '₅', '₆', '₇', '₈', '₉'};
diff --git a/lib/financial.vala b/lib/financial.vala
index dd1a7eca..a81cacc3 100644
--- a/lib/financial.vala
+++ b/lib/financial.vala
@@ -8,7 +8,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
- using GCalc;
+ using Calc;
public enum FinancialDialog
{
diff --git a/lib/function-manager.vala b/lib/function-manager.vala
index d2d34eab..810d6263 100644
--- a/lib/function-manager.vala
+++ b/lib/function-manager.vala
@@ -9,7 +9,7 @@
* license.
*/
-namespace GCalc {
+namespace Calc {
private FunctionManager? default_function_manager = null;
public class FunctionManager : Object
diff --git a/lib/math-equation.vala b/lib/math-equation.vala
index 61379aef..ce188d7a 100644
--- a/lib/math-equation.vala
+++ b/lib/math-equation.vala
@@ -9,7 +9,7 @@
* license.
*/
-using GCalc;
+using Calc;
public enum NumberMode
{
diff --git a/lib/math-function.vala b/lib/math-function.vala
index a8ebb0b7..bc91bb77 100644
--- a/lib/math-function.vala
+++ b/lib/math-function.vala
@@ -9,7 +9,7 @@
* license.
*/
-namespace GCalc {
+namespace Calc {
public class MathFunction : Object
{
private string _name;
diff --git a/lib/math-variables.vala b/lib/math-variables.vala
index d180a53b..d85dde06 100644
--- a/lib/math-variables.vala
+++ b/lib/math-variables.vala
@@ -16,7 +16,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
public class MathVariables : Object
{
private string file_name;
diff --git a/lib/number.vala b/lib/number.vala
index abe42097..35f1746d 100644
--- a/lib/number.vala
+++ b/lib/number.vala
@@ -30,7 +30,7 @@
using MPC;
-namespace GCalc {
+namespace Calc {
private delegate int BitwiseFunc (int v1, int v2);
diff --git a/lib/serializer.vala b/lib/serializer.vala
index 442a3368..ef144233 100644
--- a/lib/serializer.vala
+++ b/lib/serializer.vala
@@ -10,7 +10,7 @@
* license.
*/
-namespace GCalc {
+namespace Calc {
public enum DisplayFormat
{
AUTOMATIC,
diff --git a/lib/unit-manager.vala b/lib/unit-manager.vala
index 0555e501..71cae8b2 100644
--- a/lib/unit-manager.vala
+++ b/lib/unit-manager.vala
@@ -16,7 +16,7 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-namespace GCalc {
+namespace Calc {
private UnitManager? default_unit_manager = null;
public class UnitManager : Object
diff --git a/meson_options.txt b/meson_options.txt
index 1daa8b3a..96472bb7 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,2 +1,3 @@
option('disable-ui', type : 'boolean', value : false, description : 'Disable GTK+ program')
-option('vala-version', type: 'string', value : '', description : 'Use another version of Vala (only the
latest is officially supported)')
\ No newline at end of file
+option('vala-version', type: 'string', value : '', description : 'Use another version of Vala (only the
latest is officially supported)')
+option('disable-introspection', type : 'boolean', value : false, description : 'Disable GObject
Introspection Typelib generation')
\ No newline at end of file
diff --git a/org.gnome.Calculator.json b/org.gnome.Calculator.json
index 4852e4e2..7ffbafd7 100644
--- a/org.gnome.Calculator.json
+++ b/org.gnome.Calculator.json
@@ -75,9 +75,25 @@
}
]
},
+ {
+ "name" : "gee",
+ "config-opts" : [
+ "--disable-introspection"
+ ],
+ "sources" : [
+ {
+ "type" : "archive",
+ "url" : "https://download.gnome.org/sources/libgee/0.20/libgee-0.20.1.tar.xz",
+ "sha256" : "bb2802d29a518e8c6d2992884691f06ccfcc25792a5686178575c7111fea4630"
+ }
+ ]
+ },
{
"name" : "gnome-calculator",
"buildsystem" : "meson",
+ "config-opts" : [
+ "-Ddisable-introspection=true"
+ ],
"sources" : [
{
"type" : "git",
diff --git a/search-provider/meson.build b/search-provider/meson.build
index 6157c494..4283855d 100644
--- a/search-provider/meson.build
+++ b/search-provider/meson.build
@@ -11,6 +11,7 @@ search_provider_deps = [
mpc,
mpfr,
posix,
+ gee,
inc_rooth_dep
]
diff --git a/src/gcalccmd.vala b/src/gcalccmd.vala
index 97956dd3..f662fbf7 100644
--- a/src/gcalccmd.vala
+++ b/src/gcalccmd.vala
@@ -8,7 +8,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
private const int MAXLINE = 1024;
diff --git a/src/gnome-calculator.vala b/src/gnome-calculator.vala
index 9f001a32..be33216b 100644
--- a/src/gnome-calculator.vala
+++ b/src/gnome-calculator.vala
@@ -8,6 +8,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
+using Calc;
using GCalc;
public class Calculator : Gtk.Application
diff --git a/src/math-buttons.vala b/src/math-buttons.vala
index 1ad74f20..93603888 100644
--- a/src/math-buttons.vala
+++ b/src/math-buttons.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
public enum ButtonMode
{
diff --git a/src/math-converter.vala b/src/math-converter.vala
index a91ca257..0a013346 100644
--- a/src/math-converter.vala
+++ b/src/math-converter.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
[GtkTemplate (ui = "/org/gnome/calculator/math-converter.ui")]
public class MathConverter : Gtk.Grid
diff --git a/src/math-display.vala b/src/math-display.vala
index da3b8eed..6188cb07 100644
--- a/src/math-display.vala
+++ b/src/math-display.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
public class MathDisplay : Gtk.Viewport
{
diff --git a/src/math-function-popover.vala b/src/math-function-popover.vala
index 641b2a7d..5c1e2604 100644
--- a/src/math-function-popover.vala
+++ b/src/math-function-popover.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
[GtkTemplate (ui = "/org/gnome/calculator/math-function-popover.ui")]
public class MathFunctionPopover : Gtk.Popover
diff --git a/src/math-history.vala b/src/math-history.vala
index 403b5c6e..478eadf4 100644
--- a/src/math-history.vala
+++ b/src/math-history.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
[GtkTemplate (ui = "/org/gnome/calculator/history-view.ui")]
public class HistoryView : Gtk.ScrolledWindow
diff --git a/src/math-preferences.vala b/src/math-preferences.vala
index 62b46528..c4f6c6f2 100644
--- a/src/math-preferences.vala
+++ b/src/math-preferences.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
public class MathPreferencesDialog : Gtk.Dialog
{
diff --git a/src/math-variable-popover.vala b/src/math-variable-popover.vala
index 7b5b3fd2..cfa75cb0 100644
--- a/src/math-variable-popover.vala
+++ b/src/math-variable-popover.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
[GtkTemplate (ui = "/org/gnome/calculator/math-variable-popover.ui")]
public class MathVariablePopover : Gtk.Popover
diff --git a/src/meson.build b/src/meson.build
index a3c77dca..8b06a641 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -27,6 +27,7 @@ gnome_calculator_deps = [
mpc,
mpfr,
posix,
+ gee,
inc_rooth_dep
]
@@ -70,6 +71,7 @@ gcalccmd_deps = [
mpc,
mpfr,
posix,
+ gee,
inc_rooth_dep
]
diff --git a/tests/test-equation.vala b/tests/test-equation.vala
index 122ae60e..4e5bdb4a 100644
--- a/tests/test-equation.vala
+++ b/tests/test-equation.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
private int number_base = 10;
private int wordlen = 32;
diff --git a/tests/test-number.vala b/tests/test-number.vala
index 1ca09d41..17826efc 100644
--- a/tests/test-number.vala
+++ b/tests/test-number.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
private int fail_count = 0;
private int pass_count = 0;
diff --git a/tests/test-serializer.vala b/tests/test-serializer.vala
index 627b39d2..a9ef6229 100644
--- a/tests/test-serializer.vala
+++ b/tests/test-serializer.vala
@@ -7,7 +7,7 @@
* version. See http://www.gnu.org/copyleft/gpl.html the full text of the
* license.
*/
-using GCalc;
+using Calc;
private int fail_count = 0;
private int pass_count = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]