Received: from sebsite.pw (sebsite.pw [71.19.150.50]) by nld3-dev1.alpinelinux.org (Postfix) with ESMTPS id 2BD497810AA for <~alpine/aports@lists.alpinelinux.org>; Sun, 13 Feb 2022 22:56:47 +0000 (UTC) Received: from localhost.localdomain (unknown [8.9.88.219]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by sebsite.pw (Postfix) with ESMTPSA id 96D8B38010A; Sun, 13 Feb 2022 22:56:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sebsite.pw; s=sebsite; t=1644792963; bh=LeMEQPQWclmKIA9y2Vwkvp58ezKsDYRpDTqAyEjUTkY=; h=From:To:Cc:Subject:Date; b=Lb+WeaBkIVuu5jFI3uqgIiqSWR1TiX+AnAnnzJ9GIdvSRDPVFvptMFLSaNcyDStoS a1D4stg4ZDr4AR3aKJr27w8hJIG7ka769+b0ot1kp8mzq9VfEewtxAztA1n36iAEY4 qyvfevYNBaMkx0rJqRusJKFCYrHYnv3w6jHDJBzzVKYC7ulv6PWbRpJuAHa0kUt2/9 tMoSpazTY5r9gjN4UBG78ArK9KpjaJXM9F3Dg75/lqEHVkWDVgprRrSBmuVpTVY6S4 3dK0R9P5jTb1r6eUiM0xShDu4L7DONo3kVV40SZK4GD5rDz0dUyFW+9QU0FqKasn6W TPHW4q0xrn+8g== From: Sebastian To: ~alpine/aports@lists.alpinelinux.org Cc: Sebastian Subject: [PATCH v3] testing/cosmopolitan: new aport Date: Sun, 13 Feb 2022 17:55:05 -0500 Message-Id: <20220213225505.14292-1-sebastian@sebsite.pw> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit https://justine.lol/cosmopolitan/ Build-once run-anywhere C library Signed-off-by: Sebastian --- Changes since v2: install to /opt/cosmopolitan instead of /usr/lib. Documentation is still installed to /usr/share/doc; is this okay? testing/cosmopolitan/APKBUILD | 50 ++++++++++++++++++++++++ testing/cosmopolitan/no-clang-test.patch | 12 ++++++ 2 files changed, 62 insertions(+) create mode 100644 testing/cosmopolitan/APKBUILD create mode 100644 testing/cosmopolitan/no-clang-test.patch diff --git a/testing/cosmopolitan/APKBUILD b/testing/cosmopolitan/APKBUILD new file mode 100644 index 00000000..3c9721bf --- /dev/null +++ b/testing/cosmopolitan/APKBUILD @@ -0,0 +1,50 @@ +# Contributor: Sebastian Hudak +# Maintainer: Sebastian Hudak +pkgname=cosmopolitan +pkgver=1.0 +pkgrel=0 +pkgdesc="Build-once run-anywhere C library" +url="https://justine.lol/cosmopolitan/" +arch="x86_64" +license="ISC" +subpackages="$pkgname-doc" +source="https://justine.lol/cosmopolitan/cosmopolitan-$pkgver.tar.gz + no-clang-test.patch" +builddir="$srcdir/cosmopolitan" +options="!fhs" # installs to /opt +_mode=rel + +build() { + # Build doesn't work with custom *FLAGS. + # This is due to the nature of Cosmpolitan and APE binaries and + # probably can't be worked around. + make CFLAGS= CXXFLAGS= CPPFLAGS= LDFLAGS= MODE="$_mode" \ + o/cosmopolitan.h \ + o/cosmopolitan.html \ + o/"$_mode"/ape \ + o/"$_mode"/cosmopolitan.a \ + o/"$_mode"/libc +} + +check() { + make CFLAGS= CXXFLAGS= CPPFLAGS= LDFLAGS= MODE="$_mode" \ + o/"$_mode"/test/libc +} + +package() { + install -Dm644 o/cosmopolitan.h \ + "$pkgdir"/opt/cosmopolitan/include/cosmopolitan.h + install -Dm644 o/cosmopolitan.html \ + "$pkgdir"/usr/share/doc/cosmopolitan.html + install -Dm644 o/"$_mode"/ape/* \ + -t "$pkgdir"/opt/cosmopolitan/lib/ + install -m644 o/"$_mode"/cosmopolitan.a \ + "$pkgdir"/opt/cosmopolitan/lib/cosmopolitan.a + install -m644 o/"$_mode"/libc/crt/crt.o \ + "$pkgdir"/opt/cosmopolitan/lib/crt.o +} + +sha512sums=" +1fb01ad95d5d0908e608febd191545ca2ed06d37ff64715c3241528be2f36f656b68103178c925a8d0a985a9fd40f8f62e034a05ed719d682c5b1c336ff25c8d cosmopolitan-1.0.tar.gz +b6d892a8ecc0a50a8cae49a0ba4ef9940316ee4ff9c36f247bda521c2ffb853062c56716bd8226144348760b581bc2cf5c65a06775162c362b4e966ac413409a no-clang-test.patch +" diff --git a/testing/cosmopolitan/no-clang-test.patch b/testing/cosmopolitan/no-clang-test.patch new file mode 100644 index 00000000..1f6623bb --- /dev/null +++ b/testing/cosmopolitan/no-clang-test.patch @@ -0,0 +1,12 @@ +Clang test segfaults. +See https://groups.google.com/g/cosmopolitan-libc/c/COPYVF7sE-Y + +--- cosmopolitan/test/libc/release/test.mk 2021-05-17 03:35:10.000000000 +0000 ++++ cosmopolitan-alpine/test/libc/release/test.mk 2022-01-07 02:47:16.666693677 +0000 +@@ -147,6 +137,5 @@ + o/$(MODE)/test/libc/release/smokecxx.com.runs \ + o/$(MODE)/test/libc/release/smokeansi.com \ + o/$(MODE)/test/libc/release/smokeansi.com.runs \ +- o/$(MODE)/test/libc/release/clang.ok \ + o/$(MODE)/test/libc/release/emulate.ok \ + o/$(MODE)/test/libc/release/metal.ok -- 2.34.1