<commit_before>project(luasec)
cmake_minimum_required(VERSION 3.5.1)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/../cmake_modules")
include("koreader_thirdparty_common")
include("koreader_thirdparty_git")

enable_language(C)

assert_var_defined(CC)
assert_var_defined(LD)
assert_var_defined(INC_PATH)
assert_var_defined(LIB_PATH)
assert_var_defined(LUAPATH)

ep_get_source_dir(SOURCE_DIR)

# Don't enforce CFLAGS
set(PATCH_CMD sh -c "${ISED} 's|-O2 ||g' src/Makefile")

set(BUILD_CMD_STR "${KO_MAKE_RECURSIVE} CC=\"${CC}\" LD=\"${LD}\" AR=\"${AR}\" RANLIB=\"${RANLIB}\" INC_PATH=\"${INC_PATH}\" LIB_PATH=\"${LIB_PATH}\" LUAPATH=\"${LUAPATH}\" LUACPATH=\"${LUAPATH}\"")
if(DEFINED LIBS)
    set(BUILD_CMD_STR "${BUILD_CMD_STR} LIBS=\"${LIBS}\"")
endif()
if ($ENV{DARWIN})
    set(INSTALL_CMD sh -c "${BUILD_CMD_STR} macosx install")
    set(BUILD_CMD sh -c "${BUILD_CMD_STR} macosx")
else()
    set(INSTALL_CMD sh -c "${BUILD_CMD_STR} linux install")
    set(BUILD_CMD sh -c "${BUILD_CMD_STR} linux")
endif()

ko_write_gitclone_script(
    GIT_CLONE_SCRIPT_FILENAME
    https://github.com/brunoos/luasec
    luasec-0.8
    ${SOURCE_DIR}
)

include(ExternalProject)
ExternalProject_Add(
    ${PROJECT_NAME}<commit_msg>bump luasec to 0.8.1 (#949)<commit_after>project(luasec)
cmake_minimum_required(VERSION 3.5.1)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/../cmake_modules")
include("koreader_thirdparty_common")
include("koreader_thirdparty_git")

enable_language(C)

assert_var_defined(CC)
assert_var_defined(LD)
assert_var_defined(INC_PATH)
assert_var_defined(LIB_PATH)
assert_var_defined(LUAPATH)

ep_get_source_dir(SOURCE_DIR)

# Don't enforce CFLAGS
set(PATCH_CMD sh -c "${ISED} 's|-O2 ||g' src/Makefile")

set(BUILD_CMD_STR "${KO_MAKE_RECURSIVE} CC=\"${CC}\" LD=\"${LD}\" AR=\"${AR}\" RANLIB=\"${RANLIB}\" INC_PATH=\"${INC_PATH}\" LIB_PATH=\"${LIB_PATH}\" LUAPATH=\"${LUAPATH}\" LUACPATH=\"${LUAPATH}\"")
if(DEFINED LIBS)
    set(BUILD_CMD_STR "${BUILD_CMD_STR} LIBS=\"${LIBS}\"")
endif()
if ($ENV{DARWIN})
    set(INSTALL_CMD sh -c "${BUILD_CMD_STR} macosx install")
    set(BUILD_CMD sh -c "${BUILD_CMD_STR} macosx")
else()
    set(INSTALL_CMD sh -c "${BUILD_CMD_STR} linux install")
    set(BUILD_CMD sh -c "${BUILD_CMD_STR} linux")
endif()

ko_write_gitclone_script(
    GIT_CLONE_SCRIPT_FILENAME
    https://github.com/brunoos/luasec
    luasec-0.8.1
    ${SOURCE_DIR}
)

include(ExternalProject)
ExternalProject_Add(
    ${PROJECT_NAME}
{'fraction_non_alphanumeric': 0.1718625099920064, 'fraction_numerical': 0.007593924860111911, 'mean_word_length': 6.539156626506024, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1986723', 'n_tokens_mistral': 1062, 'n_tokens_neox': 1004, 'n_words': 153}