summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2018-04-26 02:15:58 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2018-05-09 19:16:21 +0200
commit11cb109baeda4ef7d7038ade3503e2041ea25c13 (patch)
tree1796a6dbb41d1bac1f147ceb77c53471c8d0e7d5 /gnu/packages
parent116c69d9fe4fcfc44d2b006d8c1754f7e872999b (diff)
downloadguix-11cb109baeda4ef7d7038ade3503e2041ea25c13.tar.gz
gnu: libbase: Use android-ndk-build-system.
* gnu/packages/android.scm (libbase)[build-system]: Switch to
android-ndk-build-system.
[arguments]<#:phases>[create-Makefile]: Delete phase.
[arguments]<#:make-flags]: Add CXXFLAGS.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/android.scm35
1 files changed, 3 insertions, 32 deletions
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 7c131e7e83..09426058e4 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -127,43 +127,14 @@ in Main, System, Radio and Events sub-logs.")
               (patches
                (search-patches "libbase-use-own-logging.patch"
                                "libbase-fix-includes.patch"))))
-    (build-system gnu-build-system)
+    (build-system android-ndk-build-system)
     (arguments
      `(#:tests? #f ; TODO.
+       #:make-flags '("CXXFLAGS=-std=gnu++11")
        #:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'enter-source
-           (lambda _ (chdir "base") #t))
-         (add-after 'enter-source 'create-Makefile
-           (lambda _
-             ;; No useful makefile is shipped, so we create one.
-             (with-output-to-file "Makefile"
-               (lambda _
-                 (display
-                  (string-append
-                   "NAME = libbase\n"
-                   "SOURCES = file.cpp logging.cpp parsenetaddress.cpp"
-                   " stringprintf.cpp strings.cpp errors_unix.cpp\n"
-
-                   "CXXFLAGS += -std=gnu++11 -fPIC\n"
-                   "CPPFLAGS += -Iinclude -I../include\n"
-                   "LDFLAGS += -shared -Wl,-soname,$(NAME).so.0"
-                   " -L.. -llog\n"
-
-                   "build: $(SOURCES)\n"
-                   "	$(CXX) $^ -o $(NAME).so.0 $(CXXFLAGS) $(CPPFLAGS)"
-                   " $(LDFLAGS)\n"))
-                 #t))))
-         (delete 'configure)
-         (replace 'install
-           (lambda* (#:key outputs #:allow-other-keys)
-             (let* ((out (assoc-ref outputs "out"))
-                    (lib (string-append out "/lib")))
-               (install-file "libbase.so.0" lib)
-               (with-directory-excursion lib
-                 (symlink "libbase.so.0" "libbase.so"))
-               (copy-recursively "include" out)
-               #t))))))
+           (lambda _ (chdir "base") #t)))))
     (inputs `(("liblog" ,liblog)))
     (home-page "https://developer.android.com/")
     (synopsis "Android platform base library")