From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 52832@debbugs.gnu.org
Subject: [bug#52832] [PATCH 3/3] gnu: Add etc1tool.
Date: Mon, 27 Dec 2021 21:15:05 +0100 [thread overview]
Message-ID: <d9c2d29ae4dcb8dbff5e727173b09cb4af21cf2f.1640635865.git.h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <793e925b111667693a137f3c95b63a7736868db7.1640635864.git.h.goebel@crazy-compilers.com>
* 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
next prev parent reply other threads:[~2021-12-27 20:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-01-15 20:22 ` [bug#52832] [PATCH 3/3] gnu: Add etc1tool Hartmut Goebel
2022-01-15 21:36 ` [bug#52832] [PATCH 1/3] gnu: Add android-platform-frameworks-native-headers Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d9c2d29ae4dcb8dbff5e727173b09cb4af21cf2f.1640635865.git.h.goebel@crazy-compilers.com \
--to=h.goebel@crazy-compilers.com \
--cc=52832@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).