mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 02:27:09 +01:00
[gperf] Initial implementation (#9505)
This commit is contained in:
parent
ed76c7eef2
commit
d989ad416b
53
ports/gperf/CMakeLists.txt
Normal file
53
ports/gperf/CMakeLists.txt
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.0)
|
||||||
|
project(gperf LANGUAGES C CXX)
|
||||||
|
|
||||||
|
include(CheckCXXSourceCompiles)
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
CHECK_CXX_SOURCE_COMPILES("int main(int n) { int dynamic_array[n]; }" HAVE_DYNAMIC_ARRAY)
|
||||||
|
|
||||||
|
set(LIBGP_SOURCES
|
||||||
|
lib/getline.cc
|
||||||
|
lib/getline.h
|
||||||
|
lib/getopt.c
|
||||||
|
lib/getopt.h
|
||||||
|
lib/getopt1.c
|
||||||
|
lib/hash.cc
|
||||||
|
lib/hash.h)
|
||||||
|
add_library(gp STATIC ${LIBGP_SOURCES})
|
||||||
|
target_include_directories(gp PUBLIC "${CMAKE_SOURCE_DIR}/lib")
|
||||||
|
|
||||||
|
set(GPERF_SOURCES
|
||||||
|
src/bool-array.cc
|
||||||
|
src/bool-array.h
|
||||||
|
src/bool-array.icc
|
||||||
|
src/hash-table.cc
|
||||||
|
src/hash-table.h
|
||||||
|
src/input.cc
|
||||||
|
src/input.h
|
||||||
|
src/keyword-list.cc
|
||||||
|
src/keyword-list.h
|
||||||
|
src/keyword-list.icc
|
||||||
|
src/keyword.cc
|
||||||
|
src/keyword.h
|
||||||
|
src/keyword.icc
|
||||||
|
src/main.cc
|
||||||
|
src/options.cc
|
||||||
|
src/options.h
|
||||||
|
src/options.icc
|
||||||
|
src/output.cc
|
||||||
|
src/output.h
|
||||||
|
src/positions.cc
|
||||||
|
src/positions.h
|
||||||
|
src/positions.icc
|
||||||
|
src/search.cc
|
||||||
|
src/search.h
|
||||||
|
src/version.cc
|
||||||
|
src/version.h)
|
||||||
|
add_executable(gperf ${GPERF_SOURCES})
|
||||||
|
target_link_libraries(gperf gp)
|
||||||
|
target_include_directories(gperf PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
|
||||||
|
configure_file(config.h.in config.h @ONLY)
|
||||||
|
|
||||||
|
install(TARGETS gperf RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
4
ports/gperf/CONTROL
Normal file
4
ports/gperf/CONTROL
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
Source: gperf
|
||||||
|
Version: 3.1-1
|
||||||
|
Description: GNU perfect hash function generator
|
||||||
|
Homepage: https://www.gnu.org/software/gperf/
|
1
ports/gperf/config.h.in
Normal file
1
ports/gperf/config.h.in
Normal file
@ -0,0 +1 @@
|
|||||||
|
#cmakedefine HAVE_DYNAMIC_ARRAY @HAVE_DYNAMIC_ARRAY@
|
30
ports/gperf/portfile.cmake
Normal file
30
ports/gperf/portfile.cmake
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
vcpkg_fail_port_install(ON_TARGET "UWP")
|
||||||
|
|
||||||
|
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
|
||||||
|
|
||||||
|
vcpkg_download_distfile(ARCHIVE
|
||||||
|
URLS http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
|
||||||
|
FILENAME gperf-3.1.tar.gz
|
||||||
|
SHA512 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_extract_source_archive_ex(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
ARCHIVE ${ARCHIVE}
|
||||||
|
)
|
||||||
|
|
||||||
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||||
|
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
|
||||||
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
|
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
|
||||||
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||||
|
endif()
|
@ -554,6 +554,8 @@ googleapis:x64-uwp=fail
|
|||||||
google-cloud-cpp:x64-linux=ignore
|
google-cloud-cpp:x64-linux=ignore
|
||||||
google-cloud-cpp-spanner:x86-windows=fail
|
google-cloud-cpp-spanner:x86-windows=fail
|
||||||
gppanel:x64-osx=fail
|
gppanel:x64-osx=fail
|
||||||
|
gperf:x64-uwp=fail
|
||||||
|
gperf:arm-uwp=fail
|
||||||
graphicsmagick:arm64-windows=fail
|
graphicsmagick:arm64-windows=fail
|
||||||
graphicsmagick:arm-uwp=fail
|
graphicsmagick:arm-uwp=fail
|
||||||
graphicsmagick:x64-uwp=fail
|
graphicsmagick:x64-uwp=fail
|
||||||
|
Loading…
x
Reference in New Issue
Block a user