forked from semios/ports
39 lines
851 B
Python
39 lines
851 B
Python
import os
|
|
|
|
from lib import cpp
|
|
from lib.make import *
|
|
|
|
|
|
version("1.5.7")
|
|
description("Zstandard - Fast real-time compression algorithm")
|
|
maintainer("sisungo <[email protected]>")
|
|
source_managed("github://facebook/zstd#v1.5.7")
|
|
|
|
builddep("shortcut/c")
|
|
builddep("shortcut/autotools")
|
|
|
|
|
|
def build():
|
|
makeflags = [
|
|
f"libdir={get_prefix('libzstd')}/lib",
|
|
f"bindir={get_prefix('zstd')}/bin",
|
|
f"includedir={get_prefix('libzstd-dev')}/include",
|
|
]
|
|
cpp.make(makeflags + ["HAVE_ZLIB=0", "HAVE_LZMA=0", "HAVE_LZ4=0"])
|
|
cpp.make_install(makeflags + [f"DESTDIR={os.getcwd()}/../cpp_install"])
|
|
|
|
on_build(build)
|
|
|
|
|
|
package("libzstd")
|
|
cpp.use_auto_pack(["lib"])
|
|
dep("semi-libc @same-arch")
|
|
|
|
package("zstd")
|
|
cpp.use_auto_pack(["bin"])
|
|
dep("libzstd (same)")
|
|
|
|
package("libzstd-dev")
|
|
cpp.use_auto_pack(["dev"])
|
|
dep("libzstd (same)")
|