mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
net-proxy/MTProxy: treeclean
Closes: https://bugs.gentoo.org/975821 Signed-off-by: David Roman <stkw0@disroot.org>
This commit is contained in:
6 files changed
-217
No files matched your search
@@ -1,28 +0,0 @@
|
||||
# Copyright 2024-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
DESCRIPTION="Community fork of MTProxy"
|
||||
HOMEPAGE="https://github.com/GetPageSpeed/MTProxy"
|
||||
SRC_URI="https://github.com/GetPageSpeed/MTProxy/archive/refs/tags/${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="LGPL-2"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
|
||||
DEPEND="
|
||||
dev-libs/openssl
|
||||
virtual/zlib:=
|
||||
"
|
||||
|
||||
RDEPEND="${DEPEND}"
|
||||
|
||||
PATCHES="
|
||||
${FILESDIR}/${P}-adjust_flags.patch
|
||||
${FILESDIR}/${P}-no_implicit_func.patch
|
||||
"
|
||||
|
||||
src_install() {
|
||||
dobin objs/bin/mtproto-proxy
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
DIST MTProxy-3.0.4.gh.tar.gz 197035 BLAKE2B f2476ef3125ced0425f7896eabd8b2fcb4a02faf92b9656aaa707566181022592f2d95bd8c5f9088e3874483ff1201cf2d383ba20ab367beac42475e41987bc0 SHA512 435b978071e2164e3955299b6772027666d82ca5e366d5f636987afb9c0ec1e74e27d79292679ca54c0f57a9bd60f68e10f50c6dc3ed2b8c5a74ef9ea6550aeb
|
||||
@@ -1,158 +0,0 @@
|
||||
diff -Nru MTProxy.orig/common/crc32.c MTProxy/common/crc32.c
|
||||
--- MTProxy.orig/common/crc32.c 2018-06-17 01:58:54.692000000 +0300
|
||||
+++ MTProxy/common/crc32.c 2018-06-17 05:58:10.893000000 +0300
|
||||
@@ -443,6 +443,12 @@
|
||||
static const v2di CRC64_K128 = { CRC64_REFLECTED_X191, CRC64_REFLECTED_X127 };
|
||||
static const v2di CRC64_MU = { CRC64_REFLECTED_MU, CRC64_REFLECTED_POLY_65_BIT };
|
||||
|
||||
+#ifndef __PCLMUL__
|
||||
+#pragma GCC push_options
|
||||
+#pragma GCC target("ssse3,pclmul")
|
||||
+#define __DISABLE_PCLMUL__
|
||||
+#endif /* __PCLMUL__ */
|
||||
+
|
||||
static v2di crcXX_partial_clmul (const void *q, long len, v2di D, v2di E, v2di K256, v2di K128) __attribute__((aligned(32)));
|
||||
v2di crcXX_partial_clmul (const void *q, long len, v2di D, v2di E, v2di K256, v2di K128) {
|
||||
v2di G, H;
|
||||
@@ -538,6 +544,11 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+#ifdef __DISABLE_PCLMUL__
|
||||
+#undef __DISABLE_PCLMUL__
|
||||
+#pragma GCC pop_options
|
||||
+#endif /* __DISABLE_PCLMUL__ */
|
||||
+
|
||||
/******************** CRC-64 ********************/
|
||||
|
||||
static const uint64_t crc64_table[256] = {
|
||||
@@ -622,6 +633,12 @@
|
||||
return crc;
|
||||
}
|
||||
|
||||
+#ifndef __PCLMUL__
|
||||
+#pragma GCC push_options
|
||||
+#pragma GCC target("ssse3,pclmul")
|
||||
+#define __DISABLE_PCLMUL__
|
||||
+#endif /* __PCLMUL__ */
|
||||
+
|
||||
static uint64_t crc64_barrett_reduction (v2di D) {
|
||||
/* After reflection mu constant is 64 bit */
|
||||
v2di E = __builtin_ia32_pclmulqdq128 (D, CRC64_MU, 0x00);
|
||||
@@ -665,6 +682,11 @@
|
||||
return crc64_barrett_reduction (D);
|
||||
}
|
||||
|
||||
+#ifdef __DISABLE_PCLMUL__
|
||||
+#undef __DISABLE_PCLMUL__
|
||||
+#pragma GCC pop_options
|
||||
+#endif /* __DISABLE_PCLMUL__ */
|
||||
+
|
||||
/* {{{ GF-32 */
|
||||
|
||||
unsigned gf32_mulx (unsigned a, unsigned poly) {
|
||||
@@ -756,6 +778,12 @@
|
||||
return crc1;
|
||||
}
|
||||
|
||||
+#ifndef __PCLMUL__
|
||||
+#pragma GCC push_options
|
||||
+#pragma GCC target("ssse3,pclmul")
|
||||
+#define __DISABLE_PCLMUL__
|
||||
+#endif /* __PCLMUL__ */
|
||||
+
|
||||
uint64_t gf32_combine_clmul (unsigned *powers, unsigned crc1, int64_t len2) {
|
||||
v2di D;
|
||||
FASTMOV_RMI32_TO_SSE(D, crc1);
|
||||
@@ -781,6 +809,11 @@
|
||||
RETURN_SSE_UINT64(D);
|
||||
}
|
||||
|
||||
+#ifdef __DISABLE_PCLMUL__
|
||||
+#undef __DISABLE_PCLMUL__
|
||||
+#pragma GCC pop_options
|
||||
+#endif /* __DISABLE_PCLMUL__ */
|
||||
+
|
||||
/* }}} */
|
||||
|
||||
static unsigned compute_crc32_combine_generic (unsigned crc1, unsigned crc2, int64_t len2) {
|
||||
@@ -874,6 +907,12 @@
|
||||
assert (crc64_power_buf[125]);
|
||||
}
|
||||
|
||||
+#ifndef __PCLMUL__
|
||||
+#pragma GCC push_options
|
||||
+#pragma GCC target("ssse3,pclmul")
|
||||
+#define __DISABLE_PCLMUL__
|
||||
+#endif /* __PCLMUL__ */
|
||||
+
|
||||
static uint64_t compute_crc64_combine_clmul (uint64_t crc1, uint64_t crc2, int64_t len2) {
|
||||
if (len2 <= 0) {
|
||||
return crc1;
|
||||
@@ -902,6 +941,11 @@
|
||||
return crc64_barrett_reduction (D) ^ crc2;
|
||||
}
|
||||
|
||||
+#ifdef __DISABLE_PCLMUL__
|
||||
+#undef __DISABLE_PCLMUL__
|
||||
+#pragma GCC pop_options
|
||||
+#endif /* __DISABLE_PCLMUL__ */
|
||||
+
|
||||
static uint64_t compute_crc64_combine_generic (uint64_t crc1, uint64_t crc2, int64_t len2) {
|
||||
if (len2 <= 0) {
|
||||
return crc1;
|
||||
diff -Nru MTProxy.orig/common/crc32c.c MTProxy/common/crc32c.c
|
||||
--- MTProxy.orig/common/crc32c.c 2018-06-17 01:58:54.693000000 +0300
|
||||
+++ MTProxy/common/crc32c.c 2018-06-17 05:51:35.910000000 +0300
|
||||
@@ -337,6 +337,12 @@
|
||||
return c;
|
||||
}
|
||||
|
||||
+#ifndef __PCLMUL__
|
||||
+#pragma GCC push_options
|
||||
+#pragma GCC target("pclmul")
|
||||
+#define __DISABLE_PCLMUL__
|
||||
+#endif /* __PCLMUL__ */
|
||||
+
|
||||
static unsigned crc32c_partial_sse42_clmul (const void *data, long len, unsigned crc) {
|
||||
const char *p = data;
|
||||
if (unlikely ((((uintptr_t) p) & 1)) && (len > 0)) {
|
||||
@@ -527,6 +533,11 @@
|
||||
return crc;
|
||||
}
|
||||
|
||||
+#ifdef __DISABLE_PCLMUL__
|
||||
+#undef __DISABLE_PCLMUL__
|
||||
+#pragma GCC pop_options
|
||||
+#endif /* __DISABLE_PCLMUL__ */
|
||||
+
|
||||
#else
|
||||
static unsigned crc32c_partial_sse42 (const void *data, long len, unsigned crc) {
|
||||
const char *p = data;
|
||||
diff -Nru MTProxy.orig/Makefile MTProxy/Makefile
|
||||
--- MTProxy.orig/Makefile 2018-06-17 01:58:54.691000000 +0300
|
||||
+++ MTProxy/Makefile 2018-06-17 06:39:32.350000000 +0300
|
||||
@@ -12,8 +12,8 @@
|
||||
ARCH = -m64
|
||||
endif
|
||||
|
||||
-CFLAGS = $(ARCH) -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
|
||||
-LDFLAGS = $(ARCH) -ggdb -rdynamic -lm -lrt -lcrypto -lz -lpthread -lcrypto
|
||||
+CFLAGS += -mcx16 -std=gnu11 -Wall -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64
|
||||
+LDFLAGS += -rdynamic -lm -lrt -lcrypto -lz -lpthread
|
||||
|
||||
LIB = ${OBJ}/lib
|
||||
CINCLUDE = -iquote common -iquote .
|
||||
@@ -91,10 +91,10 @@
|
||||
${EXELIST}: ${LIBLIST}
|
||||
|
||||
${EXE}/mtproto-proxy: ${OBJ}/mtproto/mtproto-proxy.o ${OBJ}/mtproto/mtproto-config.o ${OBJ}/net/net-tcp-rpc-ext-server.o
|
||||
- ${CC} -o $@ $^ ${LIB}/libkdb.a ${LDFLAGS}
|
||||
+ ${CC} ${CFLAGS} -o $@ $^ ${LIB}/libkdb.a ${LDFLAGS}
|
||||
|
||||
${LIB}/libkdb.a: ${LIB_OBJS}
|
||||
- rm -f $@ && ar rcs $@ $^
|
||||
+ rm -f $@ && ${AR} rcs $@ $^
|
||||
|
||||
clean:
|
||||
rm -rf ${OBJ} ${DEP} ${EXE} || true
|
||||
@@ -1,13 +0,0 @@
|
||||
diff --git a/engine/engine.c b/engine/engine.c
|
||||
index d0c70d3..5c5a5a2 100644
|
||||
--- a/engine/engine.c
|
||||
+++ b/engine/engine.c
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
#include "jobs/jobs.h"
|
||||
|
||||
+#include "mtproto/mtproto-config.h"
|
||||
+
|
||||
#include "net/net-connections.h"
|
||||
#include "net/net-crypto-aes.h"
|
||||
#include "net/net-msg-buffers.h"
|
||||
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>stkw0@disroot.org</email>
|
||||
<name>David Roman</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="github">GetPageSpeed/MTProxy</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
@@ -24,12 +24,6 @@
|
||||
# Removal after 2026-10-03
|
||||
gui-apps/noctalia-qs
|
||||
|
||||
# David Roman <stkw0@disroot.org> (2026-07-22)
|
||||
# Archived by upstream.
|
||||
# Bug #975821
|
||||
# Removal after 2026-08-22
|
||||
net-proxy/MTProxy
|
||||
|
||||
# Bjorn <bjorn.megaflow@gmail.com> (2026-06-23)
|
||||
# Requires gui-libs/libadwaita >= 1.9, which is currently not in
|
||||
# the main Gentoo repository.
|
||||
|
||||
Reference in new issue
Block a user