Skip to content

Commit

Permalink
Merge branch 'configuration' into 'master'
Browse files Browse the repository at this point in the history
[sailfishos][configuration] Configure application as mobile/sailfishos. JB#51366

See merge request mer-core/gecko-dev!159
  • Loading branch information
rainemak committed Oct 19, 2020
2 parents eb159d7 + 40191c3 commit c2ab645
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 2 deletions.
111 changes: 111 additions & 0 deletions rpm/0040-sailfishos-configuration-Configure-application-as-mo.patch
@@ -0,0 +1,111 @@
From ed5c88a01b2c6d0ebc89094d49913cbf06ac34ee Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Mon, 19 Oct 2020 13:40:23 +0300
Subject: [PATCH 40/40] [sailfishos][configuration] Configure application as
mobile/sailfishos. JB#51366

This doesn't fix yet the issue with msn.com but at least this
aligns a bit the build system with Android FF.

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
dom/base/moz.build | 4 +++-
dom/bindings/moz.build | 4 +++-
dom/webidl/moz.build | 6 ++++--
embedding/embedlite/config/mozconfig.merqtxulrunner | 2 +-
mobile/sailfishos | 1 +
toolkit/themes/moz.build | 4 ++--
7 files changed, 14 insertions(+), 7 deletions(-)
create mode 120000 mobile/sailfishos

diff --git a/dom/base/moz.build b/dom/base/moz.build
index f56ca8883a73..da1809171ac7 100644
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -468,7 +468,9 @@ include('/ipc/chromium/chromium-config.mozbuild')

FINAL_LIBRARY = 'xul'

-if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+app = CONFIG['MOZ_BUILD_APP']
+
+if app in ['browser', 'xulrunner'] or app.startswith('mobile/'):
DEFINES['HAVE_SIDEBAR'] = True

if CONFIG['MOZ_X11']:
diff --git a/dom/bindings/moz.build b/dom/bindings/moz.build
index dfe45219913b..cf9fbcee323d 100644
--- a/dom/bindings/moz.build
+++ b/dom/bindings/moz.build
@@ -157,7 +157,9 @@ SPHINX_PYTHON_PACKAGE_DIRS += ['mozwebidlcodegen']
with Files('mozwebidlcodegen/**.py'):
SCHEDULES.inclusive += ['docs']

-if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+app = CONFIG['MOZ_BUILD_APP']
+
+if app in ['browser', 'xulrunner'] or app.startswith('mobile/'):
# This is needed for Window.webidl
DEFINES['HAVE_SIDEBAR'] = True

diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index afe307c9cd64..145a4712b074 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -1092,12 +1092,14 @@ if CONFIG['MOZ_WEBSPEECH']:
'SpeechSynthesisEvent.webidl',
]

-if CONFIG['MOZ_BUILD_APP'] in ['browser', 'xulrunner'] or CONFIG['MOZ_SUITE']:
+app = CONFIG['MOZ_BUILD_APP']
+
+if app in ['browser', 'xulrunner'] or CONFIG['MOZ_SUITE']:
WEBIDL_FILES += [
'BrowserFeedWriter.webidl',
]

-if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
+if app in ['browser', 'xulrunner'] or app.startswith('mobile/'):
WEBIDL_FILES += [
'External.webidl',
]
diff --git a/embedding/embedlite/config/mozconfig.merqtxulrunner b/embedding/embedlite/config/mozconfig.merqtxulrunner
index 869234fc87b6..320788664dff 100644
--- a/embedding/embedlite/config/mozconfig.merqtxulrunner
+++ b/embedding/embedlite/config/mozconfig.merqtxulrunner
@@ -21,7 +21,7 @@ ac_add_options --enable-system-sqlite
ac_add_options --without-x
ac_add_options --with-gl-provider=EGL

-ac_add_options --enable-application=embedding/embedlite
+ac_add_options --enable-application=mobile/sailfishos
ac_add_options --enable-update-channel=nightly
ac_add_options --enable-tests
ac_add_options --enable-default-toolkit=cairo-qt
diff --git a/mobile/sailfishos b/mobile/sailfishos
new file mode 120000
index 000000000000..f3fdb3e9df78
--- /dev/null
+++ b/mobile/sailfishos
@@ -0,0 +1 @@
+../embedding/embedlite
\ No newline at end of file
diff --git a/toolkit/themes/moz.build b/toolkit/themes/moz.build
index 468ea128786f..d0871da7c8f5 100644
--- a/toolkit/themes/moz.build
+++ b/toolkit/themes/moz.build
@@ -20,9 +20,9 @@ app = CONFIG['MOZ_BUILD_APP']

if toolkit == 'cocoa':
DIRS += ['osx']
-elif toolkit in ('gtk3', 'qt'):
+elif toolkit in ('gtk3'):
DIRS += ['linux']
-elif app == 'mobile/android':
+elif app.startswith('mobile/'):
DIRS += ['mobile']
else:
DIRS += ['windows']
--
2.26.2

1 change: 1 addition & 0 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -82,6 +82,7 @@ Patch36: 0036-sailfishos-qt-Initialize-FreeType-library-properly.-.patch
Patch37: 0037-sailfishos-disable-TLS-1.0-and-1.1.patch
Patch38: 0038-sailfishos-gecko-Use-registered-IHistory-service-imp.patch
Patch39: 0039-sailfishos-gecko-Suppress-LoginManagerContent.jsm-ow.patch
Patch40: 0040-sailfishos-configuration-Configure-application-as-mo.patch

BuildRequires: rust
BuildRequires: rust-std-static
Expand Down
6 changes: 4 additions & 2 deletions toolkit/components/search/moz.build
Expand Up @@ -11,8 +11,10 @@ EXTRA_COMPONENTS += [
'nsSearchSuggestions.js',
]

if CONFIG['MOZ_BUILD_APP'] in ['browser', 'mobile/android', 'xulrunner']:
DEFINES['HAVE_SIDEBAR'] = True
app = CONFIG['MOZ_BUILD_APP']

if app in ['browser', 'xulrunner'] or app.startswith('mobile/'):
DEFINES['HAVE_SIDEBAR'] = True
EXTRA_COMPONENTS += [
'nsSidebar.js',
]
Expand Down

0 comments on commit c2ab645

Please sign in to comment.