argon2: add new external library
Change-Id: I81860a94b33eba95918c30b0e92b583cc2d02ff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160969 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
@@ -101,6 +101,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S
|
||||
@date >> $(fetch_LOGFILE)
|
||||
$(foreach item, \
|
||||
$(call fetch_Optional,ABW,ABW_TARBALL) \
|
||||
$(call fetch_Optional,ARGON2,ARGON2_TARBALL) \
|
||||
$(call fetch_Optional,BOOST,BOOST_TARBALL) \
|
||||
$(call fetch_Optional,BOX2D,BOX2D_TARBALL) \
|
||||
$(call fetch_Optional,BREAKPAD,BREAKPAD_TARBALL) \
|
||||
|
||||
@@ -1553,6 +1553,35 @@ endif # SYSTEM_OPENSSL
|
||||
endif # ENABLE_OPENSSL
|
||||
|
||||
|
||||
ifneq ($(SYSTEM_ARGON2),)
|
||||
|
||||
define gb_LinkTarget__use_argon2
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
$(ARGON2_CFLAGS) \
|
||||
$$(INCLUDE) \
|
||||
)
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(ARGON2_LIBS))
|
||||
|
||||
endef
|
||||
|
||||
else # !SYSTEM_ARGON2
|
||||
|
||||
$(eval $(call gb_Helper_register_packages_for_install,ooo, \
|
||||
argon2 \
|
||||
))
|
||||
|
||||
define gb_LinkTarget__use_argon2
|
||||
$(call gb_LinkTarget_set_include,$(1),\
|
||||
$(ARGON2_CFLAGS) \
|
||||
$$(INCLUDE) \
|
||||
)
|
||||
$(call gb_LinkTarget_add_libs,$(1),$(ARGON2_LIBS))
|
||||
$(call gb_LinkTarget_use_package,$(1),argon2)
|
||||
endef
|
||||
|
||||
endif # SYSTEM_ARGON2
|
||||
|
||||
|
||||
ifneq ($(SYSTEM_CDR),)
|
||||
|
||||
define gb_LinkTarget__use_cdr
|
||||
|
||||
@@ -623,6 +623,9 @@ SYSTEM_ABSEIL=@SYSTEM_ABSEIL@
|
||||
export ABSEIL_CFLAGS=@ABSEIL_CFLAGS@
|
||||
export ABSEIL_LIBS=@ABSEIL_LIBS@
|
||||
SYSTEM_ABW=@SYSTEM_ABW@
|
||||
ARGON2_CFLAGS=$(gb_SPACE)@ARGON2_CFLAGS@
|
||||
ARGON2_LIBS=$(gb_SPACE)@ARGON2_LIBS@
|
||||
SYSTEM_ARGON2=@SYSTEM_ARGON2@
|
||||
SYSTEM_BLUEZ=@SYSTEM_BLUEZ@
|
||||
# FIXME: concat-deps reads SYSTEM_BOOST from env
|
||||
SYSTEM_BOOST=@SYSTEM_BOOST@
|
||||
|
||||
@@ -11206,6 +11206,14 @@ if test "$build_crypto" = yes; then
|
||||
fi
|
||||
fi
|
||||
|
||||
ARGON2_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/argon2/include"
|
||||
if test "$COM" = "MSC"; then
|
||||
ARGON2_LIBS_internal="${WORKDIR}/UnpackedTarball/argon2/vs2015/build/Argon2OptDll.lib"
|
||||
else
|
||||
ARGON2_LIBS_internal="${WORKDIR}/UnpackedTarball/argon2/libargon2.a"
|
||||
fi
|
||||
libo_CHECK_SYSTEM_MODULE([argon2],[ARGON2],[libargon2])
|
||||
|
||||
dnl ===================================================================
|
||||
dnl Check for system redland
|
||||
dnl ===================================================================
|
||||
|
||||
@@ -8,6 +8,11 @@ ABW_TARBALL := libabw-0.1.3.tar.xz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
ARGON2_SHA256SUM := daf972a89577f8772602bf2eb38b6a3dd3d922bf5724d45e7f9589b5e830442c
|
||||
ARGON2_TARBALL := phc-winner-argon2-20190702.tar.gz
|
||||
# three static lines
|
||||
# so that git cherry-pick
|
||||
# will not run into conflicts
|
||||
# please repack the tarball using external/boost/repack_tarball.sh
|
||||
BOOST_SHA256SUM := e48ab6953fbd68ba47234bea5173e62427e9f6a7894e152305142895cfe955de
|
||||
BOOST_TARBALL := boost_1_82_0.tar.xz
|
||||
|
||||
Vendored
+1
@@ -16,6 +16,7 @@ endif
|
||||
$(eval $(call gb_Module_add_moduledirs,external,\
|
||||
$(call gb_Helper_optional,XMLSEC,xmlsec) \
|
||||
$(call gb_Helper_optional,ABW,libabw) \
|
||||
$(call gb_Helper_optional,ARGON2,argon2) \
|
||||
$(call gb_Helper_optional,BOOST,boost) \
|
||||
$(call gb_Helper_optional,BOX2D,box2d) \
|
||||
$(call gb_Helper_optional,BREAKPAD,breakpad) \
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
|
||||
#
|
||||
# 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,argon2,argon2))
|
||||
|
||||
$(eval $(call gb_ExternalPackage_use_external_project,argon2,argon2))
|
||||
|
||||
ifeq ($(COM),MSC)
|
||||
$(eval $(call gb_ExternalPackage_add_file,argon2,$(LIBO_LIB_FOLDER)/Argon2OptDll.dll,vs2015/build/Argon2OptDll.dll))
|
||||
endif # $(COM)
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
|
||||
#
|
||||
# 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,argon2))
|
||||
|
||||
$(eval $(call gb_ExternalProject_register_targets,argon2,\
|
||||
build \
|
||||
))
|
||||
|
||||
ifeq ($(COM),MSC)
|
||||
|
||||
# .vcxproj needs manual SolutionDir to find header; there is a .sln file but it
|
||||
# expects "x86" where we pass "Win32"
|
||||
|
||||
$(call gb_ExternalProject_get_state_target,argon2,build):
|
||||
$(call gb_Trace_StartRange,argon2,EXTERNAL)
|
||||
$(call gb_ExternalProject_run,build,\
|
||||
MSBuild.exe vs2015/Argon2OptDll/Argon2OptDll.vcxproj \
|
||||
/p:SolutionDir="$(call gb_UnpackedTarball_get_dir,argon2)/" \
|
||||
$(gb_MSBUILD_CONFIG_AND_PLATFORM) \
|
||||
/p:PlatformToolset=$(VCTOOLSET) /p:VisualStudioVersion=$(VCVER) /ToolsVersion:Current \
|
||||
$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
|
||||
&& MSBuild.exe vs2015/Argon2OptTestCI/Argon2OptTestCI.vcxproj \
|
||||
/p:SolutionDir="$(call gb_UnpackedTarball_get_dir,argon2)/" \
|
||||
$(gb_MSBUILD_CONFIG_AND_PLATFORM) \
|
||||
/p:PlatformToolset=$(VCTOOLSET) /p:VisualStudioVersion=$(VCVER) /ToolsVersion:Current \
|
||||
$(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION)) \
|
||||
$(if $(CROSS_COMPILING),,&& time vs2015/build/Argon2OptTestCI.exe) \
|
||||
)
|
||||
$(call gb_Trace_EndRange,argon2,EXTERNAL)
|
||||
|
||||
else # $(COM)
|
||||
|
||||
# clear MAKEFILES because Makefile relies on built-in rules
|
||||
|
||||
$(call gb_ExternalProject_get_state_target,argon2,build):
|
||||
$(call gb_Trace_StartRange,argon2,EXTERNAL)
|
||||
$(call gb_ExternalProject_run,build,\
|
||||
CFLAGS="$(CFLAGS) $(if $(filter-out WNT MACOSX,$(OS)),-fvisibility=hidden)" \
|
||||
MAKEFLAGS= $(MAKE) \
|
||||
OPTTARGET=$(if $(filter X86_64,$(CPUNAME)),x86-64,forcefail) \
|
||||
$(if $(CROSS_COMPILING),,&& time $(MAKE) test) \
|
||||
)
|
||||
$(call gb_Trace_EndRange,argon2,EXTERNAL)
|
||||
|
||||
endif # $(COM)
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
Vendored
+7
@@ -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:
|
||||
Vendored
+18
@@ -0,0 +1,18 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
|
||||
#
|
||||
# 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,argon2))
|
||||
|
||||
$(eval $(call gb_Module_add_targets,argon2,\
|
||||
UnpackedTarball_argon2 \
|
||||
ExternalProject_argon2 \
|
||||
ExternalPackage_argon2 \
|
||||
))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
Argon2 password hashing function
|
||||
|
||||
This is used in ODF encryption as key derivation function.
|
||||
|
||||
[https://github.com/P-H-C/phc-winner-argon2]
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t; fill-column: 100 -*-
|
||||
#
|
||||
# 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,argon2))
|
||||
|
||||
$(eval $(call gb_UnpackedTarball_set_tarball,argon2,$(ARGON2_TARBALL)))
|
||||
|
||||
# vim: set noet sw=4 ts=4:
|
||||
@@ -52,6 +52,12 @@
|
||||
<h1 style="text-align: center;"><a id="thirdparty" name="thirdparty">Third Party Code Additional Copyright
|
||||
Notices and License Terms</a></h1>
|
||||
<h1><a id="a__Libraries" name="a__Libraries">Libraries</a></h1>
|
||||
<div class="ARGON2">
|
||||
<h2>Argon2</h2>
|
||||
<p>The following software may be included in this product: Argon2. Use of any of this software is governed
|
||||
by the terms of the license below:</p>
|
||||
<p><a href="#a__Apache_License_version_2_0">Jump to Apache License Version 2.0</a></p>
|
||||
</div>
|
||||
<div class="BSH">
|
||||
<h2>beanshell</h2>
|
||||
<p>The following software may be included in this product: beanshell. Use of any of this software is governed
|
||||
|
||||
Reference in New Issue
Block a user