From 1185e7591f28172e83f7f8f92793ef77c15bd22c Mon Sep 17 00:00:00 2001 From: Sy Brand Date: Wed, 16 Oct 2024 05:02:30 +0100 Subject: [PATCH] [libedit] Add new port (#41442) Co-authored-by: Kai Pastor --- ports/libedit/portfile.cmake | 37 ++++++++++++++++++++++++++++++++++++ ports/libedit/vcpkg.json | 8 ++++++++ versions/baseline.json | 4 ++++ versions/l-/libedit.json | 9 +++++++++ 4 files changed, 58 insertions(+) create mode 100644 ports/libedit/portfile.cmake create mode 100644 ports/libedit/vcpkg.json create mode 100644 versions/l-/libedit.json diff --git a/ports/libedit/portfile.cmake b/ports/libedit/portfile.cmake new file mode 100644 index 0000000000..c6fa61aa34 --- /dev/null +++ b/ports/libedit/portfile.cmake @@ -0,0 +1,37 @@ +message( +"libedit currently requires the following programs from the system package manager: + autoconf autoheader aclocal automake libtoolize +On Debian and Ubuntu derivatives: + sudo apt install autoconf libtool +On recent Red Hat and Fedora derivatives: + sudo dnf install autoconf libtool +On Arch Linux and derivatives: + sudo pacman -S autoconf automake libtool +On Alpine: + apk add autoconf automake libtool" +) + +string(REPLACE "-" "" REF_SHORT_VERSION_DATE ${VERSION}) +vcpkg_download_distfile(ARCHIVE + URLS "https://thrysoee.dk/editline/libedit-${REF_SHORT_VERSION_DATE}-3.1.tar.gz" + FILENAME "libedit-${REF_SHORT_VERSION_DATE}-3.1.tar.gz" + SHA512 b11d64947f9484bb2320b0fbcfdc94466993af1dfa0d853853b73c222e95d6c1e78d88d0c305929b95bf7a85009129475c9fef0ac8595b43d75543d85052a4ff +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG +) +vcpkg_install_make() + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") diff --git a/ports/libedit/vcpkg.json b/ports/libedit/vcpkg.json new file mode 100644 index 0000000000..f513304271 --- /dev/null +++ b/ports/libedit/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "libedit", + "version-date": "2024-08-08", + "description": "A command line editor library that provides generic line editing, history, and tokenization functions, similar to those found in GNU Readline.", + "homepage": "https://thrysoee.dk/editline/", + "license": "BSD-4-Clause-UC", + "supports": "(!windows | mingw) & !android" +} diff --git a/versions/baseline.json b/versions/baseline.json index 60d351ee4c..b8b4a0b082 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4452,6 +4452,10 @@ "baseline": "1.2.6", "port-version": 2 }, + "libedit": { + "baseline": "2024-08-08", + "port-version": 0 + }, "libenvpp": { "baseline": "1.4.1", "port-version": 0 diff --git a/versions/l-/libedit.json b/versions/l-/libedit.json new file mode 100644 index 0000000000..70448e3b27 --- /dev/null +++ b/versions/l-/libedit.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "56b7b25793f17cac55a48c44958b26f6ca8440d5", + "version-date": "2024-08-08", + "port-version": 0 + } + ] +}