* [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers.
@ 2021-12-27 20:11 Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 2/3] gnu: Add libetc1 Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
0 siblings, 2 replies; 5+ messages in thread
From: Hartmut Goebel @ 2021-12-27 20:11 UTC (permalink / raw)
To: 52832
* gnu/package/android.scm (android-platform-frameworks-native): New
function. (android-platform-frameworks-native-headers): New variables.
---
gnu/packages/android.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 5fa4e6c8e9..226d8259ff 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -190,6 +190,17 @@ use their packages mostly unmodified in our Android NDK build system.")
(base32
checksum))))
+(define (android-platform-frameworks-native version)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://android.googlesource.com/platform/frameworks/native")
+ (commit (string-append "android-" version))))
+ (file-name (string-append "android-platform-frameworks-native-"
+ version "-checkout"))
+ (sha256
+ (base32 "00dgx27wma7wzivniy8zyw2443fi2xx8gyxii081m0fwamqd3jrm"))))
+
(define-public android-liblog
(package
(name "android-liblog")
@@ -728,6 +739,31 @@ it.
to be passed to the @code{udev} service.")
(license license:gpl3+)))
+(define-public android-platform-frameworks-native-headers
+ (package
+ (name "android-platform-frameworks-native-headers")
+ (version (android-platform-version))
+ (source (android-platform-frameworks-native version))
+ (build-system trivial-build-system)
+ (arguments
+ `(#:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils))
+ (let ((source (assoc-ref %build-inputs "source"))
+ (include (string-append %output "/include/android")))
+ (mkdir-p include)
+ (copy-recursively (string-append source "/include/android")
+ (string-append include)) ; "/android"))
+ ))))
+ (home-page "https://android.googlesource.com/platform/frameworks/native/")
+ (synopsis "Headers for Android development from
+android-platform-frameworks-native")
+ (description "This package contains headers used for developing software
+for Android. More precicely the headers from include/android in
+platform/frameworks/native.")
+ (license license:asl2.0)))
+
(define-public git-repo
(package
(name "git-repo")
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#52832] [PATCH 2/3] gnu: Add libetc1.
2021-12-27 20:11 [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Hartmut Goebel
@ 2021-12-27 20:15 ` Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
1 sibling, 0 replies; 5+ messages in thread
From: Hartmut Goebel @ 2021-12-27 20:15 UTC (permalink / raw)
To: 52832
* gnu/packages/android.scm (libetc1): New variable.
---
gnu/packages/android.scm | 48 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 226d8259ff..31d388fd15 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -764,6 +764,54 @@ for Android. More precicely the headers from include/android in
platform/frameworks/native.")
(license license:asl2.0)))
+(define-public libetc1
+ (package
+ (name "libetc1")
+ (version (android-platform-version))
+ (source (android-platform-frameworks-native version))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f ; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'create-Makefile
+ (lambda _
+ ;; No useful makefile is shipped, so we create one.
+ (with-output-to-file "Makefile"
+ (lambda _
+ (display
+ (string-append
+ "NAME = libETC1\n"
+ "SOURCES = opengl/libs/ETC1/etc1.cpp\n"
+ "CXXFLAGS += -fPIC\n"
+ "CPPFLAGS += -Iopengl/include\n"
+ "LDFLAGS += -shared -Wl,-soname,$(NAME).so.0\n"
+ "$(NAME).so.0: $(SOURCES)\n"
+ " $(CXX) $^ -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)\n"
+ "build: $(NAME).so.0"))
+ #t))))
+ (add-after 'unpack 'remove-unused-stuff-to-reduce-warnings
+ (lambda _
+ (delete-file-recursively "opengl/libs/tools")))
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (include (string-append out "/include")))
+ (install-file "libETC1.so.0" lib)
+ (with-directory-excursion lib
+ (symlink "libETC1.so.0" "libETC1.so"))
+ (copy-recursively "opengl/include/ETC1"
+ (string-append include "/ETC1"))))))))
+ (home-page "https://android.googlesource.com/platform/frameworks/native/")
+ (synopsis "ETC1 compression library")
+ (description "Ericsson Texture Compression (ETC) is a lossy texture
+compression technique developed in collaboration with Ericsson Research in
+early 2005. libETC1 provides the encoding and decoding of ETC1 compression
+algorithm.")
+ (license license:asl2.0)))
+
(define-public git-repo
(package
(name "git-repo")
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#52832] [PATCH 3/3] gnu: Add etc1tool.
2021-12-27 20:11 [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 2/3] gnu: Add libetc1 Hartmut Goebel
@ 2021-12-27 20:15 ` Hartmut Goebel
2022-01-15 20:22 ` Hartmut Goebel
2022-01-15 21:36 ` [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Ludovic Courtès
1 sibling, 2 replies; 5+ messages in thread
From: Hartmut Goebel @ 2021-12-27 20:15 UTC (permalink / raw)
To: 52832
* gnu/packages/android.scm (android-platform-development, etc1tools):
New variables.
---
gnu/packages/android.scm | 65 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 31d388fd15..285ff85c3f 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -45,6 +45,7 @@
#:use-module (gnu packages gcc)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages golang)
+ #:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages linux)
#:use-module (gnu packages pcre)
@@ -190,6 +191,17 @@ use their packages mostly unmodified in our Android NDK build system.")
(base32
checksum))))
+(define (android-platform-development version)
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://android.googlesource.com/platform/development")
+ (commit (string-append "android-" version))))
+ (file-name (string-append "android-platform-development-"
+ version "-checkout"))
+ (sha256
+ (base32 "0s92961yycg8wsga40i7fvbfmf1a5i6j2gk64j2jiy7s0hfd4rc3"))))
+
(define (android-platform-frameworks-native version)
(origin
(method git-fetch)
@@ -812,6 +824,59 @@ early 2005. libETC1 provides the encoding and decoding of ETC1 compression
algorithm.")
(license license:asl2.0)))
+(define-public etc1tool
+ (package
+ (name "etc1tool")
+ (version (android-platform-version))
+ (source (android-platform-development version))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'create-Makefile
+ (lambda _
+ ;; No useful makefile is shipped, so we create one.
+ (with-output-to-file "Makefile"
+ (lambda _
+ (display
+ (string-append
+ "NAME = etc1tool\n"
+ "SOURCES = tools/etc1tool/etc1tool.cpp\n"
+ "CPPFLAGS += -Iinclude\n"
+ "LDFLAGS += -lpng -lETC1\n"
+ "$(NAME): $(SOURCES)\n"
+ " $(CXX) $^ -o $@ $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS)\n"
+ "build: $(NAME)"))
+ #t))))
+ (add-before 'build 'fix-typos-in-help
+ (lambda _
+ (substitute* "tools/etc1tool/etc1tool.cpp"
+ ((" apropriate ") " appropriate "))
+ #t))
+ ;; TODO: Add man-page from Debian
+ (delete 'configure)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "etc1tool" bin)))))))
+ (inputs
+ `(("libetc1" ,libetc1)
+ ("libpng" ,libpng)))
+ (home-page "https://developer.android.com/studio/command-line/etc1tool.html")
+ (synopsis "Encode and decode PNG images to resp. from the ETC1 compression
+standard.")
+ (description
+ "@command{etc1} is a command line utility that lets you encode PNG images
+to the ETC1 compression standard and decode ETC1 compressed images back to
+PNG. This tool is part of the Android SDK for working with media files for
+game apps.
+
+The standard for the ETC1 texture format can be found at
+@uref{http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt}.")
+ (license license:asl2.0)))
+
(define-public git-repo
(package
(name "git-repo")
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#52832] [PATCH 3/3] gnu: Add etc1tool.
2021-12-27 20:15 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
@ 2022-01-15 20:22 ` Hartmut Goebel
2022-01-15 21:36 ` [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Hartmut Goebel @ 2022-01-15 20:22 UTC (permalink / raw)
To: 52832-close, 52832
Pushed as 131e243546967d48b198fea359ded2fa7caf0c19
--
Regards
Hartmut Goebel
| Hartmut Goebel | h.goebel@crazy-compilers.com |
| www.crazy-compilers.com | compilers which you thought are impossible |
^ permalink raw reply [flat|nested] 5+ messages in thread
* [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers.
2021-12-27 20:15 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
2022-01-15 20:22 ` Hartmut Goebel
@ 2022-01-15 21:36 ` Ludovic Courtès
1 sibling, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2022-01-15 21:36 UTC (permalink / raw)
To: Hartmut Goebel; +Cc: 52832
Hi,
Some late comments:
Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:
> * gnu/packages/android.scm (android-platform-development, etc1tools):
> New variables.
[...]
> + (add-before 'build 'fix-typos-in-help
> + (lambda _
> + (substitute* "tools/etc1tool/etc1tool.cpp"
> + ((" apropriate ") " appropriate "))
> + #t))
You can now omit trailing #t (yay!).
> + (inputs
> + `(("libetc1" ,libetc1)
> + ("libpng" ,libpng)))
Make sure to run ‘./pre-inst-env guix style -S inputs’ on your packages.
> + (synopsis "Encode and decode PNG images to resp. from the ETC1 compression
> +standard.")
Please follow the guidelines and ‘guix lint’ warnings.
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-01-15 21:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-27 20:11 [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 2/3] gnu: Add libetc1 Hartmut Goebel
2021-12-27 20:15 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
2022-01-15 20:22 ` Hartmut Goebel
2022-01-15 21:36 ` [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Ludovic Courtès
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.