Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add packages: pianobar, libao #2641

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/libao/ao_private.h.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- ../cache/libao-1.2.2/include/ao/ao_private.h 2016-11-14 16:03:30.000000000 +0000
+++ ./include/ao/ao_private.h 2018-07-10 21:09:26.757188903 +0000
@@ -51,7 +51,7 @@
/* --- Constants --- */

#ifndef AO_SYSTEM_CONFIG
-#define AO_SYSTEM_CONFIG "/etc/libao.conf"
+#define AO_SYSTEM_CONFIG "/data/data/com.termux/files/user/etc/libao.conf"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use @TERMUX_PREFIX@ instead of data/data/com.termux/files/usr, it is sed'ed before the patch is applied in build-package.sh.

#endif
#ifndef AO_USER_CONFIG
#define AO_USER_CONFIG "/.libao"
24 changes: 24 additions & 0 deletions packages/libao/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
TERMUX_PKG_HOMEPAGE=https://www.xiph.org/ao/
TERMUX_PKG_DESCRIPTION="A cross platform audio library"
TERMUX_PKG_VERSION=1.2.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256=df8a6d0e238feeccb26a783e778716fb41a801536fe7b6fce068e313c0e2bf4d
TERMUX_PKG_SRCURL=https://github.com/xiph/libao/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="libpulseaudio"
TERMUX_PKG_BUILD_DEPENDS="libpulseaudio-dev"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-pulse"
TERMUX_PKG_CONFFILES="etc/libao.conf"

termux_step_pre_configure () {
./autogen.sh
local LIBAO_LDFLAGS+=" -lpulse"
}

termux_step_post_make_install () {
#genrate libao config file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny typo, generate

mkdir -p $TERMUX_PREFIX/etc/
cat << EOF > $TERMUX_PREFIX/etc/libao.conf
default_driver=pulse
quiet
EOF
}
67 changes: 67 additions & 0 deletions packages/libao/configure.ac.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
--- ../cache/libao-1.2.2/configure.ac 2016-11-14 16:03:30.000000000 +0800
+++ ./configure.ac 2018-07-11 00:42:17.741867477 +0800
@@ -38,7 +38,7 @@
AM_PROG_LIBTOOL

dnl ====================================
-dnl Check dlopen
+dnl Check dlopen
dnl ====================================

dnl Currently use this to disable plugin support dlfcn.h
@@ -113,8 +113,8 @@
*-mingw*|*-cygwin*)
LIBAO_LA_LDFLAGS="-no-undefined"
;;
- *)
- LIBAO_LA_LDFLAGS=""
+ *)
+ LIBAO_LA_LDFLAGS="-lpulse"
;;
esac
AC_SUBST(LIBAO_LA_LDFLAGS)
@@ -153,7 +153,7 @@
*hpux*)
DLOPEN_FLAG='(RTLD_LAZY)'
SHARED_LIB_EXT='.sl'
- ;;
+ ;;
*openbsd* | *netbsd* | *solaris2.7 | *darwin*)
DLOPEN_FLAG='(RTLD_LAZY)'
SHARED_LIB_EXT='.so'
@@ -196,7 +196,7 @@
AC_SUBST(SIZE32)

dnl ======================================
-dnl Disable default use of SLP in roar
+dnl Disable default use of SLP in roar
dnl until such time as SLP doesn't block
dnl indefinitely
dnl ======================================
@@ -214,7 +214,7 @@
AC_SUBST([SLP_DEF])

dnl ======================================
-dnl Detect possible output devices
+dnl Detect possible output devices
dnl ======================================

dnl Check for WMM
@@ -311,7 +311,7 @@
AC_DEFINE(BROKEN_OSS)
AC_MSG_WARN(Broken OSS API workaround enabled. See README for details.)
fi
-
+
dnl Check for Sun audio

have_sun="no";
@@ -426,7 +426,7 @@
AC_PATH_XTRA
AC_CHECK_LIB(Xau, XauFileName, have_nas=yes, have_nas=no, $X_LIBS)
AC_CHECK_LIB(audio, AuOpenServer, dummy="no-op", have_nas=no, -lXau $X_LIBS)
-
+
ac_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
AC_CHECK_HEADER(audio/audiolib.h, dummy="no-op", have_nas=no)
19 changes: 19 additions & 0 deletions packages/pianobar/Makefile.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
--- ../cache/pianobar-2018.06.22/Makefile 2018-06-22 14:57:26.000000000 +0800
+++ ./Makefile 2018-07-11 03:09:11.466864807 +0800
@@ -1,6 +1,6 @@
# makefile of pianobar

-PREFIX:=/usr/local
+PREFIX:=/data/data/com.termux/files/usr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same with the prefix here, please use @TERMUX_PREFIX@.

BINDIR:=${PREFIX}/bin
LIBDIR:=${PREFIX}/lib
INCDIR:=${PREFIX}/include
@@ -64,7 +64,7 @@
${LIBAV_CFLAGS} ${LIBCURL_CFLAGS} \
${LIBGCRYPT_CFLAGS} ${LIBJSONC_CFLAGS} \
${LIBAO_CFLAGS}
-ALL_LDFLAGS:=${LDFLAGS} -lpthread -lm \
+ALL_LDFLAGS:=${LDFLAGS} -lm \
${LIBAV_LDFLAGS} ${LIBCURL_LDFLAGS} \
${LIBGCRYPT_LDFLAGS} ${LIBJSONC_LDFLAGS} \
${LIBAO_LDFLAGS}
9 changes: 9 additions & 0 deletions packages/pianobar/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://6xq.net/pianobar/
TERMUX_PKG_DESCRIPTION="pianobar is a free/open-source, console-based client for the personalized online radio Pandora."
TERMUX_PKG_VERSION=2018.06.22
TERMUX_PKG_REVISION=1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to set TERMUX_PKG_REVISION for a new package (and counter starts from 0).

TERMUX_PKG_SHA256=a616ef70c04ceea8294caaba091d6a16bf35293bdc587151a235fb0e6a00ad90
TERMUX_PKG_SRCURL=https://github.com/PromyLOPh/pianobar/archive/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="libao, ffmpeg, libgcrypt, libcurl, json-c"
TERMUX_PKG_BUILD_DEPENDS="libao-dev, ffmpeg-dev, libgcrypt-dev, libcurl-dev, json-c-dev, pkg-config"
TERMUX_PKG_BUILD_IN_SRC=yes