Skip to contentSkip to conversation

uclibc/defconfig: enable XSI math

PATCH New Gustavo Zacarias 3 participants 7 messages Apr 21, 2016 – Apr 23, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 uclibc/defconfig: enable XSI math

ARM926 size delta +12 KB.
It's required for the upcoming mpv package.

---
 package/uclibc/uClibc-ng.config | 1 +
 1 file changed, 1 insertion(+)
package/uclibc/uClibc-ng.config +1 -0
index 66de5a9..2671e06 100644
@@ -1,4 +1,5 @@
 DO_C99_MATH=y
+DO_XSI_MATH=y
 KERNEL_HEADERS="/usr/src/linux/include"
 # LDSO_CACHE_SUPPORT is not set
 # UCLIBC_STATIC_LDCONFIG is not set
Signature · 1 line
2.7.3
#1 lore raw

PATCH 2/2 mpv: new package

---
 package/Config.in                                  |   1 +
 ...ript-don-t-check-for-fork-on-POSIX-checks.patch |  31 +++
 package/mpv/Config.in                              |  15 ++
 package/mpv/mpv.hash                               |   3 +
 package/mpv/mpv.mk                                 | 255 +++++++++++++++++++++
 5 files changed, 305 insertions(+)
 create mode 100644 package/mpv/0001-wscript-don-t-check-for-fork-on-POSIX-checks.patch
 create mode 100644 package/mpv/Config.in
 create mode 100644 package/mpv/mpv.hash
 create mode 100644 package/mpv/mpv.mk
package/Config.in +1 -0
index c9081d0..bce37e8 100644
@@ -29,6 +29,7 @@ menu "Audio and video applications"
 	source "package/mpd-mpc/Config.in"
 	source "package/mpg123/Config.in"
 	source "package/mplayer/Config.in"
+	source "package/mpv/Config.in"
 	source "package/multicat/Config.in"
 	source "package/musepack/Config.in"
 	source "package/ncmpc/Config.in"
package/mpv/0001-wscript-don-t-check-for-fork-on-POSIX-checks.patch new file +31 -0
new file mode 100644
index 0000000..544c03c
@@ -0,0 +1,31 @@
+From 61aea32efe675e584121295452fc7ab2a652d021 Mon Sep 17 00:00:00 2001
+From: Gustavo Zacarias <[email protected]>
+Date: Wed, 20 Apr 2016 09:39:30 -0300
+Subject: [PATCH] wscript: don't check for fork() on POSIX checks
+
+It's not being used, and in fact prevents mpv from being built in nommu
+architectures (cortex M, blackfin, ...)
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+Status: pull request https://github.com/mpv-player/mpv/pull/3068
+
+ wscript | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript b/wscript
+index a4ffce6..40328e4 100644
+--- a/wscript
++++ b/wscript
+@@ -127,7 +127,7 @@ main_dependencies = [
+         'desc': 'POSIX environment',
+         # This should be good enough.
+         'func': check_statement(['poll.h', 'unistd.h', 'sys/mman.h'],
+-            'struct pollfd pfd; poll(&pfd, 1, 0); fork(); int f[2]; pipe(f); munmap(f,0)'),
++            'struct pollfd pfd; poll(&pfd, 1, 0); int f[2]; pipe(f); munmap(f,0)'),
+     }, {
+         'name': 'posix-or-mingw',
+         'desc': 'development environment',
+-- 
+2.7.3
+
package/mpv/Config.in new file +15 -0
new file mode 100644
index 0000000..87644cb
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_MPV
+	bool "mpv"
+	depends on BR2_TOOLCHAIN_HAS_THREADS
+	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG_SWSCALE
+	select BR2_PACKAGE_ZLIB
+	help
+	  mpv is a fork of mplayer2 and MPlayer. It shares some features
+	  with the former projects while introducing many more.
+
+	  https://mpv.io/
+
+comment "mpv needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/mpv/mpv.hash new file +3 -0
new file mode 100644
index 0000000..da51f3a
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256	602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e	v0.17.0.tar.gz
+sha256	01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b	waf-1.8.12
package/mpv/mpv.mk new file +255 -0

255 lines not on this page · raw message

Signature · 1 line
2.7.3
#2 lore raw

PATCH 2/2 mpv: new package

Quoted 13 lines · Gustavo Zacarias
---
  package/Config.in                                  |   1 +
  ...ript-don-t-check-for-fork-on-POSIX-checks.patch |  31 +++
  package/mpv/Config.in                              |  15 ++
  package/mpv/mpv.hash                               |   3 +
  package/mpv/mpv.mk                                 | 255 +++++++++++++++++++++
  5 files changed, 305 insertions(+)

create mode 100644 package/mpv/0001-wscript-don-t-check-for-fork-on-POSIX-checks.patch create mode 100644 package/mpv/Config.in
create mode 100644 package/mpv/mpv.hash
create mode 100644 package/mpv/mpv.mk

[snip]

package/mpv/Config.in line 3

Quoted 9 lines
package/mpv/Config.in new file +3 -0
new file mode 100644
index 0000000..87644cb
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_MPV
+	bool "mpv"
+	depends on BR2_TOOLCHAIN_HAS_THREADS

depends on !BR2_nios2 # ffmpeg

package/mpv/Config.in line 15

Quoted 12 lines
package/mpv/Config.in new file +12 -0
+	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
+	select BR2_PACKAGE_FFMPEG
+	select BR2_PACKAGE_FFMPEG_SWSCALE
+	select BR2_PACKAGE_ZLIB
+	help
+	  mpv is a fork of mplayer2 and MPlayer. It shares some features
+	  with the former projects while introducing many more.
+
+	  https://mpv.io/
+
+comment "mpv needs a toolchain w/ threads"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS

depends on !BR2_nios2

Quoted 16 lines
package/mpv/mpv.hash new file +3 -0
new file mode 100644
index 0000000..da51f3a
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256	602cd2b0f5fc7e43473234fbb96e3f7bbb6418f15eb8fa720d9433cce31eba6e	v0.17.0.tar.gz
+sha256	01bf2beab2106d1558800c8709bc2c8e496d3da4a2ca343fe091f22fca60c98b	waf-1.8.12
package/mpv/mpv.mk new file +1 -0
new file mode 100644
index 0000000..0032eb5
@@ -0,0 +1,255 @@
+################################################################################

package/mpv/mpv.mk line 11

Quoted 10 lines
package/mpv/mpv.mk new file +10 -0
+#
+# mpv
+#
+################################################################################
+
+MPV_VERSION = 0.17.0
+MPV_WAF_VERSION = 1.8.12
+MPV_SITE = https://github.com/mpv-player/mpv/archive
+MPV_SOURCE = v$(MPV_VERSION).tar.gz
+MPV_EXTRA_DOWNLOADS = https://waf.io/waf-$(MPV_WAF_VERSION)

Weird that an uploaded tarball doesn't include waf...

It may make sense to create a host-waf package that does downloads the
prebuilt self-extractor. This would allow us to remove the dependency on host-python for all the packages that use waf, because current waf supports python 2.5-3.5, which is plenty for us I think.

Otherwise looks good to me.

Regards,
Arnout

Quoted 5 lines
package/mpv/mpv.mk new file +5 -0
+MPV_DEPENDENCIES = \
+	host-pkgconf ffmpeg zlib \
+	$(if $(BR2_PACKAGE_LIBICONV),libiconv)
+MPV_LICENSE = GPLv2+
+MPV_LICENSE_FILES = LICENSE

[snip]

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 2/2 mpv: new package

Quoted 1 line · Arnout Vandecappelle

depends on !BR2_nios2 # ffmpeg

Ah yes, i'll update.

Quoted 9 lines

Weird that an uploaded tarball doesn't include waf...

It may make sense to create a host-waf package that does downloads the
prebuilt self-extractor. This would allow us to remove the dependency on host-python for all the packages that use waf, because current waf supports python 2.5-3.5, which is plenty for us I think.

Otherwise looks good to me.

They provide a bootstrap script that downloads it, but i consider it better that we handle that on our own/infra for obvious reasons. Regarding host-waf it's not really a good idea, essentially you've got several major waf versions say 1.6.x, 1.8.x and soon 1.9.x which aren't too drop-in compatible.
Even the mpv authors frowned upon upgrading the 1.8.12 preferred version with the latest 1.8.x (1.8.20) in their tracker (not from me, rather when looking about open issues/improvements).
And then there's samba which has an extended waf (wafsamba) and are stuck on the 1.6.x series because of that.
Regards.

#4 lore raw

PATCH 1/2 uclibc/defconfig: enable XSI math

In reply to Gustavo Zacarias
Quoted 2 lines · Gustavo Zacarias

ARM926 size delta +12 KB.
It's required for the upcoming mpv package.

Unfortunately the autobuilder toolchains don't have this enabled yet, so we'll
get failures...

The Blackfin toolchain does have this enabled, but the 2015.12 ARC toolchain
doesn't.

Anyway, it's probably a good idea to have this enabled by default.

Regards,
Arnout

Quoted 17 lines
---
  package/uclibc/uClibc-ng.config | 1 +
  1 file changed, 1 insertion(+)
package/uclibc/uClibc-ng.config +1 -0
index 66de5a9..2671e06 100644
@@ -1,4 +1,5 @@
  DO_C99_MATH=y
+DO_XSI_MATH=y
  KERNEL_HEADERS="/usr/src/linux/include"
  # LDSO_CACHE_SUPPORT is not set
  # UCLIBC_STATIC_LDCONFIG is not set
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#5 lore raw

PATCH 1/2 uclibc/defconfig: enable XSI math

Quoted 2 lines · Arnout Vandecappelle

Unfortunately the autobuilder toolchains don't have this enabled yet,
so we'll get failures...

Indeed, but at some point they'll need to update, the alternative would be artificially excluding mpv building with uclibc.

Quoted 2 lines

The Blackfin toolchain does have this enabled, but the 2015.12 ARC
toolchain doesn't.

We can exclude ARC i think, at least until/if the toolchain is updated, but maybe it doesn't make much sense for it.

Quoted 1 line

Anyway, it's probably a good idea to have this enabled by default.

Well, mpv is a nice replacement for mplayer which is actually maintained and has ton of new features, i've tested wayland/drm/x11/opengl outputs and it works just fine.
Regards.