gnu: fastboot: Simplify package.

* gnu/packages/android.scm (fastboot)[source]: Use android-platform-system-core.
[arguments]<#:phases>[unpack]: Remove.
<#:phases>[enter-source]: Modify.
<#:phases>[patch-source]: New phase.
[native-inputs]: Remove core, extras.
This commit is contained in:
Danny Milosavljevic 2018-05-10 04:13:00 +02:00
parent f546fcb4f9
commit 8297f01ee0
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
1 changed files with 8 additions and 15 deletions

View File

@ -586,25 +586,20 @@ Android core.")
(package (package
(name "fastboot") (name "fastboot")
(version (android-platform-version)) (version (android-platform-version))
(source #f) (source (android-platform-system-core version))
(build-system android-ndk-build-system) (build-system android-ndk-build-system)
(arguments (arguments
`(#:make-flags (list "CXXFLAGS=-std=gnu++11") `(#:make-flags (list "CXXFLAGS=-std=gnu++11")
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace 'unpack
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "core")
(with-directory-excursion "core"
(invoke "tar" "axf" (assoc-ref inputs "core") "--strip-components=1")
(substitute* "fastboot/Android.mk"
(("libext4_utils_host") "libext4_utils_host libselinux libpcre")))
(copy-recursively (assoc-ref inputs "extras") "extras"
#:keep-mtime? #t)
#t))
(add-after 'unpack 'enter-source (add-after 'unpack 'enter-source
(lambda _ (lambda _
(chdir "core/fastboot") (chdir "fastboot")
#t))
(add-after 'enter-source 'patch-source
(lambda _
(substitute* "Android.mk"
(("libext4_utils_host") "libext4_utils_host libselinux libpcre"))
#t)) #t))
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
@ -629,9 +624,7 @@ Android core.")
("mkbootimg" ,mkbootimg) ("mkbootimg" ,mkbootimg)
("zlib" ,zlib))) ("zlib" ,zlib)))
(native-inputs (native-inputs
`(("core" ,(android-platform-system-core version)) `(("xz" ,xz)))
("extras" ,(android-platform-system-extras version))
("xz" ,xz)))
(home-page "https://developer.android.com/studio/command-line/") (home-page "https://developer.android.com/studio/command-line/")
(synopsis "Android image flasher") (synopsis "Android image flasher")
(description (description