From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBUav-0002nd-D1 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-0002E7-2w for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60060) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fBUat-0002Dz-0E 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 1fBUas-0006FB-Qr for guix-patches@gnu.org; Wed, 25 Apr 2018 20:17:02 -0400 Subject: [bug#31265] [PATCH 4/6] gnu: libbase: Use android-ndk-build-system. Resent-Message-ID: From: Danny Milosavljevic Date: Thu, 26 Apr 2018 02:15:58 +0200 Message-Id: <20180426001600.28974-4-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 (libbase)[build-system]: Switch to android-ndk-build-system. [arguments]<#:phases>[create-Makefile]: Delete phase. [arguments]<#:make-flags]: Add CXXFLAGS. --- gnu/packages/android.scm | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm index 7c131e7e8..09426058e 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")