fastfetch, revbump, try fix for memmem (#11760)

This commit is contained in:
Schrijvers Luc
2025-02-10 20:59:46 +01:00
committed by GitHub
parent 78f6749f35
commit ecff97c595
2 changed files with 47 additions and 15 deletions

View File

@@ -7,9 +7,10 @@ HOMEPAGE="https://github.com/fastfetch-cli/fastfetch"
COPYRIGHT="2021-2023 Linus Dierheimer
2022-2025 Carter Li"
LICENSE="MIT"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/fastfetch-cli/fastfetch/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="bdbe5c7672aeacfec15ec7539f718e666c5206b1a3de9bbf8bd1b3d3c9c997e7"
PATCHES="fastfetch-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
@@ -21,15 +22,13 @@ if [ "$targetArchitecture" = x86_gcc2 ]; then
commandBinDir=$prefix/bin
fi
#USER_SETTINGS_FILES="$relativeSettingsDir/neofetch/config.conf"
PROVIDES="
fastfetch$secondaryArchSuffix = $portVersion
cmd:fastfetch$commandSuffix = $portVersion
cmd:flashfetch$commandSuffix = $portVersion
"
REQUIRES="
haiku${secondaryArchSuffix}
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
@@ -37,7 +36,7 @@ BUILD_REQUIRES="
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++${secondaryArchSuffix}
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python3
@@ -45,19 +44,14 @@ BUILD_PREREQUIRES="
BUILD()
{
mkdir -p build
cd build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release \
$cmakeDirArgs \
-DCMAKE_INSTALL_BINDIR=bin \
..
make $jobArgs
# TODO
-DCMAKE_INSTALL_BINDIR=$commandBinDir
make -C build $jobArgs
}
INSTALL()
{
#TODO
cd build
make install #PREFIX="$prefix" MANDIR="$manDir"
make -C build install
}

View File

@@ -0,0 +1,38 @@
From c452d0ca4b622f20e523bbc02d185e7b71d79265 Mon Sep 17 00:00:00 2001
From: Begasus <begasus@gmail.com>
Date: Mon, 10 Feb 2025 20:06:55 +0100
Subject: Add _GNU_SOURCE, should fix memmem error on buildmaster
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 426cd0e..5016ec1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1275,6 +1275,8 @@ elseif(DragonFly)
target_compile_definitions(libfastfetch PUBLIC __FreeBSD__)
elseif(SunOS)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 __EXTENSIONS__ _POSIX_C_SOURCE)
+elseif(HAIKU)
+ target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE)
elseif(NetBSD)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-char-subscripts")
diff --git a/src/detection/gpu/gpu_pci.c b/src/detection/gpu/gpu_pci.c
index f063582..40b793b 100644
--- a/src/detection/gpu/gpu_pci.c
+++ b/src/detection/gpu/gpu_pci.c
@@ -1,6 +1,11 @@
#include "gpu.h"
#include "common/io/io.h"
+#ifdef __HAIKU__
+#include <libgen.h>
+#include <string.h>
+#endif
+
#include <stdlib.h>
#ifdef __FreeBSD__
#include <paths.h>
--
2.45.2