all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#42734] Export android-platform-system-core
@ 2020-08-07  0:44 Denis 'GNUtoo' Carikli
  2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
  2020-08-07 11:33 ` [bug#42734] Export android-platform-system-core Julien Lepiller
  0 siblings, 2 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-07  0:44 UTC (permalink / raw)
  To: 42734

[-- Attachment #1: Type: text/plain, Size: 256 bytes --]

Hi,

Here are two patches to export android-platform-system-core.

This way it can be used as a dependency like that:
> (native-inputs
> `(("android-core" ,(android-platform-system-core
>                    (android-platform-version)))))

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version.
  2020-08-07  0:44 [bug#42734] Export android-platform-system-core Denis 'GNUtoo' Carikli
@ 2020-08-07  2:10 ` Denis 'GNUtoo' Carikli
  2020-08-07  2:10   ` [bug#42734] [PATCH 2/2] gnu: android: Export android-platform-system-core Denis 'GNUtoo' Carikli
  2020-08-07  8:24   ` bug#42734: [PATCH 1/2] gnu: android: Export android-platform-version Mathieu Othacehe
  2020-08-07 11:33 ` [bug#42734] Export android-platform-system-core Julien Lepiller
  1 sibling, 2 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-07  2:10 UTC (permalink / raw)
  To: 42734; +Cc: Mathieu Othacehe, Denis 'GNUtoo' Carikli

* gnu/packages/android.scm (android-platform-version): Export it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
 gnu/packages/android.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index f7f3aca4a2..8a094d0827 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -126,7 +126,7 @@ use their packages mostly unmodified in our Android NDK build system.")
 ;; Big thanks to them for laying the groundwork.
 
 ;; The version tag is consistent between all repositories.
-(define (android-platform-version) "7.1.2_r36")
+(define-public (android-platform-version) "7.1.2_r36")
 
 (define (android-platform-system-core version)
   (origin
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [bug#42734] [PATCH 2/2] gnu: android: Export android-platform-system-core.
  2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
@ 2020-08-07  2:10   ` Denis 'GNUtoo' Carikli
  2020-08-07  8:24   ` bug#42734: [PATCH 1/2] gnu: android: Export android-platform-version Mathieu Othacehe
  1 sibling, 0 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-07  2:10 UTC (permalink / raw)
  To: 42734; +Cc: Mathieu Othacehe, Denis 'GNUtoo' Carikli

* gnu/packages/android.scm (android-platform-system-core): Export it.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
 gnu/packages/android.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 8a094d0827..544a65d0af 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -128,7 +128,7 @@ use their packages mostly unmodified in our Android NDK build system.")
 ;; The version tag is consistent between all repositories.
 (define-public (android-platform-version) "7.1.2_r36")
 
-(define (android-platform-system-core version)
+(define-public (android-platform-system-core version)
   (origin
     (method git-fetch)
     (uri (git-reference
-- 
2.28.0





^ permalink raw reply related	[flat|nested] 9+ messages in thread

* bug#42734: [PATCH 1/2] gnu: android: Export android-platform-version.
  2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
  2020-08-07  2:10   ` [bug#42734] [PATCH 2/2] gnu: android: Export android-platform-system-core Denis 'GNUtoo' Carikli
@ 2020-08-07  8:24   ` Mathieu Othacehe
  1 sibling, 0 replies; 9+ messages in thread
From: Mathieu Othacehe @ 2020-08-07  8:24 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 42734-done


Hello Denis,

>  ;; The version tag is consistent between all repositories.
> -(define (android-platform-version) "7.1.2_r36")
> +(define-public (android-platform-version) "7.1.2_r36")

We could turn this procedure into a variable.

Anyway, pushed those two patches,

Thanks,

Mathieu




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] Export android-platform-system-core
  2020-08-07  0:44 [bug#42734] Export android-platform-system-core Denis 'GNUtoo' Carikli
  2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
@ 2020-08-07 11:33 ` Julien Lepiller
  2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
  1 sibling, 1 reply; 9+ messages in thread
From: Julien Lepiller @ 2020-08-07 11:33 UTC (permalink / raw)
  To: 42734, GNUtoo

[-- Attachment #1: Type: text/plain, Size: 544 bytes --]

Unfortunately, android-platform-core should first be fixed to accept a hash as an argument, otherwise any other version will fail. Don't know why we haven't done that before…

On 2020年8月6日 20:44:23 GMT-04:00, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
>Hi,
>
>Here are two patches to export android-platform-system-core.
>
>This way it can be used as a dependency like that:
>> (native-inputs
>> `(("android-core" ,(android-platform-system-core
>>                    (android-platform-version)))))
>
>Denis.

[-- Attachment #2: Type: text/html, Size: 927 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] Export android-platform-system-core
  2020-08-07 11:33 ` [bug#42734] Export android-platform-system-core Julien Lepiller
@ 2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
  2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
  2020-08-10 13:50     ` Julien Lepiller
  0 siblings, 2 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-10  3:19 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 42734

[-- Attachment #1: Type: text/plain, Size: 2097 bytes --]

On Fri, 07 Aug 2020 07:33:03 -0400
Julien Lepiller <julien@lepiller.eu> wrote:

> Unfortunately, android-platform-core should first be fixed to accept
> a hash as an argument, otherwise any other version will fail. Don't
> know why we haven't done that before…

I don't understand what the hash would be here, nor the consequences
you describe. Do you have some pointers on the documentation or source
code that I should read to better understand that?

By the way I find it a bit strange to refer to have to manually extract 
android-platform-system-core to be able to refer its include path.

Beside the native-input, this results in the following code:
> #:make-flags (list (string-append "CFLAGS= "
>                                   "-I core/include "
> [...]))
>
> [...]
>
> #: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))
> [...])

Instead of just that:
> #:make-flags (list (string-append "CFLAGS= "
>                    "-I " (assoc-ref %build-inputs "android-core")
>                    "/include "))
> [...]))

Another potential improvement would be to remove the
android-platform-version argument completely and set version to it in
android.mk like that:
> (define-public (android-platform-system-core
> [...]
>  (version (android-platform-version))
> [...]

That would make the native-input look like that:
> (native-inputs
>  `(
>    ("android-core" ,android-platform-system-core)))

And if we need the version 9.0.0_r3 we could define a new package:
> (define-public android-platform-system-core-9
>   (package
>    (inherit android-platform-system-core)
>     (version "9.0.0_r3"))))

and use it:
> (native-inputs
>  `(
>    ("android-core" ,android-platform-system-core-9)))

Are both proposal a good idea? Or does it have any downsides that I
didn't think of?

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] Export android-platform-system-core
  2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
@ 2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
  2020-08-10  3:46       ` Denis 'GNUtoo' Carikli
  2020-08-10 13:50     ` Julien Lepiller
  1 sibling, 1 reply; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-10  3:27 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 42734

[-- Attachment #1: Type: text/plain, Size: 1080 bytes --]

On Mon, 10 Aug 2020 05:19:49 +0200
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:

> On Fri, 07 Aug 2020 07:33:03 -0400
> Julien Lepiller <julien@lepiller.eu> wrote:
> 
> > Unfortunately, android-platform-core should first be fixed to accept
> > a hash as an argument, otherwise any other version will fail. Don't
> > know why we haven't done that before…
> 
> I don't understand what the hash would be here, nor the consequences
> you describe. Do you have some pointers on the documentation or source
> code that I should read to better understand that?
> 
> By the way I find it a bit strange to refer to have to manually
> extract android-platform-system-core to be able to refer its include
> path.

> Instead of just that:
> > #:make-flags (list (string-append "CFLAGS= "
> >                    "-I " (assoc-ref %build-inputs "android-core")
> >                    "/include "))
> > [...]))
One way of doing that would be to create an android-system-core-header
package and reference that.

Does that look like a good idea?

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] Export android-platform-system-core
  2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
@ 2020-08-10  3:46       ` Denis 'GNUtoo' Carikli
  0 siblings, 0 replies; 9+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-08-10  3:46 UTC (permalink / raw)
  To: Julien Lepiller; +Cc: 42734

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

On Mon, 10 Aug 2020 05:27:50 +0200
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:

> One way of doing that would be to create an android-system-core-header
> package and reference that.
> 
> Does that look like a good idea?
I keep sending mails too fast.

Inside the tarball we have:
> $ ls  include/
> android  backtrace  binderwrapper  cutils  diskconfig  log  memtrack
> mincrypt  nativebridge  netutils  private  system  sysutils  usbhost
> utils  ziparchive

So that could be spitted somehow.

For instance include/log/ would be packaged in android-liblog for
instance.

Denis.

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#42734] Export android-platform-system-core
  2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
  2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
@ 2020-08-10 13:50     ` Julien Lepiller
  1 sibling, 0 replies; 9+ messages in thread
From: Julien Lepiller @ 2020-08-10 13:50 UTC (permalink / raw)
  To: Denis 'GNUtoo' Carikli; +Cc: 42734

[-- Attachment #1: Type: text/plain, Size: 3155 bytes --]

I think I confused a few things here. Currently android-platform-system-core is a procedure that takes a version number and returns an origin record (a source). However, that record hard-codes a hash, so if you specify a different version, the source can't be fetcged, as the hash mismatches.

It also includes patches that may not work with other versions, so I'm not sure why we allow to pass a version number in tge first place…

How about this:

android-platform-system-core is renamed to android-platform-system-core-source and takes a version, a hash and a list patch names.

android-platform-system-core is the result of calling this function with the default version, hash anl patch set.

The other source procedures should probably be fixed in the same way.

I also found out that android-liblog didn't install its headers. I'll fix that this evening if I remember.

On 2020年8月9日 23:19:49 GMT-04:00, Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:
>On Fri, 07 Aug 2020 07:33:03 -0400
>Julien Lepiller <julien@lepiller.eu> wrote:
>
>> Unfortunately, android-platform-core should first be fixed to accept
>> a hash as an argument, otherwise any other version will fail. Don't
>> know why we haven't done that before…
>
>I don't understand what the hash would be here, nor the consequences
>you describe. Do you have some pointers on the documentation or source
>code that I should read to better understand that?
>
>By the way I find it a bit strange to refer to have to manually extract
>
>android-platform-system-core to be able to refer its include path.
>
>Beside the native-input, this results in the following code:
>> #:make-flags (list (string-append "CFLAGS= "
>>                                   "-I core/include "
>> [...]))
>>
>> [...]
>>
>> #: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))
>> [...])
>
>Instead of just that:
>> #:make-flags (list (string-append "CFLAGS= "
>>                    "-I " (assoc-ref %build-inputs "android-core")
>>                    "/include "))
>> [...]))
>
>Another potential improvement would be to remove the
>android-platform-version argument completely and set version to it in
>android.mk like that:
>> (define-public (android-platform-system-core
>> [...]
>>  (version (android-platform-version))
>> [...]
>
>That would make the native-input look like that:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core)))
>
>And if we need the version 9.0.0_r3 we could define a new package:
>> (define-public android-platform-system-core-9
>>   (package
>>    (inherit android-platform-system-core)
>>     (version "9.0.0_r3"))))
>
>and use it:
>> (native-inputs
>>  `(
>>    ("android-core" ,android-platform-system-core-9)))
>
>Are both proposal a good idea? Or does it have any downsides that I
>didn't think of?
>
>Denis.

[-- Attachment #2: Type: text/html, Size: 4356 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-08-10 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-07  0:44 [bug#42734] Export android-platform-system-core Denis 'GNUtoo' Carikli
2020-08-07  2:10 ` [bug#42734] [PATCH 1/2] gnu: android: Export android-platform-version Denis 'GNUtoo' Carikli
2020-08-07  2:10   ` [bug#42734] [PATCH 2/2] gnu: android: Export android-platform-system-core Denis 'GNUtoo' Carikli
2020-08-07  8:24   ` bug#42734: [PATCH 1/2] gnu: android: Export android-platform-version Mathieu Othacehe
2020-08-07 11:33 ` [bug#42734] Export android-platform-system-core Julien Lepiller
2020-08-10  3:19   ` Denis 'GNUtoo' Carikli
2020-08-10  3:27     ` Denis 'GNUtoo' Carikli
2020-08-10  3:46       ` Denis 'GNUtoo' Carikli
2020-08-10 13:50     ` Julien Lepiller

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.