Merge pull request #38466 from thefloweringash/apg-unix

apg: Darwin support
This commit is contained in:
Daiderd Jordan 2018-04-05 19:12:48 +02:00 committed by GitHub
commit c45eadf31d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 2 deletions

View file

@ -10,7 +10,10 @@ stdenv.mkDerivation rec {
'';
makeFlags = stdenv.lib.optionals stdenv.isDarwin ["CC=cc"];
patches = [ ./apg.patch ];
patches = [
./apg.patch
./phony-install-target.patch
];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i -e 's|APG_CLIBS += -lcrypt|APG_CLIBS += -L${openssl.out}/lib -lcrypto|' Makefile
@ -64,6 +67,6 @@ stdenv.mkDerivation rec {
homepage = http://www.adel.nursat.kz/apg/;
license = stdenv.lib.licenses.bsd3;
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
platforms = stdenv.lib.platforms.linux;
platforms = stdenv.lib.platforms.unix;
};
}

View file

@ -0,0 +1,11 @@
diff -ur a/Makefile b/Makefile
--- a/Makefile 2003-08-08 00:40:39.000000000 +0900
+++ b/Makefile 2018-04-05 22:29:39.284191020 +0900
@@ -142,6 +142,7 @@
strip ${CS_PROGNAME}
strip ${BFM_PROGNAME}
+.PHONY: install
install:
if test -x ./apg; then \
./mkinstalldirs ${INSTALL_PREFIX}${APG_BIN_DIR}; \