M gnu/local.mk => gnu/local.mk +3 -0
@@ 967,6 967,9 @@ dist_patch_DATA = \
%D%/packages/patches/procmail-ambiguous-getline-debian.patch \
%D%/packages/patches/procmail-CVE-2014-3618.patch \
%D%/packages/patches/proot-test-fhs.patch \
+ %D%/packages/patches/psm-arch.patch \
+ %D%/packages/patches/psm-ldflags.patch \
+ %D%/packages/patches/psm-repro.patch \
%D%/packages/patches/pt-scotch-build-parallelism.patch \
%D%/packages/patches/pulseaudio-fix-mult-test.patch \
%D%/packages/patches/pulseaudio-longer-test-timeout.patch \
M gnu/packages/linux.scm => gnu/packages/linux.scm +42 -0
@@ 4410,3 4410,45 @@ exports the user-space API of OFI, and is typically the only software that
applications deal with directly. It works in conjunction with provider
libraries, which are often integrated directly into libfabric.")
(license (list license:bsd-2 license:gpl2)))) ;dual
+
+(define-public psm
+ (package
+ (name "psm")
+ (version "3.3.20170428")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference (url "http://github.com/01org/psm")
+ (commit "604758e76dc31e68d1de736ccf5ddf16cb22355b")))
+ (file-name (string-append "psm-" version ".tar.gz"))
+ (sha256
+ (base32 "0nsb325dmhn5ia3d2cnksqr0gdvrrx2hmvlylfgvmaqdpq76zm85"))
+ (patches (search-patches
+ "psm-arch.patch" ; uname -p returns "unknown" on Debian 9
+ "psm-ldflags.patch" ; build shared lib with LDFLAGS
+ "psm-repro.patch")))) ; reproducibility
+ (build-system gnu-build-system)
+ (inputs `(("libuuid" ,util-linux)))
+ (arguments
+ '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
+ ,(string-append "INSTALL_PREFIX=" %output)
+ ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
+ #:tests? #f
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'patch-/usr/include
+ (lambda _
+ (substitute* "Makefile"
+ (("\\$\\{DESTDIR}/usr/include")
+ (string-append %output "/include")))
+ (substitute* "Makefile"
+ (("/lib64") "/lib"))
+ #t)))))
+ (home-page "https://github.com/01org/psm")
+ (synopsis "Intel Performance Scaled Messaging (PSM) Libraries")
+ (description
+ "The PSM Messaging API, or PSM API, is Intel's low-level user-level
+communications interface for the True Scale family of products. PSM users are
+enabled with mechanisms necessary to implement higher level communications
+interfaces in parallel environments.")
+ (license (list license:bsd-2 license:gpl2)))) ;dual
A gnu/packages/patches/psm-arch.patch => gnu/packages/patches/psm-arch.patch +13 -0
@@ 0,0 1,13 @@
+Use 'uname -m', which in practice returns the processor architecture.
+
+--- psm-3.3/buildflags.mak~ 2014-08-20 21:00:18.000000000 +0100
++++ psm-3.3/buildflags.mak 2017-10-22 12:02:12.855291447 +0100
+@@ -38,7 +38,7 @@
+ endif
+
+ export os ?= $(shell uname -s | tr '[A-Z]' '[a-z]')
+-export arch := $(shell uname -p | sed -e 's,\(i[456]86\|athlon$$\),i386,')
++export arch := $(shell uname -m | sed -e 's,\(i[456]86\|athlon$$\),i386,')
+
+ CC ?= gcc
+
A gnu/packages/patches/psm-ldflags.patch => gnu/packages/patches/psm-ldflags.patch +13 -0
@@ 0,0 1,13 @@
+Add missing flags.
+
+--- psm-3.3/ipath/Makefile~ 1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/ipath/Makefile 2017-10-22 15:10:10.269177711 +0100
+@@ -73,7 +73,7 @@
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+ date +'static __attribute__ ((unused)) char __psc_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > _revision.c
+ $(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+- $(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared \
++ $(CC) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} $(LDFLAGS) -shared \
+ -Wl,--unique='*fastpath*' \
+ ${${TARGLIB}-objs} _revision.o $(LDFLAGS) $(if $(MIC:0=),$(SCIF_LINK_FLAGS))
+
A gnu/packages/patches/psm-repro.patch => gnu/packages/patches/psm-repro.patch +14 -0
@@ 0,0 1,14 @@
+Remove timestamp to support reproducible builds.
+
+--- psm-3.3/Makefile~ 1970-01-01 01:00:00.000000000 +0100
++++ psm-3.3/Makefile 2017-10-22 15:32:11.736949002 +0100
+@@ -326,7 +326,7 @@
+ # file around. Generate it such that the ident command can find it
+ # and strings -a | grep InfiniPath does a reasonable job as well.
+ ${TARGLIB}.so.${MAJOR}.${MINOR}: ${${TARGLIB}-objs}
+- date +'char psmi_infinipath_revision[] ="$$""Date: %F %R ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
++ echo 'char psmi_infinipath_revision[] ="$$""Date: 1970-01-01 00:00 ${rpm_extra_description}InfiniPath $$";' > ${lib_build_dir}/_revision.c
+ $(CC) -c $(BASECFLAGS) $(INCLUDES) _revision.c -o _revision.o
+ $(CC) $(LDFLAGS) -o $@ -Wl,-soname=${TARGLIB}.so.${MAJOR} -shared -Wl,--unique='*fastpath*' \
+ ${${TARGLIB}-objs} _revision.o -L$(build_dir)/ipath $(LDLIBS)
+