me
/
guix
Archived
1
0
Fork 0

gnu: Add android-libziparchive.

* gnu/packages/android.scm (android-libziparchive): New variable.
* gnu/packages/patches/libziparchive-add-includes.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
master
Danny Milosavljevic 2018-04-26 02:23:29 +02:00
parent b98d447818
commit 16c2be0b42
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
3 changed files with 42 additions and 1 deletions

View File

@ -805,6 +805,7 @@ dist_patch_DATA = \
%D%/packages/patches/jq-CVE-2015-8863.patch \ %D%/packages/patches/jq-CVE-2015-8863.patch \
%D%/packages/patches/kdbusaddons-kinit-file-name.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \
%D%/packages/patches/khmer-use-libraries.patch \ %D%/packages/patches/khmer-use-libraries.patch \
%D%/packages/patches/libziparchive-add-includes.patch \
%D%/packages/patches/kiki-level-selection-crash.patch \ %D%/packages/patches/kiki-level-selection-crash.patch \
%D%/packages/patches/kiki-makefile.patch \ %D%/packages/patches/kiki-makefile.patch \
%D%/packages/patches/kiki-missing-includes.patch \ %D%/packages/patches/kiki-missing-includes.patch \

View File

@ -33,6 +33,7 @@
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages check) #:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages gnupg) #:use-module (gnu packages gnupg)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages ssh) #:use-module (gnu packages ssh)
@ -99,7 +100,8 @@ use their packages mostly unmodified in our Android NDK build system.")
(patches (patches
(search-patches "libbase-use-own-logging.patch" (search-patches "libbase-use-own-logging.patch"
"libbase-fix-includes.patch" "libbase-fix-includes.patch"
"adb-add-libraries.patch")))) "adb-add-libraries.patch"
"libziparchive-add-includes.patch"))))
(define liblog (define liblog
(package (package
@ -193,6 +195,34 @@ various Android core host applications.")
various Android core host applications.") various Android core host applications.")
(license license:asl2.0))) (license license:asl2.0)))
(define-public android-libziparchive
(package
(name "android-libziparchive")
(version (android-platform-version))
(source (android-platform-system-core version))
(build-system android-ndk-build-system)
(arguments
`(#:tests? #f ; TODO.
#:make-flags '("CFLAGS=-Wno-error"
"CXXFLAGS=-fpermissive -Wno-error -std=gnu++11")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'enter-source
(lambda _ (chdir "libziparchive") #t))
(add-after 'install 'install-headers
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(copy-recursively "../include/ziparchive"
(string-append out "/include/ziparchive"))
#t))))))
(inputs
`(("zlib" ,zlib)))
(home-page "https://developer.android.com/")
(synopsis "Android platform ZIP library")
(description "@code{android-libziparchive} is a library in common use by the
various Android core host applications.")
(license license:asl2.0)))
(define-public adb (define-public adb
(package (package
(name "adb") (name "adb")

View File

@ -0,0 +1,10 @@
--- a/libziparchive/zip_writer.cc 2018-04-25 22:33:05.472674164 +0200
+++ b/libziparchive/zip_writer.cc 2018-04-25 22:33:21.296519518 +0200
@@ -22,6 +22,7 @@
#include <sys/param.h>
+#include <cstring>
#include <cassert>
#include <cstdio>
#include <memory>