mozilla-repo.patch
changeset 637 73640b76d6c3
parent 515 0f6539389500
child 703 c4aab80e472f
--- a/mozilla-repo.patch	Tue Mar 19 09:18:24 2013 +0100
+++ b/mozilla-repo.patch	Mon Mar 25 23:57:09 2013 +0100
@@ -1,73 +1,30 @@
 # HG changeset patch
-# Parent 7820633b718ca1983da7b105d7868c455809cff1
+# Parent 8d013204e3f06811daf5156939452765fb3e10bb
 
-diff --git a/build/Makefile.in b/build/Makefile.in
---- a/build/Makefile.in
-+++ b/build/Makefile.in
-@@ -62,17 +62,17 @@ DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_
- APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
- 
- MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
- ifdef MOZ_SOURCE_STAMP
- DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
- endif
- 
- _dollar=$$
--SOURCE_REPO := $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
-+SOURCE_REPO ?= $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
- ifdef SOURCE_REPO
- DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
- endif
- 
- DEFINES += \
-   -DMOZ_APP_BASENAME="$(MOZ_APP_BASENAME)" \
-   -DMOZ_APP_VENDOR="$(MOZ_APP_VENDOR)" \
-   -DMOZ_APP_ID="$(MOZ_APP_ID)" \
-diff --git a/toolkit/content/Makefile.in b/toolkit/content/Makefile.in
---- a/toolkit/content/Makefile.in
-+++ b/toolkit/content/Makefile.in
-@@ -35,17 +35,17 @@ endif
- ifeq (Android,$(OS_TARGET))
- DEFINES += -DANDROID_PACKAGE_NAME=$(ANDROID_PACKAGE_NAME)
- endif
- 
- # strip a trailing slash from the repo URL because it's not always present,
- # and we want to construct a working URL in buildconfig.html
- # make+shell+sed = awful
- _dollar=$$
--SOURCE_REPO := $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
-+SOURCE_REPO ?= $(shell cd $(topsrcdir) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
- # extra sanity check for old versions of hg
- # that don't support showconfig
- ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
- DEFINES += -DSOURCE_REPO="$(SOURCE_REPO)"
- endif
- 
- BUILD_HOSTNAME = $(shell hostname -s || hostname)
- DEFINES += -DBUILD_HOSTNAME="$(BUILD_HOSTNAME)"
 diff --git a/toolkit/mozapps/installer/package-name.mk b/toolkit/mozapps/installer/package-name.mk
 --- a/toolkit/mozapps/installer/package-name.mk
 +++ b/toolkit/mozapps/installer/package-name.mk
-@@ -131,22 +131,22 @@ SYMBOL_ARCHIVE_BASENAME = $(PKG_BASENAME
- TEST_PACKAGE = $(PKG_BASENAME).tests.zip
+@@ -138,23 +138,23 @@ else
+ BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
+ endif
  
- ifneq (,$(wildcard $(DIST)/bin/application.ini))
- BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/application.ini App BuildID)
- else
- BUILDID = $(shell $(PYTHON) $(MOZILLA_DIR)/config/printconfigsetting.py $(DIST)/bin/platform.ini Build BuildID)
+ ifndef INCLUDED_RCS_MK
+   USE_RCS_MK := 1
+   include $(topsrcdir)/config/makefiles/makeutils.mk
  endif
  
 -MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))
 +#MOZ_SOURCE_STAMP = $(firstword $(shell hg -R $(MOZILLA_DIR) parent --template="{node|short}\n" 2>/dev/null))
  
- # strip a trailing slash from the repo URL because it's not always present,
- # and we want to construct a working URL in the sourcestamp file.
- # make+shell+sed = awful
- _dollar=$$
--MOZ_SOURCE_REPO = $(shell cd $(MOZILLA_DIR) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
-+#MOZ_SOURCE_REPO = $(shell cd $(MOZILLA_DIR) && hg showconfig paths.default 2>/dev/null | head -n1 | sed -e "s/^ssh:/http:/" -e "s/\/$(_dollar)//" )
+ ###########################################################################
+ # bug: 746277 - preserve existing functionality.
+ # MOZILLA_DIR="": cd $(SPACE); hg # succeeds if ~/.hg exists
+ ###########################################################################
+-MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL))
++#MOZ_SOURCE_REPO = $(call getSourceRepo,$(MOZILLA_DIR)$(NULL) $(NULL))
  
- MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_SOURCESTAMP_FILE_BASENAME).txt
+ MOZ_SOURCESTAMP_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).txt
+ MOZ_BUILDINFO_FILE = $(DIST)/$(PKG_PATH)/$(MOZ_INFO_BASENAME).json
  
  # JavaScript Shell
  PKG_JSSHELL = $(DIST)/jsshell-$(MOZ_PKG_PLATFORM).zip
@@ -76,28 +33,22 @@
 diff --git a/toolkit/xre/Makefile.in b/toolkit/xre/Makefile.in
 --- a/toolkit/xre/Makefile.in
 +++ b/toolkit/xre/Makefile.in
-@@ -218,20 +218,20 @@ endif
+@@ -214,17 +214,17 @@ DEFINES += -DHAVE_USR_LIB64_DIR
+ endif
+ endif
  
  MOZ_SOURCE_STAMP ?= $(firstword $(shell hg -R $(topsrcdir) parent --template="{node|short}\n" 2>/dev/null))
  ifdef MOZ_SOURCE_STAMP
  
    INIARGS = --sourcestamp=$(MOZ_SOURCE_STAMP)
  
-   # strip a trailing slash from the repo URL because it's not always present,
-   # and we want to construct a working URL in buildconfig.html
--  SOURCE_REPO := $(firstword $(shell hg --repository $(topsrcdir) showconfig paths.default 2>/dev/null))
--  SOURCE_REPO := $(strip $(SOURCE_REPO))
--  SOURCE_REPO := $(patsubst ssh://%,http://%,$(SOURCE_REPO))
--  SOURCE_REPO := $(patsubst %/,%,$(SOURCE_REPO))
-+  SOURCE_REPO ?= $(firstword $(shell hg --repository $(topsrcdir) showconfig paths.default 2>/dev/null))
-+  SOURCE_REPO ?= $(strip $(SOURCE_REPO))
-+  SOURCE_REPO ?= $(patsubst ssh://%,http://%,$(SOURCE_REPO))
-+  SOURCE_REPO ?= $(patsubst %/,%,$(SOURCE_REPO))
- 
-   # command set should change based on revision control use.
-   # warn for now in case (git, bzr, ...) is in use.
-   $(call warnIfEmpty,SOURCE_REPO) 
+-  source_repo := $(call getSourceRepo)
++  source_repo ?= $(call getSourceRepo)
  
    # extra sanity check for old versions of hg, no showconfig support
-   ifeq (http,$(patsubst http%,http,$(SOURCE_REPO)))
-     INIARGS += --sourcerepo=$(SOURCE_REPO)
+   ifneq (,$(filter http%,$(source_repo)))
+     INIARGS += --sourcerepo=$(source_repo)
+   endif
+ 
+ endif # MOZ_SOURCE_STAMP
+