Merge pull request #184825 from jiegec/foremost-darwin

foremost: unbreak on Darwin
This commit is contained in:
Sebastián Mancilla 2022-08-12 12:46:29 -04:00 committed by GitHub
commit d686550401
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)