unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add libvpx
@ 2014-06-26 12:18 David Thompson
  2014-06-26 12:59 ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: David Thompson @ 2014-06-26 12:18 UTC (permalink / raw)
  To: guix-devel

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

Here's a package recipe for libvpx, the VP8/VP9 codec.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-libvpx.patch --]
[-- Type: text/x-diff, Size: 2376 bytes --]

From 4cb60b3cac956caa5a8e11de077aceeefa417dc5 Mon Sep 17 00:00:00 2001
From: David Thompson <dthompson2@worcester.edu>
Date: Thu, 26 Jun 2014 08:16:07 -0400
Subject: [PATCH] gnu: Add libvpx.

* gnu/packages/video.scm (libvpx): New variable.
---
 gnu/packages/video.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index a824d5c..4b4fff8 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -17,7 +17,7 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages video)
-  #:use-module ((guix licenses) #:select (gpl2 gpl2+))
+  #:use-module ((guix licenses) #:select (gpl2 gpl2+ bsd-3))
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
@@ -368,3 +368,36 @@ Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, RealMedia, Matroska, NUT,
 NuppelVideo, FLI, YUV4MPEG, FILM, RoQ, PVA files.  One can watch VideoCD,
 SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.")
     (license gpl2)))
+
+(define-public libvpx
+  (package
+    (name "libvpx")
+    (version "1.3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://webm.googlecode.com/files/libvpx-v"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32
+                "1aai0h0z1bhp89pxmg4fkrwpmqq24k39fhr15cw6q77m9bccip6k"))))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:phases (alist-replace
+                 'configure
+                 (lambda* (#:key outputs #:allow-other-keys)
+                   (setenv "CONFIG_SHELL" (which "bash"))
+                   (let ((out (assoc-ref outputs "out")))
+                     (zero? (system* "./configure"
+                                     "--enable-shared"
+                                     "--as=yasm"
+                                     (string-append "--prefix=" out)))))
+                 %standard-phases)
+       #:tests? #f)) ; no check target
+    (native-inputs
+     `(("perl" ,perl)))
+    (inputs
+     `(("yasm" ,yasm)))
+    (synopsis "VP8/VP9 video codec")
+    (description "libvpx is a codec for the VP8/VP9 video compression format.")
+    (license bsd-3)
+    (home-page "http://www.webmproject.org/")))
-- 
2.0.0


[-- Attachment #3: Type: text/plain, Size: 136 bytes --]


-- 
David Thompson
Web Developer - Free Software Foundation - http://fsf.org
GPG Key: 0FF1D807
Support the FSF: https://fsf.org/donate

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

* Re: [PATCH] gnu: Add libvpx
  2014-06-26 12:18 [PATCH] gnu: Add libvpx David Thompson
@ 2014-06-26 12:59 ` Ludovic Courtès
  2014-06-26 13:04   ` Thompson, David
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-26 12:59 UTC (permalink / raw)
  To: David Thompson; +Cc: guix-devel

David Thompson <dthompson2@worcester.edu> skribis:

> From 4cb60b3cac956caa5a8e11de077aceeefa417dc5 Mon Sep 17 00:00:00 2001
> From: David Thompson <dthompson2@worcester.edu>
> Date: Thu, 26 Jun 2014 08:16:07 -0400
> Subject: [PATCH] gnu: Add libvpx.
>
> * gnu/packages/video.scm (libvpx): New variable.

LGTM, please push!

Ludo’.

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

* Re: [PATCH] gnu: Add libvpx
  2014-06-26 12:59 ` Ludovic Courtès
@ 2014-06-26 13:04   ` Thompson, David
  2014-06-26 13:56     ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Thompson, David @ 2014-06-26 13:04 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Thu, Jun 26, 2014 at 8:59 AM, Ludovic Courtès <ludo@gnu.org> wrote:
> David Thompson <dthompson2@worcester.edu> skribis:
>
>> From 4cb60b3cac956caa5a8e11de077aceeefa417dc5 Mon Sep 17 00:00:00 2001
>> From: David Thompson <dthompson2@worcester.edu>
>> Date: Thu, 26 Jun 2014 08:16:07 -0400
>> Subject: [PATCH] gnu: Add libvpx.
>>
>> * gnu/packages/video.scm (libvpx): New variable.
>
> LGTM, please push!
>
> Ludo’.

Awesome!  I just noticed that I should make yasm a native-input, since
it's only needed at build-time.  I'll make that change and push when I
get home from work.

Thanks!

- Dave

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

* Re: [PATCH] gnu: Add libvpx
  2014-06-26 13:04   ` Thompson, David
@ 2014-06-26 13:56     ` Ludovic Courtès
  2014-06-26 14:05       ` Thompson, David
  0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-26 13:56 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Thu, Jun 26, 2014 at 8:59 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>> David Thompson <dthompson2@worcester.edu> skribis:
>>
>>> From 4cb60b3cac956caa5a8e11de077aceeefa417dc5 Mon Sep 17 00:00:00 2001
>>> From: David Thompson <dthompson2@worcester.edu>
>>> Date: Thu, 26 Jun 2014 08:16:07 -0400
>>> Subject: [PATCH] gnu: Add libvpx.
>>>
>>> * gnu/packages/video.scm (libvpx): New variable.
>>
>> LGTM, please push!
>>
>> Ludo’.
>
> Awesome!  I just noticed that I should make yasm a native-input, since
> it's only needed at build-time.  I'll make that change and push when I
> get home from work.

Indeed, yes.

That said, when cross-compiling, there should in theory a cross-yasm
available.  That’s presumably not the case, so either way it’s not
cross-compilable, so no worries.

Ludo’.

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

* Re: [PATCH] gnu: Add libvpx
  2014-06-26 13:56     ` Ludovic Courtès
@ 2014-06-26 14:05       ` Thompson, David
  2014-06-26 14:30         ` Ludovic Courtès
  0 siblings, 1 reply; 6+ messages in thread
From: Thompson, David @ 2014-06-26 14:05 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

On Thu, Jun 26, 2014 at 9:56 AM, Ludovic Courtès <ludo@gnu.org> wrote:

> That said, when cross-compiling, there should in theory a cross-yasm
> available.  That’s presumably not the case, so either way it’s not
> cross-compilable, so no worries.

I hadn't thought about cross-compiling.  The libvpx readme says that
cross-compilation is possible:
http://www.webmproject.org/docs/vp8-sdk/readme.html

The configure script accepts a --target flag, so we could add it to
the configure phase.  There's no mention that yasm needs to be built a
certain way.  What do you think?

- Dave

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

* Re: [PATCH] gnu: Add libvpx
  2014-06-26 14:05       ` Thompson, David
@ 2014-06-26 14:30         ` Ludovic Courtès
  0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2014-06-26 14:30 UTC (permalink / raw)
  To: Thompson, David; +Cc: guix-devel

"Thompson, David" <dthompson2@worcester.edu> skribis:

> On Thu, Jun 26, 2014 at 9:56 AM, Ludovic Courtès <ludo@gnu.org> wrote:
>
>> That said, when cross-compiling, there should in theory a cross-yasm
>> available.  That’s presumably not the case, so either way it’s not
>> cross-compilable, so no worries.
>
> I hadn't thought about cross-compiling.  The libvpx readme says that
> cross-compilation is possible:
> http://www.webmproject.org/docs/vp8-sdk/readme.html
>
> The configure script accepts a --target flag, so we could add it to
> the configure phase.  There's no mention that yasm needs to be built a
> certain way.  What do you think?

It doesn’t hurt to put Yasm as a native input.  If it turns out that it
takes more than this to cross-compile, then we can fix things later.

So OK with Yasm as a native input.

Thanks for looking into that!

Ludo’.

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

end of thread, other threads:[~2014-06-26 14:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-26 12:18 [PATCH] gnu: Add libvpx David Thompson
2014-06-26 12:59 ` Ludovic Courtès
2014-06-26 13:04   ` Thompson, David
2014-06-26 13:56     ` Ludovic Courtès
2014-06-26 14:05       ` Thompson, David
2014-06-26 14:30         ` Ludovic Courtès

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).