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 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
|
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Tue, 30 May 2023 20:11:52 +0900
Subject: Add RAR plugin builder
Forwarded: not-needed
RAR support is separated to another plugin and main package keeps DFSG
---
CPP/7zip/Bundles/CodecRAR/Arc_gcc.mak | 126 +++++++++++++++++++++++++++++++++
CPP/7zip/Bundles/CodecRAR/makefile.gcc | 53 ++++++++++++++
2 files changed, 179 insertions(+)
create mode 100644 CPP/7zip/Bundles/CodecRAR/Arc_gcc.mak
create mode 100644 CPP/7zip/Bundles/CodecRAR/makefile.gcc
diff --git a/CPP/7zip/Bundles/CodecRAR/Arc_gcc.mak b/CPP/7zip/Bundles/CodecRAR/Arc_gcc.mak
new file mode 100644
index 0000000..a01d114
--- /dev/null
+++ b/CPP/7zip/Bundles/CodecRAR/Arc_gcc.mak
@@ -0,0 +1,126 @@
+
+LOCAL_FLAGS_ST =
+MT_OBJS =
+
+ifdef SystemDrive
+IS_MINGW = 1
+else
+ifdef SYSTEMDRIVE
+# ifdef OS
+IS_MINGW = 1
+endif
+endif
+
+ifdef ST_MODE
+
+LOCAL_FLAGS_ST = -DZ7_ST
+
+ifdef IS_MINGW
+MT_OBJS =
+
+endif
+
+else
+
+MT_OBJS =
+
+endif
+
+
+
+COMMON_OBJS = \
+ $O/CRC.o
+
+WIN_OBJS =
+
+7ZIP_COMMON_OBJS = \
+ $O/InBuffer.o \
+ $O/OutBuffer.o \
+ $O/StreamUtils.o
+
+AR_OBJS =
+
+AR_COMMON_OBJS =
+
+
+7Z_OBJS =
+
+CAB_OBJS =
+
+CHM_OBJS =
+
+ISO_OBJS =
+
+NSIS_OBJS =
+
+ifndef DISABLE_RAR
+RAR_OBJS =
+
+endif
+
+
+TAR_OBJS =
+
+UDF_OBJS =
+
+WIM_OBJS =
+
+ZIP_OBJS =
+
+COMPRESS_OBJS = \
+ $O/LzOutWindow.o
+
+ifdef DISABLE_RAR
+DISABLE_RAR_COMPRESS=1
+endif
+
+ifndef DISABLE_RAR_COMPRESS
+COMPRESS_OBJS += \
+ $O/Rar1Decoder.o \
+ $O/Rar2Decoder.o \
+ $O/Rar3Decoder.o \
+ $O/Rar3Vm.o \
+ $O/Rar5Decoder.o \
+ $O/RarCodecsRegister.o
+
+endif
+
+CRYPTO_OBJS =
+
+ifndef DISABLE_RAR
+CRYPTO_OBJS +=
+
+endif
+
+
+C_OBJS = \
+ $O/Alloc.o \
+ $O/CpuArch.o \
+ $O/Ppmd7.o \
+ $O/Ppmd7Dec.o \
+ $O/Ppmd7aDec.o \
+ $O/7zCrc.o \
+ $O/7zCrcOpt.o
+
+ARC_OBJS = \
+ $(LZMA_DEC_OPT_OBJS) \
+ $(C_OBJS) \
+ $(MT_OBJS) \
+ $(COMMON_OBJS) \
+ $(WIN_OBJS) \
+ $(AR_OBJS) \
+ $(AR_COMMON_OBJS) \
+ $(7Z_OBJS) \
+ $(CAB_OBJS) \
+ $(CHM_OBJS) \
+ $(COM_OBJS) \
+ $(ISO_OBJS) \
+ $(NSIS_OBJS) \
+ $(RAR_OBJS) \
+ $(TAR_OBJS) \
+ $(UDF_OBJS) \
+ $(WIM_OBJS) \
+ $(ZIP_OBJS) \
+ $(COMPRESS_OBJS) \
+ $(CRYPTO_OBJS) \
+ $(7ZIP_COMMON_OBJS)
diff --git a/CPP/7zip/Bundles/CodecRAR/makefile.gcc b/CPP/7zip/Bundles/CodecRAR/makefile.gcc
new file mode 100644
index 0000000..b657ef0
--- /dev/null
+++ b/CPP/7zip/Bundles/CodecRAR/makefile.gcc
@@ -0,0 +1,53 @@
+PROG = Rar
+DEF_FILE = ../../Compress/Codec.def
+
+# IS_X64 = 1
+# USE_ASM = 1
+# ST_MODE = 1
+
+include Arc_gcc.mak
+
+ifdef SystemDrive
+IS_MINGW = 1
+else
+ifdef SYSTEMDRIVE
+# ifdef OS
+IS_MINGW = 1
+endif
+endif
+
+
+ifdef IS_MINGW
+
+LOCAL_FLAGS_WIN = \
+ -DZ7_LARGE_PAGES \
+ $(LOCAL_FLAGS_ST)
+
+SYS_OBJS =
+
+else
+
+SYS_OBJS = \
+ $O/MyWindows.o
+
+endif
+
+LOCAL_FLAGS = \
+ -DZ7_EXTERNAL_CODECS \
+ $(LOCAL_FLAGS_WIN) \
+ $(LOCAL_FLAGS_ST)
+
+
+COMPRESS_OBJS_2 = \
+ $O/CodecExports.o \
+ $O/DllExportsCompress.o
+
+AR_OBJS_2 =
+
+OBJS = \
+ $(ARC_OBJS) \
+ $(AR_OBJS_2) \
+ $(COMPRESS_OBJS_2) \
+ $(SYS_OBJS)
+
+include ../../7zip_gcc.mak
|