pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

7-zip-zstd: add incomplete package



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By:	wiz
Date:		Fri Jul 19 18:19:07 2024 +0200
Changeset:	8de71646b45a3594580d7b181888dcb8b4e5df4c

Modified Files:
	Makefile
Added Files:
	7-zip-zstd/DESCR
	7-zip-zstd/Makefile
	7-zip-zstd/PLIST
	7-zip-zstd/TODO
	7-zip-zstd/distinfo
	7-zip-zstd/patches/patch-CPP_7zip_Common_CWrappers.h
	7-zip-zstd/patches/patch-CPP_7zip_Common_FileStreams.cpp
	7-zip-zstd/patches/patch-CPP_7zip_UI_Common_UpdateCallback.cpp
	7-zip-zstd/patches/patch-CPP_Common_CommandLineParser.cpp
	7-zip-zstd/patches/patch-CPP_Windows_System.cpp
	7-zip-zstd/patches/patch-CPP_Windows_SystemInfo.cpp

Log Message:
7-zip-zstd: add incomplete package

This is 7-zip with support for additional codecs.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=8de71646b45a3594580d7b181888dcb8b4e5df4c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 7-zip-zstd/DESCR                                   |  1 +
 7-zip-zstd/Makefile                                | 43 ++++++++++++++++++
 7-zip-zstd/PLIST                                   |  4 ++
 7-zip-zstd/TODO                                    | 51 ++++++++++++++++++++++
 7-zip-zstd/distinfo                                | 11 +++++
 .../patches/patch-CPP_7zip_Common_CWrappers.h      | 21 +++++++++
 .../patches/patch-CPP_7zip_Common_FileStreams.cpp  | 15 +++++++
 .../patch-CPP_7zip_UI_Common_UpdateCallback.cpp    | 15 +++++++
 .../patches/patch-CPP_Common_CommandLineParser.cpp | 15 +++++++
 7-zip-zstd/patches/patch-CPP_Windows_System.cpp    | 28 ++++++++++++
 .../patches/patch-CPP_Windows_SystemInfo.cpp       | 15 +++++++
 Makefile                                           |  6 +++
 12 files changed, 225 insertions(+)

diffs:
diff --git a/7-zip-zstd/DESCR b/7-zip-zstd/DESCR
new file mode 100644
index 0000000000..11505a1835
--- /dev/null
+++ b/7-zip-zstd/DESCR
@@ -0,0 +1 @@
+This is 7-Zip ZS with support of additional Codecs.
diff --git a/7-zip-zstd/Makefile b/7-zip-zstd/Makefile
new file mode 100644
index 0000000000..1e600e8d7a
--- /dev/null
+++ b/7-zip-zstd/Makefile
@@ -0,0 +1,43 @@
+# $NetBSD$
+
+DISTNAME=	v22.01-v1.5.5-R3
+PKGNAME=	${GITHUB_PROJECT}-${DISTNAME:S,^v,,}
+CATEGORIES=	archivers
+MASTER_SITES=	${MASTER_SITE_GITHUB:=mcmilk/}
+GITHUB_PROJECT=	7-Zip-zstd
+GITHUB_TAG=	v22.01-v1.5.5-R3
+DIST_SUBDIR=	${GITHUB_PROJECT}
+
+MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=	https://github.com/mcmilk/7-Zip-zstd/
+COMMENT=	7-zip with support for additional codecs
+#LICENSE=	# TODO: (see mk/license.mk)
+
+WRKSRC=		${WRKDIR}/7-Zip-zstd-22.01-v1.5.5-R3
+USE_LANGUAGES=	c c++
+USE_TOOLS+=	gmake
+
+BUILD_DIRS+=	CPP/7zip/Bundles/Alone2
+MAKE_FILE=	makefile.gcc
+
+# Disable -Werror.
+MAKE_FLAGS+=	CFLAGS_WARN_WALL=${CFLAGS:Q}
+
+.include "../../mk/dlopen.buildlink3.mk"
+BUILDLINK_TRANSFORM+=	opt:-ldl:${BUILDLINK_LDADD.dl:Q}
+
+# Disable RAR archive file support licensed under unRAR license.
+# You can see file listing and extract files without compression.
+BUILD_MAKE_FLAGS+=	DISABLE_RAR_COMPRESS=1
+
+INSTALLATION_DIRS+=	bin
+
+# Fix parallel build
+pre-build:
+	${MKDIR} ${WRKSRC}/CPP/7zip/Bundles/Alone2/_o
+
+do-install:
+	${INSTALL_PROGRAM} ${WRKSRC}/CPP/7zip/Bundles/Alone2/_o/7zz \
+		${DESTDIR}${PREFIX}/bin
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/7-zip-zstd/PLIST b/7-zip-zstd/PLIST
new file mode 100644
index 0000000000..92ba51a2d7
--- /dev/null
+++ b/7-zip-zstd/PLIST
@@ -0,0 +1,4 @@
+@comment $NetBSD$
+@comment TODO: to fill this file with the file listing:
+@comment TODO: 1. run "/usr/bin/make package"
+@comment TODO: 2. run "/usr/bin/make print-PLIST"
diff --git a/7-zip-zstd/TODO b/7-zip-zstd/TODO
new file mode 100644
index 0000000000..317ac76174
--- /dev/null
+++ b/7-zip-zstd/TODO
@@ -0,0 +1,51 @@
+c++      -O2 -c -O2 -g -fstack-clash-protection -I/usr/include  -DNDEBUG -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC   -o _o/Update.o  ../../UI/Common/Update.cpp
+../../UI/Common/Update.cpp: In function 'LONG Compress(const CUpdateOptions&, bool, CCodecs*, const NUpdateArchive::CActionSet&, const CArc*, CArchivePath&, const CObjectVector<CArcItem>&, Byte*, const CDirItems&, const CDirItem*, CTempFiles&, CUpdateErrorInfo&, IUpdateCallbackUI*, CFinishArchiveStat&)':
+../../UI/Common/Update.cpp:900:65: error: 'AString& AString::operator=(const wchar_t*)' is private within this context
+  900 |         updateCallbackSpec->VolName = archivePath.Prefix + name.bstrVal;
+      |                                                                 ^~~~~~~
+In file included from ../../UI/Common/../../../Common/Wildcard.h:6,
+                 from ../../UI/Common/Update.h:6,
+                 from ../../UI/Common/Update.cpp:7:
+../../UI/Common/../../../Common/MyString.h:244:8: note: declared private here
+  244 |   cls &operator=(const t *); \
+      |        ^~~~~~~~
+../../UI/Common/../../../Common/MyString.h:254:38: note: in expansion of macro 'FORBID_STRING_OPS'
+  254 | #define FORBID_STRING_OPS_AString(t) FORBID_STRING_OPS(AString, t)
+      |                                      ^~~~~~~~~~~~~~~~~
+../../UI/Common/../../../Common/MyString.h:292:3: note: in expansion of macro 'FORBID_STRING_OPS_AString'
+  292 |   FORBID_STRING_OPS_AString(wchar_t)
+      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
+../../UI/Common/Update.cpp:902:72: error: 'AString& AString::operator=(const wchar_t*)' is private within this context
+  902 |         updateCallbackSpec->VolName = archivePath.Prefix + archivePath.Name;
+      |                                                                        ^~~~
+../../UI/Common/../../../Common/MyString.h:244:8: note: declared private here
+  244 |   cls &operator=(const t *); \
+      |        ^~~~~~~~
+../../UI/Common/../../../Common/MyString.h:254:38: note: in expansion of macro 'FORBID_STRING_OPS'
+  254 | #define FORBID_STRING_OPS_AString(t) FORBID_STRING_OPS(AString, t)
+      |                                      ^~~~~~~~~~~~~~~~~
+../../UI/Common/../../../Common/MyString.h:292:3: note: in expansion of macro 'FORBID_STRING_OPS_AString'
+  292 |   FORBID_STRING_OPS_AString(wchar_t)
+      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
+../../UI/Common/Update.cpp:905:39: error: 'FString' {aka 'class AString'} has no member named 'SetFromBstr'; did you mean 'SetFrom'?
+  905 |         updateCallbackSpec->VolPrefix.SetFromBstr(prefix.bstrVal);
+      |                                       ^~~~~~~~~~~
+      |                                       SetFrom
+../../UI/Common/Update.cpp:907:40: error: 'FString' {aka 'class AString'} has no member named 'SetFromBstr'; did you mean 'SetFrom'?
+  907 |         updateCallbackSpec->VolPostfix.SetFromBstr(postfix.bstrVal);
+      |                                        ^~~~~~~~~~~
+      |                                        SetFrom
+../../UI/Common/Update.cpp:909:65: error: 'AString& AString::operator=(const wchar_t*)' is private within this context
+  909 |         updateCallbackSpec->VolExt = UString('.') + archivePath.VolExtension;
+      |                                                                 ^~~~~~~~~~~~
+../../UI/Common/../../../Common/MyString.h:244:8: note: declared private here
+  244 |   cls &operator=(const t *); \
+      |        ^~~~~~~~
+../../UI/Common/../../../Common/MyString.h:254:38: note: in expansion of macro 'FORBID_STRING_OPS'
+  254 | #define FORBID_STRING_OPS_AString(t) FORBID_STRING_OPS(AString, t)
+      |                                      ^~~~~~~~~~~~~~~~~
+../../UI/Common/../../../Common/MyString.h:292:3: note: in expansion of macro 'FORBID_STRING_OPS_AString'
+  292 |   FORBID_STRING_OPS_AString(wchar_t)
+      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
+gmake: *** [../../7zip_gcc.mak:827: _o/Update.o] Error 1
+*** Error code 2
diff --git a/7-zip-zstd/distinfo b/7-zip-zstd/distinfo
new file mode 100644
index 0000000000..a4eeac7fd0
--- /dev/null
+++ b/7-zip-zstd/distinfo
@@ -0,0 +1,11 @@
+$NetBSD$
+
+BLAKE2s (7-Zip-zstd/v22.01-v1.5.5-R3.tar.gz) = b7491ad66292a9308770df785f90ad973ac794e34cf3c25bb9dfd2abed7c7588
+SHA512 (7-Zip-zstd/v22.01-v1.5.5-R3.tar.gz) = 6a3bc56ea8db2e91afbe26a4a2efb62ed081a9fc0b98736c8f2951ba238289862c0a096621758cd792e705be2693b3b9307b2028c613d9931b1e4b9f0ec64bec
+Size (7-Zip-zstd/v22.01-v1.5.5-R3.tar.gz) = 4046736 bytes
+SHA1 (patch-CPP_7zip_Common_CWrappers.h) = 7a6d513f542cc0abaf9c47fa5a5263f3addabc5d
+SHA1 (patch-CPP_7zip_Common_FileStreams.cpp) = 97c5be07c6d055dd40e3e509d16c1b8776b85380
+SHA1 (patch-CPP_7zip_UI_Common_UpdateCallback.cpp) = 75e823100048f8b02606bcbe25908068cb5b3793
+SHA1 (patch-CPP_Common_CommandLineParser.cpp) = de1812bd90bf75698c1e6fff499be33a638fafc8
+SHA1 (patch-CPP_Windows_System.cpp) = c0036f2a4d8ca7e2e2f2eb16b286024e91d674b7
+SHA1 (patch-CPP_Windows_SystemInfo.cpp) = 807658c673cd0a4b31c186aac7d25b0f4afdac01
diff --git a/7-zip-zstd/patches/patch-CPP_7zip_Common_CWrappers.h b/7-zip-zstd/patches/patch-CPP_7zip_Common_CWrappers.h
new file mode 100644
index 0000000000..729af7d70a
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_7zip_Common_CWrappers.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Add missing macros used by Lzma2 code.
+
+--- CPP/7zip/Common/CWrappers.h.orig	2023-06-18 13:11:43.000000000 +0000
++++ CPP/7zip/Common/CWrappers.h
+@@ -6,6 +6,14 @@
+ #include "../ICoder.h"
+ #include "../../Common/MyCom.h"
+ 
++#ifndef max
++#define max(a, b) ((a) > (b) ? (a) : (b))
++#endif
++
++#ifndef min
++#define min(a, b) ((a) < (b) ? (a) : (b))
++#endif
++
+ SRes HRESULT_To_SRes(HRESULT res, SRes defaultRes) throw();
+ HRESULT SResToHRESULT(SRes res) throw();
+ 
diff --git a/7-zip-zstd/patches/patch-CPP_7zip_Common_FileStreams.cpp b/7-zip-zstd/patches/patch-CPP_7zip_Common_FileStreams.cpp
new file mode 100644
index 0000000000..82a90d7a0f
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_7zip_Common_FileStreams.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- CPP/7zip/Common/FileStreams.cpp.orig	2024-07-19 16:13:09.258508447 +0000
++++ CPP/7zip/Common/FileStreams.cpp
+@@ -12,7 +12,7 @@
+ #include <pwd.h>
+ 
+ // for major()/minor():
+-#if defined(__FreeBSD__) || defined(BSD)
++#if defined(__FreeBSD__) || defined(BSD) || defined(__NetBSD__)
+ #include <sys/types.h>
+ #else
+ #include <sys/sysmacros.h>
diff --git a/7-zip-zstd/patches/patch-CPP_7zip_UI_Common_UpdateCallback.cpp b/7-zip-zstd/patches/patch-CPP_7zip_UI_Common_UpdateCallback.cpp
new file mode 100644
index 0000000000..bc629367c6
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_7zip_UI_Common_UpdateCallback.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- CPP/7zip/UI/Common/UpdateCallback.cpp.orig	2024-07-19 16:14:07.643944168 +0000
++++ CPP/7zip/UI/Common/UpdateCallback.cpp
+@@ -9,7 +9,7 @@
+ // #include <pwd.h>
+ 
+ // for major()/minor():
+-#if defined(__FreeBSD__) || defined(BSD)
++#if defined(__FreeBSD__) || defined(BSD) || defined(__NetBSD__)
+ #include <sys/types.h>
+ #else
+ #include <sys/sysmacros.h>
diff --git a/7-zip-zstd/patches/patch-CPP_Common_CommandLineParser.cpp b/7-zip-zstd/patches/patch-CPP_Common_CommandLineParser.cpp
new file mode 100644
index 0000000000..1d1b25e46a
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_Common_CommandLineParser.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add header for isblank().
+
+--- CPP/Common/CommandLineParser.cpp.orig	2023-06-18 13:11:43.000000000 +0000
++++ CPP/Common/CommandLineParser.cpp
+@@ -4,6 +4,8 @@
+ 
+ #include "CommandLineParser.h"
+ 
++#include <ctype.h>
++
+ namespace NCommandLineParser {
+ 
+ static const wchar_t * _SplitCommandLine(const wchar_t* s, UString &dest)
diff --git a/7-zip-zstd/patches/patch-CPP_Windows_System.cpp b/7-zip-zstd/patches/patch-CPP_Windows_System.cpp
new file mode 100644
index 0000000000..cfa6893841
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_Windows_System.cpp
@@ -0,0 +1,28 @@
+$NetBSD$
+
+Add NetBSD compilation fix.
+TODO: add proper support.
+
+--- CPP/Windows/System.cpp.orig	2023-06-18 13:11:43.000000000 +0000
++++ CPP/Windows/System.cpp
+@@ -7,9 +7,11 @@
+ #ifdef __APPLE__
+ #include <sys/sysctl.h>
+ #else
++#ifndef __NetBSD__
+ #include <sys/sysinfo.h>
+ #endif
+ #endif
++#endif
+ 
+ #include "../Common/Defs.h"
+ // #include "../Common/MyWindows.h"
+@@ -203,6 +205,8 @@ bool GetRamSize(UInt64 &size)
+ 
+   #elif defined(_AIX)
+   // fixme
++  #elif defined(__NetBSD__)
++  // fixme
+   #elif defined(__gnu_hurd__)
+   // fixme
+   #elif defined(__FreeBSD_kernel__) && defined(__GLIBC__)
diff --git a/7-zip-zstd/patches/patch-CPP_Windows_SystemInfo.cpp b/7-zip-zstd/patches/patch-CPP_Windows_SystemInfo.cpp
new file mode 100644
index 0000000000..f39ac4d49d
--- /dev/null
+++ b/7-zip-zstd/patches/patch-CPP_Windows_SystemInfo.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Add NetBSD support.
+
+--- CPP/Windows/SystemInfo.cpp.orig	2024-07-19 16:14:42.941103660 +0000
++++ CPP/Windows/SystemInfo.cpp
+@@ -14,7 +14,7 @@
+ 
+ #include <unistd.h>
+ #include <sys/utsname.h>
+-#ifdef __APPLE__
++#if defined(__APPLE__) || defined(__NetBSD__)
+ #include <sys/sysctl.h>
+ #elif !defined(_AIX)
+ 
diff --git a/Makefile b/Makefile
index b38b44c8b0..07ef0c8bb6 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ COMMENT=	Work-in-progress packages
 SUBDIR+=	2048-c
 SUBDIR+=	3dsconv
 SUBDIR+=	4ti2
+SUBDIR+=	7-zip-zstd
 SUBDIR+=	7z-bin
 SUBDIR+=	8bc
 SUBDIR+=	8cc-git
@@ -855,6 +856,7 @@ SUBDIR+=	ewm
 SUBDIR+=	exabgp4
 SUBDIR+=	exact-image
 SUBDIR+=	exhume
+SUBDIR+=	exomizer
 SUBDIR+=	exonerate
 SUBDIR+=	expiretable
 SUBDIR+=	exult-snapshot
@@ -3549,10 +3551,12 @@ SUBDIR+=	py-dana
 SUBDIR+=	py-das
 SUBDIR+=	py-dash-bootstrap-components
 SUBDIR+=	py-dask
+SUBDIR+=	py-dask_expr
 SUBDIR+=	py-data-google-auth
 SUBDIR+=	py-dataclasses-json
 SUBDIR+=	py-datamarix
 SUBDIR+=	py-datarray
+SUBDIR+=	py-datasci
 SUBDIR+=	py-datashader
 SUBDIR+=	py-datashape
 SUBDIR+=	py-datatree
@@ -4236,6 +4240,7 @@ SUBDIR+=	py-pathos
 SUBDIR+=	py-patool
 SUBDIR+=	py-pattyrn
 SUBDIR+=	py-pcapy
+SUBDIR+=	py-pcs
 SUBDIR+=	py-pdf2image
 SUBDIR+=	py-pdfminer-six
 SUBDIR+=	py-pdfposter
@@ -5722,6 +5727,7 @@ SUBDIR+=	vee
 SUBDIR+=	velero
 SUBDIR+=	venom
 SUBDIR+=	verbiste
+SUBDIR+=	verilator
 SUBDIR+=	vhdtool-git
 SUBDIR+=	video-trimmer
 SUBDIR+=	vidrioclock


Home | Main Index | Thread Index | Old Index