termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.29k stars 3.06k forks source link

Package request: MOC #1637

Open ghost opened 7 years ago

ghost commented 7 years ago

MOC Player http://moc.daper.net/about

SDRausty commented 6 years ago

It looks like MOC is currently available in Termux through Arch Linux PRoot. This script is designed to install Arch Linux in just a few keystrokes. Tapping this link https://sdrausty.github.io/TermuxArch/setupTermuxArch.sh will transfer setupTermuxArch.sh to your device. Simply run bash ~/storage/downloads/setupTermuxArch.sh to install Arch Linux in Termux. To install use pacman -S moc and this will install MOF on device. More information at https://sdrausty.github.io/TermuxArch/

screenshot_20171203-080318

syslino commented 5 years ago

But a dedicated package would be nice. Arch proot is a bit of an overload for just one small cli app...

2E0PGS commented 5 years ago

Yes I would also like MOC on Termux. I am using MPV at the moment but miss the auto play features and easy TUI.

syslino commented 5 years ago

@2E0PGS I'm using cmus right now. Have a try, it's also using a TUI. Plus, it can be remote controlled.

2E0PGS commented 5 years ago

Thanks I'll give that a try. It's in the repository, nice.

On 21 Feb 2019, 05:20, at 05:20, Lino Quickels notifications@github.com wrote:

@2E0PGS I'm using cmus right now. Have a try, it's also using a TUI. Plus, it can be remote controlled.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/termux/termux-packages/issues/1637#issuecomment-465865778

2E0PGS commented 5 years ago

I get an audio output error. How did you overcome that issue with cmus on Termux?

⁣See attached screenshot.

On 21 Feb 2019, 08:17, at 08:17, Peter 2E0PGS 2e0pgs@gmail.com wrote:

Thanks I'll give that a try. It's in the repository, nice.

On 21 Feb 2019, 05:20, at 05:20, Lino Quickels notifications@github.com wrote:

@2E0PGS I'm using cmus right now. Have a try, it's also using a TUI. Plus, it can be remote controlled.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/termux/termux-packages/issues/1637#issuecomment-465865778

2E0PGS commented 5 years ago

Seems I need to install pulse.

⁣#821 #2354

On 21 Feb 2019, 10:18, at 10:18, Peter 2E0PGS 2e0pgs@gmail.com wrote:

I get an audio output error. How did you overcome that issue with cmus on Termux?

⁣See attached screenshot.

On 21 Feb 2019, 08:17, at 08:17, Peter 2E0PGS 2e0pgs@gmail.com wrote:

Thanks I'll give that a try. It's in the repository, nice.

On 21 Feb 2019, 05:20, at 05:20, Lino Quickels notifications@github.com wrote:

@2E0PGS I'm using cmus right now. Have a try, it's also using a TUI. Plus, it can be remote controlled.

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/termux/termux-packages/issues/1637#issuecomment-465865778

syslino commented 5 years ago

Yes, pulse. But that should be ab issue, as far as I remember it was an dependency.

jarun commented 5 years ago

@fornwall is moc packaged for Termux? I am not finding it.

I tried compiling it for my device this morning and I get the following error:

u0_a117@localhost ~/G/moc-2.5.2> ./configure
checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/applets/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for svnversion... no
checking build system type... ./config.guess: unable to guess system type

This script, last modified 2009-11-20, has failed to recognize
the operating system you are using. It is advised that you
download the most up to date version of the config scripts from

  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
and
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD

If the version you run (./config.guess) is already up to date, please
send the following data and any information you think might be
pertinent to <config-patches@gnu.org> in order to provide the needed
information to handle your system.

config.guess timestamp = 2009-11-20

uname -m = aarch64
uname -r = 4.4.95+
uname -s = Linux
uname -v = #2 SMP PREEMPT Wed Apr 24 00:47:34 CST 2019

/usr/bin/uname -p = 
/bin/uname -X     = 

hostinfo               = 
/bin/universe          = 
/usr/bin/arch -k       = 
/bin/arch              = 
/usr/bin/oslevel       = 
/usr/convex/getsysinfo = 

UNAME_MACHINE = aarch64
UNAME_RELEASE = 4.4.95+
UNAME_SYSTEM  = Linux
UNAME_VERSION = #2 SMP PREEMPT Wed Apr 24 00:47:34 CST 2019
configure: error: cannot guess build type; you must specify one
u0_a117@localhost ~/G/moc-2.5.2> ./configure --build=aarch64
checking for a BSD-compatible install... /data/data/com.termux/files/usr/bin/applets/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for svnversion... no
checking build system type... Invalid configuration `aarch64': machine `aarch64' not recognized
configure: error: /bin/sh ./config.sub aarch64 failed
jarun commented 5 years ago

My device details:

u0_a117@localhost ~/G/moc-2.5.2> uname -a
Linux localhost 4.4.95+ #2 SMP PREEMPT Wed Apr 24 00:47:34 CST 2019 aarch64 Android
ghost commented 5 years ago

is moc packaged for Termux? I am not finding it.

Since issue is open, moc is not packaged.

I get the following error:

Install package libtool and then replace config.sub and config.guess scripts. For example:

cp ${PREFIX}/share/libtool/build-aux/config.sub ./
cp ${PREFIX}/share/libtool/build-aux/config.guess ./
jarun commented 5 years ago

Since issue is open, moc is not packaged.

I get the sarcasm but it was hard to believe given the age of the defect.

I will try the steps.

jarun commented 5 years ago

Now I see a failure due to missing libiconv ~but it's installed~.

checking for iconv... no, consider installing GNU libiconv
configure: error: No iconv library found.
u0_a117@localhost ~/G/moc-2.5.2> pkg in libiconv
Hit:1 https://termux.net stable InRelease
Ign:2 https://dl.bintray.com/grimler/game-packages-21 games InRelease
Ign:3 https://dl.bintray.com/grimler/science-packages-21 science InRelease
Get:4 https://dl.bintray.com/grimler/game-packages-21 games Release [5344 B]
Hit:4 https://dl.bintray.com/grimler/game-packages-21 games Release
Get:5 https://dl.bintray.com/grimler/science-packages-21 science Release [5348 B]
Hit:5 https://dl.bintray.com/grimler/science-packages-21 science Release
Reading package lists... Done                         
Building dependency tree       
Reading state information... Done
10 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libiconv is already the newest version (1.16-2).
libiconv set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
u0_a117@localhost ~/G/moc-2.5.2>
jarun commented 5 years ago

Ignore the above. The dev lib was missing.

ghost commented 4 years ago

Added as disabled package in https://github.com/termux/termux-packages/commit/e6d5597acfafd5e13acc813deb918b566841591a.

It is compiling without issues but just not working:

~ $ mocp 
Running the server...

FATAL_ERROR: No valid sound driver!

FATAL_ERROR: Server exited!

Probably happens because Termux does not support ALSA (and will not as requires support from Android).

Let me know if there is a way to get it working properly without ALSA/OSS.

jarun commented 4 years ago

Looks like there is a workaround with Pulseaudio: https://moc.daper.net/node/360

jarun commented 4 years ago

I'll send a note to the MOC author and see if there's a definite route.

jarun commented 4 years ago

I received the following response from the author of MOC:

>
> Can you let us know how to make MOC work with Pulseaudio without any
> glitches?
> 
This is going to be a bit of a mixed bag.  I think the best way for me
to proceed is to comment on what's been raised in the comment thread
and then we'll see what's left.

   It looks like MOC is currently available in Termux through Arch Linux
   PRoot. This script is designed to install Arch Linux in just a few
   keystrokes.

I'm unfamiliar with Termux to the point that this is the first time I've
encountered it, so please forgive me if I miss something obvious.

   But a dedicated package would be nice. Arch proot is a bit of an
   overload for just one small cli app...

I'd agree with that.

   @2E0PGS I'm using cmus right now. Have a try, it's also using a TUI.
   Plus, it can be remote controlled.

We do have a plan to also make MOC remotely controllable via MPRIS2.

   Seems I need to install pulse.

So I'm assuming that the person posting this was trying to run MOC
without any sound subsystem intially and did not realise that such would
be required.

   Yes, pulse. But that should be ab issue, as far as I remember it was an
   dependency.

It's not a MOC dependancy.  MOC runs with ALSA, OSS, JACK and SNDIO.
It will support PulseAudio natively in the (hopefully not too distant)
future.  Meanwhile, most people use that PulseAudio ALSA emulation (as
detailed in that '360' thread on the MOC Forum) or the OSS emulation
(though few people are still using OSS).

The reason that PulseAudio is not already supported is that before
the contribution which implemented it in MOC was included, some issues
were found.  A subsequent patch to the contribution was received from
the original contributor.  However, that contributor had changed jobs in
the meantime and his new employer, Google, claimed copyright over the
patch and potentially the codebase in which it was included (at least,
we haven't been able to discount the latter).  So, we've had to wait
until the issues were rediscovered and the original solution forgotten
and reimplemented independantly.  We're not quite there yet.

   I tried compiling it for my device this morning and I get the following
   error:
   ...
   checking build system type... ./config.guess: unable to guess system type

   This script, last modified 2009-11-20, has failed to recognize
   the operating system you are using. It is advised that you
   download the most up to date version of the config scripts from
   ...
   config.guess timestamp = 2009-11-20

The 2009 date comes from the Autotools package I use when building the
source tarball.  I deliberately use a fairly old Autotools (and other
packages) so as to support the building of MOC on systems with backlevel
releases of those dependancies.  In this case, that Autotools version
is too old to have included Termux.

The correct way to build MOC in this case (and is what distribution
package maintainers whould be doing as a matter of course) is to start
with the first step under "How Do I Build and Install It?" in the
MOC README:

    autoreconf -if

This will ensure that the applicable Autotools framework is installed
into the MOC source tree from the build system.  In this case, it
means that it should recognise Termux.

      Install package libtool and then replace config.sub and config.guess
      scripts. For example:
      cp ${PREFIX}/share/libtool/build-aux/config.sub ./
      cp ${PREFIX}/share/libtool/build-aux/config.guess ./

Running 'autoreconf -if' would do this automatically.

   Now I see a failure due to missing libiconv [DEL: but it's installed
   checking for iconv... no, consider installing GNU libiconv
   configure: error: No iconv library found.

Running 'autoreconf -if' would also fix this as the AM_ICONV macro which
MOC uses would be sourced from the build system's Autoconf 'aclocal'
directory and therefore applicable to that system's packaging of iconv.

   Package seems does not support PulseAudio which is required
   for sound output in Termux.

No, and neither is PulseAudio listed as a supported sound subsystem in
the MOC README.  But others do successfully run it using PulseAudio by
using the ALSA/OSS emulation (as per the '360' thread).

(Actually, that thread is now over a decade old and I'm not sure if the
helper programs mentioned are still required.)

   Let me know if there is a way to get it working properly without
   ALSA/OSS.

   Looks like there is a workaround with Pulseaudio:
   https://moc.daper.net/node/360

It seems to work on other platforms.

Okay, so if you would like to consider my comments above and try out
those you find appropriate we can see where that gets us and where we
need to go from there.