mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 23:37:33 +09:00
Update NSS to 3.32.1-RTM
This commit is contained in:
parent
f29876f120
commit
c91ef9012b
512 changed files with 83203 additions and 16839 deletions
|
|
@ -1,48 +1,59 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
# This script builds NSPR for NSS.
|
||||
#
|
||||
# This build system is still under development. It does not yet support all
|
||||
# the features or platforms that the regular NSPR build supports.
|
||||
|
||||
# variables
|
||||
nspr_opt=()
|
||||
nspr_cflags=
|
||||
nspr_cxxflags=
|
||||
nspr_ldflags=
|
||||
|
||||
nspr_sanitizer()
|
||||
# Try to avoid bmake on OS X and BSD systems
|
||||
if hash gmake 2>/dev/null; then
|
||||
make() { command gmake "$@"; }
|
||||
fi
|
||||
|
||||
nspr_set_flags()
|
||||
{
|
||||
nspr_cflags="$nspr_cflags $(python $cwd/coreconf/sanitizers.py $1 $2)"
|
||||
nspr_cxxflags="$nspr_cxxflags $(python $cwd/coreconf/sanitizers.py $1 $2)"
|
||||
nspr_ldflags="$nspr_ldflags $(python $cwd/coreconf/sanitizers.py $1 $2)"
|
||||
nspr_cflags="$CFLAGS $@"
|
||||
nspr_cxxflags="$CXXFLAGS $@"
|
||||
nspr_ldflags="$LDFLAGS $@"
|
||||
}
|
||||
|
||||
verbose()
|
||||
nspr_build()
|
||||
{
|
||||
CFLAGS=$nspr_cflags CXXFLAGS=$nspr_cxxflags LDFLAGS=$nspr_ldflags \
|
||||
CC=$CC CXX=$CCC ../configure "${nspr_opt[@]}" --prefix="$obj_dir"
|
||||
make -C "$cwd/../nspr/$target"
|
||||
make -C "$cwd/../nspr/$target" install
|
||||
}
|
||||
local nspr_dir="$cwd"/../nspr/$target
|
||||
mkdir -p "$nspr_dir"
|
||||
|
||||
silent()
|
||||
{
|
||||
echo "[1/3] configure NSPR ..."
|
||||
CFLAGS=$nspr_cflags CXXFLAGS=$nspr_cxxflags LDFLAGS=$nspr_ldflags \
|
||||
CC=$CC CXX=$CCC ../configure "${nspr_opt[@]}" --prefix="$obj_dir" 1> /dev/null
|
||||
echo "[2/3] make NSPR ..."
|
||||
make -C "$cwd/../nspr/$target" 1> /dev/null
|
||||
echo "[3/3] install NSPR ..."
|
||||
make -C "$cwd/../nspr/$target" install 1> /dev/null
|
||||
}
|
||||
|
||||
build_nspr()
|
||||
{
|
||||
mkdir -p "$cwd/../nspr/$target"
|
||||
cd "$cwd/../nspr/$target"
|
||||
if [ "$1" == 1 ]; then
|
||||
verbose
|
||||
else
|
||||
silent
|
||||
# These NSPR options are directory-specific, so they don't need to be
|
||||
# included in nspr_opt and changing them doesn't force a rebuild of NSPR.
|
||||
extra_params=(--prefix="$dist_dir"/$target)
|
||||
if [ "$opt_build" = 1 ]; then
|
||||
extra_params+=(--disable-debug --enable-optimize)
|
||||
fi
|
||||
|
||||
echo "NSPR [1/3] configure ..."
|
||||
pushd "$nspr_dir" >/dev/null
|
||||
CFLAGS="$nspr_cflags" CXXFLAGS="$nspr_cxxflags" \
|
||||
LDFLAGS="$nspr_ldflags" CC="$CC" CXX="$CCC" \
|
||||
run_verbose ../configure "${extra_params[@]}" "$@"
|
||||
popd >/dev/null
|
||||
echo "NSPR [2/3] make ..."
|
||||
run_verbose make -C "$nspr_dir"
|
||||
echo "NSPR [3/3] install ..."
|
||||
run_verbose make -C "$nspr_dir" install
|
||||
}
|
||||
|
||||
nspr_clean()
|
||||
{
|
||||
rm -rf "$cwd"/../nspr/$target
|
||||
}
|
||||
|
||||
set_nspr_path()
|
||||
{
|
||||
local include=$(echo "$1" | cut -d: -f1)
|
||||
local lib=$(echo "$1" | cut -d: -f2)
|
||||
gyp_params+=(-Dnspr_include_dir="$include")
|
||||
gyp_params+=(-Dnspr_lib_dir="$lib")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue