diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f743443e6..4a183d5f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -452,7 +452,7 @@ jobs: version: '7.5' run: | uname -a - sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa pulseaudio py3-requests + sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa pulseaudio hwdata py3-requests cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=ON . cmake --build . --target package --verbose -j4 ./fastfetch --list-features diff --git a/src/detection/gpu/gpu_pci.c b/src/detection/gpu/gpu_pci.c index 2de51a2ca..f06358236 100644 --- a/src/detection/gpu/gpu_pci.c +++ b/src/detection/gpu/gpu_pci.c @@ -3,10 +3,14 @@ #include #ifdef __FreeBSD__ -#include + #include #ifndef _PATH_LOCALBASE #define _PATH_LOCALBASE "/usr/local" #endif +#elif __OpenBSD__ + #define _PATH_LOCALBASE "/usr/local" +#elif __NetBSD__ + #define _PATH_LOCALBASE "/usr/pkg" #endif #if FF_HAVE_EMBEDDED_PCIIDS @@ -37,17 +41,10 @@ static const FFstrbuf* loadPciIds() if (pciids.length == 0) ffReadFileBuffer(FASTFETCH_TARGET_DIR_USR "/local/share/hwdata/pci.ids", &pciids); } - #elif __FreeBSD__ - // https://github.com/freebsd/freebsd-src/blob/main/usr.sbin/pciconf/pathnames.h + #elif __FreeBSD__ || __OpenBSD__ || __NetBSD__ ffReadFileBuffer(_PATH_LOCALBASE "/share/pciids/pci.ids", &pciids); - if (pciids.length == 0) - ffReadFileBuffer(FASTFETCH_TARGET_DIR_USR "/share/pciids/pci.ids", &pciids); #elif __sun ffReadFileBuffer(FASTFETCH_TARGET_DIR_ROOT "/usr/share/hwdata/pci.ids", &pciids); - #elif __OpenBSD__ - ffReadFileBuffer(FASTFETCH_TARGET_DIR_ROOT "/usr/local/share/pci.ids", &pciids); - #elif __NetBSD__ - ffReadFileBuffer(FASTFETCH_TARGET_DIR_ROOT "/usr/pkg/share/pciutils/pci.ids", &pciids); #endif #endif // FF_CUSTOM_PCI_IDS_PATH