* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2023-08-28 3:12 Martin Matouš
0 siblings, 0 replies; 6+ messages in thread
From: Martin Matouš @ 2023-08-28 3:12 UTC (permalink / raw
To: gentoo-commits
commit: 9033c9230b8c6a3b6f21713229a128c91714be56
Author: Martin Matouš <m <AT> matous <DOT> dev>
AuthorDate: Mon Aug 28 03:10:31 2023 +0000
Commit: Martin Matouš <m <AT> matous <DOT> dev>
CommitDate: Mon Aug 28 03:10:31 2023 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9033c923
app-arch/7zip: new package, add 23.01
Signed-off-by: Martin Matouš <m <AT> matous.dev>
app-arch/7zip/7zip-23.01.ebuild | 63 +++++++++++++++++++++++++++++++++++++++++
app-arch/7zip/Manifest | 1 +
app-arch/7zip/metadata.xml | 19 +++++++++++++
3 files changed, 83 insertions(+)
diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
new file mode 100644
index 0000000000..191ccaaeee
--- /dev/null
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -0,0 +1,63 @@
+# Copyright 2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+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"
+LICENSE="LGPL-2 BSD"
+
+IUSE="asm"
+SLOT="0"
+KEYWORDS="~amd64"
+
+S="${WORKDIR}/CPP/7zip/"
+RESTRICT="mirror"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+BDEPEND="asm? ( dev-lang/jwasm )"
+
+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 asm ; then
+ mfile="${mfile}_x64"
+ bdir="${bdir}_x64"
+ fi
+ export mfile="${mfile}.mak"
+ export bdir
+}
+
+src_prepare() {
+ default
+ sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror"
+ sed -i -e 's/$(LFLAGS_STRIP)//g' ./7zip_gcc.mak \
+ || die "Error removing hardcoded strip"
+}
+
+src_compile() {
+ pushd "./Bundles/Alone2" || die "Unable to switch directory"
+ # USE_JWASM=1 - if asm: use JWasm assembler instead of Asmc (not a gentoo package)
+ emake DISABLE_RAR=1 USE_JWASM=1 --file "../../${mfile}"
+ popd > /dev/null || die "Unable to switch directory"
+}
+
+src_install() {
+ dobin "./Bundles/Alone2/b/${bdir}/7zz"
+}
diff --git a/app-arch/7zip/Manifest b/app-arch/7zip/Manifest
new file mode 100644
index 0000000000..0f23ebee40
--- /dev/null
+++ b/app-arch/7zip/Manifest
@@ -0,0 +1 @@
+DIST 7zip-23.01.tar.xz 1378588 BLAKE2B 348484b24b39db70e513fe50d79954ea0e2dd669f83e3601fa796c8f0ca4734132ca20fac8cda9b8ba550bad9146627fc0ae07056abb99028ef6d825b6a533bd SHA512 e39f660c023aa65e55388be225b5591fe2a5c9138693f3c9107e2eb4ce97fafde118d3375e01ada99d29de9633f56221b5b3d640c982178884670cd84c8aa986
diff --git a/app-arch/7zip/metadata.xml b/app-arch/7zip/metadata.xml
new file mode 100644
index 0000000000..099821269c
--- /dev/null
+++ b/app-arch/7zip/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <use>
+ <flag name="asm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code</flag>
+ </use>
+ <maintainer type="person">
+ <email>m@matous.dev</email>
+ <name>Martin Matouš</name>
+ </maintainer>
+ <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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2024-02-26 17:49 Nickolas Raymond Kaczynski
0 siblings, 0 replies; 6+ messages in thread
From: Nickolas Raymond Kaczynski @ 2024-02-26 17:49 UTC (permalink / raw
To: gentoo-commits
commit: 66e3c38e9193bb36ef35a1eab00016b4b1e6a5e6
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sat Feb 24 15:35:48 2024 +0000
Commit: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Mon Feb 26 17:45:01 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=66e3c38e
app-arch/7zip: add support for dev-lang/uasm
Signed-off-by: NRK <nrk <AT> disroot.org>
app-arch/7zip/7zip-23.01.ebuild | 28 ++++++++++++++--------------
app-arch/7zip/metadata.xml | 3 ++-
2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
index 45f60812c2..7fe4ad21c1 100644
--- a/app-arch/7zip/7zip-23.01.ebuild
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -11,7 +11,8 @@ 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"
LICENSE="LGPL-2 BSD rar? ( unRAR )"
-IUSE="asm rar"
+IUSE="uasm jwasm rar"
+REQUIRED_USE="?? ( uasm jwasm )"
SLOT="0"
KEYWORDS="~amd64"
@@ -20,13 +21,11 @@ RESTRICT="mirror"
RDEPEND=""
DEPEND="${RDEPEND}"
-# TODO(NRK): package asmc? since 7zip docs recommends using it over jwasm since
-# jwasm doesn't support AES instructions.
-#
-# alternatively look into packaging uasm (https://www.terraspace.co.uk/uasm.html)
-# instead which is jwasm based but also supports AES. the 7zip AUR package uses
-# uasm for reference.
-BDEPEND="asm? ( dev-lang/jwasm )"
+# TODO: disable executable stack when asm is used
+BDEPEND="
+ uasm? ( dev-lang/uasm )
+ jwasm? ( dev-lang/jwasm )
+"
pkg_setup() {
# instructions in DOC/readme.txt, Compiling 7-Zip for Unix/Linux
@@ -42,7 +41,7 @@ pkg_setup() {
else
die "Unsupported compiler: $(tc-getCC)"
fi
- if use asm ; then
+ if use jwasm || use uasm ; then
mfile="${mfile}_x64"
bdir="${bdir}_x64"
fi
@@ -67,11 +66,7 @@ src_compile() {
export G_CFLAGS=${CFLAGS}
export G_CXXFLAGS=${CXXFLAGS}
export G_LDFLAGS=${LDFLAGS}
- # USE_JWASM=1 - if asm: use JWasm assembler instead of Asmc (not a gentoo package)
- local args=(
- -f "../../${mfile}"
- USE_JWASM=1
- )
+ local args=( -f "../../${mfile}" )
# 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.
@@ -80,6 +75,11 @@ src_compile() {
# 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"
}
diff --git a/app-arch/7zip/metadata.xml b/app-arch/7zip/metadata.xml
index 43ad17ef87..3f87406d71 100644
--- a/app-arch/7zip/metadata.xml
+++ b/app-arch/7zip/metadata.xml
@@ -6,8 +6,9 @@
<name>Martin Matouš</name>
</maintainer>
<use>
- <flag name="asm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code</flag>
<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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2024-02-26 17:49 Nickolas Raymond Kaczynski
0 siblings, 0 replies; 6+ messages in thread
From: Nickolas Raymond Kaczynski @ 2024-02-26 17:49 UTC (permalink / raw
To: gentoo-commits
commit: 5e9e2ad78d04b60b5e2bfcd6174b9482e27a2003
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sun Feb 25 10:35:33 2024 +0000
Commit: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Mon Feb 26 17:45:02 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=5e9e2ad7
app-arch/7zip: grab docs from the linux tarball
Signed-off-by: NRK <nrk <AT> disroot.org>
app-arch/7zip/7zip-23.01.ebuild | 10 +++++++++-
app-arch/7zip/Manifest | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
index c3ec08e7e0..340dd91b03 100644
--- a/app-arch/7zip/7zip-23.01.ebuild
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -8,7 +8,10 @@ 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"
+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"
@@ -17,6 +20,8 @@ SLOT="0"
KEYWORDS="~amd64"
S="${WORKDIR}/CPP/7zip/"
+DOCS=( readme.txt History.txt License.txt )
+HTML_DOCS=( MANUAL )
RESTRICT="mirror"
RDEPEND=""
@@ -92,4 +97,7 @@ src_compile() {
src_install() {
dobin "./Bundles/Alone2/b/${bdir}/7zz"
+
+ pushd "${WORKDIR}" || die "Unable to switch directory"
+ einstalldocs
}
diff --git a/app-arch/7zip/Manifest b/app-arch/7zip/Manifest
index 0f23ebee40..39335efa32 100644
--- a/app-arch/7zip/Manifest
+++ b/app-arch/7zip/Manifest
@@ -1 +1,2 @@
+DIST 7zip-23.01-linux.tar.xz 1527700 BLAKE2B 35dc74f0a7a4e586ea5ae969dce72c14e0231822630d2d70f24e1c911cea0492354a258ef65096a6ce0da1510117c12466bc6cda577cdf9e8e74ede17e47f23e SHA512 d3549468de8fd161e4c9233fa0b170af1f28c74749d20f3d0eeb3873857f6c6d2cc0777d564e6a79be7cc21c9e982e10710a795320428dc51db809a8d0f9454e
DIST 7zip-23.01.tar.xz 1378588 BLAKE2B 348484b24b39db70e513fe50d79954ea0e2dd669f83e3601fa796c8f0ca4734132ca20fac8cda9b8ba550bad9146627fc0ae07056abb99028ef6d825b6a533bd SHA512 e39f660c023aa65e55388be225b5591fe2a5c9138693f3c9107e2eb4ce97fafde118d3375e01ada99d29de9633f56221b5b3d640c982178884670cd84c8aa986
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2024-02-26 17:49 Nickolas Raymond Kaczynski
0 siblings, 0 replies; 6+ messages in thread
From: Nickolas Raymond Kaczynski @ 2024-02-26 17:49 UTC (permalink / raw
To: gentoo-commits
commit: d00074052481cbb468d930cc42caeaa6990d1987
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sat Feb 24 15:46:14 2024 +0000
Commit: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Mon Feb 26 17:45:01 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=d0007405
app-arch/7zip: disable executable stack when using uasm
Signed-off-by: NRK <nrk <AT> disroot.org>
app-arch/7zip/7zip-23.01.ebuild | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
index 7fe4ad21c1..414d6e33be 100644
--- a/app-arch/7zip/7zip-23.01.ebuild
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit edos2unix toolchain-funcs
+inherit edos2unix toolchain-funcs flag-o-matic
NO_DOT_PV=$(ver_rs 1- '')
DESCRIPTION="A free file archiver for extremely high compression"
@@ -21,7 +21,6 @@ RESTRICT="mirror"
RDEPEND=""
DEPEND="${RDEPEND}"
-# TODO: disable executable stack when asm is used
BDEPEND="
uasm? ( dev-lang/uasm )
jwasm? ( dev-lang/jwasm )
@@ -61,6 +60,7 @@ src_prepare() {
src_compile() {
pushd "./Bundles/Alone2" || die "Unable to switch directory"
+ append-ldflags -Wl,-z,noexecstack
export G_CC=$(tc-getCC)
export G_CXX=$(tc-getCXX)
export G_CFLAGS=${CFLAGS}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2024-02-26 17:49 Nickolas Raymond Kaczynski
0 siblings, 0 replies; 6+ messages in thread
From: Nickolas Raymond Kaczynski @ 2024-02-26 17:49 UTC (permalink / raw
To: gentoo-commits
commit: 4d2e32a01b4ae0007af77d3114864276f25ae424
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sat Feb 24 13:32:34 2024 +0000
Commit: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Mon Feb 26 17:45:01 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=4d2e32a0
app-arch/7zip: add rar support
Closes: https://bugs.gentoo.org/918634
Signed-off-by: NRK <nrk <AT> disroot.org>
app-arch/7zip/7zip-23.01.ebuild | 26 ++++++++++++++++++++++----
app-arch/7zip/metadata.xml | 7 ++++---
2 files changed, 26 insertions(+), 7 deletions(-)
diff --git a/app-arch/7zip/7zip-23.01.ebuild b/app-arch/7zip/7zip-23.01.ebuild
index 38a77c1c4c..45f60812c2 100644
--- a/app-arch/7zip/7zip-23.01.ebuild
+++ b/app-arch/7zip/7zip-23.01.ebuild
@@ -1,4 +1,4 @@
-# Copyright 2023 Gentoo Authors
+# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -9,9 +9,9 @@ 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"
-LICENSE="LGPL-2 BSD"
+LICENSE="LGPL-2 BSD rar? ( unRAR )"
-IUSE="asm"
+IUSE="asm rar"
SLOT="0"
KEYWORDS="~amd64"
@@ -20,6 +20,12 @@ RESTRICT="mirror"
RDEPEND=""
DEPEND="${RDEPEND}"
+# TODO(NRK): package asmc? since 7zip docs recommends using it over jwasm since
+# jwasm doesn't support AES instructions.
+#
+# alternatively look into packaging uasm (https://www.terraspace.co.uk/uasm.html)
+# instead which is jwasm based but also supports AES. the 7zip AUR package uses
+# uasm for reference.
BDEPEND="asm? ( dev-lang/jwasm )"
pkg_setup() {
@@ -62,7 +68,19 @@ src_compile() {
export G_CXXFLAGS=${CXXFLAGS}
export G_LDFLAGS=${LDFLAGS}
# USE_JWASM=1 - if asm: use JWasm assembler instead of Asmc (not a gentoo package)
- emake DISABLE_RAR=1 USE_JWASM=1 --file "../../${mfile}"
+ local args=(
+ -f "../../${mfile}"
+ USE_JWASM=1
+ )
+ # 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
+ emake ${args[@]}
popd > /dev/null || die "Unable to switch directory"
}
diff --git a/app-arch/7zip/metadata.xml b/app-arch/7zip/metadata.xml
index 099821269c..43ad17ef87 100644
--- a/app-arch/7zip/metadata.xml
+++ b/app-arch/7zip/metadata.xml
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <use>
- <flag name="asm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code</flag>
- </use>
<maintainer type="person">
<email>m@matous.dev</email>
<name>Martin Matouš</name>
</maintainer>
+ <use>
+ <flag name="asm">Use <pkg>dev-lang/jwasm</pkg> to include optimized code</flag>
+ <flag name="rar">Enable support for non-free rar decoder</flag>
+ </use>
<upstream>
<maintainer>
<name>Igor Pavlov</name>
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/
@ 2024-02-26 17:49 Nickolas Raymond Kaczynski
0 siblings, 0 replies; 6+ messages in thread
From: Nickolas Raymond Kaczynski @ 2024-02-26 17:49 UTC (permalink / raw
To: gentoo-commits
commit: cdc75fb7c0cb1982ee5065effc061903fd679190
Author: NRK <nrk <AT> disroot <DOT> org>
AuthorDate: Sat Feb 24 15:47:52 2024 +0000
Commit: Nickolas Raymond Kaczynski <nrk <AT> disroot <DOT> org>
CommitDate: Mon Feb 26 17:45:01 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cdc75fb7
app-arch/7zip: add myself as co-maintainer
Signed-off-by: NRK <nrk <AT> disroot.org>
app-arch/7zip/metadata.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/app-arch/7zip/metadata.xml b/app-arch/7zip/metadata.xml
index 3f87406d71..f6008af2b1 100644
--- a/app-arch/7zip/metadata.xml
+++ b/app-arch/7zip/metadata.xml
@@ -5,6 +5,9 @@
<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>
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-02-26 17:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-26 17:49 [gentoo-commits] repo/proj/guru:dev commit in: app-arch/7zip/ Nickolas Raymond Kaczynski
-- strict thread matches above, loose matches on Subject: below --
2024-02-26 17:49 Nickolas Raymond Kaczynski
2024-02-26 17:49 Nickolas Raymond Kaczynski
2024-02-26 17:49 Nickolas Raymond Kaczynski
2024-02-26 17:49 Nickolas Raymond Kaczynski
2023-08-28 3:12 Martin Matouš
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox