From nobody Fri Dec 10 15:17:24 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 0785118EFC9B; Fri, 10 Dec 2021 15:17:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J9ZJh51QRz4mw7; Fri, 10 Dec 2021 15:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 882BB1C5D5; Fri, 10 Dec 2021 15:17:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BAFHOs6083540; Fri, 10 Dec 2021 15:17:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BAFHOaI083539; Fri, 10 Dec 2021 15:17:24 GMT (envelope-from git) Date: Fri, 10 Dec 2021 15:17:24 GMT Message-Id: <202112101517.1BAFHOaI083539@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Max Brazhnikov Subject: git: cba515834b61 - main - archivers/7-zip: add new port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: makc X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cba515834b610de4ee050a032e5eed4b9180fbac Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639149444; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yuqaYYC1lSyVuIQUmf/niBMMh+7jnfaosSJaKx0qnEQ=; b=BCLiTNAxk9HGXeVC3URe9ZI2ISy/KF8NjOmFIoQky6wsw3vK9lY4vEShVkBdfL+szlUJBE 6mVvVD6VvR6dh6JA0Yb1WgrlXuCbX3bWC48xVYIUEwqbS2/FujteLbw/dATs7pvYUUp23y W1ayreHjK4wKn0qZPOJ/lT0a77T6H95Pye4LnYS/Ha0ZRweQlSUpkucr8BKux6khhzcnbc sRxmiaRdPPB+jN9lG8R0JQtqEjnpCrF8TpxVb5TLMte/DO1nZmIviyLaxYe3K7xaJCpFHx NpmP9Ltr+uPQxW5heAn3M2lFwpvewlHC4Pj+h2Q0EKZWgkppXOoeHKDvTYbarQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639149444; a=rsa-sha256; cv=none; b=o4z/bOCsCm7C3NH+nd61+neL81TeI38AM++5NYQQg2cXxN1w8eYozSLly0MxvVZfZWS9E7 CIKQMTVGmNpdAb3d1/8+W7lTUtv9eIBdGW6f1D3rcuVFoqV4Dj1gzrZopDHrqK2JEdcEQ3 bChyvNDmr/AGqteG2eyt/SlPxDsYw829c0WA+KpOWDjI8sDKLtRO7E5XUewTnub5rEShRc rQiTpNMPuGNtsVs/5TFhtQ4kNn77xaSeOwPBsRqjcl5EUcR2gS/qOyJNvNdAnTjIiP5fFF wnHItybCAb4kY2R3ifbooHTdr2Y1nxShOjCYrZJdfHtVeJHL2IaBckziOeZBgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by makc: URL: https://cgit.FreeBSD.org/ports/commit/?id=cba515834b610de4ee050a032e5eed4b9180fbac commit cba515834b610de4ee050a032e5eed4b9180fbac Author: Max Brazhnikov AuthorDate: 2021-12-10 15:11:29 +0000 Commit: Max Brazhnikov CommitDate: 2021-12-10 15:13:26 +0000 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. --- archivers/7-zip/Makefile | 40 ++++++++++++++++++++++ archivers/7-zip/distinfo | 3 ++ archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak | 20 +++++++++++ archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak | 12 +++++++ .../7-zip/files/patch-CPP_Windows_SystemInfo.cpp | 18 ++++++++++ archivers/7-zip/pkg-descr | 9 +++++ archivers/Makefile | 1 + 7 files changed, 103 insertions(+) diff --git a/archivers/7-zip/Makefile b/archivers/7-zip/Makefile new file mode 100644 index 000000000000..1be9bc4e5268 --- /dev/null +++ b/archivers/7-zip/Makefile @@ -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 diff --git a/archivers/7-zip/distinfo b/archivers/7-zip/distinfo new file mode 100644 index 000000000000..3e4e5ddbc137 --- /dev/null +++ b/archivers/7-zip/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1639126647 +SHA256 (7z2106-src.7z) = 675eaa90de3c6a3cd69f567bba4faaea309199ca75a6ad12bac731dcdae717ac +SIZE (7z2106-src.7z) = 1215031 diff --git a/archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak b/archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak new file mode 100644 index 000000000000..593e77c4da87 --- /dev/null +++ b/archivers/7-zip/files/patch-CPP_7zip_7zip__gcc.mak @@ -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 + + + diff --git a/archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak b/archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak new file mode 100644 index 000000000000..0e08d8ce2f50 --- /dev/null +++ b/archivers/7-zip/files/patch-CPP_7zip_var__gcc.mak @@ -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 diff --git a/archivers/7-zip/files/patch-CPP_Windows_SystemInfo.cpp b/archivers/7-zip/files/patch-CPP_Windows_SystemInfo.cpp new file mode 100644 index 000000000000..bc362d111086 --- /dev/null +++ b/archivers/7-zip/files/patch-CPP_Windows_SystemInfo.cpp @@ -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 + ++#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 + diff --git a/archivers/7-zip/pkg-descr b/archivers/7-zip/pkg-descr new file mode 100644 index 000000000000..daf58f3ec94b --- /dev/null +++ b/archivers/7-zip/pkg-descr @@ -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/ diff --git a/archivers/Makefile b/archivers/Makefile index 2cf1501e299f..caea780b16f5 100644 --- a/archivers/Makefile +++ b/archivers/Makefile @@ -1,5 +1,6 @@ COMMENT = Archivers + SUBDIR += 7-zip SUBDIR += 9e SUBDIR += R-cran-zip SUBDIR += advancecomp