Merge updates from master

This commit is contained in:
Repository mirror & CI
2024-04-05 15:35:03 +00:00
12 changed files with 8 additions and 424 deletions

View File

@@ -1,102 +0,0 @@
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit edos2unix toolchain-funcs flag-o-matic
NO_DOT_PV=$(ver_rs 1- '')
DESCRIPTION="A free file archiver for extremely high compression"
HOMEPAGE="https://www.7-zip.org/ https://sourceforge.net/projects/sevenzip/"
SRC_URI="
https://sourceforge.net/projects/sevenzip/files/7-Zip/${PV}/7z${NO_DOT_PV}-src.tar.xz/download -> ${PN}-${PV}.tar.xz
https://sourceforge.net/projects/sevenzip/files/7-Zip/${PV}/7z${NO_DOT_PV}-linux-x64.tar.xz/download -> ${PN}-${PV}-linux.tar.xz
"
LICENSE="LGPL-2 BSD rar? ( unRAR )"
IUSE="uasm jwasm rar"
REQUIRED_USE="?? ( uasm jwasm )"
SLOT="0"
KEYWORDS="~amd64"
S="${WORKDIR}/CPP/7zip/"
DOCS=( readme.txt History.txt License.txt )
HTML_DOCS=( MANUAL )
RESTRICT="mirror"
DEPEND="${RDEPEND}"
BDEPEND="
uasm? ( dev-lang/uasm )
jwasm? ( dev-lang/jwasm )
"
# TODO(NRK): also build and install the library
# TODO(NRK): make it so this package can be used as a drop-in replacement
# for app-arch/p7zip ??
pkg_setup() {
# instructions in DOC/readme.txt, Compiling 7-Zip for Unix/Linux
# TLDR; every combination of options (clang|gcc)+(asm/noasm)
# has a dedicated makefile & builddir
mfile="cmpl"
if tc-is-clang; then
mfile="${mfile}_clang"
bdir=c
elif tc-is-gcc; then
mfile="${mfile}_gcc"
bdir=g
else
die "Unsupported compiler: $(tc-getCC)"
fi
if use jwasm || use uasm ; then
mfile="${mfile}_x64"
bdir="${bdir}_x64"
fi
export mfile="${mfile}.mak"
export bdir
}
src_prepare() {
# patch doesn't deal with CRLF even if file+patch match
# not even with --ignore-whitespace, --binary or --force
edos2unix ./7zip_gcc.mak ./var_gcc{,_x64}.mak ./var_clang{,_x64}.mak
PATCHES+=( "${FILESDIR}/${P}-respect-build-env.patch" )
sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror"
default
}
src_compile() {
pushd "./Bundles/Alone2" || die "Unable to switch directory"
append-ldflags -Wl,-z,noexecstack
export G_CFLAGS=${CFLAGS}
export G_CXXFLAGS=${CXXFLAGS}
export G_LDFLAGS=${LDFLAGS}
local args=(
-f "../../${mfile}"
CC=$(tc-getCC)
CXX=$(tc-getCXX)
)
# NOTE: makefile doesn't check the value of DISABLE_RAR_COMPRESS, only
# whether it's defined or not. so in case user has `rar` enabled
# DISABLE_RAR_COMPRESS (and DISABLE_RAR) needs to stay undefined.
if ! use rar; then
# disables non-free rar code but allows listing and extracting
# non-compressed rar archives
args+=(DISABLE_RAR_COMPRESS=1)
fi
if use jwasm; then
args+=(USE_JWASM=1)
elif use uasm; then
args+=(MY_ASM=uasm)
fi
emake ${args[@]}
popd > /dev/null || die "Unable to switch directory"
}
src_install() {
dobin "./Bundles/Alone2/b/${bdir}/7zz"
pushd "${WORKDIR}" || die "Unable to switch directory"
einstalldocs
}

View File

@@ -1,2 +0,0 @@
DIST 7zip-23.01-linux.tar.xz 1527700 BLAKE2B 35dc74f0a7a4e586ea5ae969dce72c14e0231822630d2d70f24e1c911cea0492354a258ef65096a6ce0da1510117c12466bc6cda577cdf9e8e74ede17e47f23e SHA512 d3549468de8fd161e4c9233fa0b170af1f28c74749d20f3d0eeb3873857f6c6d2cc0777d564e6a79be7cc21c9e982e10710a795320428dc51db809a8d0f9454e
DIST 7zip-23.01.tar.xz 1378588 BLAKE2B 348484b24b39db70e513fe50d79954ea0e2dd669f83e3601fa796c8f0ca4734132ca20fac8cda9b8ba550bad9146627fc0ae07056abb99028ef6d825b6a533bd SHA512 e39f660c023aa65e55388be225b5591fe2a5c9138693f3c9107e2eb4ce97fafde118d3375e01ada99d29de9633f56221b5b3d640c982178884670cd84c8aa986

View File

@@ -1,53 +0,0 @@
Respect build environment settings
Bug: https://bugs.gentoo.org/913186
Bug: https://bugs.gentoo.org/913188
Bug: https://bugs.gentoo.org/913189
--- a/7zip_gcc.mak
+++ b/7zip_gcc.mak
@@ -87,14 +87,14 @@ SHARED_EXT=.dll
LDFLAGS = -shared -DEF $(DEF_FILE) $(LDFLAGS_STATIC)
else
SHARED_EXT=.so
-LDFLAGS = -shared -fPIC $(LDFLAGS_STATIC)
+LDFLAGS = -shared -fPIC $(G_LDFLAGS) $(LDFLAGS_STATIC)
CC_SHARED=-fPIC
endif
else
-LDFLAGS = $(LDFLAGS_STATIC)
+LDFLAGS = $(LDFLAGS_STATIC) $(G_LDFLAGS)
# -s is not required for clang, do we need it for GCC ???
#-static -static-libgcc -static-libstdc++
@@ -149,7 +149,7 @@ endif
-CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) -o $@
+CFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CC_SHARED) $(G_CFLAGS) -o $@
ifdef IS_MINGW
@@ -190,7 +190,7 @@ CXX_WARN_FLAGS =
#-Wno-invalid-offsetof
#-Wno-reorder
-CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) -o $@
+CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) $(G_CXXFLAGS) -o $@
STATIC_TARGET=
ifdef COMPL_STATIC
@@ -208,7 +208,7 @@ $(O):
# -Wl,--print-gc-sections
ifneq ($(CC), $(CROSS_COMPILE)clang)
-LFLAGS_STRIP = -s
+
endif
LFLAGS_ALL = $(LFLAGS_STRIP) $(MY_ARCH_2) $(LDFLAGS) $(FLAGS_FLTO) $(LD_arch) $(OBJS) $(MY_LIBS) $(LIB2)

View File

@@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>m@matous.dev</email>
<name>Martin Matouš</name>
</maintainer>
<maintainer type="person">
<email>nrk@disroot.org</email>
</maintainer>
<use>
<flag name="rar">Enable support for non-free rar decoder</flag>
<flag name="uasm">Use <pkg>dev-lang/uasm</pkg> to include optimized code</flag>
<flag name="jwasm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code (doesn't support AES)</flag>
</use>
<upstream>
<maintainer>
<name>Igor Pavlov</name>
</maintainer>
<remote-id type="sourceforge">sevenzip</remote-id>
<changelog>https://www.7-zip.org/history.txt</changelog>
<bugs-to>https://sourceforge.net/p/sevenzip/bugs/</bugs-to>
</upstream>
</pkgmetadata>

View File

@@ -1 +0,0 @@
DIST uasm-2.56.2.tar.gz 1243830 BLAKE2B dcc0948d92cdd5972a6698e721a6ccc6a54926ef94778438cf9a88a6e41ebc652d5230003f689d4278bd1e48959dd04595c602427287a48c551d7b847be665f0 SHA512 1f6c1037909d012f3293985c4e0516f4b61497de23cac6bbb58db735efb512599c0bba5d60d8ce999e6afc57e44484a094bf10f0ee185a51afd826f5541c9337

View File

@@ -1,179 +0,0 @@
Fixes various build issues with newer clang
https://bugs.gentoo.org/927802
From b6457542bd56507cb2b659d50772f87cc66d6ea3 Mon Sep 17 00:00:00 2001
From: NRK <nrk@disroot.org>
Date: Mon, 1 Apr 2024 15:29:47 +0000
Subject: [PATCH 1/4] Add missing includes
---
assemble.c | 2 +-
codegenv2.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/assemble.c b/assemble.c
index 2ce0e14..a9f2899 100644
--- a/assemble.c
+++ b/assemble.c
@@ -43,7 +43,7 @@
#include "lqueue.h"
#include "orgfixup.h"
#include "macrolib.h"
-//#include "simd.h"
+#include "simd.h"
#if DLLIMPORT
#include "mangle.h"
diff --git a/codegenv2.c b/codegenv2.c
index 6bcc08d..7063c27 100644
--- a/codegenv2.c
+++ b/codegenv2.c
@@ -1,6 +1,7 @@
#include "codegenv2.h"
+#include <ctype.h>
#include <time.h>
#include "globals.h"
#include "parser.h"
@@ -12,6 +13,7 @@
#include "types.h"
#include "macro.h"
#include "listing.h"
+#include "input.h"
#define OutputCodeByte( x ) OutputByte( x )
--
2.42.0
From bc4ffb4ac77f97b42f7d83cae0f0ea7a59c5b6be Mon Sep 17 00:00:00 2001
From: NRK <nrk@disroot.org>
Date: Mon, 1 Apr 2024 15:36:14 +0000
Subject: [PATCH 2/4] Add missing prototypes
ref: https://github.com/Terraspace/UASM/pull/186
---
H/globals.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/H/globals.h b/H/globals.h
index e202c50..7320cb9 100644
--- a/H/globals.h
+++ b/H/globals.h
@@ -49,6 +49,7 @@
#endif
#define _ltoa ltoa
#define _strupr strupr
+extern char *strupr(char *);
#elif defined(__POCC__)
@@ -946,4 +947,11 @@ extern char *num2hex64(uint_64 value, char *buffer);
extern char *ConvertSectionName( const struct asym *, enum seg_type *pst, char *buffer );
extern void RewindToWin64(void);
+extern void CreateMacroLibCases64(void);
+extern void CreateMacroLibCases32(void);
+extern void OutputInterleavedBytes(const unsigned char *pbytes, int len, struct fixup *fixup);
+extern void SymSimd(struct dsym *sym);
+extern void RunLineQueue( void );
+extern ret_code BackPatch( struct asym *sym );
+
#endif
--
2.42.0
From d4d625d009dfc7ab91136516aafb4fc706d0c1ab Mon Sep 17 00:00:00 2001
From: NRK <nrk@disroot.org>
Date: Mon, 1 Apr 2024 15:40:30 +0000
Subject: [PATCH 3/4] Fix incompatible assignment of `void *` to `uint32_t`
---
macho64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/macho64.c b/macho64.c
index 8e74842..8b81d5e 100644
--- a/macho64.c
+++ b/macho64.c
@@ -725,7 +725,7 @@ static ret_code macho_write_module( struct module_info *modinfo )
mm.header.cputype = CPU_TYPE_X86_64;
mm.header.cpusubtype = CPU_SUBTYPE_LITTLE_ENDIAN | CPU_SUBTYPE_X86_64_ALL;
mm.header.filetype = MH_OBJECT;
- mm.header.flags = NULL;
+ mm.header.flags = 0;
macho_build_structures(modinfo, mm);
}
--
2.42.0
From 0108e8754737c9ceac0314c8f70da8c9f4bd2095 Mon Sep 17 00:00:00 2001
From: NRK <nrk@disroot.org>
Date: Mon, 1 Apr 2024 15:54:02 +0000
Subject: [PATCH 4/4] Fix incompatible function pointer
---
proc.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/proc.c b/proc.c
index fdd8b49..80e8674 100644
--- a/proc.c
+++ b/proc.c
@@ -162,10 +162,12 @@ struct delphicall_conv {
static int ms32_pcheck(struct dsym *, struct dsym *, int *);
+static int ms32_syspcheck(struct dsym *, struct dsym *, int *, int *);
static void ms32_return(struct dsym *, char *);
#if OWFC_SUPPORT
static int watc_pcheck(struct dsym *, struct dsym *, int *);
+static int watc_syspcheck(struct dsym *, struct dsym *, int *, int *);
static void watc_return(struct dsym *, char *);
#endif
@@ -212,9 +214,9 @@ static const struct vectorcall_conv vectorcall_tab[] = {
};
static const struct sysvcall_conv sysvcall_tab[] = {
- { ms32_pcheck, ms32_return }, /* FCT_MSC */
+ { ms32_syspcheck, ms32_return }, /* FCT_MSC */
#if OWFC_SUPPORT
- { watc_pcheck, watc_return }, /* FCT_WATCOMC */
+ { watc_syspcheck, watc_return }, /* FCT_WATCOMC */
#endif
#if SYSV_SUPPORT
{ sysv_pcheck, sysv_return } /* FCT_WIN64 / SYSTEMV */
@@ -380,6 +382,11 @@ static int watc_pcheck(struct dsym *proc, struct dsym *paranode, int *used)
return(1);
}
+static int watc_syspcheck(struct dsym *proc, struct dsym *paranode, int *used, int *vecused)
+{
+ return watc_pcheck(proc, paranode, used);
+}
+
static void watc_return(struct dsym *proc, char *buffer)
/********************************************************/
{
@@ -433,6 +440,11 @@ static int ms32_pcheck(struct dsym *proc, struct dsym *paranode, int *used)
return(1);
}
+static int ms32_syspcheck(struct dsym *proc, struct dsym *paranode, int *used, int *vecused)
+{
+ return ms32_pcheck(proc, paranode, used);
+}
+
static void ms32_return(struct dsym *proc, char *buffer)
/********************************************************/
{
--
2.42.0

View File

@@ -1,10 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>nrk@disroot.org</email>
</maintainer>
<upstream>
<remote-id type="github">Terraspace/UASM</remote-id>
</upstream>
</pkgmetadata>

View File

@@ -1,36 +0,0 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit toolchain-funcs flag-o-matic
DESCRIPTION="UASM is a free MASM-compatible assembler"
HOMEPAGE="https://www.terraspace.co.uk/uasm.html"
SRC_URI="https://github.com/Terraspace/UASM/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="Watcom-1.0"
SLOT="0"
KEYWORDS="~amd64"
S="${WORKDIR}/UASM-${PV}"
PATCHES=(
"${FILESDIR}/build-fix.patch"
)
src_prepare() {
default
# don't strip binary
sed -i gccLinux64.mak -e 's/ -s / /g' || die
}
src_compile() {
append-cflags -fcommon # Bug: https://github.com/Terraspace/UASM/issues/143
emake -f gccLinux64.mak CC="$(tc-getCC)" \
CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}"
}
src_install() {
dobin GccUnixR/uasm
dodoc *.txt Doc/*.txt
}

View File

@@ -11,6 +11,7 @@ DESCRIPTION="The client library for BackBlaze's B2 product"
HOMEPAGE="https://github.com/Backblaze/b2-sdk-python"
SRC_URI="https://github.com/Backblaze/b2-sdk-python/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
S="${WORKDIR}/b2-sdk-python-${PV}"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"

View File

@@ -1,6 +0,0 @@
#!/bin/bash
case $1/$2 in
post/*)
/usr/bin/legiond-cli fanset 3
;;
esac

View File

@@ -1,7 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/legiond"
command_background=true
pidfile="/run/legiond.pid"

View File

@@ -26,6 +26,7 @@ BDEPEND="
sys-apps/lm-sensors
sys-apps/dmidecode
sys-apps/sed
dev-libs/inih
"
RDEPEND="
@@ -79,17 +80,19 @@ src_install() {
systemd_dounit service/legiond.service service/legiond-onresume.service service/legiond-cpuset.service service/legiond-cpuset.timer
newinitd "${FILESDIR}/legiond.initd" legiond
newinitd service/legiond.initd legiond
newinitd service/legiond-cpuset.initd legiond
newsbin service/legiond-cpuset.sh legiond-cpuset
if use elogind; then
exeinto /lib64/elogind/system-sleep/
doexe "${FILESDIR}/legiond-onresume.sh"
doexe service/legiond-onresume.sh
fi
insinto /etc/acpi/events
doins acpi/events/{legion_ppd,legion_ac}
dobin service/legiond/legiond
dobin service/legiond/legiond-cli
dobin service/legiond/legiond-ctl
fi
}
@@ -97,7 +100,7 @@ pkg_postinst() {
ewarn "Default config files are present in /usr/share/legion_linux"
ewarn "Copy folder /usr/share/legion_linux to /etc/legion_linux"
ewarn "Note: Fancurve can be edit using the gui app"
ewarn "Dont forget to edit /etc/legion_linux/.env to enable and disable extra features"
ewarn "Dont forget to edit /etc/legion_linux/legiond.ini (previous .env) to enable and disable extra features"
ewarn "Note the CPU and APU control command both for undervolt an ryzenadj are edit in /etc/legion_linux/.env"
if !use downgrade-nvidia; then
ewarn "Note: use flag downgrade-nvidia if you need for nvidia TDP control (requires driver 525 to work)\n"