X-Original-To: alpine-aports@lists.alpinelinux.org Received: from asav21.altibox.net (asav21.altibox.net [109.247.116.8]) by lists.alpinelinux.org (Postfix) with ESMTP id 6DF865C4194 for ; Sat, 9 Jul 2016 14:41:19 +0000 (GMT) Received: from usaklig-alpine-dev.localdomain (148-252-89.157.3p.ntebredband.no [148.252.89.157]) by asav21.altibox.net (Postfix) with ESMTP id 9AC94800D0; Sat, 9 Jul 2016 16:41:18 +0200 (CEST) From: Jann - Ove Risvik To: alpine-aports@lists.alpinelinux.org Cc: Jann - Ove Risvik Subject: [alpine-aports] [PATCH] testing/opensm: new aport Date: Sat, 9 Jul 2016 16:41:17 +0200 Message-Id: <20160709144117.7914-1-jann.ove@usaklig.com> X-Mailer: git-send-email 2.8.3 X-CMAE-Score: 0 X-CMAE-Analysis: v=2.2 cv=G9VeKJs5 c=1 sm=1 tr=0 a=M+EzPTJS7kFBQSI324WMeg==:117 a=M+EzPTJS7kFBQSI324WMeg==:17 a=PwJ2IG6fAAAA:8 a=OCnwM84QAAAA:8 a=GZXoN1BBnyHY1lcpJzEA:9 a=6NwMXRBIkbEA:10 a=mulySix4bA0A:10 a=OBoYHoSLQAIA:10 a=NkPoHJjScqgA:10 a=3RU9z4J3t_sA:10 a=tKKEq-adla_cQ7A69GDf:22 a=PDbkmstH-VBdNjvip9sM:22 X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: https://openfabrics.org/index.php/openfabrics-software.html OpenSM InfiniBand subnet manager 2.nd try at packages for managing infiniband hardware. Doublechecked which of the packages actually refused to build with alpine $CHOST and $CBUILD, and worked around it a bit more elegantly than pulling in a newer config.sub --- testing/opensm/0001-musl-fixes.patch | 55 ++++++++++++++++++++++++++++++++++++ testing/opensm/APKBUILD | 42 +++++++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 testing/opensm/0001-musl-fixes.patch create mode 100644 testing/opensm/APKBUILD diff --git a/testing/opensm/0001-musl-fixes.patch b/testing/opensm/0001-musl-fixes.patch new file mode 100644 index 0000000..4fdf8d5 --- /dev/null +++ b/testing/opensm/0001-musl-fixes.patch @@ -0,0 +1,55 @@ +diff -urp opensm-3.3.20/include/complib/cl_debug_osd.h opensm-3.3.20-patched/include/complib/cl_debug_osd.h +--- opensm-3.3.20/include/complib/cl_debug_osd.h 2013-02-07 08:46:28.000000000 +0100 ++++ opensm-3.3.20-patched/include/complib/cl_debug_osd.h 2016-07-05 23:33:12.674344101 +0200 +@@ -42,7 +42,7 @@ + #define _CL_DEBUG_OSD_H_ + + #include +-#include ++#include + + #ifdef __cplusplus + # define BEGIN_C_DECLS extern "C" { +diff -urp opensm-3.3.20/include/complib/cl_types.h opensm-3.3.20-patched/include/complib/cl_types.h +--- opensm-3.3.20/include/complib/cl_types.h 2013-02-07 08:46:28.000000000 +0100 ++++ opensm-3.3.20-patched/include/complib/cl_types.h 2016-07-05 23:33:12.674344101 +0200 +@@ -55,6 +55,7 @@ + + BEGIN_C_DECLS + #include ++#include + #include + typedef uint16_t net16_t; + typedef uint32_t net32_t; +@@ -62,16 +63,16 @@ typedef uint64_t net64_t; + + /* explicit cast of void* to uint32_t */ + #ifndef ASSERT_VOIDP2UINTN +-#if __WORDSIZE == 64 ++#if LONG_BIT == 64 + #define ASSERT_VOIDP2UINTN(var) \ + CL_ASSERT( (intptr_t)var <= 0xffffffffffffffffL ) + #else /* __WORDSIZE == 64 */ +-#if __WORDSIZE == 32 ++#if LONG_BIT == 32 + /* need to cast carefully to avoid the warining of un-needed check */ + #define ASSERT_VOIDP2UINTN(var) \ + CL_ASSERT( (intptr_t)var <= 0x100000000ULL ) + #else /* __WORDSIZE == 32 */ +-#error "Need to know WORDSIZE to tell how to cast to unsigned long int" ++#error "Need to know LONG_BIT to tell how to cast to unsigned long int" + #endif /* __WORDSIZE == 32 */ + #endif /* __WORDSIZE == 64 */ + #endif +diff -urp opensm-3.3.20/opensm/osm_db_files.c opensm-3.3.20-patched/opensm/osm_db_files.c +--- opensm-3.3.20/opensm/osm_db_files.c 2014-10-21 13:49:50.000000000 +0200 ++++ opensm-3.3.20-patched/opensm/osm_db_files.c 2016-07-05 23:33:12.664344239 +0200 +@@ -415,7 +415,7 @@ int osm_db_restore(IN osm_db_domain_t * + p_accum_val); + + /* check that the key is a number */ +- if (!strtouq(p_key, &endptr, 0) ++ if (!strtoull(p_key, &endptr, 0) + && *endptr != '\0') { + OSM_LOG(p_log, OSM_LOG_ERROR, + "ERR 610B: " diff --git a/testing/opensm/APKBUILD b/testing/opensm/APKBUILD new file mode 100644 index 0000000..43bc5b7 --- /dev/null +++ b/testing/opensm/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: Jann - Ove Risvik +# Maintainer: +pkgname=opensm +pkgver=3.3.20 +pkgrel=0 +pkgdesc="OpenSM InfiniBand subnet manager" +url="https://www.openfabrics.org/index.php/openfabrics-software.html" +arch="x86 x86_64" +license="GPL2 BSD" +depends="libibumad" +depends_dev="libibumad-dev" +makedepends="$depends_dev" +install="" +subpackages="$pkgname-dev $pkgname-doc" +source="https://www.openfabrics.org/downloads/management/$pkgname-$pkgver.tar.gz +0001-musl-fixes.patch" + +builddir="$srcdir"/$pkgname-$pkgver +build() { + cd "$builddir" + ./configure \ + --build=`echo $CBUILD | sed s/alpine-linux-musl/linux/`\ + --host=`echo $CHOST | sed s/alpine-linux-musl/linux/` \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + || return 1 + make || return 1 +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="ed615b4681e94ef2e13a5de773ab89a3 opensm-3.3.20.tar.gz +cbe036cdfddfd37f6381fe7269498d0e 0001-musl-fixes.patch" +sha256sums="e17d7446abb99809b0975ea894a9f0ce56a65c5eac1185a857c8bf7978785a98 opensm-3.3.20.tar.gz +a507a4cc20982e75e674da5ba43e5a56420153338f1ffd9a6f5328488acfe8b2 0001-musl-fixes.patch" +sha512sums="ea76ae8088c949d6d0d7524920cb333d0981af34bdbe2fa2bde30f13b58dcaeb842989621990a09dfd02db56c180a70109a00e5a45aba800d593b7ee95e4b9b7 opensm-3.3.20.tar.gz +c5f07423c9726bc4671327596d8585a669b25d75d9143db99e621ab6a08ed4aa0ee22e9725afe10bf4bf98ed503a06e9f52639f41a3cae61a34987b4ed643a32 0001-musl-fixes.patch" -- 2.8.3 --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---