From ab15bbea60413c8a2e7900a98b22c46adade34fb Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sun, 30 Aug 2020 14:15:07 +0300 Subject: gnu: sdsl-lite: Install pkgconfig file. * gnu/packages/datastructures.scm (sdsl-lite)[arguments]: Add custom 'install-pkgconfig-file phase to install sdsl-lite.pc. --- gnu/packages/datastructures.scm | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/gnu/packages/datastructures.scm b/gnu/packages/datastructures.scm index a9f30831ec..6121d63325 100644 --- a/gnu/packages/datastructures.scm +++ b/gnu/packages/datastructures.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2015, 2016, 2018, 2019 Ricardo Wurmus ;;; Copyright © 2016, 2017, 2019, 2020 Tobias Geerinckx-Rice ;;; Copyright © 2018 Meiyo Peng -;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2019, 2020 Efraim Flashner ;;; Copyright © 2020 Mark H Weaver ;;; ;;; This file is part of GNU Guix. @@ -236,14 +236,34 @@ to the structure and choosing one or more fields to act as the key.") "0m542xpys54bni29zibgrfpgpd0zgyny4h131virxsanixsbz52z"))))))) (build-system cmake-build-system) (arguments - '(#:phases + `(#:phases (modify-phases %standard-phases (add-after 'install 'install-static-library (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (copy-file "lib/libsdsl_static.a" (string-append out "/lib/libsdsl.a"))) - #t))))) + #t)) + (add-after 'install 'install-pkgconfig-file + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib"))) + (mkdir-p (string-append lib "/pkgconfig")) + (with-output-to-file (string-append lib "/pkgconfig/sdsl-lite.pc") + (lambda _ + (format #t "prefix=~a~@ + exec_prefix=${prefix}~@ + libdir=${exec_prefix}/lib~@ + includedir=${prefix}/include~@ + ~@ + ~@ + Name: sdsl~@ + Version: ~a~@ + Description: SDSL: Succinct Data Structure Library~@ + Libs: -L${libdir} -lsdsl -ldivsufsort -ldivsufsort64~@ + Cflags: -I${includedir}~%" + out ,version))) + #t)))))) (native-inputs `(("libdivsufsort" ,libdivsufsort))) (home-page "https://github.com/simongog/sdsl-lite") -- cgit 1.4.1