From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52734) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBUav-0002nh-F2 for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBUat-0002Ep-IM for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60061) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBUat-0002EZ-F7 for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fBUat-0006FI-8O for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:03 -0400 Subject: [bug#31265] [PATCH 3/6] gnu: liblog: Use android-ndk-build-system. Resent-Message-ID: From: Danny Milosavljevic Date: Thu, 26 Apr 2018 02:15:57 +0200 Message-Id: <20180426001600.28974-3-dannym@scratchpost.org> In-Reply-To: <20180426001600.28974-1-dannym@scratchpost.org> References: <20180426001319.28848-1-dannym@scratchpost.org> <20180426001600.28974-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31265@debbugs.gnu.org * gnu/packages/android.scm (liblog)[build-system]: Switch to android-ndk-build-system. [arguments]<#:phases>[create-Makefile]: Delete phase. --- gnu/packages/android.scm | 37 +++---------------------------------- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 285a28515..7c131e7e8 100644 --- a/gnu/packages/android.scm +++ b/gnu/packages/android.scm @@ -27,6 +27,7 @@ #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system android-ndk) #:use-module (guix build-system python) #:use-module (guix build-system trivial) #:use-module ((guix licenses) #:prefix license:) @@ -101,46 +102,14 @@ use their packages mostly unmodified in our Android NDK build system.") (name "liblog") (version (android-platform-version)) (source (android-platform-system-core version)) - (build-system gnu-build-system) + (build-system android-ndk-build-system) (arguments `(#:tests? #f ; TODO. #:make-flags '("CC=gcc") #:phases (modify-phases %standard-phases (add-after 'unpack 'enter-source - (lambda _ (chdir "liblog") #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 = liblog\n" - "SOURCES = log_event_list.c log_event_write.c" - " logger_write.c config_write.c logger_name.c" - " logger_lock.c fake_log_device.c fake_writer.c" - " event_tag_map.c\n" - - "CFLAGS += -fvisibility=hidden -fPIC\n" - "CPPFLAGS += -I../include -DFAKE_LOG_DEVICE=1" - ;; Keep these two in sync with "liblog/Android.bp". - " -DLIBLOG_LOG_TAG=1005" - " -DSNET_EVENT_LOG_TAG=1397638484\n" - "LDFLAGS += -shared -Wl,-soname,$(NAME).so.0 -lpthread\n" - - "build: $(SOURCES)\n" - " $(CC) $^ -o $(NAME).so.0 $(CFLAGS) $(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 "liblog.so.0" lib) - (with-directory-excursion lib - (symlink "liblog.so.0" "liblog.so")) - #t)))))) + (lambda _ (chdir "liblog") #t))))) (home-page "https://developer.android.com/") (synopsis "Logging library from the Android platform.") (description "@code{liblog} represents an interface to the volatile Android