summaryrefslogtreecommitdiff
path: root/gnu/packages/android.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/android.scm')
-rw-r--r--gnu/packages/android.scm56
1 files changed, 26 insertions, 30 deletions
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 016943e0f0..dad111472a 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -4,12 +4,13 @@
;;; Copyright © 2016, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2017 Hartmut Goebel <h.goebel@crazy-compilers.com>
-;;; Copyright © 2017, 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2019, 2020 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2020 Sergey Trofimov <sarg@sarg.org.ru>
+;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,6 +30,7 @@
(define-module (gnu packages android)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system android-ndk)
#:use-module (guix build-system gnu)
@@ -360,10 +362,12 @@ various Android core host applications.")
(arguments
`(#:tests? #f ; Test failure: sysdeps_poll.fd_count
#:make-flags
- (list "CFLAGS=-Wno-error"
- "CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
- (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib "
- "-Wl,-rpath=" (assoc-ref %build-inputs "openssl") "/lib -L ."))
+ ,#~(list
+ "CFLAGS=-Wno-error"
+ "CXXFLAGS=-fpermissive -Wno-error -std=gnu++14 -D_Nonnull= -D_Nullable= -I ."
+ (string-append
+ "LDFLAGS=-Wl,-rpath=" #$output "/lib "
+ "-Wl,-rpath=" #$(this-package-input "openssl") "/lib -L ."))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
@@ -530,29 +534,25 @@ the core SELinux management utilities.")
(build-system android-ndk-build-system)
(arguments
`(#:make-flags
- (list (string-append "CPPFLAGS="
- ;"-Wno-error "
- "-I "
- (assoc-ref %build-inputs "android-libselinux")
- "/include "
- "-I " (assoc-ref %build-inputs "android-libsparse")
- "/include "
- "-I " (assoc-ref %build-inputs "android-libcutils")
- "/include "
- "-I " (assoc-ref %build-inputs "android-liblog") "/include "
- "-I ../core/include")
- "CFLAGS=-Wno-error"
- "install-libext4_utils_host.a"
- (string-append "prefix=" (assoc-ref %outputs "out")))
+ ,#~(list
+ (string-append
+ "CPPFLAGS="
+ ;"-Wno-error "
+ "-I " #$(this-package-input "android-libselinux") "/include "
+ "-I " #$(this-package-input "android-libsparse") "/include "
+ "-I " #$(this-package-input "android-libcutils") "/include "
+ "-I " #$(this-package-input "android-liblog") "/include "
+ "-I ../core/include")
+ "CFLAGS=-Wno-error"
+ "install-libext4_utils_host.a"
+ (string-append "prefix=" #$output))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-core
(lambda* (#:key inputs #:allow-other-keys)
(mkdir-p "core")
- (with-directory-excursion "core"
- (invoke "tar" "axf" (assoc-ref inputs "android-core")
- "--strip-components=1"))
- #t))
+ (copy-recursively (assoc-ref inputs "android-core")
+ "core")))
(add-after 'unpack-core 'enter-source
(lambda _ (chdir "ext4_utils") #t))
(replace 'install
@@ -585,6 +585,9 @@ Android core.")
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
(lambda _ (chdir "f2fs_utils") #t))
+ (add-before 'build 'set-compilation-flags
+ (lambda _
+ (setenv "CFLAGS" "-fcommon")))
(add-after 'install 'install-headers
(lambda* (#:key inputs outputs #:allow-other-keys)
(copy-recursively "." (string-append (assoc-ref outputs "out")
@@ -1025,13 +1028,6 @@ connected devices via ADB.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'enjarify-wrapper-inherit-pythonpath
- ;; enjarify sets PYTHONPATH from a shell script, overwriting
- ;; PYTHONPATH set from guix. Comment out this line.
- (lambda _
- (substitute* "enjarify.sh"
- (("export PYTHONPATH") "# export PYTHONPATH"))
- #t))
(add-before 'check 'fixup-expected-test-results
;; Upstream adjusted this test in commit:
;; 3ae884a6485af82d300515813f537685b08dd800