Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/1534
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core
refs/changes/34/1534/1
Get rid of nsinstall hackery
This removes the need for using NSS Build Tools on windows.
It also removes the nees to build nss for the build system while cross
compiling.
Change-Id: I13c9fdb575223f2940d3e4eda00e77ba9158f2b7
---
M Makefile.in
M config_host.mk.in
M configure.ac
M nss/ExternalProject_nss.mk
M nss/Module_nss.mk
M nss/nsinstall.py
6 files changed, 9 insertions(+), 35 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 2a56db0..0b54e3b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -298,13 +298,6 @@
$(GNUMAKE) gb_Side=build icu
#
cd cross_toolset && $(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS)
-#
-ifneq (,$(filter DESKTOP,$(BUILD_TYPE)))
-ifneq (WNT,$(OS))
-# We need to build nss for nsinstall... See NSINSTALL=... in
nss/makefile.mk
- $(GNUMAKE) gb_Side=build nss
-endif
-endif
#
# Install
diff --git a/config_host.mk.in b/config_host.mk.in
index 70f8c4e..1c98744 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -411,7 +411,6 @@
export NSS_PATCH=@NSS_PATCH@
export NSS_CFLAGS=$(gb_SPACE)@NSS_CFLAGS@
export NSS_LIBS=$(gb_SPACE)@NSS_LIBS@
-export NSSBUILDTOOLS=@NSSBUILDTOOLS@
export NUMBERTEXT_EXTENSION_PACK=@NUMBERTEXT_EXTENSION_PACK@
@x_OBJCFLAGS@ export OBJCFLAGS=@OBJCFLAGS@
@x_OBJCXXFLAGS@ export OBJCXXFLAGS=@OBJCXXFLAGS@
diff --git a/configure.ac b/configure.ac
index c60ae01..4b32e6b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8281,22 +8281,6 @@
NSS_PATCH="5"
BUILD_TYPE="$BUILD_TYPE NSS"
AC_MSG_RESULT([internal])
- if test "$build_os" = "cygwin"; then
- AC_MSG_CHECKING([for nss build tooling]) # coming from mozilla
- if test -z "$NSSBUILDTOOLS"; then
- AC_MSG_ERROR([nss build tooling not provided
-Use the --with-nss-build-tools option after installing the tools
obtained
-from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
- else
- if test \( "$WITH_MINGW" = "yes" -a ! -d "$NSSBUILDTOOLS"
\) \
- -o ! -d "$NSSBUILDTOOLS/moztools" \
- -o ! -d "$NSSBUILDTOOLS/msys" ; then
- AC_MSG_ERROR([nss build tooling incomplete!])
- else
- AC_MSG_RESULT([ok])
- fi
- fi
- fi
fi # system nss
AC_SUBST(SYSTEM_NSS)
AC_SUBST(NSS_MAJOR)
@@ -8304,7 +8288,6 @@
AC_SUBST(NSS_PATCH)
AC_SUBST(NSS_CFLAGS)
AC_SUBST(NSS_LIBS)
-AC_SUBST(NSSBUILDTOOLS)
AC_SUBST(MINGW_SMIME3_DLL)
dnl ===================================================================
diff --git a/nss/ExternalProject_nss.mk b/nss/ExternalProject_nss.mk
index 330a6e6..7ddbcae 100644
--- a/nss/ExternalProject_nss.mk
+++ b/nss/ExternalProject_nss.mk
@@ -34,15 +34,15 @@
ifeq ($(OS),WNT)
ifeq ($(COM),MSC)
-$(call gb_ExternalProject_get_state_target,nss,build): $(call
gb_ExternalProject_get_state_target,nss,configure)
+$(call gb_ExternalProject_get_state_target,nss,build): $(call
gb_ExternalProject_get_state_target,nss,configure) $(call
gb_ExternalExecutable_get_dependencies,python)
cd $(EXTERNAL_WORKDIR)/mozilla/security/nss \
&& $(if $(debug),,BUILD_OPT=1) \
MOZ_MSVCVERSION=9 OS_TARGET=WIN95 \
- PATH="$(NSSBUILDTOOLS)/msys/bin:$(NSSBUILDTOOLS)/moztools/bin:$(PATH)"
\
$(if $(filter X,$(CPU)),USE_64=1) \
LIB="$(ILIB)" \
XCFLAGS="$(SOLARINC)" \
$(MAKE) -j1 nss_build_all RC="rc.exe $(SOLARINC)" \
+ NSINSTALL='$(call gb_ExternalExecutable_get_command,python)
$(SRCDIR)/nss/nsinstall.py' \
&& touch $@
@@ -53,7 +53,7 @@
CXX="$(CXX) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)"
\
OS_LIBS="-ladvapi32 -lws2_32 -lmwsock -lwinm $(if $(filter
YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
OS_TARGET=WINNT RC="$(WINDRES)" OS_RELEASE="5.0" \
- PATH="$(NSSBUILDTOOLS)/bin:$(PATH)" IMPORT_LIB_SUFFIX=dll.a \
+ IMPORT_LIB_SUFFIX=dll.a \
NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
--enable-shared --disable-static" \
NSINSTALL="$(PYTHON_FOR_BUILD) $(SRCDIR)/nss/nsinstall.py" \
$(MAKE) -j1 nss_build_all \
@@ -69,10 +69,9 @@
$(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
$(if $(filter YES,$(CROSS_COMPILING)),\
$(if $(filter MACOSXP,$(OS)$(CPU)),CPU_ARCH=ppc) \
- NSINSTALL="$(subst $(INPATH),$(INPATH_FOR_BUILD),\
- $(call
gb_UnpackedTarball_get_dir,nss)/mozilla/security/coreconf/nsinstall/out/nsinstall)")
\
+ NSINSTALL="$(PYTHON_FOR_BUILD) $(SRCDIR)/nss/nsinstall.py") \
NSDISTMODE=copy \
- $(MAKE) -j1 $(if $(filter
build,$(gb_Side)),build_coreconf,nss_build_all) \
+ $(MAKE) -j1 nss_build_all \
&& touch $@
endif
diff --git a/nss/Module_nss.mk b/nss/Module_nss.mk
index 5455fc0..c1619ff 100644
--- a/nss/Module_nss.mk
+++ b/nss/Module_nss.mk
@@ -13,7 +13,7 @@
ifeq ($(filter ANDROID IOS,$(OS)),)
$(eval $(call gb_Module_add_targets,nss,\
UnpackedTarball_nss \
- $(if $(filter build,$(gb_Side)),,ExternalPackage_nss) \
+ ExternalPackage_nss \
ExternalProject_nss \
))
endif
diff --git a/nss/nsinstall.py b/nss/nsinstall.py
index 39d26fe..e1728a9 100644
--- a/nss/nsinstall.py
+++ b/nss/nsinstall.py
@@ -86,11 +86,11 @@
if options.m:
# mode is specified
try:
- options.m = int(options.m, 8)
# I have no idea why nss insists on using this mode for installed
headers.
# It causes problems with updating the files during a rebuild.
- if options.m == 0444:
- options.m = 0644
+ if options.m == 444:
+ options.m = 644
+ options.m = int(options.m)
except:
sys.stderr.write('nsinstall: ' + options.m + ' is not a valid
mode\n')
return 1