xbps: make this cross buildable.
This commit is contained in:
parent
adae62a1f8
commit
280090ed60
2 changed files with 63 additions and 3 deletions
|
@ -0,0 +1,43 @@
|
||||||
|
From 7d8f0bb686b587203a6533bba4f4764ed6f51d5f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Juan RP <xtraeme@gmail.com>
|
||||||
|
Date: Sat, 2 Feb 2013 01:31:20 +0100
|
||||||
|
Subject: [PATCH 01/11] lib/compat/vasprintf.c: make this build and fix
|
||||||
|
sign-compare warnings.
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/compat/vasprintf.c | 5 +++--
|
||||||
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lib/compat/vasprintf.c b/lib/compat/vasprintf.c
|
||||||
|
index d73892e..3d86aee 100644
|
||||||
|
--- lib/compat/vasprintf.c
|
||||||
|
+++ lib/compat/vasprintf.c
|
||||||
|
@@ -32,6 +32,7 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
+#include "compat.h"
|
||||||
|
|
||||||
|
int HIDDEN
|
||||||
|
vasprintf(char **ret, const char *fmt, va_list ap)
|
||||||
|
@@ -54,7 +55,7 @@ vasprintf(char **ret, const char *fmt, va_list ap)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (retval < len) {
|
||||||
|
+ if (retval < (int)len) {
|
||||||
|
new_buf = realloc(buf, retval + 1);
|
||||||
|
if (new_buf == NULL)
|
||||||
|
*ret = buf;
|
||||||
|
@@ -71,7 +72,7 @@ vasprintf(char **ret, const char *fmt, va_list ap)
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
retval = vsnprintf(buf, len, fmt, ap);
|
||||||
|
- if (retval != len - 1) {
|
||||||
|
+ if (retval != (int)len - 1) {
|
||||||
|
free(buf);
|
||||||
|
*ret = NULL;
|
||||||
|
return -1;
|
||||||
|
--
|
||||||
|
1.8.1.1
|
||||||
|
|
|
@ -4,12 +4,12 @@ version=0.20
|
||||||
revision=8
|
revision=8
|
||||||
build_style=configure
|
build_style=configure
|
||||||
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
|
configure_args="--prefix=/ --exec-prefix=/usr --sbindir=/usr/sbin
|
||||||
--enable-tests --enable-static --enable-debug"
|
--enable-static --enable-debug"
|
||||||
depends="xbps-triggers"
|
depends="xbps-triggers"
|
||||||
makedepends="which pkg-config proplib-devel>=0.6.2 openssl-devel
|
makedepends="which pkg-config proplib-devel>=0.6.2 openssl-devel
|
||||||
libfetch-devel libarchive-devel confuse-devel atf-devel>=0.16"
|
libfetch-devel libarchive-devel confuse-devel"
|
||||||
conf_files="/etc/xbps/xbps.conf"
|
conf_files="/etc/xbps/xbps.conf"
|
||||||
subpackages="libxbps libxbps-devel xbps-static xbps-tests"
|
subpackages="libxbps libxbps-devel xbps-static"
|
||||||
replaces="xbps>=0"
|
replaces="xbps>=0"
|
||||||
short_desc="The XBPS package system utilities"
|
short_desc="The XBPS package system utilities"
|
||||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||||
|
@ -17,3 +17,20 @@ homepage="http://code.google.com/p/xbps"
|
||||||
license="Simplified BSD"
|
license="Simplified BSD"
|
||||||
distfiles="http://xbps.googlecode.com/files/xbps-$version.tar.gz"
|
distfiles="http://xbps.googlecode.com/files/xbps-$version.tar.gz"
|
||||||
checksum=91e0ae3c6cf807e1f66e45d84c1913d9d87c0eb201ae9c07bc3b4425beba401f
|
checksum=91e0ae3c6cf807e1f66e45d84c1913d9d87c0eb201ae9c07bc3b4425beba401f
|
||||||
|
|
||||||
|
crossmakedepends="proplib-devel>=0.6.2 openssl-devel libfetch-devel
|
||||||
|
libarchive-devel confuse-devel"
|
||||||
|
|
||||||
|
if [ -n "$XBPS_CROSS_TRIPLET" ]; then
|
||||||
|
subpackages="libxbps libxbps-devel xbps-static"
|
||||||
|
makedepends="which pkg-config confuse-devel openssl-devel libarchive-devel"
|
||||||
|
|
||||||
|
pre_build() {
|
||||||
|
sed -i "s|-L\$(LIBDIR)|-L/usr/${XBPS_CROSS_TRIPLET}/lib|g" config.mk
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
configure_args="${configure_args} --enable-tests"
|
||||||
|
makedepends="${makedepends} atf-devel>=0.16"
|
||||||
|
subpackages="${subpackages} xbps-tests"
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue