-
Notifications
You must be signed in to change notification settings - Fork 693
[p7zip_alone2] new package for 7-Zip #12867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| using BinaryBuilder, Pkg | ||
|
|
||
| const YGGDRASIL_DIR = "../.." | ||
| include(joinpath(YGGDRASIL_DIR, "platforms", "macos_sdks.jl")) | ||
|
|
||
| name = "p7zip_alone2" | ||
| # This package is closely related to p7zip | ||
| # p7zip builds the Alone bundle to provide 7za.exe which supports only the major formats. | ||
| # p7zip_alone2 builds the Alone2 bundle to provide 7zz.exe which supports the full set of formats except RAR. | ||
| upstream_version = "25.01" | ||
| compact_version = replace(upstream_version, "."=>"") | ||
| # Upstream uses CalVer | ||
| # This package uses an independent SemVer version number | ||
| # to avoid dependent packages needing to update compat every year | ||
| # even if there are no breaking changes. | ||
| version = v"1.0.0" | ||
|
|
||
| # Collection of sources required to build p7zip | ||
| sources = [ | ||
| ArchiveSource("https://downloads.sourceforge.net/project/sevenzip/7-Zip/$(upstream_version)/7z$(compact_version)-src.tar.xz", | ||
| "ed087f83ee789c1ea5f39c464c55a5c9d4008deb0efe900814f2df262b82c36e"; | ||
| unpack_target="7z"), | ||
| ] | ||
|
|
||
| # Bash recipe for building across all platforms | ||
| script = raw""" | ||
| cd 7z/CPP/7zip/Bundles/Alone2 | ||
|
|
||
| # Lowercase names for MinGW | ||
| sed -i "s/NTSecAPI.h/ntsecapi.h/" ../../../Windows/SecurityUtils.h | ||
| sed -i 's/-lUser32/-luser32/g' ../../7zip_gcc.mak | ||
| sed -i 's/-lOle32/-lole32/g' ../../7zip_gcc.mak | ||
| sed -i 's/-lGdi32/-lgdi32/g' ../../7zip_gcc.mak | ||
| sed -i 's/-lComctl32/-lcomctl32/g' ../../7zip_gcc.mak | ||
| sed -i 's/-lComdlg32/-lcomdlg32/g' ../../7zip_gcc.mak | ||
| sed -i 's/-lShell32/-lshell32/g' ../../7zip_gcc.mak | ||
|
|
||
| # RAR has a custom license | ||
| export DISABLE_RAR=1 | ||
|
|
||
| if [[ "${target}" == *-mingw* ]]; then | ||
| export IS_MINGW=1 | ||
| export RC=windres | ||
| fi | ||
|
|
||
| if [[ "${target}" == x86_64-apple-darwin* ]]; then | ||
| # For some reason USE_ASM doesn't work on this platform | ||
| make -j${nproc} -f makefile.gcc | ||
| else | ||
| if [[ "${target}" == x86_64-* ]]; then | ||
| make -j${nproc} -f makefile.gcc IS_X64=1 USE_ASM=1 MY_ASM="uasm" | ||
| elif [[ "${target}" == aarch64-* ]]; then | ||
| make -j${nproc} -f makefile.gcc IS_ARM64=1 USE_ASM=1 | ||
| else | ||
| make -j${nproc} -f makefile.gcc | ||
| fi | ||
| fi | ||
|
|
||
| install -Dvm 755 _o/7zz${exeext} "${bindir}/7zz${exeext}" | ||
| install_license ../../../../DOC/copying.txt | ||
| install_license ../../../../DOC/License.txt | ||
| """ | ||
|
|
||
| # Require MacOS 10.13 or later to support utimensat | ||
| sources, script = require_macos_sdk("10.13", sources, script) | ||
|
|
||
| platforms = supported_platforms() | ||
|
|
||
| # The products that we will ensure are always built | ||
| products = [ | ||
| ExecutableProduct("7zz", :p7zz), | ||
| ] | ||
|
|
||
| # Dependencies that must be installed before this package can be built | ||
| dependencies = [ | ||
| HostBuildDependency(PackageSpec(name="UASM_jll", uuid="bbf38c07-751d-5a2b-a7fc-5c0acd9bd57e")), | ||
| Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae")), | ||
| ] | ||
| build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; | ||
| julia_compat="1.6", # Minimum Julia version | ||
| preferred_gcc_version=v"8", # GCC version | ||
| ) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.