commit b26177ada1d244a139f037595c3d8119c8fcdb14 from: Thomas Adam date: Thu Mar 03 22:04:22 2022 UTC portable: add support for DragonFlyBSD This adds support for DragonFlyBSD. commit - e499844e1f1133e5e1dcf58d89f8e6444b91a3eb commit + b26177ada1d244a139f037595c3d8119c8fcdb14 blob - 0181f533fd3d5ba411f2d2eb1da56561d2a48d33 blob + f030966c121d6188a680adb6e2f3f87f4ba670b9 --- .github/README.md +++ .github/README.md @@ -11,6 +11,7 @@ The following operating systems are supported: * FreeBSD * NetBSD +* DragonFlyBSD * MacOS * Linux @@ -38,6 +39,12 @@ NetBSD: * `libuuid` * `ncuresesw` +DragonFlyBSD: + +* `automake` +* `pkgconf` +* `openssl` + Darwin (MacOS): * `automake` blob - e8418b4902dd9538621d19f1eddda96d7adfe907 blob + 4f22fcdb2ba42067f6f70f03d6969b3d815f3733 --- README.portable +++ README.portable @@ -8,6 +8,7 @@ The following operating systems are supported: * FreeBSD * NetBSD +* DragonFlyBSD * MacOS * Linux @@ -35,6 +36,12 @@ NetBSD: * `libuuid` * `ncuresesw` +DragonFlyBSD: + +* `automake` +* `pkgconf` +* `openssl` + Darwin (MacOS): * `automake` blob - 0fcc14025d7c44abbf983ad62bf4c5cc19332c91 blob + e33d930c6504cc00c0b9759a91f892c77b139416 --- configure.ac +++ configure.ac @@ -165,6 +165,10 @@ case "$host_os" in AC_MSG_RESULT(netbsd) PLATFORM=netbsd ;; + *dragonfly*) + AC_MSG_RESULT(dragonfly) + PLATFORM=dragonflybsd + ;; *) AC_MSG_RESULT(unknown) PLATFORM=unknown @@ -175,6 +179,7 @@ AM_CONDITIONAL([HOST_FREEBSD], [test "$PLATFORM" = "fr AM_CONDITIONAL([HOST_LINUX], [test "$PLATFORM" = "linux"]) AM_CONDITIONAL([HOST_DARWIN], [test "$PLATFORM" = "darwin"]) AM_CONDITIONAL([HOST_NETBSD], [test "$PLATFORM" = "netbsd"]) +AM_CONDITIONAL([HOST_DRAGONFLYBSD], [test "$PLATFORM" = "dragonflybsd"]) # Landlock detection. AC_MSG_CHECKING([for landlock]) @@ -395,6 +400,12 @@ PKG_CHECK_MODULES( found_panel=no ) +PKG_CHECK_MODULES( + LIBPANELW, + panel, + found_panel=yes, + found_panel=no +) if test "x$found_panel" = "xno"; then AC_CHECK_LIB(panelw, update_panels,, AC_MSG_ERROR([ "*** panelw not found for ncurses. ***"]) blob - 7d9db3e5a84ef970dfadb93d80e42e1ed2d4cefe blob + a51529c96bbd21fc03ecd3acd8ae4225251a1d00 --- include/got_compat.h +++ include/got_compat.h @@ -145,13 +145,15 @@ void uuid_to_string(uuid_t *, char **, uint32_t *); #include #endif -#if defined(HAVE_LIBCRYPTO) && !defined(__APPLE__) +#if defined(HAVE_LIBCRYPTO) && !defined(__APPLE__) && !defined(__DragonFly__) #include -#elif !defined(__APPLE__) +#elif !defined(__APPLE__) && !defined(__DragonFly__) #include +#elif defined(__DragonFly__) +#include #endif -#if !defined(HAVE_LIBCRYPTO) || defined(__APPLE__) +#if !defined(HAVE_LIBCRYPTO) || defined(__APPLE__) || defined(__DragonFly__) #define SHA1_DIGEST_LENGTH SHA_DIGEST_LENGTH #define SHA1_DIGEST_STRING_LENGTH (SHA1_DIGEST_LENGTH * 2 + 1)