Blame SOURCES/disable-mozglue.patch

1417c8
From 7e6d628456af3e99ebcb9a01a27e1461585082a4 Mon Sep 17 00:00:00 2001
1417c8
From: Till Schneidereit <till@tillschneidereit.net>
1417c8
Date: Thu, 1 Oct 2015 12:59:09 +0200
1417c8
Subject: [PATCH] Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all
1417c8
 platforms
1417c8
1417c8
Otherwise, build fails not being able to find HashBytes.
1417c8
1417c8
Patch ported forward to mozjs52 by Philip Chimento
1417c8
<philip.chimento@gmail.com>.
1417c8
1417c8
https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
1417c8
---
1417c8
 js/src/old-configure.in | 23 ++++++++++++++---------
1417c8
 mozglue/build/moz.build |  2 +-
1417c8
 2 files changed, 15 insertions(+), 10 deletions(-)
1417c8
1417c8
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
1417c8
index 1c5c9e21..ff0617e3 100644
1417c8
--- a/js/src/old-configure.in
1417c8
+++ b/js/src/old-configure.in
1417c8
@@ -1623,16 +1623,21 @@ dnl ========================================================
1417c8
 dnl = Enable jemalloc
1417c8
 dnl ========================================================
1417c8
 
1417c8
-case "${OS_TARGET}" in
1417c8
-Android|WINNT|Darwin)
1417c8
+dnl In stand-alone builds we always only want to link executables against mozglue.
1417c8
+if test "$JS_STANDALONE"; then
1417c8
   MOZ_GLUE_IN_PROGRAM=
1417c8
-  ;;
1417c8
-*)
1417c8
-  dnl On !Android !Windows !OSX, we only want to link executables against mozglue
1417c8
-  MOZ_GLUE_IN_PROGRAM=1
1417c8
-  AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
1417c8
-  ;;
1417c8
-esac
1417c8
+else
1417c8
+  case "${OS_TARGET}" in
1417c8
+  Android|WINNT|Darwin)
1417c8
+    MOZ_GLUE_IN_PROGRAM=
1417c8
+    ;;
1417c8
+  *)
1417c8
+    dnl On !Android !Windows !OSX, we only want to link executables against mozglue
1417c8
+    MOZ_GLUE_IN_PROGRAM=1
1417c8
+    AC_DEFINE(MOZ_GLUE_IN_PROGRAM)
1417c8
+    ;;
1417c8
+  esac
1417c8
+fi
1417c8
 
1417c8
 if test "$MOZ_MEMORY"; then
1417c8
   if test "x$MOZ_DEBUG" = "x1"; then
1417c8
diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
1417c8
index d2897477..e3be5a2b 100644
1417c8
--- a/mozglue/build/moz.build
1417c8
+++ b/mozglue/build/moz.build
1417c8
@@ -6,7 +6,7 @@
1417c8
 
1417c8
 # Build mozglue as a shared lib on Windows, OSX and Android.
1417c8
 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
1417c8
-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
1417c8
+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
1417c8
     SharedLibrary('mozglue')
1417c8
 else:
1417c8
     Library('mozglue')
1417c8