From 55679f83bc00c648116bf16cafc60bd8355c03fe Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Thu, 15 Apr 2021 18:58:48 +0200 Subject: [PATCH] p7zip: bump version include 7z and 7zr --- ...{p7zip-17.03.recipe => p7zip-17.04.recipe} | 8 +- app-arch/p7zip/patches/p7zip-17.03.patchset | 77 -------- app-arch/p7zip/patches/p7zip-17.04.patchset | 180 ++++++++++++++++++ 3 files changed, 185 insertions(+), 80 deletions(-) rename app-arch/p7zip/{p7zip-17.03.recipe => p7zip-17.04.recipe} (86%) delete mode 100644 app-arch/p7zip/patches/p7zip-17.03.patchset create mode 100644 app-arch/p7zip/patches/p7zip-17.04.patchset diff --git a/app-arch/p7zip/p7zip-17.03.recipe b/app-arch/p7zip/p7zip-17.04.recipe similarity index 86% rename from app-arch/p7zip/p7zip-17.03.recipe rename to app-arch/p7zip/p7zip-17.04.recipe index 33b62e3d0..573ce76bb 100644 --- a/app-arch/p7zip/p7zip-17.03.recipe +++ b/app-arch/p7zip/p7zip-17.04.recipe @@ -5,9 +5,9 @@ OpenBSD, FreeBSD, Cygwin, AIX, ...), MacOS X and also for BeOS and Amiga." HOMEPAGE="http://p7zip.sourceforge.net" COPYRIGHT="1999-2011 7-Zip Igor Pavlov." LICENSE="GNU LGPL v2.1" -REVISION="2" +REVISION="1" SOURCE_URI="https://github.com/jinfeihan57/p7zip/archive/v$portVersion/p7zip-$portVersion.tar.gz" -CHECKSUM_SHA256="bb4b9b21584c0e076e0b4b2705af0dbe7ac19d378aa7f09a79da33a5b3293187" +CHECKSUM_SHA256="ea029a2e21d2d6ad0a156f6679bd66836204aa78148a4c5e498fe682e77127ef" PATCHES="p7zip-$portVersion.patchset" ADDITIONAL_FILES="p7zip-expander-rules" @@ -16,7 +16,9 @@ SECONDARY_ARCHITECTURES="x86" PROVIDES=" p7zip$secondaryArchSuffix = $portVersion + cmd:7z = $portVersion compat >= 17 cmd:7za = $portVersion compat >= 9 + cmd:7zr = $portVersion compat >= 17 " REQUIRES=" haiku$secondaryArchSuffix @@ -41,7 +43,7 @@ BUILD_PREREQUIRES=" BUILD() { cp makefile.haiku makefile.machine - make + make $jobArgs 7z 7zr 7za } INSTALL() diff --git a/app-arch/p7zip/patches/p7zip-17.03.patchset b/app-arch/p7zip/patches/p7zip-17.03.patchset deleted file mode 100644 index ae39215e4..000000000 --- a/app-arch/p7zip/patches/p7zip-17.03.patchset +++ /dev/null @@ -1,77 +0,0 @@ -From f62d1c89b63be12bf9ba6f8be9eb7b11d430e99b Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sun, 14 Feb 2016 10:08:25 +0100 -Subject: applying patch p7zip-9.20.1.patch - - -diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp -index 322fce2..69a9f43 100644 ---- a/CPP/Windows/System.cpp -+++ b/CPP/Windows/System.cpp -@@ -15,7 +15,7 @@ - #include - #endif - --#if defined(ENV_BEOS) -+#if defined(ENV_BEOS) || defined(ENV_HAIKU) - #include - #endif - -@@ -79,7 +79,7 @@ namespace NWindows - if (nbcpu < 1) nbcpu = 1; - return nbcpu; - } -- #elif defined(ENV_BEOS) -+ #elif defined(ENV_BEOS) || defined(ENV_HAIKU) - UInt32 GetNumberOfProcessors() { - system_info info; - get_system_info(&info); --- -2.28.0 - - -From 2c08e9edf540013e89a3ea95684c2f24f986a19b Mon Sep 17 00:00:00 2001 -From: Adrien Destugues -Date: Sun, 14 Feb 2016 10:15:58 +0100 -Subject: Fix detection of RAM size. - - -diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp -index 69a9f43..5b4e0d9 100644 ---- a/CPP/Windows/System.cpp -+++ b/CPP/Windows/System.cpp -@@ -154,7 +154,7 @@ namespace NWindows - if ( pstat( PSTAT_STATIC, pu, (size_t)sizeof(pst), (size_t)0, 0 ) != -1 ) { - size = ((UInt64)pst.physical_memory)*pst.page_size; - } --#elif defined(ENV_BEOS) -+#elif defined(ENV_BEOS) || defined(ENV_HAIKU) - system_info info; - get_system_info(&info); - size = info.max_pages; --- -2.28.0 - - -From 8640b869598b5b566c8f8841c1128946a880d359 Mon Sep 17 00:00:00 2001 -From: Jerome Duval -Date: Mon, 4 Jan 2021 12:29:26 +0100 -Subject: haiku: uses libiconv - - -diff --git a/makefile.haiku b/makefile.haiku -index a6e71c2..99d781a 100644 ---- a/makefile.haiku -+++ b/makefile.haiku -@@ -11,7 +11,7 @@ CXX=g++ - CC=gcc - LINK_SHARED=-nostart - --LOCAL_LIBS=-lbe -+LOCAL_LIBS=-lbe -liconv - LOCAL_LIBS_DLL=$(LOCAL_LIBS) - - OBJ_CRC32=$(OBJ_CRC32_C) --- -2.28.0 - diff --git a/app-arch/p7zip/patches/p7zip-17.04.patchset b/app-arch/p7zip/patches/p7zip-17.04.patchset new file mode 100644 index 000000000..5f2d1b963 --- /dev/null +++ b/app-arch/p7zip/patches/p7zip-17.04.patchset @@ -0,0 +1,180 @@ +From 247a468e06a417751e305fec7c8496eeb81dde9d Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Feb 2016 10:08:25 +0100 +Subject: applying patch p7zip-9.20.1.patch + + +diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp +index 322fce2..69a9f43 100644 +--- a/CPP/Windows/System.cpp ++++ b/CPP/Windows/System.cpp +@@ -15,7 +15,7 @@ + #include + #endif + +-#if defined(ENV_BEOS) ++#if defined(ENV_BEOS) || defined(ENV_HAIKU) + #include + #endif + +@@ -79,7 +79,7 @@ namespace NWindows + if (nbcpu < 1) nbcpu = 1; + return nbcpu; + } +- #elif defined(ENV_BEOS) ++ #elif defined(ENV_BEOS) || defined(ENV_HAIKU) + UInt32 GetNumberOfProcessors() { + system_info info; + get_system_info(&info); +-- +2.30.0 + + +From cd51376c43dfcbc64fe64a7f06d785744d5d28fc Mon Sep 17 00:00:00 2001 +From: Adrien Destugues +Date: Sun, 14 Feb 2016 10:15:58 +0100 +Subject: Fix detection of RAM size. + + +diff --git a/CPP/Windows/System.cpp b/CPP/Windows/System.cpp +index 69a9f43..5b4e0d9 100644 +--- a/CPP/Windows/System.cpp ++++ b/CPP/Windows/System.cpp +@@ -154,7 +154,7 @@ namespace NWindows + if ( pstat( PSTAT_STATIC, pu, (size_t)sizeof(pst), (size_t)0, 0 ) != -1 ) { + size = ((UInt64)pst.physical_memory)*pst.page_size; + } +-#elif defined(ENV_BEOS) ++#elif defined(ENV_BEOS) || defined(ENV_HAIKU) + system_info info; + get_system_info(&info); + size = info.max_pages; +-- +2.30.0 + + +From 68774e5ef5d66d62fbb802d773a446a54520356f Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 4 Jan 2021 12:29:26 +0100 +Subject: haiku: uses libiconv + + +diff --git a/makefile.haiku b/makefile.haiku +index a6e71c2..99d781a 100644 +--- a/makefile.haiku ++++ b/makefile.haiku +@@ -11,7 +11,7 @@ CXX=g++ + CC=gcc + LINK_SHARED=-nostart + +-LOCAL_LIBS=-lbe ++LOCAL_LIBS=-lbe -liconv + LOCAL_LIBS_DLL=$(LOCAL_LIBS) + + OBJ_CRC32=$(OBJ_CRC32_C) +-- +2.30.0 + + +From cc6d7e8dd79cab558eb5299bc0a7aae553e009af Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Thu, 15 Apr 2021 18:54:32 +0200 +Subject: Haiku: fix 7z and 7zr build on x86_64 + + +diff --git a/CPP/Windows/DLL.cpp b/CPP/Windows/DLL.cpp +index 744af1f..796c7b4 100644 +--- a/CPP/Windows/DLL.cpp ++++ b/CPP/Windows/DLL.cpp +@@ -37,7 +37,7 @@ TRACEN((printf("CLibrary::Free(this=%p,%p)\n",(void *)this,(void *)_module))) + #ifdef __APPLE_CC__ + int ret = NSUnLinkModule ((NSModule)_module, 0); + #elif ENV_BEOS +- int ret = unload_add_on((image_id)_module); ++ int ret = unload_add_on((image_id)(uintptr_t)_module); + #else + int ret = dlclose(_module); + #endif +@@ -65,7 +65,7 @@ static FARPROC local_GetProcAddress(HMODULE module,LPCSTR lpProcName) + ptr = 0; + } + #elif ENV_BEOS +- if (get_image_symbol((image_id)module, lpProcName, B_SYMBOL_TYPE_TEXT, &ptr) != B_OK) ++ if (get_image_symbol((image_id)(uintptr_t)module, lpProcName, B_SYMBOL_TYPE_TEXT, &ptr) != B_OK) + ptr = 0; + #else + ptr = dlsym (module, lpProcName); +@@ -122,11 +122,11 @@ bool CLibrary::Load(LPCTSTR lpLibFileName) + image_id image = load_add_on(p.Path()); + TRACEN((printf("load_add_on(%s)=%d\n",p.Path(),(int)image))) + if (image < 0) { +- err = (image_id)handler; ++ err = (image_id)(uintptr_t)handler; + handler = 0; + } else { + err = 0; +- handler = (HMODULE)image; ++ handler = (HMODULE)(uintptr_t)image; + } + #else + int options_dlopen = 0; +diff --git a/makefile.haiku b/makefile.haiku +index 99d781a..d7169cd 100644 +--- a/makefile.haiku ++++ b/makefile.haiku +@@ -1,15 +1,17 @@ + + OPTFLAGS=-O -s + +-ALLFLAGS=${OPTFLAGS} \ ++ALLFLAGS=${OPTFLAGS} -pipe \ + -DENV_BEOS -DENV_HAIKU \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ ++ -D_UINT64_T_DECLARED \ + $(LOCAL_FLAGS) + + CXX=g++ + CC=gcc +-LINK_SHARED=-nostart ++CC_SHARED=-fPIC ++LINK_SHARED=-fPIC -shared + + LOCAL_LIBS=-lbe -liconv + LOCAL_LIBS_DLL=$(LOCAL_LIBS) +diff --git a/makefile.machine b/makefile.machine +index a89b568..d7169cd 100644 +--- a/makefile.machine ++++ b/makefile.machine +@@ -1,14 +1,11 @@ +-# +-# makefile for Linux (x86, PPC, alpha ...) +-# + +-OPTFLAGS=-O2 -s +-#OPTFLAGS=-O0 -ggdb ++OPTFLAGS=-O -s + + ALLFLAGS=${OPTFLAGS} -pipe \ ++ -DENV_BEOS -DENV_HAIKU \ + -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \ + -DNDEBUG -D_REENTRANT -DENV_UNIX \ +- -D_7ZIP_LARGE_PAGES \ ++ -D_UINT64_T_DECLARED \ + $(LOCAL_FLAGS) + + CXX=g++ +@@ -16,8 +13,8 @@ CC=gcc + CC_SHARED=-fPIC + LINK_SHARED=-fPIC -shared + +-LOCAL_LIBS=-lpthread +-LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl ++LOCAL_LIBS=-lbe -liconv ++LOCAL_LIBS_DLL=$(LOCAL_LIBS) + + OBJ_CRC32=$(OBJ_CRC32_C) + OBJ_AES= +-- +2.30.0 +