mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 22:53:51 +02:00
ck: fix cross builds
This commit is contained in:
parent
5213c0d5fa
commit
e6e62ecad3
2 changed files with 30 additions and 8 deletions
29
srcpkgs/ck/patches/cross.patch
Normal file
29
srcpkgs/ck/patches/cross.patch
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
--- configure.orig
|
||||||
|
+++ configure
|
||||||
|
@@ -636,10 +636,11 @@
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
-$CC -o .1 .1.c
|
||||||
|
-COMPILER=`./.1 2> /dev/null`
|
||||||
|
-r=$?
|
||||||
|
-rm -f .1.c .1
|
||||||
|
+r=1
|
||||||
|
+case "`$CC --version`" in
|
||||||
|
+*clang*) COMPILER=clang; r=0 ;;
|
||||||
|
+*GCC*) COMPILER=gcc; r=0 ;;
|
||||||
|
+esac
|
||||||
|
|
||||||
|
if test "$r" -ne 0; then
|
||||||
|
assert "" "update compiler"
|
||||||
|
--- src/Makefile.in.orig
|
||||||
|
+++ src/Makefile.in
|
||||||
|
@@ -25,7 +25,7 @@
|
||||||
|
$(LD) $(LDFLAGS) -o $(TARGET_DIR)/libck.so $(OBJECTS)
|
||||||
|
|
||||||
|
libck.a: $(OBJECTS)
|
||||||
|
- ar rcs $(TARGET_DIR)/libck.a $(OBJECTS)
|
||||||
|
+ $(AR) rcs $(TARGET_DIR)/libck.a $(OBJECTS)
|
||||||
|
|
||||||
|
ck_array.o: $(INCLUDE_DIR)/ck_array.h $(SDIR)/ck_array.c
|
||||||
|
$(CC) $(CFLAGS) -c -o $(TARGET_DIR)/ck_array.o $(SDIR)/ck_array.c
|
|
@ -3,20 +3,13 @@ pkgname=ck
|
||||||
version=0.7.0
|
version=0.7.0
|
||||||
revision=1
|
revision=1
|
||||||
build_style=configure
|
build_style=configure
|
||||||
configure_args="--prefix=/usr"
|
configure_args="--prefix=/usr --platform=${XBPS_TARGET_MACHINE%-musl}"
|
||||||
short_desc="Concurrency Kit C library"
|
short_desc="Concurrency Kit C library"
|
||||||
maintainer="Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com>"
|
maintainer="Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com>"
|
||||||
license="BSD-2-Clause"
|
license="BSD-2-Clause"
|
||||||
homepage="http://concurrencykit.org/"
|
homepage="http://concurrencykit.org/"
|
||||||
distfiles="https://github.com/concurrencykit/ck/archive/${version}.tar.gz"
|
distfiles="https://github.com/concurrencykit/ck/archive/${version}.tar.gz"
|
||||||
checksum=e730cb448fb0ecf9d19bf4c7efe9efc3c04dd9127311d87d8f91484742b0da24
|
checksum=e730cb448fb0ecf9d19bf4c7efe9efc3c04dd9127311d87d8f91484742b0da24
|
||||||
nocross="hand-made shellscript that doesn't take triplet-prefixed compilers into account"
|
|
||||||
|
|
||||||
case "$XBPS_TARGET_MACHINE" in
|
|
||||||
aarch64*) configure_args+=" --enable-lse --disable-sse" ;;
|
|
||||||
x86_64*|i686*) ;;
|
|
||||||
*) configure_args+=" --disable-sse" ;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
vlicense LICENSE
|
vlicense LICENSE
|
||||||
|
|
Loading…
Add table
Reference in a new issue