Skip to content

Commit

Permalink
lzip: add mingw support
Browse files Browse the repository at this point in the history
Part of a greater effort to get qtbase and qtmultimedia cross compiling
for windows.
  • Loading branch information
seanybaggins committed Feb 2, 2024
1 parent 6a23653 commit 6269f31
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/tools/compression/lzip/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ stdenv.mkDerivation rec {
sha256 = "sha256-R5LAR93xXvKdVbqOaKGiHgy3aS2H7N9yBEGYZFgvKA0=";
};

patches = lib.optionals stdenv.hostPlatform.isMinGW [
./mingw-install-exe-file.patch
];

configureFlags = [
"CPPFLAGS=-DNDEBUG"
"CFLAGS=-O3"
Expand Down
13 changes: 13 additions & 0 deletions pkgs/tools/compression/lzip/mingw-install-exe-file.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Makefile.in b/Makefile.in
index d07ad5a..1c15203 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -64,7 +64,7 @@ install-strip-compress : install-bin-strip install-info-compress install-man-com

install-bin : all
if [ ! -d "$(DESTDIR)$(bindir)" ] ; then $(INSTALL_DIR) "$(DESTDIR)$(bindir)" ; fi
- $(INSTALL_PROGRAM) ./$(progname) "$(DESTDIR)$(bindir)/$(progname)"
+ $(INSTALL_PROGRAM) ./$(progname).exe "$(DESTDIR)$(bindir)/$(progname).exe"

install-bin-strip : all
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' install-bin

0 comments on commit 6269f31

Please sign in to comment.