From c0908affad6d354db1cd2a86e9a2fd5b94bbc7fa Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Mon, 19 Aug 2013 01:22:29 +0000 Subject: [PATCH] upx: upgrade to 3.09 Signed-off-by: Luka Perkov SVN-Revision: 37813 --- tools/upx/Makefile | 6 +++--- tools/upx/patches/100-lzmaonly.patch | 28 ++++++++++++++-------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/tools/upx/Makefile b/tools/upx/Makefile index c162e557cb..a095ee1268 100644 --- a/tools/upx/Makefile +++ b/tools/upx/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2012 OpenWrt.org +# Copyright (C) 2011-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,11 +7,11 @@ include $(TOPDIR)/rules.mk PKG_NAME:=upx -PKG_VERSION:=3.07 +PKG_VERSION:=3.09 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.bz2 PKG_SOURCE_URL:=@SF/upx -PKG_MD5SUM:=8186ab103288242f7e8ecad1acd4af03 +PKG_MD5SUM:=1253da46eac54a217eb73e2d44818e53 PKG_CAT:=bzcat HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src diff --git a/tools/upx/patches/100-lzmaonly.patch b/tools/upx/patches/100-lzmaonly.patch index a3098b4761..f8e8d0b82a 100644 --- a/tools/upx/patches/100-lzmaonly.patch +++ b/tools/upx/patches/100-lzmaonly.patch @@ -1,6 +1,6 @@ --- a/src/compress.cpp +++ b/src/compress.cpp -@@ -41,7 +41,7 @@ +@@ -41,7 +41,7 @@ unsigned upx_adler32(const void *buf, un if (len == 0) return adler; assert(buf != NULL); @@ -20,7 +20,7 @@ # define WITH_UCL 1 #endif #if 0 && !defined(WITH_LZMA) -@@ -645,7 +645,11 @@ +@@ -640,7 +640,11 @@ struct lzma_compress_config_t }; @@ -32,7 +32,7 @@ { void reset() { memset(this, 0xff, sizeof(*this)); } }; -@@ -697,7 +701,9 @@ +@@ -692,7 +696,9 @@ struct lzma_compress_result_t struct ucl_compress_result_t { @@ -44,7 +44,7 @@ }; --- a/src/main.cpp +++ b/src/main.cpp -@@ -618,7 +618,9 @@ +@@ -618,7 +618,9 @@ static int do_option(int optc, const cha opt->method = -1; opt->all_filters = true; opt->filter = -1; @@ -54,7 +54,7 @@ /* fallthrough */ case 900: // --best if (!set_method(-1, 10)) -@@ -709,6 +711,7 @@ +@@ -709,6 +711,7 @@ static int do_option(int optc, const cha opt->exact = true; break; // compression runtime parameters @@ -62,7 +62,7 @@ case 801: getoptvar(&opt->crp.crp_ucl.c_flags, 0, 3, arg); break; -@@ -730,6 +733,7 @@ +@@ -730,6 +733,7 @@ static int do_option(int optc, const cha case 807: getoptvar(&opt->crp.crp_ucl.m_size, 10000u, 999999u, arg); break; @@ -72,7 +72,7 @@ break; --- a/src/Makefile +++ b/src/Makefile -@@ -57,7 +57,10 @@ +@@ -57,7 +57,10 @@ ifneq ($(wildcard $(UPX_UCLDIR)/include/ INCLUDES += -I$(UPX_UCLDIR)/include LIBS += $(addprefix -L,$(dir $(wildcard $(UPX_UCLDIR)/libucl$(libext) $(UPX_UCLDIR)/src/.libs/libucl$(libext)))) endif @@ -86,7 +86,7 @@ ifneq ($(UPX_LZMA_VERSION),) --- a/src/packer.cpp +++ b/src/packer.cpp -@@ -199,6 +199,7 @@ +@@ -199,6 +199,7 @@ bool Packer::compress(upx_bytep i_ptr, u if (cconf_parm) cconf = *cconf_parm; // cconf options @@ -94,7 +94,7 @@ if (M_IS_NRV2B(ph.method) || M_IS_NRV2D(ph.method) || M_IS_NRV2E(ph.method)) { if (opt->crp.crp_ucl.c_flags != -1) -@@ -216,6 +217,7 @@ +@@ -216,6 +217,7 @@ bool Packer::compress(upx_bytep i_ptr, u step = 0; #endif } @@ -102,7 +102,7 @@ if (M_IS_LZMA(ph.method)) { oassign(cconf.conf_lzma.pos_bits, opt->crp.crp_lzma.pos_bits); -@@ -250,6 +252,7 @@ +@@ -250,6 +252,7 @@ bool Packer::compress(upx_bytep i_ptr, u if (r != UPX_E_OK) throwInternalError("compression failed"); @@ -110,7 +110,7 @@ if (M_IS_NRV2B(ph.method) || M_IS_NRV2D(ph.method) || M_IS_NRV2E(ph.method)) { const ucl_uint *res = ph.compress_result.result_ucl.result; -@@ -267,6 +270,7 @@ +@@ -267,6 +270,7 @@ bool Packer::compress(upx_bytep i_ptr, u assert(cconf.conf_ucl.max_match == 0 || cconf.conf_ucl.max_match >= ph.max_match_found); } } @@ -120,7 +120,7 @@ if (!checkCompressionRatio(ph.u_len, ph.c_len)) --- a/src/p_exe.cpp +++ b/src/p_exe.cpp -@@ -506,7 +506,9 @@ +@@ -506,7 +506,9 @@ void PackExe::pack(OutputFile *fo) Filter ft(ph.level); // compress (max_match = 8192) upx_compress_config_t cconf; cconf.reset(); @@ -132,7 +132,7 @@ --- a/src/p_ps1.cpp +++ b/src/p_ps1.cpp -@@ -499,7 +499,9 @@ +@@ -499,7 +499,9 @@ void PackPs1::pack(OutputFile *fo) // compress (max_match = 65535) upx_compress_config_t cconf; cconf.reset(); @@ -144,7 +144,7 @@ --- a/src/p_tos.cpp +++ b/src/p_tos.cpp -@@ -506,7 +506,9 @@ +@@ -506,7 +506,9 @@ void PackTos::pack(OutputFile *fo) Filter ft(ph.level); // compress (max_match = 65535) upx_compress_config_t cconf; cconf.reset();