feat: add package semios-charset #78
@@ -0,0 +1,51 @@
|
||||
import subprocess
|
||||
|
||||
from lib.make import *
|
||||
|
||||
|
||||
version("0.1.0-alpha.1")
|
||||
description("SemiOS fork of the UNIX sed utility")
|
||||
maintainer("sisungo <[email protected]>")
|
||||
source_managed("gitea://gitea.semilabs.org/semios/semios-charset#v0.1.0-alpha.1")
|
||||
|
||||
builddep("shortcut/c")
|
||||
builddep("shortcut/autotools")
|
||||
|
||||
|
||||
def build():
|
||||
subprocess.run(["./build.sh"], check=True)
|
||||
|
||||
on_build(build)
|
||||
|
||||
|
||||
def pack(composer, aliases):
|
||||
composer.makedir("lib")
|
||||
for i in aliases:
|
||||
composer.addfile(f"libSemiOSCharset{i}.so", f"lib/libSemiOSCharset{i}.so")
|
||||
|
||||
def defpackage(name, aliases):
|
||||
package(name)
|
||||
dep("semi-libc @same-arch")
|
||||
for i in aliases:
|
||||
provide(f"semios-charset-{i.lower().replace('_', '-')} @same-arch")
|
||||
on_pack(lambda x: pack(x, aliases))
|
||||
|
||||
defpackage("semios-charset-utf-16", ["UTF-16", "UTF-16BE", "UTF-16LE", "UTF-16-INTERNAL"])
|
||||
defpackage(
|
||||
"semios-charset-utf-32",
|
||||
[
|
||||
"UTF-32", "UTF-32BE", "UTF-32LE", "UTF-32-INTERNAL",
|
||||
"UCS-4", "UCS-4BE", "UCS-4LE", "UCS-4-INTERNAL",
|
||||
"WCHAR_T",
|
||||
],
|
||||
)
|
||||
defpackage("semios-charset-cp850", ["CP850", "850", "IBM850", "IBM-850"])
|
||||
defpackage("semios-charset-gb18030", ["GB18030"])
|
||||
|
||||
def pack_iconv(composer):
|
||||
composer.makedir("bin")
|
||||
composer.addfile("iconv", "bin/iconv")
|
||||
|
||||
package("iconv")
|
||||
dep("semi-libc @same-arch")
|
||||
on_pack(pack_iconv)
|
||||
Reference in new issue
Block a user