Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[crfsuite] change /include/x.h => /include/crfsuite/x.h #15785

Merged
merged 1 commit into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion port_versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,7 @@
},
"crfsuite": {
"baseline": "2019-07-21",
"port-version": 0
"port-version": 1
},
"croncpp": {
"baseline": "2020-09-04",
Expand Down
5 changes: 5 additions & 0 deletions port_versions/c-/crfsuite.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "65bc9733064d028bb4f2960d824862263f74bfde",
"version-date": "2019-07-21",
"port-version": 1
},
{
"git-tree": "779f57b3fd1e0e2a15df5baf4488ef149f7f0cfd",
"version-string": "2019-07-21",
Expand Down
58 changes: 32 additions & 26 deletions ports/crfsuite/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
PROJECT(crfsuite)

file(GLOB SOURCE_FILE_CQDB
"lib/cqdb/src/*.c"
"lib/cqdb/src/*.c"
)
file(GLOB HEADERS_FILE_CQDB
"lib/cqdb/include/*.h"
"lib/cqdb/include/*.h"
)

file(GLOB SOURCE_FILE_CRF
"lib/crf/src/*.c"
"lib/crf/src/*.c"
)
file(GLOB HEADERS_FILE_CRF
"lib/crf/src/*.h"
"lib/crf/src/*.h"
)
file(GLOB SOURCE_FILE_FRONTEND
"frontend/*.c"
"frontend/*.c"
)
file(GLOB HEADERS_FILE_FRONTEND
"frontend/*.h"
"frontend/*.h"
)
file(GLOB SOURCE_FILE
"swig/*.cpp"
"frontend/*.c"
"swig/*.cpp"
"frontend/*.c"
)
file(GLOB HEADERS_FILE
"include/*.h"
"include/*.hpp"
"frontend/*.h"
"include/*.h"
"include/*.hpp"
"frontend/*.h"
)

find_library(LBFGS_LIBRARY lbfgs)
Expand All @@ -36,30 +36,36 @@ include_directories(lib/cqdb/include/)
include_directories(include/)
include_directories(win32/liblbfgs/)


add_library (cqdb STATIC ${SOURCE_FILE_CQDB} ${HEADERS_FILE_CQDB})
add_library (crf STATIC ${SOURCE_FILE_CRF} ${HEADERS_FILE_CRF})
add_library (crfsuite STATIC ${SOURCE_FILE} ${HEADERS_FILE})
add_library(cqdb STATIC ${SOURCE_FILE_CQDB} ${HEADERS_FILE_CQDB})
add_library(crf STATIC ${SOURCE_FILE_CRF} ${HEADERS_FILE_CRF})
add_library(crfsuite STATIC ${SOURCE_FILE} ${HEADERS_FILE})

target_link_libraries(crf PUBLIC cqdb ${LBFGS_LIBRARY})
target_link_libraries(crfsuite PUBLIC crf)


install(TARGETS cqdb crf crfsuite
RUNTIME DESTINATION bin
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)

if (WIN32)
add_executable(frontend ${SOURCE_FILE_FRONTEND} ${HEADERS_FILE_FRONTEND})
target_link_libraries(frontend PUBLIC crf)
install(TARGETS frontend
RUNTIME DESTINATION tools
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
add_executable(frontend ${SOURCE_FILE_FRONTEND} ${HEADERS_FILE_FRONTEND})
target_link_libraries(frontend PUBLIC crf)
install(TARGETS frontend
RUNTIME DESTINATION tools
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
endif()


install(FILES ${HEADERS_FILE} ${HEADERS_FILE_CQDB} ${HEADERS_FILE_CRF} ${HEADERS_FILE_FRONTEND} DESTINATION include)
install(
FILES
${HEADERS_FILE}
${HEADERS_FILE_CQDB}
${HEADERS_FILE_CRF}
${HEADERS_FILE_FRONTEND}
DESTINATION
include/crfsuite
)
5 changes: 0 additions & 5 deletions ports/crfsuite/CONTROL

This file was deleted.

19 changes: 8 additions & 11 deletions ports/crfsuite/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,31 +1,28 @@
if (VCPKG_TARGET_TRIPLET STREQUAL "x64-uwp" OR VCPKG_TARGET_TRIPLET STREQUAL "arm-uwp")
message(FATAL_ERROR "crfsuite does not support on this platform")
endif()

vcpkg_fail_port_install(ON_TARGET uwp)

vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO chokkan/crfsuite
REF 5d1bd3b803bb26582ed5cc274d6b5af6cc7f9cae
SHA512 e7f329f96fb0dc0e347b3e7a3e26b23ceb45e6fae7b59ace05633a24d58a31665826ebc5280e5a864f50598772791e4b5b3e7da7f46994655cbe03806f823f73
SHA512 e7f329f96fb0dc0e347b3e7a3e26b23ceb45e6fae7b59ace05633a24d58a31665826ebc5280e5a864f50598772791e4b5b3e7da7f46994655cbe03806f823f73
HEAD_REF master
)


list(REMOVE_ITEM SOURCE_FILE ${SOURCE_PATH}/win32/liblbfgs/lbfgs.lib)
list(REMOVE_ITEM SOURCE_FILE ${SOURCE_PATH}/win32/liblbfgs/lbfgs_debug.lib)
list(REMOVE_ITEM SOURCE_FILE "${SOURCE_PATH}/win32/liblbfgs/lbfgs.lib")
list(REMOVE_ITEM SOURCE_FILE "${SOURCE_PATH}/win32/liblbfgs/lbfgs_debug.lib")

file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
SOURCE_PATH "${SOURCE_PATH}"
PREFIX_NINJA
)
vcpkg_install_cmake()
vcpkg_copy_pdbs()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/crfsuite RENAME copyright)
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
11 changes: 11 additions & 0 deletions ports/crfsuite/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "crfsuite",
"version-date": "2019-07-21",
"port-version": 1,
"description": "CRFSuite is an implementation of Conditional Random Fields (CRFs) for labeling sequential data.",
"homepage": "http://www.chokkan.org/software/crfsuite/",
"supports": "!uwp",
"dependencies": [
"liblbfgs"
]
}
2 changes: 0 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ crashpad:arm-uwp=fail
crashpad:x64-linux=fail
crashpad:x64-uwp=fail
crashpad:x86-windows=fail
crfsuite:arm-uwp=fail
crfsuite:x64-uwp=fail
crossguid:x64-osx=fail
ctemplate:arm64-windows=fail
ctemplate:arm-uwp=fail
Expand Down