Skip to content
Snippets Groups Projects
Verified Commit 947319e1 authored by FARGES Olivier's avatar FARGES Olivier
Browse files

debug star-sp

parent 6d1041f1
No related branches found
No related tags found
No related merge requests found
(define-module (edix packages random123) (define-module (random123)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix git-download) #:use-module (guix download)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix git-download)
#:use-module (guix licenses) #:use-module (guix licenses)
#:use-module (guix utils)
#:use-module (guix build-system cmake)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages gcc) #:use-module (gnu packages gcc)
#:use-module (gnu packages documentation) #:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)) #:use-module (gnu packages bash)
#:use-module (gnu packages documentation)
#:use-module (gnu packages version-control)) ;; Ajout de `git`
(define-public random123 (define-public random123
(package (package
(name "random123") (name "random123")
(version "v1.14.0") ; Modifier selon la version disponible (version "1.14.0") ; Modifier selon la version disponible
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/DEShawResearch/random123.git") (url "https://github.com/DEShawResearch/random123.git")
(commit version))) (commit "v1.14.0")))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 "1awsf27k3mrp8rlc6wqzm2a5lndggp18fvzir395b3hljyx45bxg")))) ; Remplacer par la vraie somme SHA256 (base32 "1awsf27k3mrp8rlc6wqzm2a5lndggp18fvzir395b3hljyx45bxg"))))
(build-system gnu-build-system) (build-system gnu-build-system)
; (arguments '(#:tests? #f)) ; Désactiver les tests s'il n'y en a pas
(native-inputs '()) (native-inputs (list git pkg-config doxygen))
(inputs (list gcc doxygen)) (arguments
(arguments `(#:tests? #f
`(#:tests? #f ; Désactiver les tests s'il n'y en a pas #:phases
#:phases (modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) ; Pas de configuration nécessaire (delete 'configure)
(replace 'install ;(replace 'install
(lambda* (#:key outputs #:allow-other-keys) ; (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) ; (let* ((out (assoc-ref outputs "out"))
(mkdir-p (string-append out "/include")) ; (include-dir (string-append out "/include"))
(mkdir-p (string-append out "/lib")) ; (pkgconfig-dir (string-append out "/lib/pkgconfig"))
(mkdir-p (string-append out "/bin")) ; (pc-file (string-append pkgconfig-dir "/random123.pc")))
(copy-recursively "include" (string-append out "/include")) ;; Créer les dossiers d'installation
(copy-recursively "lib" (string-append out "/lib")) ;(mkdir-p include-dir)
(copy-recursively "bin" (string-append out "/bin")))))))) ;(mkdir-p pkgconfig-dir)
(home-page "https://www.deshawresearch.com/resources_random123.html") ;; Copier les fichiers d'en-tête
(synopsis "Bibliothèque de générateurs de nombres pseudo-aléatoires") ;(copy-recursively "include" include-dir)
(description "Random123 est une bibliothèque pour des générateurs de nombres pseudo-aléatoires (PRNG) rapides et parallélisables.") ;; Générer `random123.pc` directement dans `pkgconfig-dir`
;(call-with-output-file pc-file
; (lambda (port)
; (format port "prefix=~a\n" out)
; (format port "includedir=${prefix}/include\n\n")
; (format port "Name: Random123\n")
; (format port "Description: Counter-Based Random Number Generators\n")
; (format port "Version: 0.14~%\n\n")
; (format port "Cflags: -I${includedir}\n")))
;(format #t "✔ Fichier random123.pc généré avec succès à ~a\n" pc-file)
; ))))
;(replace 'install
; (lambda* (#:key outputs #:allow-other-keys)
; (let ((out (assoc-ref outputs "out")))
;; Correction : forcer PREFIX et DESTDIR
; (invoke "make" "install"
; (string-append "PREFIX=" out)
; (string-append "DESTDIR=" out)))))
; (replace 'install
; (lambda* (#:key outputs #:allow-other-keys)
; (let ((out (assoc-ref outputs "out")))
; (invoke "make" "install" (string-append "PREFIX=" out)))))
(replace 'build
(lambda _
(let* ((version ,version)
(tag (string-append "v" ,version)))
;; Générer `random123.mk.in` manuellement
(call-with-output-file "random123.mk.in"
(lambda (port)
(format port "PREFIX=@PREFIX@\n")
(format port "includedir=${PREFIX}/include\n")
(format port "\n")
(format port "Name: Random123\n")
(format port "Description: Counter-Based Random Number Generators\n")
(format port "Version: ~a\n\n" version)
(format port "Cflags: -I${includedir}\n")))
;; Générer `Makefile`
(invoke "sh" "-c"
(string-append "sed -e 's/@TAG@/" tag "/' -e 's/@VERSION@/" version "/' random123.mk.in > Makefile"))
;; Compiler
(invoke "make"))))
;(replace 'install
; (lambda* (#:key outputs #:allow-other-keys)
; (let* ((out (assoc-ref outputs "out"))
; (include-dir (string-append out "/include"))
; (pkgconfig-dir (string-append out "/lib/pkgconfig"))
; (pc-file (string-append pkgconfig-dir "/random123.pc")))
; (mkdir-p include-dir)
; (mkdir-p pkgconfig-dir)
;; Exécuter `make install` avec `PREFIX` et `DESTDIR`
; (invoke "make" "install"
; (string-append "PREFIX=" out)
; (string-append "DESTDIR=" out))
;; Vérifier si `include/` a bien été installé, sinon le copier manuellement
; (if (not (file-exists? (string-append include-dir "/Random123")))
; (begin
; (format #t "⚠ `make install` n'a pas installé `include/`, copie manuelle...\n")
; (copy-recursively "include" include-dir))
; (format #t "✔ `include/` installé avec `make install`\n"))
;; Générer `random123.pc`
; (call-with-output-file pc-file
; (lambda (port)
; (format port "prefix=~a\n" out)
; (format port "includedir=${prefix}/include\n\n")
; (format port "Name: Random123\n")
; (format port "Description: Counter-Based Random Number Generators\n")
; (format port "Version: ~a\n\n" ,version)
; (format port "Cflags: -I${includedir}\n")))
; (format #t "✔ Installation réussie : `random123.pc` généré et installé dans ~a\n" pc-file)))))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(invoke "make" "install" (string-append "PREFIX=" out ) (string-append "DESTDIR=" out))))))))
(synopsis "Bibliothèque de générateurs de nombres aléatoires contre-basés")
(description "Random123 est une bibliothèque fournissant des générateurs de nombres aléatoires hautes performances.")
(home-page "https://github.com/DEShawResearch/random123")
(license bsd-3))) (license bsd-3)))
random123
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (edix packages rsys)) #:use-module (edix packages rsys))
(define-public star-vx (define-public star-vx
(package (package
(name "star-vx") (name "star-vx")
...@@ -29,27 +28,18 @@ ...@@ -29,27 +28,18 @@
(base32 "11lcs6lhbjdizrf3chjg6mlnsp89h558vdml3l8vz3a6scgblzg2")))) (base32 "11lcs6lhbjdizrf3chjg6mlnsp89h558vdml3l8vz3a6scgblzg2"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
(list pkg-config autoconf automake libtool)) (list pkg-config autoconf automake libtool gcc gnu-make))
(inputs (propagated-inputs (list rsys))
(list gcc
gfortran
bash
gnu-make rsys
))
(arguments (arguments
`(#:make-flags (list (string-append "CC=gcc" )) `(#:make-flags (list (string-append "CC=gcc" ))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(delete 'configure) (delete 'configure)
(delete 'check) (delete 'check)
(replace 'build
(lambda* (#:key make-flags #:allow-other-keys)
(invoke "make" (string-join make-flags " "))))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(invoke "make" "install" (string-append "PREFIX=" out)))))))) (invoke "make" "install" (string-append "PREFIX=" out))))))))
(home-page "https://meso-star.com/star-vx") ;; Remplacez avec le bon lien (home-page "https://meso-star.com/star-vx") ;; Remplacez avec le bon lien
(synopsis "Bibliothèque Star-VX") (synopsis "Bibliothèque Star-VX")
(description "Star-VX est une bibliothèque de traitement de structures de données arborescentes.") (description "Star-VX est une bibliothèque de traitement de structures de données arborescentes.")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment