forked from 00575/R2S
-
Notifications
You must be signed in to change notification settings - Fork 0
/
0001-fix-upx.patch
165 lines (157 loc) · 4.69 KB
/
0001-fix-upx.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
From b23c4a0853d2f9e5b2653e96128a0e634b4139a3 Mon Sep 17 00:00:00 2001
From: klever1988 <[email protected]>
Date: Fri, 21 Feb 2020 07:10:30 +0000
Subject: [PATCH] fix upx
---
package/lean/v2ray-plugin/Makefile | 2 +-
package/lean/v2ray/Makefile | 4 +--
tools/Makefile | 1 -
tools/ucl/Makefile | 51 ------------------------------
tools/upx/Makefile | 37 ----------------------
5 files changed, 3 insertions(+), 92 deletions(-)
delete mode 100644 tools/ucl/Makefile
delete mode 100644 tools/upx/Makefile
diff --git a/package/lean/v2ray-plugin/Makefile b/package/lean/v2ray-plugin/Makefile
index 5eb1dffa..72432811 100644
--- a/package/lean/v2ray-plugin/Makefile
+++ b/package/lean/v2ray-plugin/Makefile
@@ -48,7 +48,7 @@ endef
define Build/Compile
$(call GoPackage/Build/Compile)
- $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin
+ upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray-plugin
endef
define Package/v2ray-plugin/install
diff --git a/package/lean/v2ray/Makefile b/package/lean/v2ray/Makefile
index c1bd33f4..24cdbf09 100644
--- a/package/lean/v2ray/Makefile
+++ b/package/lean/v2ray/Makefile
@@ -270,7 +270,7 @@ define Build/Compile
mv -f $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ray
ifeq ($(CONFIG_V2RAY_COMPRESS_UPX),y)
- $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray
+ upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ray
endif
ifneq ($(CONFIG_V2RAY_EXCLUDE_V2CTL),y)
@@ -279,7 +279,7 @@ ifneq ($(CONFIG_V2RAY_EXCLUDE_V2CTL),y)
mv -f $(GO_PKG_BUILD_BIN_DIR)/main $(GO_PKG_BUILD_BIN_DIR)/v2ctl
ifeq ($(CONFIG_V2RAY_COMPRESS_UPX),y)
- $(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ctl
+ upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/v2ctl
endif
endif
endef
diff --git a/tools/Makefile b/tools/Makefile
index 1bb272fe..b1300e99 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -28,7 +28,6 @@ tools-y += firmware-utils patch-image quilt padjffs2
tools-y += mm-macros missing-macros cmake bc findutils gengetopt patchelf
tools-y += mtools dosfstools libressl
tools-$(CONFIG_TARGET_orion_generic) += wrt350nv2-builder upslug2
-tools-y += ucl upx
tools-$(CONFIG_TARGET_x86) += qemu
tools-$(CONFIG_EFI_IMAGES) += gptfdisk popt
tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
diff --git a/tools/ucl/Makefile b/tools/ucl/Makefile
deleted file mode 100644
index 9fb9aec1..00000000
--- a/tools/ucl/Makefile
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# Copyright (C) 2019 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=ucl
-PKG_VERSION:=1.03
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=http://www.oberhumer.com/opensource/ucl/download/$(PKG_SOURCE)
-PKG_HASH:=b865299ffd45d73412293369c9754b07637680e5c826915f097577cd27350348
-
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
-
-include $(INCLUDE_DIR)/host-build.mk
-
-HOSTCC :=gcc
-HOST_CFLAGS +=-std=gnu89
-
-define Host/Prepare
- $(Host/Prepare/Default)
- mkdir -p $(STAGING_DIR_HOST)/include/ucl
-endef
-
-define Host/Configure
- (cd $(HOST_BUILD_DIR); \
- CC="$(HOSTCC)" \
- CFLAGS="$(HOST_CFLAGS)" \
- ./configure --prefix=$(STAGING_DIR_HOST) \
- );
- $(call Host/Configure/Default)
-endef
-
-define Host/Compile
- $(MAKE) -C $(HOST_BUILD_DIR)
-endef
-
-define Host/Install
- $(MAKE) -C $(HOST_BUILD_DIR) install
-endef
-
-define Host/Clean
- $(MAKE) -C $(HOST_BUILD_DIR) uninstall
- rm -rf $(HOST_BUILD_DIR)
- rm -rf $(STAGING_DIR_HOST)/include/ucl
-endef
-
-$(eval $(call HostBuild))
diff --git a/tools/upx/Makefile b/tools/upx/Makefile
deleted file mode 100644
index 127acd0d..00000000
--- a/tools/upx/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# Copyright (C) 2011-2020 OpenWrt.org
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=upx
-PKG_VERSION:=3.95
-
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tar.xz
-PKG_SOURCE_URL:=https://github.com/upx/upx/releases/download/v$(PKG_VERSION)
-PKG_HASH:=3b0f55468d285c760fcf5ea865a070b27696393002712054c69ff40d8f7f5592
-
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)-src
-
-include $(INCLUDE_DIR)/host-build.mk
-
-UPX_UCLDIR := $(BUILD_DIR_HOST)/ucl-1.03
-
-define Host/Compile
- UPX_UCLDIR=$(UPX_UCLDIR) \
- $(MAKE) -C $(HOST_BUILD_DIR)/src \
- CXXFLAGS_WERROR="" LDFLAGS="$(HOST_LDFLAGS)" \
- CXX="$(HOSTCXX)"
-endef
-
-define Host/Install
- $(CP) $(HOST_BUILD_DIR)/src/upx.out $(STAGING_DIR_HOST)/bin/upx
-endef
-
-define Host/Clean
- rm -f $(STAGING_DIR_HOST)/bin/upx
-endef
-
-$(eval $(call HostBuild))
--
2.17.1