~alpine/aports

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
4 3

[PATCH] testing/cosmopolitan: new aport

Details
Message ID
<20220109220253.19058-1-sebastian@sebsite.pw>
DKIM signature
missing
Download raw message
Patch: +62 -0
https://justine.lol/cosmopolitan/
Build-once run-anywhere C library

Signed-off-by: Sebastian <sebastian@sebsite.pw>
---
 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..d03b0318
--- /dev/null
+++ b/testing/cosmopolitan/APKBUILD
@@ -0,0 +1,50 @@
# Contributor: Sebastian Hudak <sebastian@sebsite.pw>
# Maintainer: Sebastian Hudak <sebastian@sebsite.pw>
pkgname=cosmopolitan
pkgver=1.0
pkgrel=0
pkgdesc="Build-once run-anywhere C library"
url="https://justine.lol/cosmopolitan/"
arch="x86_64"
license="ISC"
# From CONTRIBUTING.md[1]: Build Config "Must not depend on system
# commands (exception: sh, make, gzip, zip)"
# [1]: https://github.com/jart/cosmopolitan/blob/master/CONTRIBUTING.md
makedepends="gzip zip"
subpackages="$pkgname-doc"
source="https://justine.lol/cosmopolitan/cosmopolitan-$pkgver.tar.gz
	no-clang-test.patch"
builddir="$srcdir/cosmopolitan"
_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"/usr/include/cosmopolitan.h
	install -Dm644 o/cosmopolitan.html \
		"$pkgdir"/usr/share/doc/cosmopolitan.html
	mkdir -p "$pkgdir"/usr/lib/
	install -m644 o/"$_mode"/ape/* "$pkgdir"/usr/lib/
	install -m644 o/"$_mode"/cosmopolitan.a "$pkgdir"/usr/lib/cosmopolitan.a
	install -m644 o/"$_mode"/libc/crt/crt.o "$pkgdir"/usr/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
Details
Message ID
<164436121066.985.3118368467324598135.gitlab.29369.f957a7b7b56f2f64e4a9aef290d6b99ca2778bbb@listserv.local>
In-Reply-To
<20220109220253.19058-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
Sorry to bother you @mailinglist-bot,

but we've detected that this merge request hasn't seen any recent activity. If you need help or want to discuss your approach with developers you can ping `@team/mentors`. You can also ask on IRC on `#alpine-devel` on irc.oftc.net. If no further activity occurs in this MR, Alpine developers may close it in the future.

Thanks for your contribution.

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29369#note_213662
Details
Message ID
<164472322185.985.3298396533755230909.gitlab.29369.9a1a5880e87998b805ee53c29edb307d55dd7000@listserv.local>
In-Reply-To
<20220109220253.19058-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
On Sun, 09 Jan 2022 17:02:53 -0500, Sebastian wrote:
> +	install -m644 o/"$_mode"/ape/* "$pkgdir"/usr/lib/
> +	install -m644 o/"$_mode"/cosmopolitan.a "$pkgdir"/usr/lib/cosmopolitan.a
> +	install -m644 o/"$_mode"/libc/crt/crt.o "$pkgdir"/usr/lib/crt.o

```suggestion:-3+0
	install -Dm644 o/"$_mode"/ape/* -t "$pkgdir"/usr/lib/
	install -Dm644 o/"$_mode"/cosmopolitan.a "$pkgdir"/usr/lib/cosmopolitan.a
	install -Dm644 o/"$_mode"/libc/crt/crt.o "$pkgdir"/usr/lib/crt.o
```

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29369#note_214875
Details
Message ID
<164472354036.985.13022988242306544567.gitlab.29369.8fb4b3510b6629c50f60cc59dc87b6d4b6891058@listserv.local>
In-Reply-To
<20220109220253.19058-1-sebastian@sebsite.pw> (view parent)
DKIM signature
missing
Download raw message
On Sun, 09 Jan 2022 17:02:53 -0500, Sebastian wrote:
> +# commands (exception: sh, make, gzip, zip)"
> +# [1]: https://github.com/jart/cosmopolitan/blob/master/CONTRIBUTING.md
> +makedepends="gzip zip"

are you sure these are actually needed during the build though

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29369#note_214876
Details
Message ID
<164474605208.985.1934863104654337946.gitlab.29369.9a1a5880e87998b805ee53c29edb307d55dd7000@listserv.local>
In-Reply-To
<164472322185.985.3298396533755230909.gitlab.29369.9a1a5880e87998b805ee53c29edb307d55dd7000@listserv.local> (view parent)
DKIM signature
missing
Download raw message
On Sun, 09 Jan 2022 17:02:53 -0500, Sebastian wrote:
> +	install -m644 o/"$_mode"/ape/* "$pkgdir"/usr/lib/
> +	install -m644 o/"$_mode"/cosmopolitan.a "$pkgdir"/usr/lib/cosmopolitan.a
> +	install -m644 o/"$_mode"/libc/crt/crt.o "$pkgdir"/usr/lib/crt.o

As an aside, this is a cross-compilation type thing, so the cosmopolitan artifacts should *not* be installed to `/usr/lib`.  They should go somewhere else.

-- 
via https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/29369#note_214917
Reply to thread Export thread (mbox)