me
/
guix
Archived
1
0
Fork 0

gnu: libx86emu: Format with 'guix style'.

* gnu/packages/virtualization.scm (libx86emu): Adjust package formatting
with 'guix style'.
Efraim Flashner 2023-07-09 12:24:43 +03:00
parent 7ba1626113
commit 8258e88878
No known key found for this signature in database
GPG Key ID: 41AAE7DCCA3D8351
1 changed files with 41 additions and 45 deletions

View File

@ -596,58 +596,54 @@ server and embedded PowerPC, and S390 guests.")
(name "libx86emu") (name "libx86emu")
(version "3.5") (version "3.5")
(home-page "https://github.com/wfeldt/libx86emu") (home-page "https://github.com/wfeldt/libx86emu")
(source (source (origin
(origin (method git-fetch)
(method git-fetch) (uri (git-reference
(uri (url home-page)
(git-reference (commit version)))
(url home-page) (file-name (git-file-name name version))
(commit version))) (sha256
(file-name (git-file-name name version)) (base32 "11nj3y7maz9ch15b1c2b69gd8d7mpaha377zpdbvfsmg5w9zz93l"))
(sha256 (modules '((guix build utils)))
(base32 "11nj3y7maz9ch15b1c2b69gd8d7mpaha377zpdbvfsmg5w9zz93l")) (snippet `(begin
(modules ;; Remove git2log program file.
'((guix build utils))) (delete-file "git2log")
(snippet ;; Remove variables that depends on git2log.
`(begin (substitute* "Makefile"
;; Remove git2log program file. (("GIT2LOG.*=.*$") "")
(delete-file "git2log") (("GITDEPS.*=.*$") "")
;; Remove variables that depends on git2log. (("BRANCH.*=.*$") ""))))))
(substitute* "Makefile"
(("GIT2LOG.*=.*$") "")
(("GITDEPS.*=.*$") "")
(("BRANCH.*=.*$") ""))))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:test-target "test" `(#:test-target "test"
;; sys/io.h is not present from glibc on non-x86 systems. ;; sys/io.h is not present from glibc on non-x86 systems.
#:tests? ,(and (target-x86?) #:tests? ,(and (target-x86?)
(not (%current-target-system))) (not (%current-target-system)))
#:phases #:phases (modify-phases %standard-phases
(modify-phases %standard-phases (add-after 'unpack 'patch
(add-after 'unpack 'patch (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 (string-append out "/include"))
(include (string-append out "/include")) (lib (string-append out "/lib")))
(lib (string-append out "/lib"))) ;; Correct the values of version and install directories.
;; Correct the values of version and install directories. (substitute* "Makefile"
(substitute* "Makefile" (("VERSION.*=.*$")
(("VERSION.*=.*$") (string-append "VERSION := "
(string-append "VERSION := " ,version "\n"))
,version "\n")) (("PREFIX.*=.*$")
(("PREFIX.*=.*$") (string-append "PREFIX := " out "\n"))
(string-append "PREFIX := " out "\n")) (("MAJOR_VERSION.*=.*$")
(("MAJOR_VERSION.*=.*$") (string-append "MAJOR_VERSION := "
(string-append "MAJOR_VERSION := " ,(version-major version) "\n"))
,(version-major version) "\n")) (("LIBDIR.*=.*$")
(("LIBDIR.*=.*$") (string-append "LIBDIR = " lib "\n"))
(string-append "LIBDIR = " lib "\n")) (("/usr/include")
(("/usr/include") include))))) include)))))
(delete 'configure)))) ; no configure script (delete 'configure)))) ;no configure script
(native-inputs (native-inputs (list nasm perl))
(list nasm perl))
(synopsis "Library for x86 emulation") (synopsis "Library for x86 emulation")
(description "Libx86emu is a small library to emulate x86 instructions. The (description
"Libx86emu is a small library to emulate x86 instructions. The
focus here is not a complete emulation but to cover enough for typical focus here is not a complete emulation but to cover enough for typical
firmware blobs. You can firmware blobs. You can
@enumerate @enumerate