Skip to content

Commit ae6ab69

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 ae6ab69

File tree

4 files changed

+16
-65
lines changed

4 files changed

+16
-65
lines changed

ports/gperf/CMakeLists.txt

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.15)
2+
23
project(gperf LANGUAGES C CXX)
34

45
include(CheckCXXSourceCompiles)
56
include(GNUInstallDirs)
67

78
CHECK_CXX_SOURCE_COMPILES("int main(int n) { int dynamic_array[n]; }" HAVE_DYNAMIC_ARRAY)
89

10+
if(MSVC)
11+
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
12+
endif()
13+
914
set(LIBGP_SOURCES
1015
lib/getline.cc
1116
lib/getline.h

ports/gperf/CONTROL

+1-1
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

-53
This file was deleted.

ports/gperf/portfile.cmake

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
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})
1917
file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
2018

2119
vcpkg_configure_cmake(
2220
SOURCE_PATH ${SOURCE_PATH}
21+
OPTIONS -DCMAKE_SYSTEM_VERSION=8.1
2322
OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools
2423
)
2524

0 commit comments

Comments
 (0)