summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am8
-rw-r--r--NEWS6
-rw-r--r--android/AndroidManifest.xml2
-rwxr-xr-xandroid/build.py16
-rw-r--r--android/src/Main.java2
-rw-r--r--configure.ac9
-rw-r--r--python/build/ffmpeg.py2
-rw-r--r--python/build/libs.py16
-rw-r--r--python/build/meson.py6
-rw-r--r--src/input/plugins/FileInputPlugin.cxx3
-rw-r--r--src/playlist/cue/CueParser.cxx1
-rw-r--r--src/system/EPollFD.cxx15
-rwxr-xr-xwin32/build.py2
13 files changed, 59 insertions, 29 deletions
diff --git a/Makefile.am b/Makefile.am
index 0db008c6e..e403da342 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -347,7 +347,7 @@ libmpd.so: $(filter %.a,$(src_mpd_LDADD)) libmain.a
$(AM_V_CXXLD)$(CXXLD) -shared -Wl,--no-undefined,-shared,-Bsymbolic -llog -lz -o $@ $(AM_CXXFLAGS) $(CXXFLAGS) $(LDFLAGS) src/libmain_a-Main.o $(src_mpd_LDADD) $(LIBS)
ANDROID_SDK_BUILD_TOOLS_VERSION = 27.0.0
-ANDROID_SDK_PLATFORM = android-17
+ANDROID_SDK_PLATFORM = android-21
ANDROID_BUILD_TOOLS_DIR = $(ANDROID_SDK)/build-tools/$(ANDROID_SDK_BUILD_TOOLS_VERSION)
ANDROID_SDK_PLATFORM_DIR = $(ANDROID_SDK)/platforms/$(ANDROID_SDK_PLATFORM)
@@ -394,7 +394,7 @@ android/build/include/org_musicpd_Bridge.h: android/build/classes.dex
BUILT_SOURCES = android/build/include/org_musicpd_Bridge.h
-android/build/lib/armeabi-v7a/libmpd.so: libmpd.so
+android/build/lib/$(ANDROID_ABI)/libmpd.so: libmpd.so
mkdir -p $(@D)
rm -f $@
$(STRIP) -o $@ $<
@@ -404,7 +404,7 @@ android/build/res/drawable/icon.png: mpd.svg
rsvg-convert --width=48 --height=48 $< -o $@
.DELETE_ON_ERROR: android/build/unsigned.apk
-android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/armeabi-v7a/libmpd.so
+android/build/unsigned.apk: android/build/classes.dex android/build/resources.apk android/build/lib/$(ANDROID_ABI)/libmpd.so
cp android/build/resources.apk $@
cd $(dir $@) && zip -q -r $(notdir $@) classes.dex lib
@@ -808,6 +808,8 @@ libstorage_a_SOURCES = \
libstorage_a_CPPFLAGS = $(AM_CPPFLAGS) \
$(DBUS_CFLAGS) \
+ $(CURL_CFLAGS) \
+ $(EXPAT_CFLAGS) \
$(NFS_CFLAGS) \
$(SMBCLIENT_CFLAGS)
diff --git a/NEWS b/NEWS
index 5d8e1dbdf..2ee55c7df 100644
--- a/NEWS
+++ b/NEWS
@@ -44,14 +44,18 @@ ver 0.21 (not yet released)
* systemd watchdog support
* require GCC 6
-ver 0.20.21 (not yet released)
+ver 0.20.21 (2018/08/17)
* database
- proxy: add "password" setting
- proxy: support tags "ArtistSort", "AlbumArtistSort", "AlbumSort"
- simple: allow .mpdignore comments only at start of line
* output
- httpd: remove broken DLNA support code
+* playlist
+ - cue: support file type declaration "FLAC" (non-standard)
* URI schemes are case insensitive
+* Android, Windows
+ - enable the "curl" storage plugin
ver 0.20.20 (2018/05/22)
* protocol
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 09536d9c1..b6abd1124 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -5,7 +5,7 @@
android:versionCode="20"
android:versionName="0.20.21">
- <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
+ <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="21"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Main"
diff --git a/android/build.py b/android/build.py
index ee64d3059..caf85f06c 100755
--- a/android/build.py
+++ b/android/build.py
@@ -29,6 +29,15 @@ android_abis = {
'cflags': '-march=armv7-a -mfpu=vfp -mfloat-abi=softfp',
},
+ 'arm64-v8a': {
+ 'android_api_level': '21',
+ 'arch': 'aarch64-linux-android',
+ 'ndk_arch': 'arm64',
+ 'toolchain_arch': 'aarch64-linux-android',
+ 'llvm_triple': 'aarch64-none-linux-android',
+ 'cflags': '',
+ },
+
'x86': {
'arch': 'i686-linux-android',
'ndk_arch': 'x86',
@@ -65,7 +74,8 @@ class AndroidNdkToolchain:
self.build_path = build_path
ndk_arch = abi_info['ndk_arch']
- ndk_platform = 'android-14'
+ android_api_level = '21'
+ ndk_platform = 'android-' + android_api_level
# select the NDK compiler
gcc_version = '4.9'
@@ -106,7 +116,7 @@ class AndroidNdkToolchain:
self.cppflags = '--sysroot=' + sysroot + \
' -isystem ' + os.path.join(install_prefix, 'include') + \
' -isystem ' + os.path.join(sysroot, 'usr', 'include', arch) + \
- ' -D__ANDROID_API__=14'
+ ' -D__ANDROID_API__=' + android_api_level
self.ldflags = '--sysroot=' + sysroot + \
' -L' + os.path.join(install_prefix, 'lib') + \
' -L' + os.path.join(target_root, 'usr', 'lib') + \
@@ -116,6 +126,7 @@ class AndroidNdkToolchain:
self.is_arm = ndk_arch == 'arm'
self.is_armv7 = self.is_arm and 'armv7' in self.cflags
+ self.is_aarch64 = ndk_arch == 'arm64'
self.is_windows = False
libcxx_path = os.path.join(ndk_path, 'sources/cxx-stl/llvm-libc++')
@@ -146,6 +157,7 @@ thirdparty_libs = [
libid3tag,
ffmpeg,
curl,
+ libexpat,
libnfs,
boost,
]
diff --git a/android/src/Main.java b/android/src/Main.java
index 933524398..da64a1976 100644
--- a/android/src/Main.java
+++ b/android/src/Main.java
@@ -49,7 +49,7 @@ public class Main extends Activity implements Runnable {
TextView tv = new TextView(this);
tv.setText("Failed to load the native MPD libary.\n" +
"Report this problem to us, and include the following information:\n" +
- "ABI=" + Build.CPU_ABI + "\n" +
+ "SUPPORTED_ABIS=" + String.join(", ", Build.SUPPORTED_ABIS) + "\n" +
"PRODUCT=" + Build.PRODUCT + "\n" +
"FINGERPRINT=" + Build.FINGERPRINT + "\n" +
"error=" + Loader.error);
diff --git a/configure.ac b/configure.ac
index abc8f36ba..ec3eb15dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,7 +16,7 @@ AC_CONFIG_MACRO_DIR([m4])
AC_DEFINE(PROTOCOL_VERSION, "0.21.0", [The MPD protocol version])
-GIT_COMMIT=`GIT_DIR="$srcdir/.git" git describe --dirty --always 2>/dev/null`
+GIT_COMMIT=`cd "$srcdir" && git describe --dirty --always 2>/dev/null`
if test x$GIT_COMMIT != x; then
AC_DEFINE_UNQUOTED(GIT_COMMIT, ["$GIT_COMMIT"], [The current git commit])
fi
@@ -186,6 +186,7 @@ AC_ARG_WITH([android-sdk],
[Directory for Android SDK]),
[], [with_android_sdk=no])
+android_abi=""
if test x$host_is_android = xyes; then
if test x$with_android_sdk = xno; then
AC_MSG_ERROR([Android build requires option --with-android-sdk=DIR])
@@ -194,9 +195,15 @@ if test x$host_is_android = xyes; then
if ! test -x $with_android_sdk/tools/android; then
AC_MSG_ERROR([Android SDK not found in $with_android_sdk])
fi
+
+ AS_CASE([$host_cpu],
+ [i686], [android_abi="x86"],
+ [aarch64], [android_abi="arm64-v8a"],
+ [android_abi="armeabi-v7a"])
fi
AC_SUBST(ANDROID_SDK, [$with_android_sdk])
+AC_SUBST(ANDROID_ABI, [$android_abi])
dnl ---------------------------------------------------------------------------
dnl Language Checks
diff --git a/python/build/ffmpeg.py b/python/build/ffmpeg.py
index d75e98044..6c0753618 100644
--- a/python/build/ffmpeg.py
+++ b/python/build/ffmpeg.py
@@ -21,6 +21,8 @@ class FfmpegProject(Project):
if toolchain.is_arm:
arch = 'arm'
+ elif toolchain.is_aarch64:
+ arch = 'aarch64'
else:
arch = 'x86'
diff --git a/python/build/libs.py b/python/build/libs.py
index f94d9eb71..e4f621daf 100644
--- a/python/build/libs.py
+++ b/python/build/libs.py
@@ -364,6 +364,16 @@ curl = AutotoolsProject(
patches='src/lib/curl/patches',
)
+libexpat = AutotoolsProject(
+ 'https://github.com/libexpat/libexpat/releases/download/R_2_2_6/expat-2.2.6.tar.bz2',
+ '17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2',
+ 'lib/libexpat.a',
+ [
+ '--disable-shared', '--enable-static',
+ '--without-docbook',
+ ],
+)
+
libnfs = AutotoolsProject(
'https://github.com/sahlberg/libnfs/archive/libnfs-3.0.0.tar.gz',
'445d92c5fc55e4a5b115e358e60486cf8f87ee50e0103d46a02e7fb4618566a5',
@@ -374,13 +384,15 @@ libnfs = AutotoolsProject(
# work around -Wtautological-compare
'--disable-werror',
+
+ '--disable-utils', '--disable-examples',
],
base='libnfs-libnfs-3.0.0',
autoreconf=True,
)
boost = BoostProject(
- 'http://downloads.sourceforge.net/project/boost/boost/1.66.0/boost_1_66_0.tar.bz2',
- '5721818253e6a0989583192f96782c4a98eb6204965316df9f5ad75819225ca9',
+ 'http://downloads.sourceforge.net/project/boost/boost/1.68.0/boost_1_68_0.tar.bz2',
+ '7f6130bc3cf65f56a618888ce9d5ea704fa10b462be126ad053e80e553d6d8b7',
'include/boost/version.hpp',
)
diff --git a/python/build/meson.py b/python/build/meson.py
index 4cda8ec2a..427d51f0f 100644
--- a/python/build/meson.py
+++ b/python/build/meson.py
@@ -20,6 +20,9 @@ class MesonProject(Project):
cpu = 'armv7'
else:
cpu = 'armv6'
+ elif toolchain.is_aarch64:
+ cpu_family = 'aarch64'
+ cpu = 'arm64-v8a'
else:
cpu_family = 'x86'
if 'x86_64' in toolchain.arch:
@@ -51,6 +54,9 @@ c_link_args = %s
cpp_args = %s
cpp_link_args = %s
+# Keep Meson from executing Android-x86 test binariees
+needs_exe_wrapper = true
+
[host_machine]
system = '%s'
cpu_family = '%s'
diff --git a/src/input/plugins/FileInputPlugin.cxx b/src/input/plugins/FileInputPlugin.cxx
index 380cacfce..545906d49 100644
--- a/src/input/plugins/FileInputPlugin.cxx
+++ b/src/input/plugins/FileInputPlugin.cxx
@@ -64,13 +64,10 @@ OpenFileInputStream(Path path, Mutex &mutex)
throw FormatRuntimeError("Not a regular file: %s",
path.c_str());
-#if !defined(__BIONIC__) || __ANDROID_API__ >= 21
- /* posix_fadvise() requires Android API 21 */
#ifdef POSIX_FADV_SEQUENTIAL
posix_fadvise(reader.GetFD().Get(), (off_t)0, info.GetSize(),
POSIX_FADV_SEQUENTIAL);
#endif
-#endif
return std::make_unique<FileInputStream>(path.ToUTF8Throw().c_str(),
std::move(reader), info.GetSize(),
diff --git a/src/playlist/cue/CueParser.cxx b/src/playlist/cue/CueParser.cxx
index 2bd1aa4b0..38f0529a2 100644
--- a/src/playlist/cue/CueParser.cxx
+++ b/src/playlist/cue/CueParser.cxx
@@ -202,6 +202,7 @@ CueParser::Feed2(char *p) noexcept
return;
if (strcmp(type, "WAVE") != 0 &&
+ strcmp(type, "FLAC") != 0 && /* non-standard */
strcmp(type, "MP3") != 0 &&
strcmp(type, "AIFF") != 0) {
state = IGNORE_FILE;
diff --git a/src/system/EPollFD.cxx b/src/system/EPollFD.cxx
index d22d3836b..a119ab05e 100644
--- a/src/system/EPollFD.cxx
+++ b/src/system/EPollFD.cxx
@@ -22,21 +22,6 @@
#include "EPollFD.hxx"
#include "Error.hxx"
-#if defined(__BIONIC__) && __ANDROID_API__ < 21
-
-#include <sys/syscall.h>
-#include <fcntl.h>
-
-#define EPOLL_CLOEXEC O_CLOEXEC
-
-static inline int
-epoll_create1(int flags) noexcept
-{
- return syscall(__NR_epoll_create1, flags);
-}
-
-#endif
-
EPollFD::EPollFD()
:fd(::epoll_create1(EPOLL_CLOEXEC))
{
diff --git a/win32/build.py b/win32/build.py
index 99203a6d6..061bae8c6 100755
--- a/win32/build.py
+++ b/win32/build.py
@@ -65,6 +65,7 @@ class CrossGccToolchain:
self.is_arm = arch.startswith('arm')
self.is_armv7 = self.is_arm and 'armv7' in self.cflags
+ self.is_aarch64 = arch == 'aarch64'
self.is_windows = 'mingw32' in arch
self.env = dict(os.environ)
@@ -86,6 +87,7 @@ thirdparty_libs = [
liblame,
ffmpeg,
curl,
+ libexpat,
libnfs,
boost,
]