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

[tor-commits] [tor-browser/geckoview-96.0-11.5-1] fixup! TB3: Tor Browser's official .mozconfigs.



commit c025288dbe5b2cc1280f9f2e192e395217659310
Author: Pier Angelo Vendrame <pierov@xxxxxxxxxxxxxx>
Date:   Wed Jan 26 15:23:42 2022 +0100

    fixup! TB3: Tor Browser's official .mozconfigs.
    
    This fixes bug #40793.
---
 build/moz.configure/old.configure |  5 ---
 moz.configure                     | 81 +++++++++++++++++++++++++++++++++++++++
 old-configure.in                  | 49 -----------------------
 3 files changed, 81 insertions(+), 54 deletions(-)

diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index 5c144e5c8b45..e3974613d6a1 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -122,11 +122,6 @@ def old_configure_options(*options):
     "--with-user-appdir",
     "--x-includes",
     "--x-libraries",
-    # Tor additions.
-    "--with-tor-browser-version",
-    "--enable-tor-browser-update",
-    "--enable-tor-browser-data-outside-app-dir",
-    "--enable-tor-launcher",
 )
 def prepare_configure_options(host, target, all_options, *options):
     # old-configure only supports the options listed in @old_configure_options
diff --git a/moz.configure b/moz.configure
index 3d742a890443..d769e09f18c8 100755
--- a/moz.configure
+++ b/moz.configure
@@ -1136,6 +1136,87 @@ set_config("MOZ_SYSTEM_ZLIB", True, when="--with-system-zlib")
 add_old_configure_assignment("MOZ_SYSTEM_ZLIB", True, when="--with-system-zlib")
 
 
+# Tor additions.
+
+option(
+    "--with-tor-browser-version",
+    nargs=1,
+    help="Set Tor Browser version, e.g., 7.0a1"
+)
+
+
+@depends("--with-tor-browser-version")
+def tor_browser_version(value):
+    if not value:
+        die("--with-tor-browser-version is required for Tor Browser.")
+    return value[0]
+
+
+@depends("--with-tor-browser-version")
+def tor_browser_version_quoted(value):
+    if not value:
+        die("--with-tor-browser-version is required for Tor Browser.")
+    return '"{}"'.format(value[0])
+
+
+set_config("TOR_BROWSER_VERSION", tor_browser_version)
+set_define("TOR_BROWSER_VERSION", tor_browser_version)
+set_define("TOR_BROWSER_VERSION_QUOTED", tor_browser_version_quoted)
+
+
+option(
+    "--enable-tor-browser-update",
+    help="Enable Tor Browser update"
+)
+
+
+@depends("--enable-tor-browser-update")
+def tor_browser_update(value):
+    if value:
+        return True
+
+
+set_config("TOR_BROWSER_UPDATE", tor_browser_update)
+set_define("TOR_BROWSER_UPDATE", tor_browser_update)
+add_old_configure_assignment("TOR_BROWSER_UPDATE", tor_browser_update)
+
+
+option(
+    "--enable-tor-browser-data-outside-app-dir",
+    help="Enable Tor Browser data outside of app directory"
+)
+
+
+@depends("--enable-tor-browser-data-outside-app-dir")
+def tor_browser_data_outside_app_dir(value):
+    if value:
+        return True
+
+
+set_define(
+    "TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
+add_old_configure_assignment(
+    "TOR_BROWSER_DATA_OUTSIDE_APP_DIR", tor_browser_data_outside_app_dir)
+
+
+option(
+    "--disable-tor-launcher",
+    help="Do not include Tor Launcher"
+)
+
+
+@depends("--disable-tor-launcher")
+def tor_browser_disable_launcher(value):
+    if not value:
+        return True
+
+
+set_config("TOR_BROWSER_DISABLE_TOR_LAUNCHER", tor_browser_disable_launcher)
+set_define("TOR_BROWSER_DISABLE_TOR_LAUNCHER", tor_browser_disable_launcher)
+add_old_configure_assignment(
+    "TOR_BROWSER_DISABLE_TOR_LAUNCHER", tor_browser_disable_launcher)
+
+
 # Please do not add configure checks from here on.
 
 # Fallthrough to autoconf-based configure
diff --git a/old-configure.in b/old-configure.in
index ebeb62640acd..d1479574d1c7 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -1808,55 +1808,6 @@ if test -n "$MOZ_UPDATER"; then
     AC_DEFINE(MOZ_UPDATER)
 fi
 
-dnl ========================================================
-dnl Tor additions
-dnl ========================================================
-MOZ_ARG_WITH_STRING(tor-browser-version,
-[  --with-tor-browser-version=VERSION
-                          Set Tor Browser version, e.g., 7.0a1],
-    TOR_BROWSER_VERSION="$withval")
-
-if test -z "$TOR_BROWSER_VERSION"; then
-    AC_MSG_ERROR([--with-tor-browser-version is required for Tor Browser.])
-fi
-
-MOZ_ARG_ENABLE_BOOL(tor-browser-update,
-[  --enable-tor-browser-update
-                          Enable Tor Browser update],
-    TOR_BROWSER_UPDATE=1,
-    TOR_BROWSER_UPDATE= )
-
-if test -n "$TOR_BROWSER_UPDATE"; then
-    AC_DEFINE(TOR_BROWSER_UPDATE)
-fi
-
-MOZ_ARG_ENABLE_BOOL(tor-browser-data-outside-app-dir,
-[  --enable-tor-browser-data-outside-app-dir
-                          Enable Tor Browser data outside of app directory],
-    TOR_BROWSER_DATA_OUTSIDE_APP_DIR=1,
-    TOR_BROWSER_DATA_OUTSIDE_APP_DIR= )
-
-if test -n "$TOR_BROWSER_DATA_OUTSIDE_APP_DIR"; then
-    AC_DEFINE(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
-fi
-
-AC_DEFINE_UNQUOTED(TOR_BROWSER_VERSION,$TOR_BROWSER_VERSION)
-AC_DEFINE_UNQUOTED(TOR_BROWSER_VERSION_QUOTED,"$TOR_BROWSER_VERSION")
-AC_SUBST(TOR_BROWSER_UPDATE)
-AC_SUBST(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
-
-MOZ_ARG_DISABLE_BOOL(tor-launcher,
-[  --disable-tor-launcher
-                          Do not include Tor Launcher],
-   TOR_BROWSER_DISABLE_TOR_LAUNCHER=1,
-   TOR_BROWSER_DISABLE_TOR_LAUNCHER=)
-
-if test -n "$TOR_BROWSER_DISABLE_TOR_LAUNCHER"; then
-    AC_DEFINE(TOR_BROWSER_DISABLE_TOR_LAUNCHER)
-fi
-
-AC_SUBST(TOR_BROWSER_DISABLE_TOR_LAUNCHER)
-
 dnl ========================================================
 dnl parental controls (for Windows Vista)
 dnl ========================================================

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits