diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-08 06:52:57 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-07-08 06:53:20 +0000 |
commit | b6ecb2636c7f0613773f922c290dc02c890c4d8f (patch) | |
tree | 083133d5baff9da1644d32e56907afbdc71d13fd /main | |
parent | 991001c6f9ccf4f57efd4acff85e30801b1d785d (diff) | |
download | aports-b6ecb2636c7f0613773f922c290dc02c890c4d8f.tar.bz2 aports-b6ecb2636c7f0613773f922c290dc02c890c4d8f.tar.xz |
main/open-iscsi: fix build on musl
Diffstat (limited to 'main')
-rw-r--r-- | main/open-iscsi/APKBUILD | 15 | ||||
-rw-r--r-- | main/open-iscsi/musl-fixes.patch | 31 |
2 files changed, 44 insertions, 2 deletions
diff --git a/main/open-iscsi/APKBUILD b/main/open-iscsi/APKBUILD index b37759e55f..5d9fc6e796 100644 --- a/main/open-iscsi/APKBUILD +++ b/main/open-iscsi/APKBUILD @@ -2,7 +2,7 @@ pkgname=open-iscsi pkgver=2.0.873 _realver=${pkgver%.*}-${pkgver##*.} -pkgrel=1 +pkgrel=2 pkgdesc="High performance, transport independent, multi-platform iSCSI initiator" url="http://www.open-iscsi.org" arch="all" @@ -12,6 +12,7 @@ makedepends="openssl-dev" install="" subpackages="$pkgname-doc" source="http://www.open-iscsi.org/bits/open-iscsi-$_realver.tar.gz + musl-fixes.patch iscsid.initd iscsid.confd" @@ -19,6 +20,13 @@ _builddir="$srcdir"/$pkgname-$_realver prepare() { cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done + # include iscsistart in the package + sed -i -e '/^PROGRAMS = /s/$/ usr\/iscsistart/' Makefile || return 1 } build() { @@ -28,7 +36,7 @@ build() { package() { cd "$_builddir" - make DESTDIR="$pkgdir" install_user + make DESTDIR="$pkgdir" install_user || return 1 mkdir -p $pkgdir/usr/bin mkdir -p $pkgdir/usr/sbin mv $pkgdir/sbin/iscsi-iname $pkgdir/usr/bin @@ -40,11 +48,14 @@ package() { } md5sums="8b8316d7c9469149a6cc6234478347f7 open-iscsi-2.0-873.tar.gz +080961aef6eb9d0e8e5f65cf95411225 musl-fixes.patch 1462e44ce6ec4ae44ec83d0ffcd3cdda iscsid.initd b762b687d4628791b4362df22cf22d34 iscsid.confd" sha256sums="7dd9f2f97da417560349a8da44ea4fcfe98bfd5ef284240a2cc4ff8e88ac7cd9 open-iscsi-2.0-873.tar.gz +44acaab8123abb8a205732baba11e1c70bcf828dfd3ac5c42c475ee85b433507 musl-fixes.patch 3bad25eba8254de845e41016df65855673c85a76ff96af713c7eab62c646bb7a iscsid.initd 673bf4744efc3276d372587c996270821d39dcdc0bf27a13691ea6b0e814b6d0 iscsid.confd" sha512sums="4e67116cb7dd49381c9279645e5a661f05596ae6be3b832772089828b3764ca2d04b5dea1bcc337071efb52c3c75a6fb943136c659ee59500f3a198ed0dcea6b open-iscsi-2.0-873.tar.gz +d40f6f14d848f2d8a2fdb11672be9b9147b71a72ac06b33f771bbe80e5fa4b5d92405df7f8978e8cd1779820e9797473bd55fc07b4f49d32c5279ac0fb39c93f musl-fixes.patch ac3894a62d27a975c7ec6dbc639e7442d6f1472e4fe0967f813cc78de4a36418fcb584888012f1927a83bb2c73c26f85031cb411d49ba5356772dfd23e426c3f iscsid.initd 075bb9cb783be7ccbc799947e0e042b85310d40b3045141dc1be40ca84ed1cc0e1e54559df501c512c179e28375314b27a03c15d9a6d4b1cabd428b2279985d3 iscsid.confd" diff --git a/main/open-iscsi/musl-fixes.patch b/main/open-iscsi/musl-fixes.patch new file mode 100644 index 0000000000..35f11e1a59 --- /dev/null +++ b/main/open-iscsi/musl-fixes.patch @@ -0,0 +1,31 @@ +--- ./utils/open-isns/isns.h.orig ++++ ./utils/open-isns/isns.h +@@ -13,6 +13,7 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <stdio.h> ++#include <time.h> + + #include <isns-proto.h> + #include "types.h" +--- ./utils/fwparam_ibft/fwparam_ppc.c.orig ++++ ./utils/fwparam_ibft/fwparam_ppc.c +@@ -356,7 +356,7 @@ + * Sort the nics into "natural" order. The proc fs + * device-tree has them in somewhat random, or reversed order. + */ +- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp); ++ qsort(niclist, nic_count, sizeof(char *), (int (*)(const void *, const void *))nic_cmp); + + snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases"); + dev_count = 0; +--- ./usr/idbm.c.orig ++++ ./usr/idbm.c +@@ -25,6 +25,7 @@ + #include <stdlib.h> + #include <string.h> + #include <errno.h> ++#include <fcntl.h> + #include <dirent.h> + #include <limits.h> + #include <sys/stat.h> |