Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edix-channel
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FARGES Olivier
edix-channel
Commits
8a4ebeac
Verified
Commit
8a4ebeac
authored
3 months ago
by
FARGES Olivier
Browse files
Options
Downloads
Patches
Plain Diff
debug star-sp
parent
900f59c7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
edix/packages/random123.scm
+18
-86
18 additions, 86 deletions
edix/packages/random123.scm
with
18 additions
and
86 deletions
edix/packages/random123.scm
+
18
−
86
View file @
8a4ebeac
...
@@ -31,96 +31,28 @@
...
@@ -31,96 +31,28 @@
#
:phases
#
:phases
(
modify-phases
%standard-phases
(
modify-phases
%standard-phases
(
delete
'configure
)
(
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"
))
; (include-dir (string-append out "/include"))
(
include-dir
(
string-append
out
"/include"
))
; (pkgconfig-dir (string-append out "/lib/pkgconfig"))
(
pkgconfig-dir
(
string-append
out
"/lib/pkgconfig"
))
; (pc-file (string-append pkgconfig-dir "/random123.pc")))
(
pc-file
(
string-append
pkgconfig-dir
"/random123.pc"
)))
;; Créer les dossiers d'installation
; Créer les dossiers d'installation
;(mkdir-p include-dir)
(
mkdir-p
include-dir
)
;(mkdir-p pkgconfig-dir)
(
mkdir-p
pkgconfig-dir
)
;; Copier les fichiers d'en-tête
; Copier les fichiers d'en-tête
;(copy-recursively "include" include-dir)
(
copy-recursively
"include"
include-dir
)
;; Générer `random123.pc` directement dans `pkgconfig-dir`
; Générer `random123.pc` directement dans `pkgconfig-dir`
;(call-with-output-file pc-file
(
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
)
(
lambda
(
port
)
(
format
port
"PREFIX=@PREFIX@\n"
)
(
format
port
"prefix=~a\n"
out
)
(
format
port
"includedir=${PREFIX}/include\n"
)
(
format
port
"includedir=${prefix}/include\n\n"
)
(
format
port
"\n"
)
(
format
port
"Name: Random123\n"
)
(
format
port
"Name: Random123\n"
)
(
format
port
"Description: Counter-Based Random Number Generators\n"
)
(
format
port
"Description: Counter-Based Random Number Generators\n"
)
(
format
port
"Version:
~a\n\n"
version
)
(
format
port
"Version:
0.14~%\n\n"
)
(
format
port
"Cflags: -I${includedir}\n"
)))
(
format
port
"Cflags: -I${includedir}\n"
)))
(
format
#t
"✔ Fichier random123.pc généré avec succès à ~a\n"
pc-file
)
;; 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"
)
(
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."
)
(
description
"Random123 est une bibliothèque fournissant des générateurs de nombres aléatoires hautes performances."
)
(
home-page
"https://github.com/DEShawResearch/random123"
)
(
home-page
"https://github.com/DEShawResearch/random123"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment