summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2015-08-30 14:27:40 (GMT)
committerBoris Nagaev <bnagaev@gmail.com>2015-11-10 01:25:40 (GMT)
commiteab4194fc8c7df1a27248d1539108a9ded090f45 (patch)
tree2f40432310e984f9cadc609cda0495f9bdf3959c
parent1185a87aaf321183ef1706513ad94c8e4f5c2c8f (diff)
downloadmxe-eab4194fc8c7df1a27248d1539108a9ded090f45.zip
mxe-eab4194fc8c7df1a27248d1539108a9ded090f45.tar.gz
mxe-eab4194fc8c7df1a27248d1539108a9ded090f45.tar.bz2
add package upx
-rw-r--r--index.html4
-rw-r--r--src/upx-1-fix-logging.patch52
-rw-r--r--src/upx.mk34
3 files changed, 90 insertions, 0 deletions
diff --git a/index.html b/index.html
index f1e03fe..e69925f 100644
--- a/index.html
+++ b/index.html
@@ -2459,6 +2459,10 @@ local-pkg-list: $(LOCAL_PKG_LIST)</pre>
<td class="website"><a href="https://www.gnu.org/software/unrtf/">unRTF</a></td>
</tr>
<tr>
+ <td class="package">upx</td>
+ <td class="website"><a href="http://upx.sourceforge.net/">UPX</a></td>
+ </tr>
+ <tr>
<td class="package">vamp-plugin-sdk</td>
<td class="website"><a href="http://vamp-plugins.org/">Vamp Plugins SDK</a></td>
</tr>
diff --git a/src/upx-1-fix-logging.patch b/src/upx-1-fix-logging.patch
new file mode 100644
index 0000000..a1d5005
--- /dev/null
+++ b/src/upx-1-fix-logging.patch
@@ -0,0 +1,52 @@
+This file is part of MXE.
+See index.html for further information.
+
+From a9c84ba7518ea4cc92cf4b391f609c3f6ade0974 Mon Sep 17 00:00:00 2001
+From: Boris Nagaev <bnagaev@gmail.com>
+Date: Sun, 30 Aug 2015 16:13:06 +0200
+Subject: [PATCH] fix logging
+
+Set logging function to simple fprintf.
+---
+ src/c_init.cpp | 3 ++-
+ src/console.h | 3 +--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/c_init.cpp b/src/c_init.cpp
+index 542b066..a1ce500 100644
+--- a/src/c_init.cpp
++++ b/src/c_init.cpp
+@@ -141,7 +141,7 @@ console_t console_init =
+ intro
+ };
+
+-
++/*
+ void __acc_cdecl_va con_fprintf(FILE *f, const char *format, ...)
+ {
+ va_list args;
+@@ -156,6 +156,7 @@ void __acc_cdecl_va con_fprintf(FILE *f, const char *format, ...)
+ assert(con != me);
+ con->print0(f,buf);
+ }
++*/
+
+ #endif /* USE_CONSOLE */
+
+diff --git a/src/console.h b/src/console.h
+index eeee36e..4a2c4c0 100644
+--- a/src/console.h
++++ b/src/console.h
+@@ -123,8 +123,7 @@ console_t;
+
+
+ #if defined(__GNUC__)
+-void __acc_cdecl_va con_fprintf(FILE *f, const char *format, ...)
+- __attribute__((__format__(printf,2,3)));
++#define con_fprintf fprintf
+ #else
+ void __acc_cdecl_va con_fprintf(FILE *f, const char *format, ...);
+ #endif
+--
+1.7.10.4
+
diff --git a/src/upx.mk b/src/upx.mk
new file mode 100644
index 0000000..4b86d42
--- /dev/null
+++ b/src/upx.mk
@@ -0,0 +1,34 @@
+# This file is part of MXE.
+# See index.html for further information.
+
+PKG := upx
+$(PKG)_IGNORE :=
+$(PKG)_VERSION := 3.91
+$(PKG)_CHECKSUM := 527ce757429841f51675352b1f9f6fc8ad97b18002080d7bf8672c466d8c6a3c
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)-src
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION)-src.tar.bz2
+$(PKG)_URL := http://upx.sourceforge.net/download/$($(PKG)_FILE)
+$(PKG)_DEPS := gcc ucl zlib lzma
+
+define $(PKG)_UPDATE
+ $(WGET) -q -O- 'http://upx.sourceforge.net/' | \
+ $(SED) -n 's,.*upx-\([0-9][^"]*\)\-src.tar.*,\1,p' | \
+ head -1
+endef
+
+define $(PKG)_BUILD
+ $(call PREPARE_PKG_SOURCE,ucl,$(1))
+ mkdir '$(1)/lzma'
+ $(call PREPARE_PKG_SOURCE,lzma,$(1)/lzma)
+ UPX_UCLDIR='$(1)/$(ucl_SUBDIR)' \
+ UPX_LZMADIR='$(1)/lzma' \
+ UPX_LZMA_VERSION=0x$(subst .,,$(lzma_VERSION)) \
+ $(MAKE) -C '$(1)' -j '$(JOBS)' all \
+ 'CXX=$(TARGET)-g++' \
+ 'CC=$(TARGET)-gcc' \
+ 'LD=$(TARGET)-ld' \
+ 'AR=$(TARGET)-ar' \
+ 'PKG_CONFIG=$(TARGET)-pkg-config' \
+ 'exeext=.exe'
+ cp '$(1)/src/upx.exe' '$(PREFIX)/$(TARGET)/bin/'
+endef