Ticket #13252: android-plugins-20180329.patch

File android-plugins-20180329.patch, 4.7 KB (added by Mark Spieth, 2 years ago)
  • mythplugins/configure

    diff --git a/mythplugins/configure b/mythplugins/configure
    index 7c07d42804..941d15de8e 100755
    a b EOF 
    220220}
    221221
    222222add_ldflags(){
    223     append LDFLAGS "$@"
     223    append ELDFLAGS "$@"
    224224}
    225225
    226226add_cxxflags(){
    disable $DEPRECATED_PLUGIN_LIST 
    307307prefix="/usr/local"
    308308libdir_name="lib"
    309309sysroot=""
     310mythroot=""
    310311ln_s="ln -sf"
    311312
    312313logfile="config.ep"
    NB: all --enable-* options can be reversed with --disable-* 
    326327
    327328Generic options:
    328329  --prefix=PREFIX          MythTV install location PREFIX [$prefix]
    329   --sysroot=SYSROOT        MythTV sysroot location SYSROOT [$sysroot]
     330  --sysroot=SYSROOT        General sysroot location SYSROOT [$sysroot]
     331  --mythroot=SYSROOT       MythTV specific sysroot location [$mythroot]
    330332  --qmake=QMAKE            use specified qmake [$qmake]
     333  --qmakespecs=QMAKE       use specified qmakespecs [$qmakespecs]
    331334  --python=PATH            Force a specific python executable to use [$python]
    332335  --libdir-name=LIBNAME    install/look for libs in PREFIX/LIBNAME [$libdir_name]
    333336  --help                   print this message
    334337  --enable-all             Enable all options
    335338  --previous               use previous configure parameters if possible
     339  --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
    336340
    337341MythArchive related options:
    338342  --enable-mytharchive     build the mytharchive plugin [$archive]
    fi 
    397401CMDLINE_SET="
    398402    logfile
    399403    qmake
     404    qmakespecs
    400405    python
    401406    sysroot
     407    mythroot
    402408"
    403409
    404410CONFIGURATION_OPTS=""
    for opt do 
    452458      die_unknown $opt
    453459  fi
    454460  ;;
     461  --extra-ldflags=*)
     462      add_ldflags $optval
     463  ;;
    455464  *)
    456465  optname="${opt%%=*}"
    457466  optname="${optname#--}"
    EOF 
    528537fi
    529538
    530539# bring in mythtv config
    531 if [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
     540if [ -e $mythroot$prefix/include/mythtv/mythconfig.mak ] ; then
     541    rm mythconfig.mak 2> /dev/null
     542    cp $mythroot$prefix/include/mythtv/mythconfig.mak mythconfig.mak
     543    sed -i -e "s,^SYSROOT\=.*,SYSROOT=$mythroot,g" mythconfig.mak
     544elif [ -e $prefix/include/mythtv/mythconfig.mak ] ; then
    532545    rm mythconfig.mak 2> /dev/null
    533546    ${ln_s} $prefix/include/mythtv/mythconfig.mak mythconfig.mak
    534547else
    CFLAGS=${CFLAGS#CFLAGS=} 
    549562CPPFLAGS=$(cat mythconfig.mak | grep -e "^CPPFLAGS=")
    550563CPPFLAGS=${CPPFLAGS#CPPFLAGS=}
    551564LDFLAGS=$(cat mythconfig.mak | grep -e "^LDFLAGS=")
    552 LDFLAGS=${LDFLAGS#LDFLAGS=}
     565LDFLAGS="${LDFLAGS#LDFLAGS=} ${ELDFLAGS}"
    553566CXX=$(cat mythconfig.mak | grep -e "^QMAKE_CXX=")
    554567CXX=${CXX#QMAKE_CXX=}
    555568ECXXFLAGS=$(cat mythconfig.mak | grep -e "^ECXXFLAGS=")
    if [ x"$qmake" = "xqmake" ]; then 
    581594else
    582595    CHECK_QMAKE=`which $qmake 2>/dev/null`" "`which qmake-qt5 2>/dev/null`" /usr/lib64/qt5/bin/qmake /usr/lib/x86_64-linux-gnu/qt5/bin/qmake /usr/lib/i386-linux-gnu/qt5/bin/qmake /usr/lib/arm-linux-gnueabihf/qt5/bin/qmake /usr/local/lib/qt5/bin/qmake"
    583596fi
     597if [ -n "qmakespec" ]; then
     598        qmake="$qmake -spec $qmakespec"
     599fi
    584600# try to find a qt5 qmake to use
    585601found_qmake=''
    586602for i in $CHECK_QMAKE; do
  • mythplugins/mythgame/mythgame/external/ioapi.c

    diff --git a/mythplugins/mythgame/mythgame/external/ioapi.c b/mythplugins/mythgame/mythgame/external/ioapi.c
    index 7f5c191b2a..8db1d9f9be 100644
    a b  
    1414        #define _CRT_SECURE_NO_WARNINGS
    1515#endif
    1616
    17 #if defined(__APPLE__) || defined(IOAPI_NO_64)
     17#if defined(__APPLE__) || defined(IOAPI_NO_64) || defined(ANDROID)
    1818// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions
    1919#define FOPEN_FUNC(filename, mode) fopen(filename, mode)
    2020#define FTELLO_FUNC(stream) ftello(stream)
  • mythplugins/programs-libs.pro

    diff --git a/mythplugins/programs-libs.pro b/mythplugins/programs-libs.pro
    index 905b593375..c8dce9abb1 100644
    a b INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmyth 
    55INCLUDEPATH += $${SYSROOT}$${PREFIX}/include/mythtv/libmythservicecontracts
    66DEPENDPATH *= $${INCLUDEPATH}
    77
    8 LIBS += -L$${LIBDIR} $$EXTRA_LIBS -lmythbase-$$LIBVERSION
     8LIBS += -L$${SYSROOT}$${LIBDIR} $$EXTRA_LIBS -lmythbase-$$LIBVERSION
    99LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION -lmythupnp-$$LIBVERSION
    1010LIBS += -lmythservicecontracts-$$LIBVERSION
    1111LIBS += -lmythavcodec
  • mythplugins/targetdep.pro

    diff --git a/mythplugins/targetdep.pro b/mythplugins/targetdep.pro
    index 55f714bde9..1a447f0ef0 100644
    a b MYTH_SHLIB_EXT=$${LIBVERSION}.$${QMAKE_EXTENSION_SHLIB} 
    1010MYTH_LIB_EXT  =$${LIBVERSION}.$${QMAKE_EXTENSION_LIB}
    1111
    1212
    13 DEPLIBS = $${LIBDIR}
     13DEPLIBS = $${SYSROOT}$${LIBDIR}
    1414
    1515# On Windows, dlls were installed with exes:
    1616mingw : DEPLIBS = $${PREFIX}/bin