From c52c3f5089880674b43b26e7b75b8936e70bf779 Mon Sep 17 00:00:00 2001 From: Rich G Date: Wed, 20 Feb 2019 23:45:09 -0500 Subject: [PATCH] New Package: opensm closes #9005 --- srcpkgs/opensm-devel | 1 + srcpkgs/opensm/patches/fix-musl.patch | 41 +++++++++++++++++++++++++++ srcpkgs/opensm/template | 31 ++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 120000 srcpkgs/opensm-devel create mode 100644 srcpkgs/opensm/patches/fix-musl.patch create mode 100644 srcpkgs/opensm/template diff --git a/srcpkgs/opensm-devel b/srcpkgs/opensm-devel new file mode 120000 index 0000000000..2277e622fb --- /dev/null +++ b/srcpkgs/opensm-devel @@ -0,0 +1 @@ +opensm \ No newline at end of file diff --git a/srcpkgs/opensm/patches/fix-musl.patch b/srcpkgs/opensm/patches/fix-musl.patch new file mode 100644 index 0000000000..58db4e3fc5 --- /dev/null +++ b/srcpkgs/opensm/patches/fix-musl.patch @@ -0,0 +1,41 @@ +diff --git include/complib/cl_debug_osd.h include/complib/cl_debug_osd.h +index 31d6972..4506504 100644 +--- include/complib/cl_debug_osd.h ++++ include/complib/cl_debug_osd.h +@@ -42,7 +42,7 @@ + #define _CL_DEBUG_OSD_H_ + + #include +-#include ++#include + + #ifdef __cplusplus + # define BEGIN_C_DECLS extern "C" { +diff --git include/complib/cl_types.h include/complib/cl_types.h +index a773e51..a94ea2e 100644 +--- include/complib/cl_types.h ++++ include/complib/cl_types.h +@@ -56,6 +56,9 @@ + BEGIN_C_DECLS + #include + #include ++#ifndef __GLIBC__ ++#include ++#endif + typedef uint16_t net16_t; + typedef uint32_t net32_t; + typedef uint64_t net64_t; +diff --git opensm/osm_db_files.c opensm/osm_db_files.c +index fd9f2fe..8ac6b7b 100644 +--- opensm/osm_db_files.c ++++ opensm/osm_db_files.c +@@ -415,7 +415,7 @@ int osm_db_restore(IN osm_db_domain_t * p_domain) + 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/srcpkgs/opensm/template b/srcpkgs/opensm/template new file mode 100644 index 0000000000..52ec8efef9 --- /dev/null +++ b/srcpkgs/opensm/template @@ -0,0 +1,31 @@ +# Template file for 'opensm' +pkgname=opensm +version=3.3.21 +revision=1 +build_style=gnu-configure +hostmakedepends="automake bison flex libtool" +makedepends="rdma-core-devel" +short_desc="InfiniBand Subnet Manager and Administrator" +maintainer="Rich G " +license="GPL-2.0-only" +homepage="https://github.com/linux-rdma/opensm" +distfiles="https://github.com/linux-rdma/opensm/releases/download/${version}/opensm-${version}.tar.gz" +checksum=50d024090dc083274bc840792a3b539ecee5ad37a42948f43e84068e42b89b48 + +pre_configure() { + ./autogen.sh +} + +post_install() { + rm -rf ${DESTDIR}/etc/init.d +} + +opensm-devel_package() { + depends="opensm-${version}_${revision}" + short_desc+=" - development files" + pkg_install() { + vmove usr/include + vmove "usr/lib/*.so" + vmove "usr/lib/*.a" + } +}