foremost: unbreak on Darwin

Support darwin build and add jiegec as maintainer.
This commit is contained in:
Jiajie Chen 2022-08-02 21:18:28 +08:00
parent 7b5ac19d7b
commit a04107a0af
2 changed files with 16 additions and 6 deletions

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
# ld: api.o:(.bss+0xbdba0): multiple definition of `wildcard'; main.o:(.bss+0xbd760): first defined here
NIX_CFLAGS_COMPILE = "-fcommon";
makeFlags = [ "PREFIX=$(out)" ];
makeFlags = [ "PREFIX=$(out)" ] ++ lib.optionals stdenv.isDarwin [ "mac" ];
enableParallelBuilding = true;
@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
'';
homepage = "http://foremost.sourceforge.net/";
license = licenses.publicDomain;
platforms = platforms.linux;
maintainers = [ maintainers.jiegec ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@ -1,6 +1,15 @@
--- a/Makefile 2015-04-21 00:40:46.949266581 +0200
+++ b/Makefile 2015-04-21 00:41:38.637165883 +0200
@@ -24,9 +24,9 @@
diff --git a/Makefile b/Makefile
index 1a20f4f..077acdb 100755
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
-RAW_CC = gcc
+RAW_CC := $(CC)
RAW_FLAGS = -Wall -O2
LINK_OPT =
VERSION = 1.5.7
@@ -24,9 +24,9 @@ MAN_PAGES = $(NAME).8.gz
RAW_FLAGS += -DVERSION=\"$(VERSION)\"
# Where we get installed
@ -13,7 +22,7 @@
# Setup for compiling and cross-compiling for Windows
# The CR_ prefix refers to cross compiling from OSX to Windows
CR_CC = $(CR_BASE)/gcc
@@ -120,7 +120,6 @@
@@ -120,7 +120,6 @@ foremost: $(OBJ)
install: goals
install -m 755 $(NAME) $(BIN)
install -m 444 $(MAN_PAGES) $(MAN)