me

/

vinix-ports Public
382 commits 0 issues 0 pull requests 1 contributor Discussions Projects Snippets LOC history Platform CI

Build core libraries and Make with the selected target SDK

diviocity committed 6 days ago · 6fd266f8c1f837e31e45cfca8f213a45b00ab866 View patch
Unverified signature 10 files changed +52 -89
brotli/PKGBUILD.vile +5 -13

@@ -1,29 +1,21 @@

11defpkgbuild(brotli,

22 #:pkgname, "brotli",

33 #:pkgver, "1.1.1",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "Brotli compressor, decoder and libraries",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "MIT",

88 #:url, "https://github.com/google/brotli",

99 #:depends, ["musl"],

1010 #:source, ["brotli-1.1.1.tar.gz::https://github.com/google/brotli/archive/refs/tags/v1.1.1.tar.gz"],

1111 #:sha256sums, ["1a84dfaa740994d19254bf78aa7d74a4a8040d1638f3d5f2cdecb188fd520da8"],

1212 #:build, fn() {

13- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

14- run("cmake", "-S", "brotli-1.1.1", "-B", "build", "-DCMAKE_BUILD_TYPE=Release",

15- "-DCMAKE_SYSTEM_NAME=Linux", "-DCMAKE_SYSTEM_PROCESSOR=x86_64", "-DCMAKE_C_COMPILER=vinix-cc",

16- string-append("-DCMAKE_SYSROOT=", root), "-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY",

17- "-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY", "-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY",

18- "-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER", "-DCMAKE_INSTALL_PREFIX=/usr", "-DCMAKE_INSTALL_LIBDIR=lib",

19- "-DBUILD_SHARED_LIBS=ON", "-DBROTLI_DISABLE_TESTS=ON")

13+ run("vinix-cmake", "brotli-1.1.1", "build", "-DBUILD_SHARED_LIBS=ON", "-DBROTLI_DISABLE_TESTS=ON")

2014 run("cmake", "--build", "build")

2115 },

2216 #:check, fn() {

23- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

24- loader := string-append(root, "/lib/ld-musl-x86_64.so.1")

25- run(loader, "--library-path", "build", "build/brotli", "-q", "1", "-o", "sample.br", "brotli-1.1.1/README.md")

26- run(loader, "--library-path", "build", "build/brotli", "-d", "-o", "restored", "sample.br")

17+ run("vinix-run", "--library-path", "build", "build/brotli", "-q", "1", "-o", "sample.br", "brotli-1.1.1/README.md")

18+ run("vinix-run", "--library-path", "build", "build/brotli", "-d", "-o", "restored", "sample.br")

2719 run("cmp", "brotli-1.1.1/README.md", "restored")

2820 },

2921 #:package, fn() {

bzip2/PKGBUILD.vile +7 -5

@@ -1,9 +1,12 @@

1+cross := get-environment-variable("CROSS_COMPILE")

2+prefix := if string?(cross) { cross } else { "" }

3+

14defpkgbuild(bzip2,

25 #:pkgname, "bzip2",

36 #:pkgver, "1.0.8",

4- #:pkgrel, 1,

7+ #:pkgrel, 2,

58 #:pkgdesc, "Block-sorting compressor and libbz2",

6- #:arch, [#:x86-64],

9+ #:arch, [#:x86-64, #:aarch64],

710 #:license, "bzip2-1.0.6",

811 #:url, "https://sourceware.org/bzip2/",

912 #:depends, ["musl"],

@@ -17,12 +20,11 @@ defpkgbuild(bzip2,

1720 #:build, fn() {

1821 run("make", "-C", "bzip2-1.0.8", "-f", "Makefile-libbz2_so", "CC=vinix-cc")

1922 run("ln", "-s", "libbz2.so.1.0.8", "bzip2-1.0.8/libbz2.so.1")

20- run("make", "-C", "bzip2-1.0.8", "CC=vinix-cc", "libbz2.a", "bzip2recover")

23+ run("make", "-C", "bzip2-1.0.8", "CC=vinix-cc", string-append("AR=", prefix, "ar"), string-append("RANLIB=", prefix, "ranlib"), "libbz2.a", "bzip2recover")

2124 },

2225 #:check, fn() {

23- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

2426 run("cp", "bzip2-1.0.8/sample1.bz2", "input.bz2")

25- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", "bzip2-1.0.8",

27+ run("vinix-run", "--library-path", "bzip2-1.0.8",

2628 "bzip2-1.0.8/bzip2-shared", "-dk", "input.bz2")

2729 run("cmp", "input", "bzip2-1.0.8/sample1.ref")

2830 },

expat/PKGBUILD.vile +4 -6

@@ -1,9 +1,9 @@

11defpkgbuild(expat,

22 #:pkgname, "expat",

33 #:pkgver, "2.11.0",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "Expat XML parser, headers and xmlwf",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "MIT",

88 #:url, "https://libexpat.github.io/",

99 #:depends, ["musl"],

@@ -11,14 +11,12 @@ defpkgbuild(expat,

1111 #:sha256sums, ["61e7614b602201c28a189dafee78f5bceaee192bbde46a930752ff09cf5542fa"],

1212

1313 #:build, fn() {

14- run("env", "CC=vinix-cc", "expat-2.11.0/configure", "--prefix=/usr",

15- "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

14+ run("vinix-configure", "expat-2.11.0/configure",

1615 "--without-docbook", "--without-examples", "--without-tests")

1716 run("make")

1817 },

1918 #:check, fn() {

20- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

21- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", "lib/.libs",

19+ run("vinix-run", "--library-path", "lib/.libs",

2220 "xmlwf/.libs/xmlwf", "expat-2.11.0/doc/xmlwf.xml")

2321 },

2422 #:package, fn() {

libffi/PKGBUILD.vile +4 -6

@@ -1,9 +1,9 @@

11defpkgbuild(libffi,

22 #:pkgname, "libffi",

33 #:pkgver, "3.8.2",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "Portable foreign function calls and closures",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "MIT",

88 #:url, "https://sourceware.org/libffi/",

99 #:depends, ["musl"],

@@ -11,16 +11,14 @@ defpkgbuild(libffi,

1111 #:sha256sums, ["a699fda2b090c4b46cb79cf60c4dacfce480eb05742c0de66acf3af174a47f92"],

1212

1313 #:build, fn() {

14- run("env", "CC=vinix-cc", "libffi-3.8.2/configure", "--prefix=/usr",

15- "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

14+ run("vinix-configure", "libffi-3.8.2/configure",

1615 "--disable-multi-os-directory", "--disable-docs", "--enable-pax_emutramp", "--enable-portable-binary", "--disable-exec-static-tramp")

1716 run("make")

1817 },

1918 #:check, fn() {

20- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

2119 run("vinix-cc", "-Iinclude", "-I.", "libffi-3.8.2/testsuite/libffi.call/strlen2.c",

2220 "-L.libs", "-lffi", "-o", "test-calling-convention")

23- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs", "./test-calling-convention")

21+ run("vinix-run", "--library-path", ".libs", "./test-calling-convention")

2422 },

2523 #:package, fn() {

2624 run("make", "install", string-append("DESTDIR=", pkgdir()))

libuuid/PKGBUILD.vile +5 -11

@@ -1,9 +1,9 @@

11defpkgbuild(libuuid,

22 #:pkgname, "libuuid",

33 #:pkgver, "2.40.4",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "UUID library and development files from util-linux",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "BSD-3-Clause",

88 #:url, "https://www.kernel.org/pub/linux/utils/util-linux/",

99 #:depends, ["musl"],

@@ -12,20 +12,14 @@ defpkgbuild(libuuid,

1212 #:sha256sums, ["5c1daf733b04e9859afdc3bd87cc481180ee0f88b5c0946b16fdec931975fb79"],

1313

1414 #:build, fn() {

15- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

16- run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",

17- "CC=vinix-cc",

18- "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"),

19- string-append("PKG_CONFIG_SYSROOT_DIR=", root),

20- "util-linux-2.40.4/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

21- "--prefix=/usr", "--disable-all-programs", "--enable-libuuid", "--without-python",

15+ run("vinix-configure", "util-linux-2.40.4/configure",

16+ "--disable-all-programs", "--enable-libuuid", "--without-python",

2217 "--disable-nls", "--disable-asciidoc")

2318 run("make", "libuuid.la", "libuuid/uuid.pc")

2419 },

2520 #:check, fn() {

26- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

2721 run("make", "test_uuid_parser")

28- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs", ".libs/test_uuid_parser")

22+ run("vinix-run", "--library-path", ".libs", ".libs/test_uuid_parser")

2923 },

3024 #:package, fn() {

3125 run("install", "-d", string-append(pkgdir(), "/usr/lib"))

make/PKGBUILD.vile +4 -9

@@ -1,25 +1,20 @@

11defpkgbuild(make,

22 #:pkgname, "make",

33 #:pkgver, "4.4.1",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "GNU Make for Vinix",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:url, "https://www.gnu.org/software/make/",

88 #:license, "GPL-3.0-or-later",

99 #:depends, ["musl"],

1010 #:source, ["https://distfiles.alpinelinux.org/distfiles/v3.21/make-4.4.1.tar.gz"],

1111 #:sha256sums, ["dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3"],

1212 #:build, fn() {

13- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

14- cc := string-append("CC=gcc --sysroot=", root, " -specs=", root, "/usr/lib/musl-gcc-sysroot.specs")

15- run("env", cc, "CFLAGS=-O2 -std=gnu17", "make-4.4.1/configure", "--prefix=/usr", "--build=x86_64-pc-linux-gnu",

16- "--host=x86_64-linux-musl", "--disable-nls", "--without-guile")

13+ run("env", "CFLAGS=-O2 -std=gnu17", "vinix-configure", "make-4.4.1/configure", "--disable-nls", "--without-guile")

1714 run("make")

1815 },

1916 #:check, fn() {

20- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

21- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", string-append(root, "/usr/lib"),

22- "./make", "-f", "/dev/null", "--eval=all: ; @echo Vinix make works", "all")

17+ run("vinix-run", "./make", "-f", "/dev/null", "--eval=all: ; @echo Vinix make works", "all")

2318 },

2419 #:package, fn() {

2520 run("make", string-append("DESTDIR=", pkgdir()), "install")

pcre2/PKGBUILD.vile +5 -12

@@ -1,9 +1,9 @@

11defpkgbuild(pcre2,

22 #:pkgname, "pcre2",

33 #:pkgver, "10.49",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "Perl-compatible regular expressions with 8, 16 and 32-bit code units",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "BSD-3-Clause",

88 #:url, "https://www.pcre.org/",

99 #:depends, ["musl", "zlib"],

@@ -11,20 +11,13 @@ defpkgbuild(pcre2,

1111 #:sha256sums, ["53c156e1ba416a20da8e65395daa132da0d80e76910424caca3fcdae7831d384"],

1212

1313 #:build, fn() {

14- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

15- run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH",

16- "CC=vinix-cc",

17- "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"),

18- string-append("PKG_CONFIG_SYSROOT_DIR=", root),

19- "pcre2-10.49/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

20- "--prefix=/usr", "--enable-pcre2-16", "--enable-pcre2-32", "--enable-jit",

14+ run("vinix-configure", "pcre2-10.49/configure",

15+ "--enable-pcre2-16", "--enable-pcre2-32", "--enable-jit",

2116 "--enable-pcre2grep-libz", "--disable-symvers")

2217 run("make")

2318 },

2419 #:check, fn() {

25- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

26- run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path",

27- string-append(".libs:", root, "/usr/lib"), ".libs/pcre2grep", "-q", "^defpkgbuild",

20+ run("vinix-run", "--library-path", ".libs", ".libs/pcre2grep", "-q", "^defpkgbuild",

2821 string-append(startdir(), "/PKGBUILD.vile"))

2922 },

3023 #:package, fn() {

pkgconf/PKGBUILD.vile +4 -6

@@ -1,9 +1,9 @@

11defpkgbuild(pkgconf,

22 #:pkgname, "pkgconf",

33 #:pkgver, "2.3.0",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "Query compiler and linker flags for installed libraries",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "ISC",

88 #:url, "https://pkgconf.org/",

99 #:depends, ["musl"],

@@ -11,15 +11,13 @@ defpkgbuild(pkgconf,

1111 #:sha256sums, ["3a9080ac51d03615e7c1910a0a2a8df08424892b5f13b0628a204d3fcce0ea8b"],

1212

1313 #:build, fn() {

14- run("env", "CC=vinix-cc", "pkgconf-2.3.0/configure", "--prefix=/usr",

15- "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl",

14+ run("vinix-configure", "pkgconf-2.3.0/configure",

1615 "--with-pkg-config-dir=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig")

1716 run("make")

1817 },

1918 #:check, fn() {

20- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

2119 run("env", "PKG_CONFIG_PATH=", "PKG_CONFIG_LIBDIR=.",

22- string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", ".libs",

20+ "vinix-run", "--library-path", ".libs",

2321 ".libs/pkgconf", "--exact-version=2.3.0", "libpkgconf")

2422 },

2523 #:package, fn() {

xz/PKGBUILD.vile +5 -13

@@ -1,31 +1,23 @@

11defpkgbuild(xz,

22 #:pkgname, "xz",

33 #:pkgver, "5.8.4",

4- #:pkgrel, 1,

4+ #:pkgrel, 2,

55 #:pkgdesc, "XZ and LZMA compression tools and shared library",

6- #:arch, [#:x86-64],

6+ #:arch, [#:x86-64, #:aarch64],

77 #:license, "0BSD AND LGPL-2.1-or-later AND GPL-2.0-or-later",

88 #:url, "https://tukaani.org/xz/",

99 #:depends, ["musl"],

1010 #:source, ["https://github.com/tukaani-project/xz/archive/refs/tags/v5.8.4/xz-5.8.4.tar.gz"],

1111 #:sha256sums, ["b6b34c52e672e810d339db14e0c10b5b6f5f67a30d8d05cdac5d8cb4d82f78d5"],

1212 #:build, fn() {

13- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

14- run("cmake", "-S", "xz-5.8.4", "-B", "build", "-DCMAKE_BUILD_TYPE=Release",

15- "-DCMAKE_SYSTEM_NAME=Linux", "-DCMAKE_SYSTEM_PROCESSOR=x86_64", "-DCMAKE_C_COMPILER=vinix-cc",

16- string-append("-DCMAKE_SYSROOT=", root), "-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY",

17- "-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY", "-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY",

18- "-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER", "-DCMAKE_INSTALL_PREFIX=/usr", "-DCMAKE_INSTALL_LIBDIR=lib",

19- "-DBUILD_SHARED_LIBS=ON", "-DXZ_NLS=OFF", "-DBUILD_TESTING=OFF")

13+ run("vinix-cmake", "xz-5.8.4", "build", "-DBUILD_SHARED_LIBS=ON", "-DXZ_NLS=OFF", "-DBUILD_TESTING=OFF")

2014 run("cmake", "--build", "build")

2115 },

2216 #:check, fn() {

23- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

24- loader := string-append(root, "/lib/ld-musl-x86_64.so.1")

2517 run("cp", "xz-5.8.4/README", "original")

2618 run("cp", "original", "roundtrip")

27- run(loader, "--library-path", "build", "build/xz", "--threads=1", "roundtrip")

28- run(loader, "--library-path", "build", "build/xz", "-d", "roundtrip.xz")

19+ run("vinix-run", "--library-path", "build", "build/xz", "--threads=1", "roundtrip")

20+ run("vinix-run", "--library-path", "build", "build/xz", "-d", "roundtrip.xz")

2921 run("cmp", "original", "roundtrip")

3022 },

3123 #:package, fn() {

zstd/PKGBUILD.vile +9 -8

@@ -1,32 +1,33 @@

1+cross := get-environment-variable("CROSS_COMPILE")

2+prefix := if string?(cross) { cross } else { "" }

3+

14defpkgbuild(zstd,

25 #:pkgname, "zstd",

36 #:pkgver, "1.6.0",

4- #:pkgrel, 1,

7+ #:pkgrel, 2,

58 #:pkgdesc, "Zstandard compression library and development headers",

6- #:arch, [#:x86-64],

9+ #:arch, [#:x86-64, #:aarch64],

710 #:license, "BSD-3-Clause OR GPL-2.0-only",

811 #:url, "https://facebook.github.io/zstd/",

912 #:depends, ["musl"],

1013 #:source, ["zstd-1.6.0.tar.gz::https://github.com/facebook/zstd/archive/refs/tags/v1.6.0.tar.gz"],

1114 #:sha256sums, ["289bb207935e5b4f241239f9832e665fa6b9636c3f87f479e125371e13842b8e"],

1215 #:build, fn() {

13- run("make", "-C", "zstd-1.6.0/lib", "CC=vinix-cc", "libzstd-release")

16+ run("make", "-C", "zstd-1.6.0/lib", "CC=vinix-cc", string-append("AR=", prefix, "ar"), string-append("RANLIB=", prefix, "ranlib"), "libzstd-release")

1417 },

1518 #:check, fn() {

16- root := get-environment-variable("VPAC_MAKEPKG_ROOT")

17- loader := string-append(root, "/lib/ld-musl-x86_64.so.1")

1819 for-each(fn(program) {

1920 run("vinix-cc", "-Izstd-1.6.0/lib", string-append("zstd-1.6.0/examples/", program, ".c"),

2021 "-Lzstd-1.6.0/lib", "-lzstd", "-o", program)

2122 }, list("simple_compression", "simple_decompression"))

2223 run("cp", "zstd-1.6.0/README.md", "sample")

23- run(loader, "--library-path", "zstd-1.6.0/lib", "./simple_compression", "sample")

24- run(loader, "--library-path", "zstd-1.6.0/lib", "./simple_decompression", "sample.zst")

24+ run("vinix-run", "--library-path", "zstd-1.6.0/lib", "./simple_compression", "sample")

25+ run("vinix-run", "--library-path", "zstd-1.6.0/lib", "./simple_decompression", "sample.zst")

2526 run("zstd", "--quiet", "--decompress", "sample.zst", "-o", "decoded")

2627 run("cmp", "sample", "decoded")

2728 },

2829 #:package, fn() {

29- run("make", "-C", "zstd-1.6.0/lib", "CC=vinix-cc", "PREFIX=/usr", string-append("DESTDIR=", pkgdir()),

30+ run("make", "-C", "zstd-1.6.0/lib", "CC=vinix-cc", string-append("AR=", prefix, "ar"), string-append("RANLIB=", prefix, "ranlib"), "PREFIX=/usr", string-append("DESTDIR=", pkgdir()),

3031 "install-shared", "install-includes", "install-pc")

3132 for-each(fn(name) {

3233 run("install", "-Dm644", string-append("zstd-1.6.0/", name), string-append(pkgdir(), "/usr/share/licenses/zstd/", name))