Merge pull request #2349 from InuSasha/feature/nss-host

nss/nspr: build full host library
This commit is contained in:
Christian Hewitt 2017-12-27 23:21:39 +04:00 committed by GitHub
commit ef5a27c606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 7 deletions

View File

@ -23,6 +23,7 @@ PKG_VERSION="4.13.1"
PKG_ARCH="any"
PKG_LICENSE="Mozilla Public License"
PKG_SITE="http://www.linuxfromscratch.org/blfs/view/svn/general/nspr.html"
PKG_DEPENDS_HOST="ccache:host"
PKG_DEPENDS_TARGET="toolchain nss:host"
PKG_SECTION="security"
PKG_SHORTDESC="Netscape Portable Runtime (NSPR) provides a platform-neutral API for system level and libc like functions"
@ -39,7 +40,22 @@ PKG_CONFIGURE_OPTS_TARGET="--with-pthreads $TARGET_USE_64"
PKG_MAKE_OPTS_TARGET="NSINSTALL=$TOOLCHAIN/bin/nsinstall"
PKG_MAKEINSTALL_OPTS_TARGET="NSINSTALL=$TOOLCHAIN/bin/nsinstall"
configure_host() {
cd $(get_build_dir nss)/nspr
./configure --with-pthreads --enable-64bit --with-pthreads --prefix=$TOOLCHAIN
}
pre_make_host() {
cd $(get_build_dir nss)/nspr
make clean
}
configure_target() {
cd $(get_build_dir nss)/nspr
./configure --with-pthreads $TARGET_USE_64 $TARGET_CONFIGURE_OPTS
}
pre_make_target() {
cd $(get_build_dir nss)/nspr
make clean
}

View File

@ -25,6 +25,7 @@ PKG_ARCH="any"
PKG_LICENSE="Mozilla Public License"
PKG_SITE="http://ftp.mozilla.org/"
PKG_URL="http://ftp.mozilla.org/pub/security/nss/releases/NSS_3_29_5_RTM/src/nss-3.29.5-with-nspr-4.13.1.tar.gz"
PKG_DEPENDS_HOST="nspr:host zlib:host"
PKG_DEPENDS_TARGET="toolchain nss:host nspr zlib sqlite"
PKG_SECTION="security"
PKG_SHORTDESC="The Network Security Services (NSS) package is a set of libraries designed to support cross-platform development of security-enabled client and server applications"
@ -36,21 +37,38 @@ MAKEFLAGS=-j1
make_host() {
cd $PKG_BUILD/nss
make USE_64=1 -C coreconf/nsinstall
make clean || true
rm -rf $PKG_BUILD/dist
make BUILD_OPT=1 USE_64=1 \
PREFIX=$TOOLCHAIN \
NSPR_INCLUDE_DIR=$TOOLCHAIN/include/nspr \
USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz \
SKIP_SHLIBSIGN=1 \
NSS_TESTS="dummy" \
CC=$CC LDFLAGS="$LDFLAGS -L$TOOLCHAIN/lib" \
V=1
}
makeinstall_host() {
cp $PKG_BUILD/nss/coreconf/nsinstall/*/nsinstall $TOOLCHAIN/bin
}
post_makeinstall_host() {
rm -rf $PKG_BUILD/nss/coreconf/nsinstall/Linux*
cd $PKG_BUILD
$STRIP dist/Linux*/lib/*.so
cp -L dist/Linux*/lib/*.so $TOOLCHAIN/lib
cp -L dist/Linux*/lib/libcrmf.a $TOOLCHAIN/lib
mkdir -p $TOOLCHAIN/include/nss
cp -RL dist/{public,private}/nss/* $TOOLCHAIN/include/nss
cp -L dist/Linux*/lib/pkgconfig/nss.pc $TOOLCHAIN/lib/pkgconfig
cp -L nss/coreconf/nsinstall/*/nsinstall $TOOLCHAIN/bin
}
make_target() {
cd $PKG_BUILD/nss
[ "$TARGET_ARCH" = "x86_64" ] && TARGET_USE_64="USE_64=1"
local TARGET_USE_64=""
[ "$TARGET_ARCH" = "x86_64" -o "$TARGET_ARCH" = "aarch64" ] && TARGET_USE_64="USE_64=1"
make clean || true
rm -rf $PKG_BUILD/dist
make BUILD_OPT=1 $TARGET_USE_64 \
NSS_USE_SYSTEM_SQLITE=1 \