mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: glm: Update to 1.0.1.
* gnu/packages/maths.scm (glm): Update to 1.0.1. Apply a list style. [source]: Switch to git-fetch. [arguments] <phases>: Remove 'set-environment as <https://github.com/g-truc/glm/pull/1087> is resolved. Use default 'install as <https://github.com/g-truc/glm/pull/968> is resolved. Add 'post-install. Change-Id: Ibda3768102ac94f6ef69057bfccd8716f7f91d0e
This commit is contained in:
parent
40015f816d
commit
41b2716442
1 changed files with 23 additions and 34 deletions
|
@ -7192,50 +7192,39 @@ with C89.")
|
||||||
(define-public glm
|
(define-public glm
|
||||||
(package
|
(package
|
||||||
(name "glm")
|
(name "glm")
|
||||||
(version "0.9.9.8")
|
(version "1.0.1")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (string-append "https://github.com/g-truc/glm/releases/download/"
|
(uri (git-reference
|
||||||
version "/glm-" version ".zip"))
|
(url "https://github.com/g-truc/glm")
|
||||||
|
(commit version)))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32 "0k6yk9v46h690rshdx49x98y5qspkzibld1wb51jwcm35vba7qip"))))
|
(base32 "0890rvv3czi3nqj11dc2m3wcdfv0dm0nr63wfcpfikk9sk6b4w8s"))))
|
||||||
(build-system cmake-build-system)
|
(build-system cmake-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases (modify-phases %standard-phases
|
(list
|
||||||
(add-before 'configure 'set-environment
|
#:phases
|
||||||
(lambda _
|
#~(modify-phases %standard-phases
|
||||||
;; Pass "-fno-ipa-modref" flag to the compiler to work
|
(add-after 'install 'post-install
|
||||||
;; around a test failure with GCC 11. This is a
|
(lambda _
|
||||||
;; header-only library so these flags only affect tests.
|
(let* ((doc (string-append #$output "/share/doc/glm"))
|
||||||
;; See <https://github.com/g-truc/glm/pull/1087>.
|
(pkgconfig (string-append #$output "/lib/pkgconfig")))
|
||||||
(setenv "CXXFLAGS" "-O2 -g -fno-ipa-modref")))
|
(mkdir-p doc)
|
||||||
(replace 'install
|
(mkdir-p pkgconfig)
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(copy-recursively "../source/doc/api" (string-append doc "/html"))
|
||||||
;; Since version 0.9.9.6, 'make install' is not supported
|
(install-file "../source/doc/manual.pdf" doc)
|
||||||
;; and we have to do it "manually". Upstream discussion:
|
(call-with-output-file (string-append pkgconfig "/glm.pc")
|
||||||
;; <https://github.com/g-truc/glm/pull/968>.
|
(lambda (port)
|
||||||
(let* ((source (string-append "../glm"))
|
(format port
|
||||||
(out (assoc-ref outputs "out"))
|
"prefix=~a
|
||||||
(inc (string-append out "/include"))
|
|
||||||
(lib (string-append out "/lib"))
|
|
||||||
(pkgconfig (string-append lib "/pkgconfig")))
|
|
||||||
(with-directory-excursion source
|
|
||||||
(mkdir-p inc)
|
|
||||||
(mkdir-p pkgconfig)
|
|
||||||
(copy-recursively "glm" (string-append inc "/glm"))
|
|
||||||
(copy-recursively "cmake" (string-append lib "/cmake"))
|
|
||||||
(call-with-output-file (string-append pkgconfig "/glm.pc")
|
|
||||||
(lambda (port)
|
|
||||||
(format port
|
|
||||||
"prefix=~a
|
|
||||||
includedir=${prefix}/include
|
includedir=${prefix}/include
|
||||||
|
|
||||||
Name: GLM
|
Name: GLM
|
||||||
Description: OpenGL Mathematics
|
Description: OpenGL Mathematics
|
||||||
Version: ~a
|
Version: ~a
|
||||||
Cflags: -I${includedir}~%" out ,(version-prefix version 3)))))
|
Cflags: -I${includedir}~%" #$output #$version)))))))))
|
||||||
#t))))))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list unzip))
|
(list unzip))
|
||||||
(home-page "https://glm.g-truc.net/")
|
(home-page "https://glm.g-truc.net/")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue