diff options
Diffstat (limited to 'vcpkg/ports/gdbm')
| -rw-r--r-- | vcpkg/ports/gdbm/portfile.cmake | 52 | ||||
| -rw-r--r-- | vcpkg/ports/gdbm/vcpkg.json | 29 |
2 files changed, 81 insertions, 0 deletions
diff --git a/vcpkg/ports/gdbm/portfile.cmake b/vcpkg/ports/gdbm/portfile.cmake new file mode 100644 index 0000000..d2fea2a --- /dev/null +++ b/vcpkg/ports/gdbm/portfile.cmake @@ -0,0 +1,52 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://ftpmirror.gnu.org/gdbm/gdbm-${VERSION}.tar.gz" + "https://ftp.gnu.org/gnu/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/vcpkg/ports/gdbm/vcpkg.json b/vcpkg/ports/gdbm/vcpkg.json new file mode 100644 index 0000000..f0f1f45 --- /dev/null +++ b/vcpkg/ports/gdbm/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "gdbm", + "version": "1.24", + "port-version": 1, + "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" + ] + } + } +} |