Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (c734a5cb11759a3a94859e8f9cc462621353cab5)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Treeve Jelbert <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (c734a5cb11759a3a94859e8f9cc462621353cab5)
  • Date: Mon, 13 Aug 2018 19:24:52 +0000

GIT changes to master grimoire by Treeve Jelbert <treeve AT sourcemage.org>:

crypto/cryfs/HISTORY
| 3
crypto/cryfs/PRE_BUILD
| 19
crypto/cryfs/patches/0001-cpp-utils-improvement.patch
| 72 ++
crypto/cryfs/patches/0002-cmake-improvements.patch
| 109 ++++
crypto/cryfs/patches/0003-fix-logging.patch
| 40 +
crypto/scrypt/DEPENDS
| 1
crypto/scrypt/DETAILS
| 1
crypto/scrypt/HISTORY
| 6
crypto/scrypt/INSTALL
| 7
crypto/scrypt/PRE_BUILD
| 3

crypto/scrypt/patches/0001-meson-build-simplifies-resuse-of-scrypt-by-other-spe.patch
| 269 ++++++++++
11 files changed, 506 insertions(+), 24 deletions(-)

New commits:
commit c734a5cb11759a3a94859e8f9cc462621353cab5
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

cryfs - use latest system lbraries

commit 1cb892f8cff1a583141b1e4831bb937a3e5a1f41
Author: Treeve Jelbert <treeve AT sourcemage.org>
Commit: Treeve Jelbert <treeve AT sourcemage.org>

scrypt - simplify code reuse

diff --git a/crypto/cryfs/HISTORY b/crypto/cryfs/HISTORY
index 722afbb..faccd5b 100644
--- a/crypto/cryfs/HISTORY
+++ b/crypto/cryfs/HISTORY
@@ -1,3 +1,6 @@
+2018-08-13 Treeve Jelbert <treeve AT sourcemage.org>
+ * PRE_BUILD patches/*: use system copies of fmt, syslog & scrypt
+
2018-05-23 Treeve Jelbert <treeve AT sourcemage.org>
* BUILD: fix boost detection
* DEPENDS: use bundled spdlog
diff --git a/crypto/cryfs/PRE_BUILD b/crypto/cryfs/PRE_BUILD
index 30f8b3a..9d39330 100755
--- a/crypto/cryfs/PRE_BUILD
+++ b/crypto/cryfs/PRE_BUILD
@@ -1,20 +1,5 @@
mk_source_dir $SOURCE_DIRECTORY &&
cd $SOURCE_DIRECTORY &&
unpack_file &&
-#
-# the project's build system is broken, so do it myself
-#
-
-
-sed -i '/cpack/D' CMakeLists.txt &&
-SCRYPT=vendor/scrypt/scrypt-$VX &&
-cp $INSTALL_ROOT/usr/include/scrypt/*.h \
- $SPELL_DIRECTORY/CMakeLists.txt \
- $SCRYPT/scrypt &&
-sed -i "s|vendor|$SCRYPT/scrypt|" CMakeLists.txt &&
-sed -i "1i \
-include_directories(\${CMAKE_SOURCE_DIR}/$SCRYPT)" \
- src/cpp-utils/CMakeLists.txt \
- src/cryfs/CMakeLists.txt \
- src/cryfs-cli/CMakeLists.txt &&
-sed -i 's/spdlog/fmt/' src/cpp-utils/CMakeLists.txt
+rm -r vendor &&
+apply_patch_dir patches
diff --git a/crypto/cryfs/patches/0001-cpp-utils-improvement.patch
b/crypto/cryfs/patches/0001-cpp-utils-improvement.patch
new file mode 100644
index 0000000..24a9fb1
--- /dev/null
+++ b/crypto/cryfs/patches/0001-cpp-utils-improvement.patch
@@ -0,0 +1,72 @@
+From 68a2654ffdd5dd9bb31eaa505d50714f31c8a98f Mon Sep 17 00:00:00 2001
+From: Treeve Jelbert <treeve AT sourcemage.org>
+Date: Mon, 13 Aug 2018 20:19:22 +0200
+Subject: [PATCH 1/3] cpp-utils improvement
+
+---
+ src/cpp-utils/CMakeLists.txt | 5 ++---
+ src/cpp-utils/crypto/kdf/Scrypt.h | 2 +-
+ src/cpp-utils/logging/Logger.h | 1 +
+ src/cpp-utils/logging/logging.h | 2 +-
+ 4 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/src/cpp-utils/CMakeLists.txt b/src/cpp-utils/CMakeLists.txt
+index a934bfe..3a65348 100644
+--- a/src/cpp-utils/CMakeLists.txt
++++ b/src/cpp-utils/CMakeLists.txt
+@@ -39,12 +39,11 @@ set(SOURCES
+ )
+
+ add_library(${PROJECT_NAME} STATIC ${SOURCES})
+-
+-target_link_libraries(${PROJECT_NAME} PUBLIC pthread curl)
++target_link_libraries(${PROJECT_NAME} PUBLIC curl pthread)
+
+ # TODO From Crypto++ 5.7 on, it should support cmake with find_package()
instead of find_library().
+ find_library_with_path(CryptoPP cryptopp CRYPTOPP_LIB_PATH)
+-target_link_libraries(${PROJECT_NAME} PUBLIC ${CryptoPP} scrypt spdlog)
++target_link_libraries(${PROJECT_NAME} PUBLIC ${CryptoPP} ${SCRYPT} fmt
${FMT_LIBRARIES})
+
+ target_add_boost(${PROJECT_NAME} filesystem system thread)
+ target_enable_style_warnings(${PROJECT_NAME})
+diff --git a/src/cpp-utils/crypto/kdf/Scrypt.h
b/src/cpp-utils/crypto/kdf/Scrypt.h
+index 6578e95..9ca3150 100644
+--- a/src/cpp-utils/crypto/kdf/Scrypt.h
++++ b/src/cpp-utils/crypto/kdf/Scrypt.h
+@@ -8,7 +8,7 @@
+ #include "PasswordBasedKDF.h"
+
+ extern "C" {
+- #include <scrypt/lib/crypto/crypto_scrypt.h>
++ #include <scrypto/crypto_scrypt.h>
+ }
+ #include <stdexcept>
+ #include "SCryptParameters.h"
+diff --git a/src/cpp-utils/logging/Logger.h b/src/cpp-utils/logging/Logger.h
+index 45e515c..eabbf7d 100644
+--- a/src/cpp-utils/logging/Logger.h
++++ b/src/cpp-utils/logging/Logger.h
+@@ -4,6 +4,7 @@
+
+ #define SPDLOG_ENABLE_SYSLOG
+ #include <spdlog/spdlog.h>
++#include <spdlog/sinks/stdout_sinks.h>
+ #include "../macros.h"
+
+ namespace cpputils {
+diff --git a/src/cpp-utils/logging/logging.h
b/src/cpp-utils/logging/logging.h
+index f98aa79..cf200ae 100644
+--- a/src/cpp-utils/logging/logging.h
++++ b/src/cpp-utils/logging/logging.h
+@@ -4,7 +4,7 @@
+
+ #include "Logger.h"
+ #include <stdexcept>
+-#include <spdlog/fmt/ostr.h>
++#include <fmt/ostream.h>
+
+ namespace cpputils {
+ namespace logging {
+--
+2.18.0
+
diff --git a/crypto/cryfs/patches/0002-cmake-improvements.patch
b/crypto/cryfs/patches/0002-cmake-improvements.patch
new file mode 100644
index 0000000..c0d8214
--- /dev/null
+++ b/crypto/cryfs/patches/0002-cmake-improvements.patch
@@ -0,0 +1,109 @@
+From 55f4325bc62a81d04996c92b1bb717f2a8bb71cc Mon Sep 17 00:00:00 2001
+From: Treeve Jelbert <treeve AT sourcemage.org>
+Date: Mon, 13 Aug 2018 20:20:20 +0200
+Subject: [PATCH 2/3] cmake improvements
+
+---
+ CMakeLists.txt | 21 +++++----------------
+ src/CMakeLists.txt | 10 ++++++++++
+ src/cryfs-cli/CMakeLists.txt | 3 ++-
+ utils.cmake | 11 ++---------
+ 4 files changed, 19 insertions(+), 26 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 04ac2aa..50b9287 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,29 +1,18 @@
+-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.8 FATAL_ERROR)
+
+ project(cryfs)
++set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
++set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
+
+ include(utils.cmake)
+
+ require_gcc_version(4.8)
+ require_clang_version(3.7)
+
+-# Default value is not to build test cases
+-if(NOT BUILD_TESTING)
+- set(BUILD_TESTING OFF CACHE BOOL "BUILD_TESTING")
+-endif(NOT BUILD_TESTING)
++option(BUILD_TESTING "build tests" OFF)
+
+-# Default vaule is to build in release mode
+-if(NOT CMAKE_BUILD_TYPE)
+- set(CMAKE_BUILD_TYPE Release CACHE INTERNAL "CMAKE_BUILD_TYPE")
+-endif(NOT CMAKE_BUILD_TYPE)
++option (CRYFS_UPDATE_CHECKS "allow online update checks" OFF)
+
+-# Default value is to do update checks
+-if(NOT CRYFS_UPDATE_CHECKS)
+- set(CRYFS_UPDATE_CHECKS ON CACHE BOOL "CRYFS_UPDATE_CHECKS")
+-endif(NOT CRYFS_UPDATE_CHECKS)
+-
+-add_subdirectory(vendor)
+ add_subdirectory(src)
+ add_subdirectory(doc)
+ add_subdirectory(test)
+-add_subdirectory(cpack)
+diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
+index c74b486..37e0c54 100644
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -1,4 +1,14 @@
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
++find_package(spdlog REQUIRED)
++find_package(fmt REQUIRED)
++add_definitions("-DSPDLOG_FMT_EXTERNAL=1")
++#include_directories(${FMT_INCLUDE_DIR})
++#include_directories(/usr/include)
++
++find_package(PkgConfig REQUIRED)
++find_library(SCRYPT NAMES libpercival percival)
++#pkg_search_module(scrypt)
++#find_package(scrypt REQUIRED)
+
+ add_subdirectory(gitversion)
+ add_subdirectory(cpp-utils)
+diff --git a/src/cryfs-cli/CMakeLists.txt b/src/cryfs-cli/CMakeLists.txt
+index 07a0ad5..21d7f18 100644
+--- a/src/cryfs-cli/CMakeLists.txt
++++ b/src/cryfs-cli/CMakeLists.txt
+@@ -15,7 +15,8 @@ add_library(${PROJECT_NAME} ${SOURCES})
+ target_link_libraries(${PROJECT_NAME} PUBLIC cryfs cpp-utils gitversion)
+ target_enable_style_warnings(${PROJECT_NAME})
+ target_activate_cpp14(${PROJECT_NAME})
+-
++#add_definitions('-D_FILE_OFFSET_BITS=64')
++target_compile_definitions(${PROJECT_NAME} PRIVATE -D_FILE_OFFSET_BITS=64)
+ if(NOT CRYFS_UPDATE_CHECKS)
+ target_compile_definitions(${PROJECT_NAME} PRIVATE
-DCRYFS_NO_UPDATE_CHECKS)
+ endif(NOT CRYFS_UPDATE_CHECKS)
+diff --git a/utils.cmake b/utils.cmake
+index de03cdb..dd1d06a 100644
+--- a/utils.cmake
++++ b/utils.cmake
+@@ -49,15 +49,8 @@ endfunction(target_enable_style_warnings)
+ ##################################################
+ function(target_add_boost TARGET)
+ # Load boost libraries
+- if(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
+- # Many supported systems don't have boost >= 1.56. Better link it
statically.
+- message(STATUS "Boost will be statically linked")
+- set(Boost_USE_STATIC_LIBS ON)
+- else(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
+- message(STATUS "Boost will be dynamically linked")
+- set(Boost_USE_STATIC_LIBS OFF)
+- endif(NOT DEFINED Boost_USE_STATIC_LIBS OR Boost_USE_STATIC_LIBS)
+- find_package(Boost 1.56.0
++ option(Boost_USE_STATIC_LIBS "use static Boost libraries" OFF)
++ find_package(Boost 1.56.0
+ REQUIRED
+ COMPONENTS ${ARGN})
+ target_include_directories(${TARGET} SYSTEM PUBLIC
${Boost_INCLUDE_DIRS})
+--
+2.18.0
+
diff --git a/crypto/cryfs/patches/0003-fix-logging.patch
b/crypto/cryfs/patches/0003-fix-logging.patch
new file mode 100644
index 0000000..71dd573
--- /dev/null
+++ b/crypto/cryfs/patches/0003-fix-logging.patch
@@ -0,0 +1,40 @@
+From c02cce52f3fba393f103db49082736c4a668125a Mon Sep 17 00:00:00 2001
+From: Treeve Jelbert <treeve AT sourcemage.org>
+Date: Mon, 13 Aug 2018 20:47:56 +0200
+Subject: [PATCH 3/3] fix logging
+
+---
+ src/cryfs-cli/Cli.cpp | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/cryfs-cli/Cli.cpp b/src/cryfs-cli/Cli.cpp
+index 8a80a4d..cb56350 100644
+--- a/src/cryfs-cli/Cli.cpp
++++ b/src/cryfs-cli/Cli.cpp
+@@ -6,6 +6,9 @@
+ #include <cmath>
+ #include <cstdio>
+ #include <cstdlib>
++
++#include <spdlog/sinks/syslog_sink.h>
++#include <spdlog/sinks/basic_file_sink.h>
+ #include <cpp-utils/assert/backtrace.h>
+
+ #include <fspp/fuse/Fuse.h>
+@@ -282,11 +285,11 @@ namespace cryfs {
+ //TODO Test that --logfile parameter works. Should be: file if
specified, otherwise stderr if foreground, else syslog.
+ if (options.logFile() != none) {
+ cpputils::logging::setLogger(
+-
spdlog::create<spdlog::sinks::simple_file_sink<std::mutex>>("cryfs",
options.logFile()->native()));
++
spdlog::create<spdlog::sinks::basic_file_sink<std::mutex>>("cryfs",
options.logFile()->native()));
+ } else if (options.foreground()) {
+ cpputils::logging::setLogger(spdlog::stderr_logger_mt("cryfs"));
+ } else {
+- cpputils::logging::setLogger(spdlog::syslog_logger("cryfs",
"cryfs", LOG_PID));
++ cpputils::logging::setLogger(spdlog::syslog_logger_mt("cryfs",
"cryfs", LOG_PID));
+ }
+ }
+
+--
+2.18.0
+
diff --git a/crypto/scrypt/DEPENDS b/crypto/scrypt/DEPENDS
index 09706da..b2f63d7 100755
--- a/crypto/scrypt/DEPENDS
+++ b/crypto/scrypt/DEPENDS
@@ -1 +1,2 @@
+source $GRIMOIRE/MESON_DEPENDS
depends SSL
diff --git a/crypto/scrypt/DETAILS b/crypto/scrypt/DETAILS
index f61456f..159920e 100755
--- a/crypto/scrypt/DETAILS
+++ b/crypto/scrypt/DETAILS
@@ -1,3 +1,4 @@
+source $GRIMOIRE/MESON_FUNCTIONS
SPELL=scrypt
VERSION=1.2.1

SOURCE_HASH=sha512:ffda0ee90d283985245b77cc1d04b13c52aff78e925f323075d3b2c0439f16bbba1c432de8607820af945e6fa4e3be0e22a422b0b43a1fca0504cee3761004cd
diff --git a/crypto/scrypt/HISTORY b/crypto/scrypt/HISTORY
index 8fd6f00..ea3847c 100644
--- a/crypto/scrypt/HISTORY
+++ b/crypto/scrypt/HISTORY
@@ -1,3 +1,9 @@
+2018-08-13 Treeve Jelbert <treeve AT sourcemage.org>
+ * DETAILS DEPENDS: adpt to meson
+ * PRE_BUILD patches/*: added
+ * INSTALL: deleted
+ use meson_build, to simplify code reuse in other spells
+
2017-09-16 Treeve Jelbert <treeve AT sourcemage.org>
* DETAILS: version 1.2.1
* DEPENDS: added, for SSL
diff --git a/crypto/scrypt/INSTALL b/crypto/scrypt/INSTALL
deleted file mode 100755
index 8371ccd..0000000
--- a/crypto/scrypt/INSTALL
+++ /dev/null
@@ -1,7 +0,0 @@
-default_install &&
-
-# cryfs needs these files
-cd $SOURCE_DIRECTORY &&
-DEST=$INSTALL_ROOT/usr/include/scrypt &&
-mkdir -p $DEST &&
-cp -a config.h cpusupport-config.h $DEST
diff --git a/crypto/scrypt/PRE_BUILD b/crypto/scrypt/PRE_BUILD
new file mode 100755
index 0000000..922c0ab
--- /dev/null
+++ b/crypto/scrypt/PRE_BUILD
@@ -0,0 +1,3 @@
+default_pre_build &&
+cd $SOURCE_DIRECTORY &&
+apply_patch_dir patches
diff --git
a/crypto/scrypt/patches/0001-meson-build-simplifies-resuse-of-scrypt-by-other-spe.patch

b/crypto/scrypt/patches/0001-meson-build-simplifies-resuse-of-scrypt-by-other-spe.patch
new file mode 100644
index 0000000..35e2913
--- /dev/null
+++
b/crypto/scrypt/patches/0001-meson-build-simplifies-resuse-of-scrypt-by-other-spe.patch
@@ -0,0 +1,269 @@
+From 66844fb7fb9c7ebf9f257a05d9ba6436b04365f6 Mon Sep 17 00:00:00 2001
+From: Treeve Jelbert <treeve AT sourcemage.org>
+Date: Sun, 12 Aug 2018 16:02:08 +0200
+Subject: [PATCH] meson build - simplifies resuse of scrypt by other spells
+
+---
+ config.h.meson | 99 ++++++++++++++++++++++++++++++++++
+ meson.build | 143 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 242 insertions(+)
+ create mode 100644 config.h.meson
+ create mode 100644 meson.build
+
+diff --git a/config.h.meson b/config.h.meson
+new file mode 100644
+index 0000000..d68637d
+--- /dev/null
++++ b/config.h.meson
+@@ -0,0 +1,99 @@
++/* config.h.in. Generated from configure.ac by autoheader. */
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#mesondefine HAVE_CLOCK_GETTIME
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#mesondefine HAVE_INTTYPES_H
++
++/* Define to 1 if you have the <memory.h> header file. */
++#mesondefine HAVE_MEMORY_H
++
++/* Define to 1 if you have the `mmap' function. */
++#mesondefine HAVE_MMAP
++
++/* Define to 1 if you have the <openssl/aes.h> header file. */
++#mesondefine HAVE_OPENSSL_AES_H
++
++/* Define to 1 if you have the `posix_memalign' function. */
++#mesondefine HAVE_POSIX_MEMALIGN
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#mesondefine HAVE_STDINT_H
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#mesondefine HAVE_STDLIB_H
++
++/* Define to 1 if you have the <strings.h> header file. */
++#mesondefine HAVE_STRINGS_H
++
++/* Define to 1 if you have the <string.h> header file. */
++#mesondefine HAVE_STRING_H
++
++/* Define to 1 if the system has the type `struct sysinfo'. */
++#mesondefine HAVE_STRUCT_SYSINFO
++
++/* Define to 1 if `mem_unit' is a member of `struct sysinfo'. */
++#mesondefine HAVE_STRUCT_SYSINFO_MEM_UNIT
++
++/* Define to 1 if `totalram' is a member of `struct sysinfo'. */
++#mesondefine HAVE_STRUCT_SYSINFO_TOTALRAM
++
++/* Define to 1 if you have the `sysinfo' function. */
++#mesondefine HAVE_SYSINFO
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#mesondefine HAVE_SYS_PARAM_H
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#mesondefine HAVE_SYS_STAT_H
++
++/* Define to 1 if you have the <sys/sysctl.h> header file. */
++#mesondefine HAVE_SYS_SYSCTL_H
++
++/* Define to 1 if you have the <sys/sysinfo.h> header file. */
++#mesondefine HAVE_SYS_SYSINFO_H
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#mesondefine HAVE_SYS_TYPES_H
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#mesondefine HAVE_UNISTD_H
++
++/* Name of package */
++#mesondefine PACKAGE
++
++/* Define to the address where bug reports for this package should be sent.
*/
++#mesondefine PACKAGE_BUGREPORT
++
++/* Define to the full name of this package. */
++#mesondefine PACKAGE_NAME
++
++/* Define to the full name and version of this package. */
++#mesondefine PACKAGE_STRING
++
++/* Define to the one symbol short name of this package. */
++#mesondefine PACKAGE_TARNAME
++
++/* Define to the home page for this package. */
++#mesondefine PACKAGE_URL
++
++/* Define to the version of this package. */
++#mesondefine PACKAGE_VERSION
++
++/* Define to 1 if you have the ANSI C header files. */
++#mesondefine STDC_HEADERS
++
++/* Version number of package */
++#mesondefine VERSION
++
++/* Enable large inode numbers on Mac OS X 10.5. */
++#ifndef _DARWIN_USE_64_BIT_INODE
++# define _DARWIN_USE_64_BIT_INODE 1
++#endif
++
++/* Number of bits in a file offset, on hosts where this is settable. */
++#mesondefine _FILE_OFFSET_BITS
++
++/* Define for large files, on AIX-style hosts. */
++#mesondefine _LARGE_FILES
+diff --git a/meson.build b/meson.build
+new file mode 100644
+index 0000000..7c77a48
+--- /dev/null
++++ b/meson.build
+@@ -0,0 +1,143 @@
++#kate: indent-width 2; tab-width 2;
++project(
++ 'scrypt',
++ ['c'],
++ version : '1.2.1',
++ license : 'BSD',
++ meson_version : '>= 0.46',
++ default_options : ['buildtype=debugoptimized']
++)
++
++cc = meson.get_compiler('c')
++c_args = ['-DHAVE_CONFIG_H']
++
++#pre_args = ['-D__USE_POSIX']
++
++foreach a : c_args
++ add_project_arguments(a, language : ['c'])
++endforeach
++
++cdata = configuration_data()
++cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
++
++check_headers = [
++ ['HAVE_INTTYPES_H', 'inttypes.h'],
++ ['HAVE_MEMORY_H', 'memory.h'],
++ ['HAVE_OPENSSL_AES_H', 'openssl/aes.h'],
++ ['HAVE_STDINT_H', 'stdint.h'],
++ ['HAVE_STDLIB_H', 'stdlib.h'],
++ ['HAVE_STRINGS_H', 'strings.h'],
++ ['HAVE_STRING_H', 'string.h'],
++ ['HAVE_SYS_PARAM_H', 'sys/param.h'],
++ ['HAVE_SYS_STAT_H', 'sys/stat.h'],
++ ['HAVE_SYS_SYSCTL_H', 'sys/sysctl.h'],
++ ['HAVE_SYS_SYSINFO_H', 'sys/sysinfo.h'],
++ ['HAVE_SYS_TYPES_H', 'sys/types.h'],
++ ['HAVE_UNISTD_H', 'unistd.h'],
++]
++
++foreach h : check_headers
++ if cc.has_header(h.get(1))
++ cdata.set(h.get(0), 1)
++ endif
++endforeach
++
++check_functions = [
++ ['HAVE_CLOCK_GETTIME', 'clock_gettime', '#include<time.h>'],
++ ['HAVE_MMAP', 'mmap', '#include<sys/mman.h>'],
++ ['HAVE_POSIX_MEMALIGN', 'posix_memalign', '#include<stdlib.h>'],
++# check token ('HAVE_STRUCT_SYSINFO',)
++# check token ('HAVE_STRUCT_SYSINFO_MEM_UNIT',)
++# check token ('HAVE_STRUCT_SYSINFO_TOTALRAM',)
++# check token ('HAVE_SYSINFO',)
++]
++
++foreach f : check_functions
++ if cc.has_function(f.get(1), prefix : f.get(2))
++ cdata.set(f.get(0), 1)
++ endif
++endforeach
++
++
++configure_file(input : 'config.h.meson',
++ output : 'config.h',
++ configuration : cdata)
++
++aes_dep = dependency('libcrypto')
++aes_lib = meson.get_compiler('c').find_library('libcrypto')
++
++
++#datadir = xorg_dep.get_pkgconfig_variable('sysconfigdir')
++#install_data('conf/10-radeon.conf',install_dir: datadir)
++libfiles=files(
++'lib/crypto/crypto_scrypt.c',
++'lib/crypto/crypto_scrypt_smix.c',
++'lib/crypto/crypto_scrypt_smix_sse2.c',
++
++'libcperciva/alg/sha256.c',
++'libcperciva/cpusupport/cpusupport_x86_aesni.c',
++'libcperciva/cpusupport/cpusupport_x86_sse2.c',
++'libcperciva/crypto/crypto_aes_aesni.c',
++'libcperciva/crypto/crypto_aes.c',
++'libcperciva/crypto/crypto_aesctr.c',
++'libcperciva/crypto/crypto_entropy.c',
++'libcperciva/util/entropy.c',
++'libcperciva/util/warnp.c',
++'libcperciva/util/insecure_memzero.c',
++)
++
++main_files = files(
++'main.c',
++'libcperciva/util/getopt.c',
++'libcperciva/util/readpass.c',
++'libcperciva/util/humansize.c',
++'libcperciva/util/asprintf.c',
++'lib/scryptenc/scryptenc.c',
++'lib/crypto/crypto_scrypt.c',
++'lib/scryptenc/scryptenc_cpuperf.c',
++'lib/util/memlimit.c',
++)
++
++inc_percy = include_directories(
++ 'libcperciva/cpusupport' ,
++ 'libcperciva/alg' ,
++ 'libcperciva/util',
++ )
++ inc_main = include_directories(
++ 'lib/scryptenc',
++ #'libcperciva/alg' ,
++ 'libcperciva/crypto',
++ #'libcperciva/util',
++ 'lib/crypto/',
++ 'lib/util',
++)
++
++percival = shared_library(
++ 'percival',
++ libfiles,
++ dependencies : [aes_dep,aes_lib],
++ include_directories : [inc_percy],
++ install : true,
++# link_with : [aes_lib],
++# name_prefix : '',
++# install_dir: libdir,
++)
++
++scrypt = executable('scrypt',main_files,
++ include_directories : [inc_main,inc_percy],
++ link_with : [percival],
++ install : true,
++)
++
++install_man('scrypt.1')
++
++pkgconfig = import('pkgconfig')
++pkgconfig.generate(
++ filebase : 'libpercival',
++ name : 'Libpercival',
++ description : 'helper library for scrypt',
++ version : meson.project_version(),
++ libraries : percival
++)
++
++install_headers('lib/crypto/crypto_scrypt.h', subdir : 'scrypto')
+--
+2.18.0
+



  • [SM-Commit] GIT changes to master grimoire by Treeve Jelbert (c734a5cb11759a3a94859e8f9cc462621353cab5), Treeve Jelbert, 08/13/2018

Archive powered by MHonArc 2.6.24.

Top of Page