all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
To: 52832@debbugs.gnu.org
Subject: [bug#52832] [PATCH 2/3] gnu: Add libetc1.
Date: Mon, 27 Dec 2021 21:15:04 +0100	[thread overview]
Message-ID: <3ccef8196e2ff1c09293b09a419169a7839730d3.1640635865.git.h.goebel@crazy-compilers.com> (raw)
In-Reply-To: <793e925b111667693a137f3c95b63a7736868db7.1640635864.git.h.goebel@crazy-compilers.com>

* 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





  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 ` Hartmut Goebel [this message]
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

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3ccef8196e2ff1c09293b09a419169a7839730d3.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 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.