forked from apache/incubator-gluten
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GLUTEN-7049][VL] Install lib stemmer through vcpkg (apache#7050)
- Loading branch information
Showing
5 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required(VERSION 3.8.0) | ||
|
||
project(libstemmer) | ||
|
||
file(GLOB SNOWBALL_SOURCES | ||
src_c/*.c | ||
runtime/api.c | ||
runtime/utilities.c | ||
libstemmer/libstemmer.c | ||
) | ||
|
||
add_library(stemmer ${SNOWBALL_SOURCES}) | ||
|
||
install( | ||
TARGETS stemmer | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib | ||
ARCHIVE DESTINATION lib | ||
) | ||
if(NOT DISABLE_INSTALL_HEADERS) | ||
install(FILES include/libstemmer.h DESTINATION include) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
vcpkg_check_linkage(ONLY_STATIC_LIBRARY) | ||
string(SUBSTRING "${VERSION}" 5 -1 VERSION) | ||
|
||
vcpkg_download_distfile(ARCHIVE | ||
URLS "https://snowballstem.org/dist/libstemmer_c-${VERSION}.tar.gz" | ||
FILENAME "libstemmer_c-${VERSION}.tar.gz" | ||
SHA512 a61a06a046a6a5e9ada12310653c71afb27b5833fa9e21992ba4bdf615255de991352186a8736d0156ed754248a0ffb7b7712e8d5ea16f75174d1c8ddd37ba4a | ||
) | ||
|
||
vcpkg_extract_source_archive( | ||
SOURCE_PATH | ||
ARCHIVE "${ARCHIVE}" | ||
) | ||
|
||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON | ||
) | ||
|
||
vcpkg_cmake_install() | ||
|
||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "libstemmer", | ||
"version": "2021.2.2.0", | ||
"description": "Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval", | ||
"homepage": "https://snowballstem.org/", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,7 +52,8 @@ | |
"benchmark", | ||
"jemalloc", | ||
"icu", | ||
"thrift" | ||
"thrift", | ||
"libstemmer" | ||
] | ||
}, | ||
"velox-s3": { | ||
|