summaryrefslogtreecommitdiff
path: root/libs/hwloc
diff options
context:
space:
mode:
authorW. Michael Petullo <mike@flyn.org>2018-08-08 20:54:22 -0400
committerW. Michael Petullo <mike@flyn.org>2018-08-09 17:42:47 -0400
commit6412ce93a265748309d607fdcddf7ed526e5a447 (patch)
tree53340bbd9060a8b5d32a025b0ab7965aa08e7388 /libs/hwloc
parentefb7d0be6dd7882748d337391c5568d829bf17f5 (diff)
hwloc: add new package
Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'libs/hwloc')
-rw-r--r--libs/hwloc/Makefile92
1 files changed, 92 insertions, 0 deletions
diff --git a/libs/hwloc/Makefile b/libs/hwloc/Makefile
new file mode 100644
index 000000000..bf2dbfa64
--- /dev/null
+++ b/libs/hwloc/Makefile
@@ -0,0 +1,92 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=hwloc
+PKG_VERSION:=2.0.1
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://download.open-mpi.org/release/$(PKG_NAME)/v2.0/
+PKG_HASH:=f1156df22fc2365a31a3dc5f752c53aad49e34a5e22d75ed231cd97eaa437f9d
+
+PKG_LICENSE:=BSD-3-Clause
+PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
+PKG_INSTALL:=1
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/hwloc/Default
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Portable Hardware Locality
+ URL:=https://www.open-mpi.org/projects/hwloc/
+endef
+
+define Package/hwloc/Default/description
+ The Portable Hardware Locality (hwloc) software package provides a
+ portable abstraction (across OS, versions, architectures, ...) of the
+ hierarchical topology of modern architectures, including NUMA memory
+ nodes, sockets, shared caches, cores and simultaneous multithreading. It
+ also gathers various system attributes such as cache and memory
+ information as well as the locality of I/O devices such as network
+ interfaces, InfiniBand HCAs or GPUs.
+endef
+
+define Package/hwloc-utils
+$(call Package/hwloc/Default)
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE+= utilities
+ DEPENDS+= +libhwloc
+endef
+
+define Package/hwloc-utils/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc utilities.
+endef
+
+define Package/libhwloc
+$(call Package/hwloc/Default)
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE+= libraries
+endef
+
+define Package/libhwloc/description
+$(call Package/hwloc/Default/description)
+ This package contains the hwloc libraries.
+endef
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc.h $(STAGING_DIR)/usr/include/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/*.h $(STAGING_DIR)/usr/include/hwloc/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/include/hwloc/autogen
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/hwloc/autogen/*.h $(STAGING_DIR)/usr/include/hwloc/autogen/
+ $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib* $(STAGING_DIR)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+ $(INSTALL_DATA) \
+ $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc \
+ $(1)/usr/lib/pkgconfig
+endef
+
+define Package/hwloc-utils/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+endef
+
+define Package/libhwloc/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,hwloc-utils))
+$(eval $(call BuildPackage,libhwloc))