quickbms: fix build

This commit is contained in:
Yongun Seong 2023-05-25 20:00:39 +09:00
parent 6f6f750d80
commit 3c779c3fa8
No known key found for this signature in database
2 changed files with 32 additions and 2 deletions

View file

@ -0,0 +1,10 @@
--- src/Makefile 2023-05-25 18:16:56.000296653 +0900
+++ src/Makefile 2023-05-25 18:17:00.772272861 +0900
@@ -23,7 +23,6 @@
EXTRA_TARGETS = libs/amiga/amiga.s libs/powzix/*.cpp
CFLAGS += -msse2
endif
-USE_OPENSSL = 1
endif
# -liconv and -fPIC are necessary on Android

View file

@ -1,4 +1,13 @@
{ stdenv, lib, fetchzip, bzip2, lzo, openssl, zlib }:
{ stdenv
, lib
, fetchzip
, fetchpatch
, bzip2
, lzo
, openssl_1_1
, opensslSupport ? false
, zlib
}:
stdenv.mkDerivation rec {
version = "0.11.0";
@ -9,7 +18,18 @@ stdenv.mkDerivation rec {
hash = "sha256-uQKTE36pLO8uhrX794utqaDGUeyqRz6zLCQFA7DYkNc=";
};
buildInputs = [ bzip2 lzo openssl zlib ];
patches = [
# Fix errors on x86_64 and _rotl definition
(fetchpatch {
name = "0001-fix-compile.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix-compile.patch?h=quickbms&id=a2e3e4638295d7cfe39513bfef9447fb23154a6b";
hash = "sha256-49fT/L4BNzMYnq1SXhFMgSDLybLkz6KSbgKmUpZZu08=";
stripLen = 1;
})
] ++ lib.optional (!opensslSupport) ./0002-disable-openssl.patch;
buildInputs = [ bzip2 lzo zlib ]
++ lib.optional (opensslSupport) openssl_1_1;
makeFlags = [ "PREFIX=$(out)" ];