summaryrefslogtreecommitdiff
path: root/app-arch
diff options
context:
space:
mode:
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/7zip/7zip-24.05.ebuild109
-rw-r--r--app-arch/7zip/Manifest4
-rw-r--r--app-arch/7zip/files/7zip-24.05-respect-build-env.patch52
-rw-r--r--app-arch/Manifest.gzbin18257 -> 18254 bytes
-rw-r--r--app-arch/bzip2/Manifest1
-rw-r--r--app-arch/bzip2/bzip2-1.0.8-r4.ebuild135
6 files changed, 165 insertions, 136 deletions
diff --git a/app-arch/7zip/7zip-24.05.ebuild b/app-arch/7zip/7zip-24.05.ebuild
new file mode 100644
index 000000000000..4393a0da0302
--- /dev/null
+++ b/app-arch/7zip/7zip-24.05.ebuild
@@ -0,0 +1,109 @@
+# Copyright 2023-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edos2unix flag-o-matic toolchain-funcs
+
+NO_DOT_PV=$(ver_rs 1- '')
+DESCRIPTION="Free file archiver for extremely high compression"
+HOMEPAGE="https://www.7-zip.org/ https://sourceforge.net/projects/sevenzip/"
+# linux-x64 tarball is only used for docs
+SRC_URI="
+ https://downloads.sourceforge.net/sevenzip/7-Zip/${PV}/7z${NO_DOT_PV}-src.tar.xz
+ https://downloads.sourceforge.net/sevenzip/7-Zip/${PV}/7z${NO_DOT_PV}-linux-x64.tar.xz
+"
+S="${WORKDIR}"
+
+LICENSE="LGPL-2 BSD rar? ( unRAR )"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="uasm jwasm rar"
+REQUIRED_USE="?? ( uasm jwasm )"
+
+DOCS=( readme.txt History.txt License.txt )
+HTML_DOCS=( MANUAL )
+
+DEPEND="${RDEPEND}"
+BDEPEND="
+ uasm? ( dev-lang/uasm )
+ jwasm? ( dev-lang/jwasm )
+"
+
+PATCHES=(
+ "${FILESDIR}/${P}-respect-build-env.patch"
+)
+
+# 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
+ pushd "./CPP/7zip" || die "Unable to switch directory"
+ edos2unix ./7zip_gcc.mak ./var_gcc{,_x64}.mak ./var_clang{,_x64}.mak
+ sed -i -e 's/-Werror //g' ./7zip_gcc.mak || die "Error removing -Werror"
+ popd >/dev/null || die "Unable to switch directory"
+
+ default
+}
+
+src_compile() {
+ pushd "./CPP/7zip/Bundles/Alone2" || die "Unable to switch directory"
+
+ # avoid executable stack when using uasm/jwasm, harmless otherwise
+ 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 "./CPP/7zip/Bundles/Alone2/b/${bdir}/7zz"
+ einstalldocs
+}
diff --git a/app-arch/7zip/Manifest b/app-arch/7zip/Manifest
index 8ea5408195a2..f7ed1afcf431 100644
--- a/app-arch/7zip/Manifest
+++ b/app-arch/7zip/Manifest
@@ -1,5 +1,9 @@
AUX 7zip-23.01-respect-build-env.patch 1556 BLAKE2B fdc1993dbcdc1bac28420d82ae19906be1c9857b7e0822f87d8c40003c55182b42b2f6ebde17897c4e1b074fe518cd4dc8d1c09a7d96d8be599aed5d2d506c91 SHA512 52dc54e980a729291fcadd097c6291fe33183c81cc92e30b10f5ad9c3f7ae09d8b0d3fd483c766ed63fb977b71b28eec0a78b2d4c7c054f68bcb63b8ef57d69a
+AUX 7zip-24.05-respect-build-env.patch 1428 BLAKE2B 00a6da925ca0236a423e1f82426ae81976358c30ba8b6d30b8af368aeb8e4271c443d3e401f7ea32ef6743b21c730f2ecaf78319e0bdf8c76d6a45baa8f9c1e3 SHA512 0aabff2930325553de08314bd161d2132f5c6fd3ed0363c37c961b04e16ae8b906053c0f8f9132c55760acf3ec1dbdb47f0677d618cf82d8ce8cfe6d52cb6e8d
DIST 7z2301-linux-x64.tar.xz 1527700 BLAKE2B 35dc74f0a7a4e586ea5ae969dce72c14e0231822630d2d70f24e1c911cea0492354a258ef65096a6ce0da1510117c12466bc6cda577cdf9e8e74ede17e47f23e SHA512 d3549468de8fd161e4c9233fa0b170af1f28c74749d20f3d0eeb3873857f6c6d2cc0777d564e6a79be7cc21c9e982e10710a795320428dc51db809a8d0f9454e
DIST 7z2301-src.tar.xz 1378588 BLAKE2B 348484b24b39db70e513fe50d79954ea0e2dd669f83e3601fa796c8f0ca4734132ca20fac8cda9b8ba550bad9146627fc0ae07056abb99028ef6d825b6a533bd SHA512 e39f660c023aa65e55388be225b5591fe2a5c9138693f3c9107e2eb4ce97fafde118d3375e01ada99d29de9633f56221b5b3d640c982178884670cd84c8aa986
+DIST 7z2405-linux-x64.tar.xz 1553872 BLAKE2B d6c0bd4eb81f4112bfe50bf6affc68021b03d059076af5519a41c8d471e978ad2b4acc8f67c650070f9d07c518741a0146579ddfb8d56fd125f6db0beece0990 SHA512 13f97236157e2761a0bf406b08fba13a1ecc6d5663fb38f8dfe3b87f3910ba34fd359d8b36bea5135319543f31ec1e210eb512ea9864d9b140c336b9e416c313
+DIST 7z2405-src.tar.xz 1486772 BLAKE2B 609c7ae8b89e56e747ebfecb25108d8918138f48f0f2ed73183c76101ddd3615aafb9eb7823be0de2a434b450587e01f476d2ed092628a311b6e4ed091e06260 SHA512 d340adfa68e818dd3d3aa411780c81532fa37b6649178b81ec3739725f83e0bc3c01744612b2d467f4d0c2cc984dd35488406d7baee185cf372acebd9c0123a7
EBUILD 7zip-23.01.ebuild 2887 BLAKE2B 8b30b8baa88bb0d0806b4547d4005a92dc6cc3a018e915fb2deafe014e103c943bbd7f744e6a7475d735eb715e97acc3f851104b59b96e27c291ab1b05cdd48b SHA512 29d37f7aff541638e6220f3f23d9c41e4a6bdbdcb79c23115efc0c44febf867b1f4eb558ea75966fa5e892293ddd18d1b85c5d6b8dda89f51e66988571669147
+EBUILD 7zip-24.05.ebuild 2887 BLAKE2B 8b30b8baa88bb0d0806b4547d4005a92dc6cc3a018e915fb2deafe014e103c943bbd7f744e6a7475d735eb715e97acc3f851104b59b96e27c291ab1b05cdd48b SHA512 29d37f7aff541638e6220f3f23d9c41e4a6bdbdcb79c23115efc0c44febf867b1f4eb558ea75966fa5e892293ddd18d1b85c5d6b8dda89f51e66988571669147
MISC metadata.xml 967 BLAKE2B 5b54d1cc757cdc63407a51587389f9db032ae141fd9e19423185fd457f50c469ceb53095b128d8c6cd751cf3f0a87703dd36ba5d048dbfe9bea0ccd2354168b2 SHA512 c8c53c995f4bb5982461fa16dd50193f48c59aa15076bd78e38ccc4f0abf2190bf2b143df50e1c7911bd7814bd2ecb34892ee818b328764a9ff4ab2429718d37
diff --git a/app-arch/7zip/files/7zip-24.05-respect-build-env.patch b/app-arch/7zip/files/7zip-24.05-respect-build-env.patch
new file mode 100644
index 000000000000..d16b22bf1d4e
--- /dev/null
+++ b/app-arch/7zip/files/7zip-24.05-respect-build-env.patch
@@ -0,0 +1,52 @@
+Respect build environment settings
+
+Bug: https://bugs.gentoo.org/913186
+Bug: https://bugs.gentoo.org/913188
+Bug: https://bugs.gentoo.org/913189
+
+
+--- a/CPP/7zip/7zip_gcc.mak
++++ b/CPP/7zip/7zip_gcc.mak
+@@ -45,7 +45,6 @@
+ else
+ CFLAGS_DEBUG = -DNDEBUG
+ ifneq ($(CC), $(CROSS_COMPILE)clang)
+-LFLAGS_STRIP = -s
+ endif
+ endif
+
+@@ -104,14 +103,14 @@
+ 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 = $(G_LDFLAGS) $(LDFLAGS_STATIC)
+ # -z force-bti
+ # -s is not required for clang, do we need it for GCC ???
+
+@@ -169,7 +168,7 @@
+
+
+
+-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
+@@ -210,7 +209,7 @@
+ #-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) $(CXX_INCLUDE_FLAGS) -o $@
++CXXFLAGS = $(MY_ARCH_2) $(LOCAL_FLAGS) $(CXXFLAGS_BASE2) $(CFLAGS_BASE) $(FLAGS_FLTO) $(CXXFLAGS_EXTRA) $(CC_SHARED) $(CXX_WARN_FLAGS) $(CXX_STD_FLAGS) $(CXX_INCLUDE_FLAGS) $(G_CXXFLAGS) -o $@
+
+ STATIC_TARGET=
+ ifdef COMPL_STATIC
diff --git a/app-arch/Manifest.gz b/app-arch/Manifest.gz
index 2b90637ec8dd..ebe297288978 100644
--- a/app-arch/Manifest.gz
+++ b/app-arch/Manifest.gz
Binary files differ
diff --git a/app-arch/bzip2/Manifest b/app-arch/bzip2/Manifest
index a8ff1221799c..fd9b4f42c736 100644
--- a/app-arch/bzip2/Manifest
+++ b/app-arch/bzip2/Manifest
@@ -7,7 +7,6 @@ AUX bzip2-1.0.8-out-of-tree-build.patch 1997 BLAKE2B 87791ad7b5c702110a7a45bb4a0
AUX bzip2-1.0.8-saneso.patch 463 BLAKE2B 83c5a905dbb3dd6481abe7ad7f57f9ce5c5cac8ababee2b5ff0221965f1ee6675c4060cec841dcf4370018a7fc6376cced900c6410eca96579962d52fd07563d SHA512 19d1a721680e4113c3b3267af74fa5a7ec5947c6630946c60ac5cf165476d9e7c2229e0cb099029dc9f5708b5ba15864f84af198940709144b65dbd2cd3a76a8
DIST bzip2-1.0.8.tar.gz 810029 BLAKE2B 22ab3acd84f4db8c3d6f59340c252faedfd4447cea00dafbd652e65b6cf8a20adf6835c22e58563004cfafdb15348c924996230b4b23cae42da5e25eeac4bdad SHA512 083f5e675d73f3233c7930ebe20425a533feedeaaa9d8cc86831312a6581cefbe6ed0d08d2fa89be81082f2a5abdabca8b3c080bf97218a1bd59dc118a30b9f3
DIST bzip2-1.0.8.tar.gz.sig 310 BLAKE2B 0d702dcb19f7738da9f05ee9d719f5cd3653540365e78db143404e599ea54bc6f9d5e6a38cdf5cdd3c6550243d34266343467c6b1db9d5d3c134f9353b00f395 SHA512 4a4a3fa0ec1c10a704b9870e8e629fd007cca55184423c6bfc3049a702fb41e4aeb73bfe9ca7442c27d32d278f1f34f27523a6be67d35b37896acdded12bf40d
-EBUILD bzip2-1.0.8-r4.ebuild 3551 BLAKE2B faa39850794cf91b33067cb90ea0c9113d65b01610f8a9025bd9018a221d9ecc5ea32d3f42c66b01e52ba131dedec34b78c7eba198108e63da9f5fde22f4c351 SHA512 a655dd1c0bdbbbea98a88cf3d235b08a7b3b47bc527858443a9a3024a58a5e5f4acab440f53f36bdc2c3d9827de2ad4b4f42606604b4ca36eb9208c2d482ec5c
EBUILD bzip2-1.0.8-r5.ebuild 3511 BLAKE2B 406daa92ae16bd8ee10185f84fe154815717bc7b16b6dca0dc0e7d36b31ddfa8d563e01c2692ca7f5b5d6cb07afc4fd50e0f77d5512d596acf6e8786f0333751 SHA512 e01bcf2ca47dddbbbed0a8c12b150165e54b98b8eae3d88d965c6250ed2718432e63c3df3d975367d3637ee66e36aaad3771f58bdd5ac77ee3392737ff7a7cf7
EBUILD bzip2-9999.ebuild 1382 BLAKE2B 03246514a2ea9a7123145072068f0b3ca0092d8d87a769ef4b01966e77d79029203a1fb8b4692d1024cf9727b596231f1926b77b978e509d23ecf3d012b19d8b SHA512 5c4a20ea3691e4641e3db5b79f9f65e554f893dacafa980e2beb62f790a6c104d4b39586b9a6e81e4b34abead9045df114182321445cd86ebcbd15235f97e774
MISC metadata.xml 384 BLAKE2B e74083bed23efd0279d23ea4f9fc048a9a0c253d48757f74a6c0044f5ca6a6b4cb86908db25d42f304b72a8dbf4c3627371ad6ab69aeab9267e8eb21c2053898 SHA512 c358db6bdaabfa401452ceaa8f85298b75ae00e5f7f189768741b4c74ed123be79405c03c7b94707db29b7d60710c441d089c10fa511262ad5a88cd106fb54f4
diff --git a/app-arch/bzip2/bzip2-1.0.8-r4.ebuild b/app-arch/bzip2/bzip2-1.0.8-r4.ebuild
deleted file mode 100644
index c90c3005af92..000000000000
--- a/app-arch/bzip2/bzip2-1.0.8-r4.ebuild
+++ /dev/null
@@ -1,135 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-# XXX: atm, libbz2.a is always PIC :(, so it is always built quickly
-# (since we're building shared libs) ...
-
-EAPI=7
-
-VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/bzip2.gpg
-inherit toolchain-funcs multilib multilib-minimal usr-ldscript verify-sig
-
-DESCRIPTION="A high-quality data compressor used extensively by Gentoo Linux"
-HOMEPAGE="https://sourceware.org/bzip2/"
-SRC_URI="https://sourceware.org/pub/${PN}/${P}.tar.gz"
-SRC_URI+=" verify-sig? ( https://sourceware.org/pub/${PN}/${P}.tar.gz.sig )"
-
-LICENSE="BZIP2"
-SLOT="0/1" # subslot = SONAME
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~arm64-macos"
-IUSE="static static-libs"
-
-BDEPEND="
- verify-sig? ( sec-keys/openpgp-keys-bzip2 )
-"
-PDEPEND="
- app-alternatives/bzip2
-"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-1.0.4-makefile-CFLAGS.patch
- "${FILESDIR}"/${PN}-1.0.8-saneso.patch
- "${FILESDIR}"/${PN}-1.0.4-man-links.patch #172986
- "${FILESDIR}"/${PN}-1.0.6-progress.patch
- "${FILESDIR}"/${PN}-1.0.3-no-test.patch
- "${FILESDIR}"/${PN}-1.0.8-mingw.patch #393573
- "${FILESDIR}"/${PN}-1.0.8-out-of-tree-build.patch
-)
-
-DOCS=( CHANGES README{,.COMPILATION.PROBLEMS,.XML.STUFF} manual.pdf )
-HTML_DOCS=( manual.html )
-
-src_prepare() {
- default
-
- # - Use right man path
- # - Generate symlinks instead of hardlinks
- # - pass custom variables to control libdir
- sed -i \
- -e 's:\$(PREFIX)/man:\$(PREFIX)/share/man:g' \
- -e 's:ln -s -f $(PREFIX)/bin/:ln -s -f :' \
- -e 's:$(PREFIX)/lib:$(PREFIX)/$(LIBDIR):g' \
- Makefile || die
-}
-
-bemake() {
- emake \
- VPATH="${S}" \
- CC="$(tc-getCC)" \
- AR="$(tc-getAR)" \
- RANLIB="$(tc-getRANLIB)" \
- "$@"
-}
-
-multilib_src_compile() {
- bemake -f "${S}"/Makefile-libbz2_so all
- # Make sure we link against the shared lib #504648
- ln -s libbz2.so.${PV} libbz2.so || die
- bemake -f "${S}"/Makefile all LDFLAGS="${LDFLAGS} $(usex static -static '')"
-}
-
-multilib_src_test() {
- cp "${S}"/sample* "${BUILD_DIR}" || die
- bemake -f "${S}"/Makefile check
-}
-
-multilib_src_install() {
- into /usr
-
- # Install the shared lib manually. We install:
- # .x.x.x - standard shared lib behavior
- # .x.x - SONAME some distros use #338321
- # .x - SONAME Gentoo uses
- dolib.so libbz2.so.${PV}
- local v
- for v in libbz2.so{,.{${PV%%.*},${PV%.*}}} ; do
- dosym libbz2.so.${PV} /usr/$(get_libdir)/${v}
- done
-
- use static-libs && dolib.a libbz2.a
-
- if multilib_is_native_abi ; then
- gen_usr_ldscript -a bz2
-
- dobin bzip2recover$(get_exeext)
- into /
- newbin bzip2$(get_exeext) bzip2-reference$(get_exeext)
- fi
-}
-
-multilib_src_install_all() {
- # `make install` doesn't cope with out-of-tree builds, nor with
- # installing just non-binaries, so handle things ourselves.
- insinto /usr/include
- doins bzlib.h
- into /usr
- dobin bz{diff,grep,more}
- doman bz{diff,grep,more}.1
- newman bzip2.1 bzip2-reference.1
-
- dosym bzdiff /usr/bin/bzcmp
- dosym bzdiff.1 /usr/share/man/man1/bzcmp.1
-
- dosym bzmore /usr/bin/bzless
- dosym bzmore.1 /usr/share/man/man1/bzless.1
-
- dosym bzip2-reference.1 /usr/share/man/man1/bzip2recover.1
- local x
- for x in bz{e,f}grep ; do
- dosym bzgrep /usr/bin/${x}
- dosym bzgrep.1 /usr/share/man/man1/${x}.1
- done
-
- einstalldocs
-}
-
-pkg_postinst() {
- # ensure to preserve the symlinks before app-alternatives/bzip2
- # is installed
- local x
- for x in bzip2 bunzip2 bzcat; do
- if [[ ! -h ${EROOT}/bin/${x} ]]; then
- ln -s bzip2-reference$(get_exeext) "${EROOT}/bin/${x}$(get_exeext)" || die
- fi
- done
-}