summaryrefslogtreecommitdiff
path: root/nss
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-01-01 09:39:36 -0500
committerLuboš Luňák <l.lunak@suse.cz>2013-01-02 16:21:23 +0000
commitc003d25d24786073229d0f8e545b2863c27fa282 (patch)
treec79f8c7f34a51ae34d7599076dccb92a5955516d /nss
parentdc277bc6a1c357fe725db2c567d3e1cf16fb7806 (diff)
convert nss to gbuild
Change-Id: I59edc4c437abccc201823d97f1cbec230d273b05 Reviewed-on: https://gerrit.libreoffice.org/1529 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
Diffstat (limited to 'nss')
-rw-r--r--nss/ExternalPackage_nss.mk78
-rw-r--r--nss/ExternalProject_nss.mk80
-rw-r--r--nss/Makefile7
-rw-r--r--nss/Module_nss.mk22
-rw-r--r--nss/UnpackedTarball_nss.mk24
-rw-r--r--nss/makefile.mk269
-rw-r--r--nss/nss-config.in147
-rw-r--r--nss/nss-config.patch150
-rw-r--r--nss/nss.mingw.patch (renamed from nss/nss.patch.mingw)0
-rw-r--r--nss/prj/build.lst3
-rw-r--r--nss/prj/d.lst34
-rw-r--r--nss/prj/dmake0
12 files changed, 359 insertions, 455 deletions
diff --git a/nss/ExternalPackage_nss.mk b/nss/ExternalPackage_nss.mk
new file mode 100644
index 000000000000..ae28d98d9c92
--- /dev/null
+++ b/nss/ExternalPackage_nss.mk
@@ -0,0 +1,78 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalPackage_ExternalPackage,nss,nss))
+
+$(eval $(call gb_ExternalPackage_use_external_project,nss,nss))
+
+$(eval $(call gb_ExternalPackage_add_files,nss,bin,\
+ config/nspr-config \
+ config/nss-config \
+))
+
+ifeq ($(OS),WNT)
+ifeq ($(COM),MSC)
+$(eval $(call gb_ExternalPackage_add_files,nss,lib,\
+ mozilla/dist/out/lib/nspr4.lib \
+ mozilla/dist/out/lib/nss3.lib \
+ mozilla/dist/out/lib/nssdbm3.lib \
+ mozilla/dist/out/lib/nssutil3.lib \
+ mozilla/dist/out/lib/plc4.lib \
+ mozilla/dist/out/lib/plds4.lib \
+ mozilla/dist/out/lib/smime3.lib \
+ mozilla/dist/out/lib/softokn3.lib \
+ mozilla/dist/out/lib/sqlite3.lib \
+ mozilla/dist/out/lib/ssl3.lib \
+))
+else
+$(eval $(call gb_ExternalPackage_add_files,nss,lib,\
+ mozilla/nsprpub/out/pr/src/libnspr4.dll.a \
+ mozilla/dist/out/lib/libnss3.dll.a \
+ mozilla/dist/out/lib/libnssdbm3.dll.a \
+ mozilla/dist/out/lib/libnssutil3.dll.a \
+ mozilla/nsprpub/out/lib/libc/src/libplc4.dll.a \
+ mozilla/nsprpub/out/lib/ds/libplds4.dll.a \
+ mozilla/dist/out/lib/libsmime3.dll.a \
+ mozilla/dist/out/lib/libsoftokn3.dll.a \
+ mozilla/dist/out/lib/libsqlite3.dll.a \
+ mozilla/dist/out/lib/libssl3.dll.a \
+))
+endif
+$(eval $(call gb_ExternalPackage_add_files,nss,bin,\
+ mozilla/dist/out/lib/nspr4.dll \
+ mozilla/dist/out/lib/nss3.dll \
+ mozilla/dist/out/lib/nssdbm3.dll \
+ mozilla/dist/out/lib/nssutil3.dll \
+ mozilla/dist/out/lib/plc4.dll \
+ mozilla/dist/out/lib/plds4.dll \
+ mozilla/dist/out/lib/smime3.dll \
+ mozilla/dist/out/lib/softokn3.dll \
+ mozilla/dist/out/lib/sqlite3.dll \
+ mozilla/dist/out/lib/ssl3.dll \
+))
+else # OS!=WNT
+$(eval $(call gb_ExternalPackage_add_files,nss,lib,\
+ mozilla/dist/out/lib/libcrmf.a \
+ mozilla/dist/out/lib/libfreebl3.so \
+ mozilla/dist/out/lib/libnspr4.so \
+ mozilla/dist/out/lib/libnss3.so \
+ mozilla/dist/out/lib/libnssckbi.so \
+ mozilla/dist/out/lib/libnssdbm3.so \
+ mozilla/dist/out/lib/libnsssysinit.so \
+ mozilla/dist/out/lib/libnssutil3.so \
+ mozilla/dist/out/lib/libplc4.so \
+ mozilla/dist/out/lib/libplds4.so \
+ mozilla/dist/out/lib/libsmime3.so \
+ mozilla/dist/out/lib/libsoftokn3.so \
+ mozilla/dist/out/lib/libsqlite3.so \
+ mozilla/dist/out/lib/libssl3.so \
+))
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/nss/ExternalProject_nss.mk b/nss/ExternalProject_nss.mk
new file mode 100644
index 000000000000..330a6e6c81d1
--- /dev/null
+++ b/nss/ExternalProject_nss.mk
@@ -0,0 +1,80 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,nss))
+
+$(eval $(call gb_ExternalProject_use_unpacked,nss,nss))
+
+$(eval $(call gb_ExternalProject_register_targets,nss,\
+ configure \
+ build \
+))
+
+$(call gb_ExternalProject_get_state_target,nss,configure):
+ cd $(EXTERNAL_WORKDIR) \
+ && $(if $(filter MSC,$(COM)),LIB="$(ILIB)") \
+ mozilla/nsprpub/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
+ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
+ $(if $(filter MSCX,$(COM)$(CPU)),--enable-64bit) \
+ $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
+ && sed -e 's%@prefix@%$(OUTDIR)%' \
+ -e 's%@includedir@%$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss%' \
+ -e 's%@MOD_MAJOR_VERSION@%$(NSS_MAJOR)%' \
+ -e 's%@MOD_MINOR_VERSION@%$(NSS_MINOR)%' \
+ -e 's%@MOD_PATCH_VERSION@%$(NSS_PATCH)%' \
+ $(SRCDIR)/nss/nss-config.in > $(EXTERNAL_WORKDIR)/config/nss-config \
+ && chmod a+x $(EXTERNAL_WORKDIR)/config/nss-config \
+ && touch $@
+
+ifeq ($(OS),WNT)
+ifeq ($(COM),MSC)
+$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure)
+ 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)" \
+ && touch $@
+
+
+else
+$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure)
+ cd $(EXTERNAL_WORKDIR)/mozilla/security/nss \
+ CC="$(CC) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
+ 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 \
+ 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 \
+ && touch $@
+
+endif
+else # OS!=WNT
+$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure)
+ cd $(EXTERNAL_WORKDIR)/mozilla/security/nss \
+ && $(if $(filter FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X,$(CPU)),USE_64=1)) \
+ $(if $(filter MACOSX,$(OS)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \
+ $(if $(filter 1060 1070 1080,$(MAC_OS_X_VERSION_MIN_REQUIRED)),NSS_USE_SYSTEM_SQLITE=1)) \
+ $(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)") \
+ NSDISTMODE=copy \
+ $(MAKE) -j1 $(if $(filter build,$(gb_Side)),build_coreconf,nss_build_all) \
+ && touch $@
+
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/nss/Makefile b/nss/Makefile
new file mode 100644
index 000000000000..ccb1c85a04da
--- /dev/null
+++ b/nss/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/nss/Module_nss.mk b/nss/Module_nss.mk
new file mode 100644
index 000000000000..5455fc0670a3
--- /dev/null
+++ b/nss/Module_nss.mk
@@ -0,0 +1,22 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,nss))
+
+ifeq ($(SYSTEM_NSS),NO)
+ifeq ($(filter ANDROID IOS,$(OS)),)
+$(eval $(call gb_Module_add_targets,nss,\
+ UnpackedTarball_nss \
+ $(if $(filter build,$(gb_Side)),,ExternalPackage_nss) \
+ ExternalProject_nss \
+))
+endif
+endif
+
+# vim: set noet sw=4 ts=4:
diff --git a/nss/UnpackedTarball_nss.mk b/nss/UnpackedTarball_nss.mk
new file mode 100644
index 000000000000..6e9ad7bc3a01
--- /dev/null
+++ b/nss/UnpackedTarball_nss.mk
@@ -0,0 +1,24 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,nss))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,nss,$(NSS_TARBALL)))
+
+$(eval $(call gb_UnpackedTarball_add_patches,nss,\
+ nss/nss.patch \
+ nss/nss.aix.patch \
+ nss/nss-3.13.5-zlib-werror.patch \
+ $(if $(filter MACOSX,$(OS)),nss/nss_macosx.patch) \
+ $(if $(filter WNTGCC,$(OS)$(COM)),nss/nspr-4.9-build.patch \
+ nss/nss-3.13.3-build.patch \
+ nss/nss.mingw.patch) \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/nss/makefile.mk b/nss/makefile.mk
deleted file mode 100644
index 91c63d281e63..000000000000
--- a/nss/makefile.mk
+++ /dev/null
@@ -1,269 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=.
-
-PRJNAME=nss
-TARGET=nss
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-.IF "$(SYSTEM_NSS)"=="YES"
-all:
- @echo "NSS will not be built. Using system one instead."
-.ENDIF
-
-.IF "$(OS)" == "ANDROID" || "$(OS)" == "IOS"
-@all:
- @echo "FIXME: NSS module not buildable yet on this platform"
-.ENDIF
-
-VER_MAJOR=3
-VER_MINOR=13
-VER_PATCH=5
-
-TARFILE_NAME=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)-with-nspr-4.9.1
-TARFILE_MD5=a0a861f539f0e7a91d05e6b9457e4db1
-TARFILE_ROOTDIR=nss-$(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
-PATCH_FILES=nss.patch nss.aix.patch nss-config.patch \
- nss-3.13.5-zlib-werror.patch
-# nss-3.13.5-zlib-werror.patch: avoid -Werror=implicit-function-declaration for
-# lseek, read, write
-
-.IF "$(OS)"=="MACOSX"
-PATCH_FILES+=nss_macosx.patch
-.ENDIF # "$(OS)"=="MACOSX"
-
-# For a MSVC build, not exporting BUILD_OPT causes the produced DLLs
-# to use the debug CRT. (The exact mechanism that causes this to
-# happen is a bit of a mystery...) That is confusing and wrong, as
-# nothing in LO otherwise uses that. It also makes testing a build
-# much harder for me at least, as I do that in a fairly pristine
-# virtual machine with no MSVC debugging runtime available. (The
-# normal CRT is bundled in the LO installer.)
-.IF "$(debug)" != "" && "$(OS)$(COM)" != "WNTMSC"
-.ELSE
-BUILD_OPT=1
-.EXPORT: BUILD_OPT
-.ENDIF
-
-.IF "$(OS)" == "MACOSX"
-my_prefix=/@.__________________________________________________$(EXTRPATH)
-.ELSE
-my_prefix=$(OUTDIR)
-.END
-
-CONFIGURE_ACTION=mozilla/nsprpub/configure --prefix=$(my_prefix) --includedir=$(OUTDIR)/inc/mozilla/nspr
-
-.IF "$(CROSS_COMPILING)"=="YES"
-CONFIGURE_ACTION+=--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)
-.ENDIF
-
-.IF "$(OS)$(COM)$(CPUNAME)"=="WNTMSCX86_64"
-CONFIGURE_ACTION+=--enable-64bit
-.ENDIF
-
-CONFIGURE_ACTION+= ; \
- sed -e 's\#@prefix@\#$(OUTDIR)\#' -e 's\#@includedir@\#$(OUTDIR)/inc/mozilla/nss\#' -e 's\#@MOD_MAJOR_VERSION@\#$(VER_MAJOR)\#' -e 's\#@MOD_MINOR_VERSION@\#$(VER_MINOR)\#' -e 's\#@MOD_PATCH_VERSION@\#$(VER_PATCH)\#' mozilla/security/nss/nss-config.in > mozilla/security/nss/nss-config ; \
- chmod a+x mozilla/security/nss/nss-config
-
-.IF "$(OS)"!="WNT"
-.IF "$(OS)$(COM)"=="LINUXGCC"
-.IF "$(BUILD64)"=="1"
-# force 64-bit buildmode
-USE_64:=1
-.EXPORT : USE_64
-.ENDIF
-.ENDIF
-
-.IF "$(OS)$(COM)"=="MACOSXGCC"
-.IF "$(BUILD64)"=="1"
-# force 64-bit buildmode
-USE_64:=1
-.EXPORT : USE_64
-.ENDIF
-.ENDIF
-
-.IF "$(OS)$(COM)"=="FREEBSDGCC"
-.IF "$(CPUNAME)"=="X86_64"
-# force 64-bit buildmode
-USE_64:=1
-.EXPORT : USE_64
-.ENDIF
-.ENDIF
-
-.IF "$(OS)"=="MACOSX"
-MACOS_SDK_DIR:=$(MACOSX_SDK_PATH)
-.EXPORT : MACOS_SDK_DIR
-.ENDIF # "$(OS)"=="MACOSX"
-
-OUT2LIB=mozilla/dist/out/lib/*$(DLLPOST) mozilla/dist/out/lib/libcrmf.a
-
-OUT2BIN=config/nspr-config mozilla/security/nss/nss-config
-
-BUILD_DIR=mozilla/security/nss
-BUILD_ACTION= $(GNUMAKE) nss_build_all -j1
-
-.IF "$(CROSS_COMPILING)"=="YES"
-
-.IF "$(OS)-$(CPUNAME)"="MACOSX-POWERPC"
-# Hardcode this for now... need to add more when/if cross-compiling to
-# other desktop OSes, yeah, this is silly, but the nss build mechanism
-# is a bit messy, I could not figure out how to get it to get CPU_ARCH
-# automatically when cross-compiling
-BUILD_ACTION+= CPU_ARCH=ppc
-.ENDIF
-
-# When cross-compiling need to use a nsinstall built for the build
-# platform, so yeah, whole nss built for the build platform just for
-# that... But oh well, nss is small compared to LO;)
-BUILD_ACTION+= NSINSTALL=$(SRC_ROOT)/nss/$(INPATH_FOR_BUILD)/misc/build/$(TARFILE_ROOTDIR)/mozilla/security/coreconf/nsinstall/out/nsinstall
-
-.ENDIF
-
-#Note: with the new version the libfreebl3.so gets built in a way that does
-# not conflict with the system one on Linux automatically;
-# it is no longer necessary to add a workaround for #i105566# && moz#513024#
-.IF "$(OS)$(COM)"=="SOLARISGCC"
-BUILD_ACTION+=NS_USE_GCC=1
-.ENDIF
-
-# Otherwise, LibreOffice.app/Contents/MacOS/python -c 'import uno' fails to
-# dlopen LibreOffice.app/Contents/MacOS/libpyuno.dylib (at
-# pyuno/source/module/pyuno_dlopenwrapper.c:73) with dlerror "Symbol not found:
-# _sqlite3_wal_checkpoint; Referenced from: /System/Library/Frameworks/
-# CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/
-# CFNetwork; Expected in: [...]/LibreOffice.app/Contents/MacOS/libsqlite3.dylib;
-# in /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/
-# CFNetwork.framework/Versions/A/CFNetwork":
-.IF "$(OS)" == "MACOSX" && "$(MAC_OS_X_VERSION_MIN_REQUIRED)" >= "1060"
-BUILD_ACTION += NSS_USE_SYSTEM_SQLITE=1
-.END
-
-.ENDIF # "$(OS)"!="WNT"
-
-
-.IF "$(OS)"=="WNT"
-
-.IF "$(COM)"=="GCC"
-
-PATCH_FILES += \
- nspr-4.9-build.patch \
- nss-3.13.3-build.patch \
- nss.patch.mingw \
-
-
-PATH!:=$(NSSBUILDTOOLS)/bin:$(PATH)
-
-nss_CC=$(CC)
-nss_CXX=$(CXX)
-.IF "$(MINGW_SHARED_GCCLIB)"=="YES"
-nss_CC+=-shared-libgcc
-nss_CXX+=-shared-libgcc
-.ENDIF
-
-nss_LIBS=-ladvapi32 -lws2_32 -lmswsock -lwinmm
-.IF "$(MINGW_SHARED_GXXLIB)"=="YES"
-nss_LIBS+=$(MINGW_SHARED_LIBSTDCPP)
-.ENDIF
-nss_LDFLAGS=
-
-OS_TARGET=WINNT
-.EXPORT : OS_TARGET
-
-BUILD_DIR=mozilla/security/nss
-BUILD_ACTION=$(GNUMAKE) NS_USE_GCC=1 CC="$(nss_CC)" CXX="$(nss_CXX)" OS_LIBS="$(nss_LIBS)" PATH="$(PATH)" NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" LDFLAGS="$(nss_LDFLAGS)" RANLIB="$(RANLIB)" RC="$(WINDRES)" OS_RELEASE=5.0 NSINSTALL="$(PYTHON_FOR_BUILD) $(SRC_ROOT)/nss/nsinstall.py" IMPORT_LIB_SUFFIX=dll.a nss_build_all
-
-OUT2LIB= \
- mozilla/nsprpub/out/pr/src/libnspr4.dll.a \
- mozilla/dist/out/lib/libnss3.dll.a \
- mozilla/dist/out/lib/libnssdbm3.dll.a \
- mozilla/dist/out/lib/libnssutil3.dll.a \
- mozilla/nsprpub/out/lib/libc/src/libplc4.dll.a \
- mozilla/nsprpub/out/lib/ds/libplds4.dll.a \
- mozilla/dist/out/lib/libsmime3.dll.a \
- mozilla/dist/out/lib/libsoftokn3.dll.a \
- mozilla/dist/out/lib/libsqlite3.dll.a \
- mozilla/dist/out/lib/libssl3.dll.a
-
-.ELSE # "$(COM)"=="GCC"
-MOZ_MSVCVERSION= 9
-.EXPORT : MOZ_MSVCVERSION
-nss_build:=$(shell cygpath -p $(NSSBUILDTOOLS))
-
-#Using WINNT will cause at least that nspr4.dll, plc4.dll, plds4.dll
-#become libnspr4.dll, libplc4.dll, libplds4.dll
-#WINNT causes the use of Microsoft fibers (specific to Windows NT and Windows 2000).
-#OS_TARGET= WINNT
-OS_TARGET=WIN95
-.EXPORT : OS_TARGET
-
-#To build nss one has to call "make nss_build_all" in
-#mozilla/security/nss
-
-.IF "$(CPUNAME)"=="X86_64"
-PASS_USE_64=USE_64=1
-.ENDIF
-
-NSS_BUILD_DIR=$(ABS_PACKAGE_DIR)/$(TARFILE_ROOTDIR)/mozilla/security/nss
-BUILD_ACTION= PATH="$(nss_build)/msys/bin:$(nss_build)/moztools/bin:$(PATH)" && $(NSSBUILDTOOLS)/msys/bin/bash -i \
- -c "cd $(NSS_BUILD_DIR) && make $(PASS_USE_64) nss_build_all"
-
-OUT2LIB= \
- mozilla/dist/out/lib/nspr4.lib \
- mozilla/dist/out/lib/nss3.lib \
- mozilla/dist/out/lib/nssdbm3.lib \
- mozilla/dist/out/lib/nssutil3.lib \
- mozilla/dist/out/lib/plc4.lib \
- mozilla/dist/out/lib/plds4.lib \
- mozilla/dist/out/lib/smime3.lib \
- mozilla/dist/out/lib/softokn3.lib \
- mozilla/dist/out/lib/sqlite3.lib \
- mozilla/dist/out/lib/ssl3.lib
-
-.ENDIF # "$(COM)"=="GCC"
-
-OUT2BIN=mozilla/dist/out/lib/*$(DLLPOST) \
- config/nspr-config \
- mozilla/security/nss/nss-config
-
-.ENDIF # "$(OS)"=="WNT"
-
-
-OUTDIR2INC=mozilla/dist/public/nss mozilla/dist/out/include
-
-# --- Targets ------------------------------------------------------
-
-.INCLUDE : set_ext.mk
-.INCLUDE : target.mk
-.INCLUDE : tg_ext.mk
-
-
diff --git a/nss/nss-config.in b/nss/nss-config.in
new file mode 100644
index 000000000000..141d4833c5fb
--- /dev/null
+++ b/nss/nss-config.in
@@ -0,0 +1,147 @@
+#!/bin/sh
+
+prefix=@prefix@
+
+major_version=@MOD_MAJOR_VERSION@
+minor_version=@MOD_MINOR_VERSION@
+patch_version=@MOD_PATCH_VERSION@
+
+usage()
+{
+ cat <<EOF
+Usage: nss-config [OPTIONS] [LIBRARIES]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--includedir[=DIR]]
+ [--libdir[=DIR]]
+ [--version]
+ [--libs]
+ [--cflags]
+Dynamic Libraries:
+ nss
+ ssl
+ smime
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+lib_ssl=yes
+lib_smime=yes
+lib_nss=yes
+lib_nssutil=yes
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --includedir=*)
+ includedir=$optarg
+ ;;
+ --includedir)
+ echo_includedir=yes
+ ;;
+ --libdir=*)
+ libdir=$optarg
+ ;;
+ --libdir)
+ echo_libdir=yes
+ ;;
+ --version)
+ echo ${major_version}.${minor_version}.${patch_version}
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ ssl)
+ lib_ssl=yes
+ ;;
+ smime)
+ lib_smime=yes
+ ;;
+ nss)
+ lib_nss=yes
+ ;;
+ nssutil)
+ lib_nssutil=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+# Set variables that may be dependent upon other variables
+if test -z "$exec_prefix"; then
+ exec_prefix=${prefix}
+fi
+if test -z "$includedir"; then
+ includedir=@includedir@
+fi
+if test -z "$libdir"; then
+ libdir=${exec_prefix}/lib
+fi
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+if test "$echo_includedir" = "yes"; then
+ echo $includedir
+fi
+
+if test "$echo_libdir" = "yes"; then
+ echo $libdir
+fi
+
+if test "$echo_cflags" = "yes"; then
+ echo -I$includedir
+fi
+
+if test "$echo_libs" = "yes"; then
+ libdirs="-L$libdir"
+ if test `uname` != Darwin; then
+ libdirs="-Wl,-rpath-link,$libdir $libdirs"
+ fi
+ if test -n "$lib_ssl"; then
+ libdirs="$libdirs -lssl${major_version}"
+ fi
+ if test -n "$lib_smime"; then
+ libdirs="$libdirs -lsmime${major_version}"
+ fi
+ if test -n "$lib_nss"; then
+ libdirs="$libdirs -lnss${major_version}"
+ fi
+ if test -n "$lib_nssutil"; then
+ libdirs="$libdirs -lnssutil${major_version}"
+ fi
+ echo $libdirs
+fi
+
diff --git a/nss/nss-config.patch b/nss/nss-config.patch
deleted file mode 100644
index 071cb99dfe13..000000000000
--- a/nss/nss-config.patch
+++ /dev/null
@@ -1,150 +0,0 @@
---- /dev/null
-+++ misc/build/nss-3.13.5/mozilla/security/nss/nss-config.in 2010-06-11 16:35:54.946870871 +0200
-@@ -0,0 +1,147 @@
-+#!/bin/sh
-+
-+prefix=@prefix@
-+
-+major_version=@MOD_MAJOR_VERSION@
-+minor_version=@MOD_MINOR_VERSION@
-+patch_version=@MOD_PATCH_VERSION@
-+
-+usage()
-+{
-+ cat <<EOF
-+Usage: nss-config [OPTIONS] [LIBRARIES]
-+Options:
-+ [--prefix[=DIR]]
-+ [--exec-prefix[=DIR]]
-+ [--includedir[=DIR]]
-+ [--libdir[=DIR]]
-+ [--version]
-+ [--libs]
-+ [--cflags]
-+Dynamic Libraries:
-+ nss
-+ ssl
-+ smime
-+EOF
-+ exit $1
-+}
-+
-+if test $# -eq 0; then
-+ usage 1 1>&2
-+fi
-+
-+lib_ssl=yes
-+lib_smime=yes
-+lib_nss=yes
-+lib_nssutil=yes
-+
-+while test $# -gt 0; do
-+ case "$1" in
-+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-+ *) optarg= ;;
-+ esac
-+
-+ case $1 in
-+ --prefix=*)
-+ prefix=$optarg
-+ ;;
-+ --prefix)
-+ echo_prefix=yes
-+ ;;
-+ --exec-prefix=*)
-+ exec_prefix=$optarg
-+ ;;
-+ --exec-prefix)
-+ echo_exec_prefix=yes
-+ ;;
-+ --includedir=*)
-+ includedir=$optarg
-+ ;;
-+ --includedir)
-+ echo_includedir=yes
-+ ;;
-+ --libdir=*)
-+ libdir=$optarg
-+ ;;
-+ --libdir)
-+ echo_libdir=yes
-+ ;;
-+ --version)
-+ echo ${major_version}.${minor_version}.${patch_version}
-+ ;;
-+ --cflags)
-+ echo_cflags=yes
-+ ;;
-+ --libs)
-+ echo_libs=yes
-+ ;;
-+ ssl)
-+ lib_ssl=yes
-+ ;;
-+ smime)
-+ lib_smime=yes
-+ ;;
-+ nss)
-+ lib_nss=yes
-+ ;;
-+ nssutil)
-+ lib_nssutil=yes
-+ ;;
-+ *)
-+ usage 1 1>&2
-+ ;;
-+ esac
-+ shift
-+done
-+
-+# Set variables that may be dependent upon other variables
-+if test -z "$exec_prefix"; then
-+ exec_prefix=${prefix}
-+fi
-+if test -z "$includedir"; then
-+ includedir=@includedir@
-+fi
-+if test -z "$libdir"; then
-+ libdir=${exec_prefix}/lib
-+fi
-+
-+if test "$echo_prefix" = "yes"; then
-+ echo $prefix
-+fi
-+
-+if test "$echo_exec_prefix" = "yes"; then
-+ echo $exec_prefix
-+fi
-+
-+if test "$echo_includedir" = "yes"; then
-+ echo $includedir
-+fi
-+
-+if test "$echo_libdir" = "yes"; then
-+ echo $libdir
-+fi
-+
-+if test "$echo_cflags" = "yes"; then
-+ echo -I$includedir
-+fi
-+
-+if test "$echo_libs" = "yes"; then
-+ libdirs="-L$libdir"
-+ if test `uname` != Darwin; then
-+ libdirs="-Wl,-rpath-link,$libdir $libdirs"
-+ fi
-+ if test -n "$lib_ssl"; then
-+ libdirs="$libdirs -lssl${major_version}"
-+ fi
-+ if test -n "$lib_smime"; then
-+ libdirs="$libdirs -lsmime${major_version}"
-+ fi
-+ if test -n "$lib_nss"; then
-+ libdirs="$libdirs -lnss${major_version}"
-+ fi
-+ if test -n "$lib_nssutil"; then
-+ libdirs="$libdirs -lnssutil${major_version}"
-+ fi
-+ echo $libdirs
-+fi
-+
diff --git a/nss/nss.patch.mingw b/nss/nss.mingw.patch
index db073e94919a..db073e94919a 100644
--- a/nss/nss.patch.mingw
+++ b/nss/nss.mingw.patch
diff --git a/nss/prj/build.lst b/nss/prj/build.lst
index 2377ac2f1740..9c4caa13b545 100644
--- a/nss/prj/build.lst
+++ b/nss/prj/build.lst
@@ -1,3 +1,2 @@
ns nss : solenv soltools NULL
-ns nss nmake - usr1 ns_mkout NULL
-ns nss nmake - all ns_nss NULL
+ns nss\prj nmake - all ns_nss NULL
diff --git a/nss/prj/d.lst b/nss/prj/d.lst
index 09c38c223f8b..e69de29bb2d1 100644
--- a/nss/prj/d.lst
+++ b/nss/prj/d.lst
@@ -1,34 +0,0 @@
-mkdir: %_DEST%\inc\mozilla\nspr
-mkdir: %_DEST%\inc\mozilla\nspr\obsolete
-mkdir: %_DEST%\inc\mozilla\nspr\private
-mkdir: %_DEST%\inc\mozilla\nss
-mkdir: %_DEST%\lib\sqlite
-
-..\%__SRC%\inc\include\* %_DEST%\inc\mozilla\nspr
-..\%__SRC%\inc\include\obsolete\protypes.h %_DEST%\inc\mozilla\nspr\obsolete\protypes.h
-..\%__SRC%\inc\include\private\*.h %_DEST%\inc\mozilla\nspr\private
-..\%__SRC%\inc\nss\*.h %_DEST%\inc\mozilla\nss
-
-..\%__SRC%\lib\libfreebl3.* %_DEST%\lib\libfreebl3.*
-..\%__SRC%\lib\libfreebl_32fpu_3.* %_DEST%\lib\libfreebl_32fpu_3.*
-..\%__SRC%\lib\libfreebl_32int64_3.* %_DEST%\lib\libfreebl_32int64_3.*
-..\%__SRC%\lib\libfreebl_32int_3.* %_DEST%\lib\libfreebl_32int_3.*
-..\%__SRC%\lib\libfreebl_64int_3.* %_DEST%\lib\libfreebl_64int_3.*
-..\%__SRC%\lib\libfreebl_64fpu_3.* %_DEST%\lib\libfreebl_64fpu_3.*
-..\%__SRC%\lib\libnspr4.* %_DEST%\lib\libnspr4.*
-..\%__SRC%\lib\libnss3.* %_DEST%\lib\libnss3.*
-..\%__SRC%\lib\libnssckbi.* %_DEST%\lib\libnssckbi.*
-..\%__SRC%\lib\libnssdbm3.* %_DEST%\lib\libnssdbm3.*
-..\%__SRC%\lib\libnssutil3.* %_DEST%\lib\libnssutil3.*
-..\%__SRC%\lib\libplc4.* %_DEST%\lib\libplc4.*
-..\%__SRC%\lib\libplds4.* %_DEST%\lib\libplds4.*
-..\%__SRC%\lib\libsmime3.* %_DEST%\lib\libsmime3.*
-..\%__SRC%\lib\libsoftokn3.* %_DEST%\lib\libsoftokn3.*
-..\%__SRC%\lib\libssl3.* %_DEST%\lib\libssl3.*
-..\%__SRC%\lib\libcrmf.a %_DEST%\lib\libcrmf.a
-
-..\%__SRC%\lib\libsqlite3.* %_DEST%\lib\sqlite\libsqlite3.*
-..\%__SRC%\lib\*.lib %_DEST%\lib
-
-..\%__SRC%\bin\* %_DEST%\bin
-
diff --git a/nss/prj/dmake b/nss/prj/dmake
deleted file mode 100644
index e69de29bb2d1..000000000000
--- a/nss/prj/dmake
+++ /dev/null