36 lines
948 B
Python
36 lines
948 B
Python
import os
|
|
|
|
from lib import cpp
|
|
from lib.make import *
|
|
|
|
version("26.6")
|
|
description("7-Zip is a file archiver with a high compression ratio.")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("github://ip7z/7zip#26.06")
|
|
|
|
builddep("shortcut/c++")
|
|
builddep("shortcut/autotools")
|
|
|
|
|
|
def build():
|
|
os.chdir("CPP/7zip/Bundles/Alone2")
|
|
sharedflags = "-D_GNU_SOURCE -Wno-error=cast-qual -Wno-error=disabled-macro-expansion -lc++ -lc++abi -Wno-error=unused-command-line-argument"
|
|
cpp.make([
|
|
"-f", "../../cmpl_clang.mak",
|
|
f"CC={os.environ.get('CC', 'clang')} {os.environ.get('CFLAGS', '')} {sharedflags}",
|
|
f"CXX={os.environ.get('CC', 'clang++')} {os.environ.get('CXXFLAGS', '')} {sharedflags}",
|
|
"DISABLE_RAR=1",
|
|
])
|
|
|
|
on_build(build)
|
|
|
|
|
|
def pack(composer):
|
|
composer.makedir("bin")
|
|
composer.add("b/c/7zz", "bin/7zz")
|
|
|
|
package("7z")
|
|
dep("semi-libc @same-arch")
|
|
dep("libcxx @same-arch")
|
|
on_pack(pack)
|