archivers/7-zip: add new port
This is console version of original 7-Zip archiver released for Linux: https://sourceforge.net/p/sevenzip/discussion/45797/thread/cec5e63147/ The sources are packed with 7z, therefore p7zip is required to build this port.
This commit is contained in:
parent
ab7f2c4a56
commit
cba515834b
40
archivers/7-zip/Makefile
Normal file
40
archivers/7-zip/Makefile
Normal file
@ -0,0 +1,40 @@
|
||||
PORTNAME= 7-zip
|
||||
DISTVERSION= 21.06
|
||||
CATEGORIES= archivers
|
||||
MASTER_SITES= https://www.7-zip.org/a/
|
||||
DISTNAME= 7z${DISTVERSION:S/.//}-src
|
||||
|
||||
MAINTAINER= makc@FreeBSD.org
|
||||
COMMENT= Console version of the 7-Zip file archiver
|
||||
|
||||
LIB_DEPENDS= libsysinfo.so:devel/libsysinfo
|
||||
|
||||
USES= 7z dos2unix gmake localbase
|
||||
|
||||
MAKEFILE= ../../cmpl_clang.mak
|
||||
MAKE_ARGS= LOCAL_FLAGS="${CFLAGS}" \
|
||||
LOCAL_LIBS="${LIBS} -lsysinfo"
|
||||
|
||||
NO_WRKSUBDIR= yes
|
||||
BUILD_WRKSRC= ${WRKSRC}/CPP/7zip/Bundles/Alone2
|
||||
DOS2UNIX_FILES= CPP/7zip/7zip_gcc.mak \
|
||||
CPP/7zip/var_gcc.mak \
|
||||
CPP/Windows/SystemInfo.cpp
|
||||
|
||||
PLIST_FILES= bin/7zz
|
||||
PORTDOCS= 7zC.txt 7zFormat.txt Methods.txt lzma.txt readme.txt \
|
||||
src-history.txt
|
||||
|
||||
OPTIONS_DEFINE= DOCS
|
||||
|
||||
post-patch:
|
||||
${ECHO_CMD} > ${WRKSRC}/CPP/7zip/warn_clang.mak
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${BUILD_WRKSRC}/b/c/7zz ${STAGEDIR}/${PREFIX}/bin
|
||||
|
||||
do-install-DOCS-on:
|
||||
${MKDIR} ${STAGEDIR}${DOCSDIR} && \
|
||||
${INSTALL_DATA} ${PORTDOCS:C,^,${WRKSRC}/DOC/,} ${STAGEDIR}${DOCSDIR}
|
||||
|
||||
.include <bsd.port.mk>
|
3
archivers/7-zip/distinfo
Normal file
3
archivers/7-zip/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1639126647
|
||||
SHA256 (7z2106-src.7z) = 675eaa90de3c6a3cd69f567bba4faaea309199ca75a6ad12bac731dcdae717ac
|
||||
SIZE (7z2106-src.7z) = 1215031
|
20
archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak
Normal file
20
archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak
Normal file
@ -0,0 +1,20 @@
|
||||
--- CPP/7zip/7zip_gcc.mak.orig 2021-12-10 11:04:08 UTC
|
||||
+++ CPP/7zip/7zip_gcc.mak
|
||||
@@ -22,7 +22,7 @@ CFLAGS_BASE_LIST = -c
|
||||
# CFLAGS_BASE_LIST = -S
|
||||
CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \
|
||||
-DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \
|
||||
- -fPIC
|
||||
+ -fPIC $(LOCAL_FLAGS)
|
||||
|
||||
# -D_7ZIP_AFFINITY_DISABLE
|
||||
|
||||
@@ -111,7 +111,7 @@ MY_MKDIR=mkdir -p
|
||||
|
||||
# LOCAL_LIBS=-lpthread
|
||||
# LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
|
||||
-LIB2 = -lpthread -ldl
|
||||
+LIB2 = $(LOCAL_LIBS) -lpthread
|
||||
|
||||
|
||||
|
12
archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak
Normal file
12
archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak
Normal file
@ -0,0 +1,12 @@
|
||||
--- CPP/7zip/var_gcc.mak.orig 2021-12-10 10:31:55 UTC
|
||||
+++ CPP/7zip/var_gcc.mak
|
||||
@@ -6,7 +6,7 @@ IS_ARM64=
|
||||
CROSS_COMPILE=
|
||||
MY_ARCH=
|
||||
USE_ASM=
|
||||
-CC=$(CROSS_COMPILE)gcc
|
||||
-CXX=$(CROSS_COMPILE)g++
|
||||
+CC=$(CC)
|
||||
+CXX=$(CXX)
|
||||
|
||||
# -march=armv8-a+crc+crypto
|
18
archivers/7-zip/files/patch-CPP_Windows_SystemInfo.cpp
Normal file
18
archivers/7-zip/files/patch-CPP_Windows_SystemInfo.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
--- CPP/Windows/SystemInfo.cpp.orig 2021-12-10 11:30:40 UTC
|
||||
+++ CPP/Windows/SystemInfo.cpp
|
||||
@@ -20,6 +20,15 @@
|
||||
|
||||
#include <sys/auxv.h>
|
||||
|
||||
+#if defined(__FreeBSD__)
|
||||
+unsigned long getauxval(unsigned long type)
|
||||
+{
|
||||
+ unsigned long aux = 0;
|
||||
+ elf_aux_info(type, &aux, sizeof(aux));
|
||||
+ return aux;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// #undef AT_HWCAP // to debug
|
||||
// #undef AT_HWCAP2 // to debug
|
||||
|
9
archivers/7-zip/pkg-descr
Normal file
9
archivers/7-zip/pkg-descr
Normal file
@ -0,0 +1,9 @@
|
||||
7-Zip is a file archiver with a high compression ratio in 7z format with LZMA
|
||||
and LZMA2 compression. Supported formats:
|
||||
|
||||
* Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
|
||||
* Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS,
|
||||
IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF,
|
||||
UEFI, VDI, VHD, VMDK, WIM, XAR and Z
|
||||
|
||||
WWW: https://www.7-zip.org/
|
@ -1,5 +1,6 @@
|
||||
COMMENT = Archivers
|
||||
|
||||
SUBDIR += 7-zip
|
||||
SUBDIR += 9e
|
||||
SUBDIR += R-cran-zip
|
||||
SUBDIR += advancecomp
|
||||
|
Loading…
Reference in New Issue
Block a user