libdevmapper: add patch and specify TERMUX_PKG_API_LEVEL=23

API_LEVEL=23 is necessary for fmemopen
This commit is contained in:
Henrik Grimler 2018-12-15 08:33:25 +01:00 committed by Yaksh Bariya
parent bb4a2d6dcc
commit da2eba0f3a
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
3 changed files with 35 additions and 80 deletions

View File

@ -1,17 +1,18 @@
TERMUX_PKG_HOMEPAGE=https://sourceware.org/lvm2/
TERMUX_PKG_DESCRIPTION="A device-mapper library from LVM2 package"
TERMUX_PKG_DEPENDS="libandroid-support"
TERMUX_PKG_DEPENDS="libandroid-support, libaio"
TERMUX_PKG_VERSION=2.03.00
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/sourceware/lvm2/releases/LVM2.${TERMUX_PKG_VERSION}.tgz
TERMUX_PKG_SHA256=405992bf76960e60c7219d84d5f1e22edc34422a1ea812e21b2ac3c813d0da4e
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_API_LEVEL=23
termux_step_make() {
make -j"${TERMUX_MAKE_PROCESSES}" lib.device-mapper
make -j"${TERMUX_MAKE_PROCESSES}" lib.device-mapper
}
termux_step_make_install() {
cd libdm
make install
cd libdm
make install
}

View File

@ -0,0 +1,30 @@
--- ../dmsetup.c.orig 2018-12-13 11:29:47.098416214 +0000
+++ ./libdm/dm-tools/dmsetup.c 2018-12-13 11:47:21.254839518 +0000
@@ -26,7 +26,9 @@
#include <ctype.h>
#include <dirent.h>
#include <fcntl.h>
-#include <langinfo.h>
+#ifndef __ANDROID__
+# include <langinfo.h>
+#endif
#include <locale.h>
#include <stdlib.h>
#include <sys/param.h>
@@ -6463,12 +6465,15 @@
struct winsize winsz;
size_t len;
+ #ifndef __ANDROID__
/* Symbol set default */
if (!strcmp(nl_langinfo(CODESET), "UTF-8"))
_tsym = &_tsym_utf;
else
_tsym = &_tsym_ascii;
-
+ #else
+ _tsym = &_tsym_utf;
+ #endif
/* Default */
_tree_switches[TR_DEVICE] = 1;
_tree_switches[TR_TRUNCATE] = 1;

View File

@ -1,76 +0,0 @@
diff -uNr LVM2.2.02.177/configure LVM2.2.02.177.mod/configure
--- LVM2.2.02.177/configure 2017-12-18 22:44:34.000000000 +0200
+++ LVM2.2.02.177.mod/configure 2018-05-26 12:58:21.206743983 +0300
@@ -10806,11 +10806,11 @@
done
- check_lib_no_libs dlm dlm_lock -lpthread
+ check_lib_no_libs dlm dlm_lock
if test $NOTFOUND = 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libdlm, using -ldlm" >&5
$as_echo "no pkg for libdlm, using -ldlm" >&6; }
- DLM_LIBS="-ldlm -lpthread"
+ DLM_LIBS="-ldlm"
HAVE_DLM=yes
fi
elif test $pkg_failed = untried; then
@@ -10831,11 +10831,11 @@
done
- check_lib_no_libs dlm dlm_lock -lpthread
+ check_lib_no_libs dlm dlm_lock
if test $NOTFOUND = 0; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no pkg for libdlm, using -ldlm" >&5
$as_echo "no pkg for libdlm, using -ldlm" >&6; }
- DLM_LIBS="-ldlm -lpthread"
+ DLM_LIBS="-ldlm"
HAVE_DLM=yes
fi
else
@@ -14130,7 +14130,7 @@
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread $LIBS"
+LIBS="$LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -14161,7 +14161,7 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_lock" >&5
$as_echo "$ac_cv_lib_pthread_pthread_mutex_lock" >&6; }
if test "x$ac_cv_lib_pthread_pthread_mutex_lock" = xyes; then :
- PTHREAD_LIBS="-lpthread"
+ PTHREAD_LIBS="-lc"
else
hard_bailout
fi
diff -uNr LVM2.2.02.177/configure.in LVM2.2.02.177.mod/configure.in
--- LVM2.2.02.177/configure.in 2017-12-18 22:44:34.000000000 +0200
+++ LVM2.2.02.177.mod/configure.in 2018-05-26 12:57:25.986743573 +0300
@@ -907,10 +907,10 @@
PKG_CHECK_MODULES(DLM, libdlm, [HAVE_DLM=yes],
[NOTFOUND=0
AC_CHECK_HEADERS(libdlm.h,,[$bailout])
- check_lib_no_libs dlm dlm_lock -lpthread
+ check_lib_no_libs dlm dlm_lock
if test $NOTFOUND = 0; then
AC_MSG_RESULT([no pkg for libdlm, using -ldlm])
- DLM_LIBS="-ldlm -lpthread"
+ DLM_LIBS="-ldlm"
HAVE_DLM=yes
fi])
fi
@@ -1627,8 +1627,8 @@
[M_LIBS="-lm"], hard_bailout)
################################################################################
-AC_CHECK_LIB([pthread], [pthread_mutex_lock],
- [PTHREAD_LIBS="-lpthread"], hard_bailout)
+#AC_CHECK_LIB([pthread], [pthread_mutex_lock],
+# [PTHREAD_LIBS="-lpthread"], hard_bailout)
################################################################################
dnl -- Disable selinux