Skip to content

Commit eda1618

Browse files
committed
Update gperf to v3.2
The gperf 3.2 release happened early this year but the release wasn't packaged on their ftp. Use a GitHub mirror of the sources instead. Build is modified to use a static runtime on Windows. It also targets Windows 8.1. This is to make sure that the executable runs within the docker-webkit-dev containers.
1 parent eed7570 commit eda1618

4 files changed

Lines changed: 16 additions & 65 deletions

File tree

ports/gperf/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.15)
2+
3+
set(CMAKE_SYSTEM_VERSION 8.1 CACHE TYPE INTERNAL FORCE)
24
project(gperf LANGUAGES C CXX)
35

46
include(CheckCXXSourceCompiles)
57
include(GNUInstallDirs)
68

79
CHECK_CXX_SOURCE_COMPILES("int main(int n) { int dynamic_array[n]; }" HAVE_DYNAMIC_ARRAY)
810

11+
if(MSVC)
12+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
13+
endif()
14+
915
set(LIBGP_SOURCES
1016
lib/getline.cc
1117
lib/getline.h

ports/gperf/CONTROL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Source: gperf
2-
Version: 3.1-1
2+
Version: 3.2
33
Description: GNU perfect hash function generator
44
Homepage: https://www.gnu.org/software/gperf/

ports/gperf/patches/0001-Support-input-files-with-CR-LF-line-terminators.patch

Lines changed: 0 additions & 53 deletions
This file was deleted.

ports/gperf/portfile.cmake

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
1+
set(VERSION 3.2)
2+
13
vcpkg_fail_port_install(ON_TARGET "UWP")
24

35
set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
46

5-
vcpkg_download_distfile(ARCHIVE
6-
URLS http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz
7-
FILENAME gperf-3.1.tar.gz
8-
SHA512 855ebce5ff36753238a44f14c95be7afdc3990b085960345ca2caf1a2db884f7db74d406ce9eec2f4a52abb8a063d4ed000a36b317c9a353ef4e25e2cca9a3f4
9-
)
10-
11-
vcpkg_extract_source_archive_ex(
7+
# There's a 3.2 release but it was never added to the ftp
8+
# Use a GitHub mirror instead
9+
vcpkg_from_github(
1210
OUT_SOURCE_PATH SOURCE_PATH
13-
ARCHIVE ${ARCHIVE}
14-
PATCHES
15-
${CMAKE_CURRENT_LIST_DIR}/patches/0001-Support-input-files-with-CR-LF-line-terminators.patch
11+
REPO rurban/gperf
12+
REF v3.2
13+
SHA512 9373ddff2b3f631722e7dbc1ad7330466d1322ff552c4876b36b397e75b0ec5f665b3a4437ea1b7163989f8e8864007548938b0970df2b345f8ae324d3f0d91d
1614
)
1715

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

0 commit comments

Comments
 (0)