From ece62633847960f68f57d74bc56227fdd2e1bc50 Mon Sep 17 00:00:00 2001 From: asac Date: Mon, 12 Mar 2007 17:03:03 +0100 Subject: [PATCH] flat chrome fix * do-not-zip-chrome-jars-use-exploded-structure-instead-configure-in-remove-ac_msg_error-in-case-zip-is-not-found-in-path --- config/config.mk | 6 +++++- config/make-jars.pl | 5 ++++- config/rules.mk | 2 +- configure.in | 10 +++++++--- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/config/config.mk b/config/config.mk index bcd9abe..2c3da1f 100644 --- a/config/config.mk +++ b/config/config.mk @@ -461,10 +461,14 @@ endif # Flags passed to make-jars.pl MAKE_JARS_FLAGS = \ - -s $(srcdir) -t $(topsrcdir) -z $(ZIP) -p $(MOZILLA_DIR)/config/preprocessor.pl \ + -s $(srcdir) -t $(topsrcdir) -p $(MOZILLA_DIR)/config/preprocessor.pl \ -f $(MOZ_CHROME_FILE_FORMAT) \ $(NULL) +ifdef ZIP +MAKE_JARS_FLAGS += -z $(ZIP) +endif + ifdef NO_JAR_AUTO_REG MAKE_JARS_FLAGS += -a endif diff --git a/config/make-jars.pl b/config/make-jars.pl index 5a1cdf4..364033d 100644 --- a/config/make-jars.pl +++ b/config/make-jars.pl @@ -137,7 +137,7 @@ if (defined($::opt_z)) { $zipprog = $::opt_z; } -if ($zipprog eq "") { +if (($fileformat eq "jar" || $fileformat eq "both") && $zipprog eq "") { print "A valid zip program must be given via the -z option or the ZIP environment variable. Exiting.\n"; exit(1); } @@ -514,6 +514,7 @@ start: my $dest = $1; my $srcPath = defined($2) ? substr($2, 1, -1) : $2; EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0, 0); + EnsureFileInDir("$jarDir/$jarfile", $baseFilesDir, $dest, $srcPath, 0, 0) if ($fileformat eq "flat"); $args = "$args$dest "; if (!foreignPlatformFile($jarfile) && $autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/) @@ -526,6 +527,7 @@ start: my $dest = $1; my $srcPath = defined($2) ? substr($2, 1, -1) : $2; EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1, 0); + EnsureFileInDir("$jarDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1, 0) if ($fileformat eq "flat"); $overrides = "$overrides$dest "; if (!foreignPlatformFile($jarfile) && $autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/) { @@ -538,6 +540,7 @@ start: my $dest = $1; my $srcPath = defined($2) ? substr($2, 1, -1) : $2; EnsureFileInDir("$chromeDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1, 1); + EnsureFileInDir("$jarDir/$jarfile", $baseFilesDir, $dest, $srcPath, 1, 1) if ($fileformat eq "flat"); $overrides = "$overrides$dest "; if (!foreignPlatformFile($jarfile) && $autoreg && $dest =~ /([\w\d.\-\_\+]+)\/([\w\d.\-\_\\\/]+)contents.rdf/) { diff --git a/config/rules.mk b/config/rules.mk index 88af4d7..e3c889a 100644 --- a/config/rules.mk +++ b/config/rules.mk @@ -1577,7 +1577,7 @@ ifndef XPI_NAME $(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \ $(JAR_MANIFEST) | \ $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-jars.pl \ - -d $(MAKE_JARS_TARGET) -j $(DESTDIR)$(mozappdir)/chrome \ + -d $(MAKE_JARS_TARGET)/chrome -j $(DESTDIR)$(mozappdir)/chrome \ $(MAKE_JARS_FLAGS) -- "$(XULPPFLAGS) $(DEFINES) $(ACDEFINES)"; \ $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-chromelist.pl \ $(DESTDIR)$(mozappdir)/chrome $(JAR_MANIFEST) $(_NO_FLOCK); \ diff --git a/configure.in b/configure.in index 3d5a7af..c5cffcd 100644 --- a/configure.in +++ b/configure.in @@ -560,9 +560,6 @@ AC_PATH_PROG(WHOAMI, whoami, :) AC_PATH_PROG(AUTOCONF, autoconf, :) AC_PATH_PROG(UNZIP, unzip, :) AC_PATH_PROGS(ZIP, zip) -if test -z "$ZIP" || test "$ZIP" = ":"; then - AC_MSG_ERROR([zip not found in \$PATH]) -fi AC_PATH_PROG(SYSTEM_MAKEDEPEND, makedepend) AC_PATH_PROG(XARGS, xargs) if test -z "$XARGS" || test "$XARGS" = ":"; then @@ -6115,6 +6112,13 @@ if test "$MOZ_CHROME_FILE_FORMAT" != "jar" && AC_MSG_ERROR([--enable-chrome-format must be set to either jar, flat, both, or symlink]) fi +if test "$MOZ_CHROME_FILE_FORMAT" = "jar" || + test "$MOZ_CHROME_FILE_FORMAT" = "both"; then + if test -z "$ZIP" || test "$ZIP" = ":"; then + AC_MSG_ERROR([zip is required for chrome format $MOZ_CHROME_FILE_FORMAT]) + fi +fi + dnl ======================================================== dnl = Define default location for MOZILLA_FIVE_HOME dnl ======================================================== -- 1.4.4.4