Added cpuinfo to freebsd port

This commit is contained in:
TheDarkBug 2021-07-22 18:48:36 +02:00
commit d0597d5909
3 changed files with 13 additions and 5 deletions

View file

@ -1,7 +1,7 @@
NAME = uwufetch
FILES = uwufetch.c
CFLAGS = -O3
CFLAGS_DEBUG = -Wall -Wextra
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
ifeq ($(shell uname), Linux)
PREFIX = /usr/bin
LIBDIR = /usr/lib
@ -11,9 +11,16 @@ else ifeq ($(shell uname), Darwin)
LIBDIR = /usr/local/lib
MANDIR = /usr/local/share/man/man1
endif
CC = cc
MAN_COMPILER = pandoc
ifeq ($(shell uname), FreeBSD)
CFLAGS += -D__FREEBSD__
CFLAGS_DEBUG += -D__FREEBSD__
endif
build: $(FILES)
$(CC) $(CFLAGS) -o $(NAME) $(FILES)

View file

@ -67,7 +67,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
## Endeavour OS
<img title="Endowo Os" src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/endeavour.png" alt="image" width="100">
<img title="Endowo Os" src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/endeavouros.png" alt="image" width="100">
### Base artwork:
@ -218,7 +218,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
## OpenSuse
<img title="OwOsuse" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/"opensuse-leap".png' alt="image" width="100">
<img title="OwOsuse" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/opensuse-leap.png' alt="image" width="100">
### Base artwork:
@ -332,7 +332,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
## VoidLinux
<img title="Owoid" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/"void".png' alt="image" width="100">
<img title="Owoid" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/void.png' alt="image" width="100">
### Base artwork:

View file

@ -406,7 +406,7 @@ void get_info()
break;
}
}
#ifndef __FREEBSD__
while (fgets(line, sizeof(line), cpuinfo))
#ifdef __FREEBSD__
if (sscanf(line, "hw.model: %[^\n]", cpu_model))
@ -415,6 +415,7 @@ void get_info()
#endif
break;
sprintf(user, "%s", getenv("USER"));
#endif
if (iscygwin == 0)
fclose(os_release);
}