-
-
Notifications
You must be signed in to change notification settings - Fork 601
Add initial support for MidnightBSD #1377
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
0d410ec
4fbf038
86d10ed
2ccd8b3
efe66e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") | |
| set(FreeBSD TRUE CACHE BOOL "..." FORCE) | ||
| elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD") | ||
| set(OpenBSD TRUE CACHE BOOL "..." FORCE) | ||
| elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD") | ||
| set(MidnightBSD TRUE CACHE BOOL "..." FORCE) | ||
| elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD") | ||
| set(NetBSD TRUE CACHE BOOL "..." FORCE) | ||
| elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly") | ||
|
|
@@ -51,36 +53,36 @@ include(CheckIncludeFile) | |
|
|
||
| include(CMakeDependentOption) | ||
|
|
||
| cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD" OFF) | ||
| cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XCB "Enable xcb" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XRANDR "Enable xrandr" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_X11 "Enable x11" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DRM "Enable libdrm" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD" OFF) | ||
| cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XCB "Enable xcb" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XRANDR "Enable xrandr" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_X11 "Enable x11" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DRM "Enable libdrm" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DRM_AMDGPU "Enable libdrm_amdgpu" ON "LINUX" OFF) | ||
| cmake_dependent_option(ENABLE_GIO "Enable gio-2.0" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DCONF "Enable dconf" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DBUS "Enable dbus-1" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XFCONF "Enable libxfconf-0" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_SQLITE3 "Enable sqlite3" ON "LINUX OR FreeBSD OR APPLE OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_GIO "Enable gio-2.0" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DCONF "Enable dconf" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DBUS "Enable dbus-1" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_XFCONF "Enable libxfconf-0" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_SQLITE3 "Enable sqlite3" ON "LINUX OR FreeBSD OR APPLE OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_RPM "Enable rpm" ON "LINUX" OFF) | ||
| cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR APPLE OR WIN32 OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR APPLE OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR APPLE OR WIN32 OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR APPLE OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_CHAFA "Enable chafa" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF) | ||
| cmake_dependent_option(ENABLE_ZLIB "Enable zlib" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF) | ||
| cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR WIN32 OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF) | ||
| cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR OpenBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR OpenBSD OR MidnightBSD OR NetBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF) | ||
| cmake_dependent_option(ENABLE_DIRECTX_HEADERS "Enable DirectX headers for WSL" ON "LINUX" OFF) | ||
| cmake_dependent_option(ENABLE_ELF "Enable libelf" ON "LINUX OR ANDROID OR DragonFly" OFF) | ||
| cmake_dependent_option(ENABLE_THREADS "Enable multithreading" ON "Threads_FOUND" OFF) | ||
| cmake_dependent_option(ENABLE_LIBZFS "Enable libzfs" ON "LINUX OR FreeBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD OR SunOS" OFF) | ||
| cmake_dependent_option(ENABLE_PCIACCESS "Enable libpciaccess" ON "NetBSD OR OpenBSD OR MidnightBSD OR SunOS" OFF) | ||
laffer1 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| option(ENABLE_SYSTEM_YYJSON "Use system provided (instead of fastfetch embedded) yyjson library" OFF) | ||
| option(ENABLE_ASAN "Build fastfetch with ASAN (address sanitizer)" OFF) | ||
|
|
@@ -587,7 +589,7 @@ elseif(ANDROID) | |
| src/util/platform/FFPlatform_unix.c | ||
| src/util/binary_linux.c | ||
| ) | ||
| elseif(FreeBSD) | ||
| elseif(FreeBSD OR MidnightBSD) | ||
| list(APPEND LIBFASTFETCH_SRC | ||
| src/common/dbus.c | ||
| src/common/io/io_unix.c | ||
|
|
@@ -1063,7 +1065,7 @@ if(ENABLE_DIRECTX_HEADERS) | |
| endif() | ||
|
|
||
| # Proprietary GPU driver APIs | ||
| if(LINUX OR FreeBSD OR WIN32) | ||
| if(LINUX OR FreeBSD OR WIN32 OR MidnightBSD) | ||
| list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_nvidia.c) | ||
| list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_mthreads.c) | ||
| endif() | ||
|
|
@@ -1123,7 +1125,7 @@ if(APPLE AND EXISTS "/usr/bin/otool") | |
| target_compile_definitions(libfastfetch PUBLIC FF_LIBSYSTEM_VERSION="${CMAKE_MATCH_1}") | ||
| endif() | ||
| endif() | ||
| if(FreeBSD AND EXISTS "/usr/local/bin/objdump") | ||
| if((FreeBSD OR MidnightBSD) AND EXISTS "/usr/local/bin/objdump") | ||
| execute_process(COMMAND /bin/sh -c "/usr/local/bin/objdump -T /lib/libc.so.* | grep 'FBSD_[0-9][0-9]*\\.[0-9][0-9]*' -o | sort -Vru | head -1" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does MidnightBSD use FreeBSD libc? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. MidnightBSD uses FreeBSD libc with some additions. So there are FBSD symbol versions and also MBSD versions. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess using MBSD versions is better. |
||
| OUTPUT_VARIABLE OBJDUMP_T_RESULT) | ||
| if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)") | ||
|
|
@@ -1445,6 +1447,12 @@ elseif(OpenBSD) | |
| PRIVATE "m" | ||
| PRIVATE "kvm" | ||
| ) | ||
| elseif(MidnightBSD) | ||
| target_link_libraries(libfastfetch | ||
| PRIVATE "m" | ||
| PRIVATE "usbhid" | ||
| PRIVATE "geom" | ||
| ) | ||
| elseif(NetBSD) | ||
| target_link_libraries(libfastfetch | ||
| PRIVATE "m" | ||
|
|
@@ -1500,10 +1508,10 @@ if(WIN32) | |
| endif() | ||
| set(CMAKE_CXX_STANDARD 17) | ||
| endif() | ||
| if(FreeBSD) | ||
| if(FreeBSD OR MidnightBSD) | ||
| set(CMAKE_REQUIRED_INCLUDES "/usr/local/include" "/usr/include") | ||
| endif() | ||
| if(LINUX OR FreeBSD OR OpenBSD OR NetBSD) | ||
| if(LINUX OR FreeBSD OR OpenBSD OR MidnightBSD OR NetBSD) | ||
| CHECK_INCLUDE_FILE("linux/videodev2.h" HAVE_LINUX_VIDEODEV2) | ||
| if(HAVE_LINUX_VIDEODEV2) | ||
| target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LINUX_VIDEODEV2=1) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.