diff --git a/ports/gdbm/portfile.cmake b/ports/gdbm/portfile.cmake new file mode 100644 index 00000000000000..4b76cfb73d228b --- /dev/null +++ b/ports/gdbm/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://ftp.gnu.org/gnu/gdbm/gdbm-${VERSION}.tar.gz" + "https://ftpmirror.gnu.org/gdbm/gdbm-${VERSION}.tar.gz" + "https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gdbm/gdbm-${VERSION}.tar.gz" + FILENAME "gdbm-${VERSION}.tar.gz" + SHA512 401ff8c707079f21da1ac1d6f4714a87f224b6f41943078487dc891be49f51fd1ac7a32fd599aae0fad185f2c6ba7432616d328fd6aaab068eb54db9562ff7fa +) + +vcpkg_extract_source_archive( + SOURCE_PATH + ARCHIVE "${ARCHIVE}" +) + +vcpkg_list(SET options) + +if("libgdbm-compat" IN_LIST FEATURES) + list(APPEND options "--enable-libgdbm-compat=yes") +endif() + +if("readline" IN_LIST FEATURES) + list(APPEND options "--with-readline") +else() + list(APPEND options "--without-readline") +endif() + +if("memory-mapped-io" IN_LIST FEATURES) + list(APPEND options "--enable-memory-mapped-io") +else() + list(APPEND options "--disable-memory-mapped-io") +endif() + +vcpkg_make_configure( + SOURCE_PATH "${SOURCE_PATH}" + AUTORECONF + COPY_SOURCE + OPTIONS + ${options} +) + +vcpkg_make_install() + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING") + +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/share/gdbm/info" + "${CURRENT_PACKAGES_DIR}/share/gdbm/locale" + "${CURRENT_PACKAGES_DIR}/share/gdbm/man1" + "${CURRENT_PACKAGES_DIR}/share/gdbm/man3" +) diff --git a/ports/gdbm/vcpkg.json b/ports/gdbm/vcpkg.json new file mode 100644 index 00000000000000..d0f720f7ebdf28 --- /dev/null +++ b/ports/gdbm/vcpkg.json @@ -0,0 +1,28 @@ +{ + "name": "gdbm", + "version": "1.24", + "description": "GDBM is a library of database functions that use extensible hashing and works similar to the standard UNIX dbm.", + "homepage": "https://www.gnu.org.ua/software/gdbm/gdbm.html", + "license": "GPL-3.0-only", + "supports": "linux", + "dependencies": [ + { + "name": "vcpkg-make", + "host": true + } + ], + "features": { + "libgdbm-compat": { + "description": "Build and install libgdbm_compat, a compatibility layer which provides UNIX-like dbm and ndbm interfaces." + }, + "memory-mapped-io": { + "description": "Enable the use of mmap(2) for I/O optimizations." + }, + "readline": { + "description": "Enable GNU Readline support.", + "dependencies": [ + "readline" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 49ac1161c681a0..7fb9c81db043b7 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3044,6 +3044,10 @@ "baseline": "3.10.2", "port-version": 0 }, + "gdbm": { + "baseline": "1.24", + "port-version": 0 + }, "gdcm": { "baseline": "3.0.24", "port-version": 0 diff --git a/versions/g-/gdbm.json b/versions/g-/gdbm.json new file mode 100644 index 00000000000000..370bcdfbc85068 --- /dev/null +++ b/versions/g-/gdbm.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "6f1a4f9089dcb8097ecdf38fda0274e2f19c6294", + "version": "1.24", + "port-version": 0 + } + ] +}