summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lzma-1-include-stdio.h.patch27
-rw-r--r--src/lzma-2-mystring-include-windows.patch28
-rw-r--r--src/lzma.mk42
3 files changed, 97 insertions, 0 deletions
diff --git a/src/lzma-1-include-stdio.h.patch b/src/lzma-1-include-stdio.h.patch
new file mode 100644
index 0000000..dfcda63
--- /dev/null
+++ b/src/lzma-1-include-stdio.h.patch
@@ -0,0 +1,27 @@
+This file is part of MXE.
+See index.html for further information.
+
+From dd3c0c213571d2ff8acbb3b19966cfa4d6bff3cc Mon Sep 17 00:00:00 2001
+From: Boris Nagaev <bnagaev@gmail.com>
+Date: Sun, 30 Aug 2015 14:26:24 +0200
+Subject: [PATCH] include stdio.h
+
+---
+ CPP/7zip/Common/FileStreams.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CPP/7zip/Common/FileStreams.cpp b/CPP/7zip/Common/FileStreams.cpp
+index de49911..7609c56 100755
+--- a/CPP/7zip/Common/FileStreams.cpp
++++ b/CPP/7zip/Common/FileStreams.cpp
+@@ -1,6 +1,7 @@
+ // FileStreams.cpp
+
+ #include "StdAfx.h"
++#include <stdio.h>
+
+ #ifndef _WIN32
+ #include <fcntl.h>
+--
+1.7.10.4
+
diff --git a/src/lzma-2-mystring-include-windows.patch b/src/lzma-2-mystring-include-windows.patch
new file mode 100644
index 0000000..1b15764
--- /dev/null
+++ b/src/lzma-2-mystring-include-windows.patch
@@ -0,0 +1,28 @@
+This file is part of MXE.
+See index.html for further information.
+
+From 7798a70fa69dc4994cc25f82ec3e9b2b368d50fe Mon Sep 17 00:00:00 2001
+From: Boris Nagaev <bnagaev@gmail.com>
+Date: Sun, 30 Aug 2015 14:46:10 +0200
+Subject: [PATCH] MyString: include windows.h
+
+Functions CharUpperA, CharPrev etc
+---
+ CPP/Common/MyString.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CPP/Common/MyString.h b/CPP/Common/MyString.h
+index 7db8a37..297986f 100755
+--- a/CPP/Common/MyString.h
++++ b/CPP/Common/MyString.h
+@@ -4,6 +4,7 @@
+ #define __COMMON_STRING_H
+
+ #include <string.h>
++#include <windows.h>
+
+ #include "MyVector.h"
+
+--
+1.7.10.4
+
diff --git a/src/lzma.mk b/src/lzma.mk
new file mode 100644
index 0000000..239ae39
--- /dev/null
+++ b/src/lzma.mk
@@ -0,0 +1,42 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG := lzma
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 920
+$(PKG)_CHECKSUM := 8ac221acdca8b6f6dd110120763af42b3707363752fc04e63c7bbff76774a445
+$(PKG)_SUBDIR := .
+$(PKG)_FILE := lzma$(subst .,,$($(PKG)_VERSION)).tar.bz2
+$(PKG)_URL := http://www.7-zip.org/a/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'http://www.7-zip.org/sdk.html' | \
+ $(SED) -n 's,.*lzma\([0-9][^"]*\)\.tar.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ $(MAKE) all -C '$(1)/C/Util/Lzma' \
+ -f makefile.gcc -j '$(JOBS)' \
+ 'PROG=lzma.exe' \
+ 'CC=$(TARGET)-gcc' \
+ 'CXX=$(TARGET)-g++' \
+ 'LD=$(TARGET)-ld' \
+ 'AR=$(TARGET)-ar' \
+ 'PKG_CONFIG=$(TARGET)-pkg-config'
+ $(MAKE) all -C '$(1)/CPP/7zip/Bundles/LzmaCon' \
+ -f makefile.gcc -j '$(JOBS)' \
+ 'IS_MINGW=1' \
+ 'PROG=lzma.exe' \
+ 'CXX=$(TARGET)-g++ -O2 -Wall' \
+ 'CXX_C=$(TARGET)-gcc -O2 -Wall' \
+ 'CC=$(TARGET)-gcc' \
+ 'LD=$(TARGET)-ld' \
+ 'AR=$(TARGET)-ar' \
+ 'PKG_CONFIG=$(TARGET)-pkg-config'
+ cp '$(1)/C/Util/Lzma/lzma.exe' \
+ '$(PREFIX)/$(TARGET)/bin/lzma.exe'
+ cp '$(1)/CPP/7zip/Bundles/LzmaCon/lzma.exe' \
+ '$(PREFIX)/$(TARGET)/bin/lzma-cxx.exe'
+endef