Skip to content

Commit

Permalink
Merge branch 'MythTV:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mholmqvist committed Dec 28, 2023
2 parents c7f0f16 + 839cea5 commit c7c0dfd
Show file tree
Hide file tree
Showing 1,112 changed files with 208,162 additions and 160,880 deletions.
68 changes: 47 additions & 21 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,23 @@ Checks: '-*,
bugprone-*,
# Renamed/replaced by cppcoreguidelines-narrowing-conversions. ,
-bugprone-narrowing-conversions,
# As of 2023-05-22, there are 156 unique warnings. ,
-bugprone-assignment-in-if-condition
# As of 2022-12-19, there are 1014 unique warnings. ,
-bugprone-easily-swappable-parameters,
# As of 2022-12-19, there are 123 unique warnings. ,
# As of 2023-09-19, there are 7 unique warnings. ,
-bugprone-empty-catch,
# As of 2023-05-22, there are 97 unique warnings. ,
-bugprone-implicit-widening-of-multiplication-result,
# As of 2022-12-19, there are 161 unique warnings. ,
-bugprone-assignment-in-if-condition
# Renamed/replaced by cppcoreguidelines-narrowing-conversions. ,
-bugprone-narrowing-conversions,
# As of 2023-09-19, there are 140 unique warnings. ,
-bugprone-switch-missing-default-case,
cert-*,
Expand All @@ -63,18 +69,18 @@ Checks: '-*,
-cert-env33-c,
# Calls to standard library functions where the return value
# isnt checked. These should all be fixed. As of 2022-12-19,
# there are 344 warnings. ,
# isnt checked. These should all be fixed. As of 2023-05-22,
# there are 340 warnings. ,
-cert-err33-c,
# string-to-number conversion functions that do not verify the
# validity of the conversion. As of 2022-12-19, there are 85
# validity of the conversion. As of 2023-05-22, there are 43
# warnings. ,
-cert-err34-c,
# Lots of complaints about constructors of static objects
# possibly throwing exceptions that cant be caught. As of
# 2022-12-19, there are 540 warnings. ,
# 2023-05-22, there are 508 warnings. ,
-cert-err58-cpp,
clang-analyzer-*,
Expand All @@ -98,13 +104,13 @@ Checks: '-*,
# As of 2022-12-19, there are 142 unique warnings. ,
-cppcoreguidelines-avoid-goto,
# As of 2022-12-19, there are 1413 unique warnings. ,
# As of 2023-05-22, there are 1257 unique warnings. ,
-cppcoreguidelines-avoid-non-const-global-variables,
# As of 2022-12-19, there are 2503 unique warnings. ,
# As of 2023-05-22, there are 374 unique warnings. ,
-cppcoreguidelines-narrowing-conversions,
# As of 2022-12-19, there are 213 unique warnings. ,
# As of 2022-12-19, there are 212 unique warnings. ,
-cppcoreguidelines-no-malloc,
# No gsl. ,
Expand All @@ -124,10 +130,10 @@ Checks: '-*,
# As of 2022-12-19, there are 17 unique warnings. ,
-cppcoreguidelines-pro-type-const-cast,
# As of 2022-12-19, there are 799 unique warnings. ,
# As of 2023-05-22, there are 744 unique warnings. ,
-cppcoreguidelines-pro-type-cstyle-cast,
# As of 2022-12-19, there are 563 unique warnings. ,
# As of 2022-12-19, there are 425 unique warnings. ,
-cppcoreguidelines-pro-type-reinterpret-cast,
# Recommends using boost:: to access unions. ,
Expand All @@ -147,9 +153,12 @@ Checks: '-*,
misc-*,
# New in clang15. As of 2022-12-19, there are 16055 unique
# New in clang15. As of 2023-05-22, there are 15546 unique
# warnings. ,
-misc-const-correctness
-misc-const-correctness,
# As of 2023-09-19, there are 115517 unique warnings. ,
-misc-include-cleaner,
# Complains about every public or protected variable in a class. ,
-misc-non-private-member-variables-in-classes,
Expand All @@ -159,31 +168,46 @@ Checks: '-*,
# are in MythTV. ,
-misc-no-recursion,
# New in clang16. As of 2023-05-03, there are 1445 unique
# warnings. ,
-misc-use-anonymous-namespace,
modernize-*,
# Noisy!!! foo(void) => foo() ,
-modernize-redundant-void-arg,
# As of 2023-09-29, there are 14 unique warnings
remaining. These all come from calls to
Q_GLOBAL_STATIC_WITH_ARGS and cant be fixed by us. ,
-modernize-type-traits,
# Why would anyone want this? ,
-modernize-use-trailing-return-type,
# Disable newer C++14/17 tests for now. ,
-modernize-use-nodiscard,
# New in clang15. As of 2022-12-19, the vast majority of these
# unique warnings (661 of 700) are from the config.h file. ,
-modernize-macro-to-enum
# Renamed from cppcoreguidelines-macro-to-enum in clang15. As
# of 2023-05-22, there are 41 unique warnings. ,
-modernize-macro-to-enum,
performance-*,
# As of 2023-09-19, there are 443 unique warnings. ,
-performance-avoid-endl,
# The Q_DECLARE_METATYPE macro triggers a warning from this
# new clang12 checker. As of 2022-12-19, there vast majority
# new clang12 checker. As of 2022-12-19, the vast majority
# of these (236 of 292) warnings are associated with this
# macro; the other 56 are in the MythTV code. ,
-performance-no-int-to-ptr,
readability-*,
# As of 2023-09-19, there are 315 unique warnings. ,
-readability-avoid-unconditional-preprocessor-if,
# Need to decide on an appropriate value. ,
-readability-function-cognitive-complexity,
Expand All @@ -198,7 +222,7 @@ Checks: '-*,
# 2022-12-19, there are 426 unique warnings. ,
-readability-implicit-bool-conversion,
# As of 2022-12-19, there are 16263 unique warnings. ,
# As of 2023-05-22, there are 14798 unique warnings. ,
-readability-magic-numbers,
# Doesn''t understand Qt signals/slots. ,
Expand All @@ -212,6 +236,8 @@ CheckOptions:
- { key: cppcoreguidelines-pro-type-member-init.IgnoreArrays, value: 1 }
- { key: cppcoreguidelines-narrowing-conversions.PedanticMode, value: 0 } # test 1 at some point

- { key: misc-header-include-cycle.IgnoredFilesList, value: 'qglobal.h;mem.h;common.h' }

- { key: modernize-make-shared.IgnoreMacros, value: 0 }
- { key: modernize-make-unique.IgnoreMacros, value: 0 }
- { key: modernize-use-bool-literals.IgnoreMacros, value: 1 }
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/buildmaster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
name: build
strategy:
matrix:
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-11', 'macos-12']
os: ['ubuntu-20.04', 'ubuntu-22.04', 'macos-12', 'macos-13']
cc: ['gcc', 'clang']
include:
- cc: 'gcc'
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Install core dependencies (macOS)
run: |
brew install pkg-config ccache qt5 nasm libsamplerate taglib lzo libcec libbluray libass libhdhomerun dav1d x264 x265 libvpx openssl sound-touch
brew install pkg-config ccache qt5 nasm libsamplerate taglib lzo libcec libbluray libass libhdhomerun dav1d x264 x265 libvpx openssl sound-touch lame
brew link qt5 --force
echo "MYTHTV_CONFIG=$MYTHTV_CONFIG --extra-cxxflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib" >> $GITHUB_ENV
if: runner.os == 'macOS'
Expand Down
1 change: 1 addition & 0 deletions mythplugins/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Makefile
config.*
mythconfig.mak
settings2.pro
44 changes: 37 additions & 7 deletions mythplugins/configure
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,13 @@ check_lib_cxx(){
check_header_cxx $header && check_func_cxx $func $header "$@"
}

cp_if_changed(){
cmp -s "$1" "$2" && { test "$quiet" != "yes" && echo "$2 is unchanged"; } && return
mkdir -p "$(dirname $2)"
cp -f "$1" "$2"
echo "Created $2"
}

#
# default parameters for all plugins
#
Expand Down Expand Up @@ -464,13 +471,23 @@ check_py_lib(){
log check_py_lib "$@"
lib=${1}
check_cmd $python <<EOF
from distutils.sysconfig import get_python_lib
import sys
for mythroot in '${mythroot}'.split(':'):
sys.path.append(get_python_lib(prefix=mythroot +'${prefix}'))
sys.path.append(get_python_lib(prefix=mythroot +'${prefix}/local'))
sys.path.append(get_python_lib(prefix='${sysroot}${prefix}'))
sys.path.append(get_python_lib(prefix='${sysroot}${prefix}/local'))
try:
from distutils.sysconfig import get_python_lib
for mythroot in '${mythroot}'.split(':'):
sys.path.append(get_python_lib(prefix=mythroot +'${prefix}'))
sys.path.append(get_python_lib(prefix=mythroot +'${prefix}/local'))
sys.path.append(get_python_lib(prefix='${sysroot}${prefix}'))
sys.path.append(get_python_lib(prefix='${sysroot}${prefix}/local'))
except:
# python 3.12+
from sysconfig import get_path
for mroot in '${mythroot}'.split(':'):
sys.path.append(mroot + get_path('purelib'))
vars = {'base': '${sysroot}${prefix}', 'prefix': '${prefix}'}
sys.path.append(get_path('purelib', vars=vars, expand=True))
vars = {'base': '${sysroot}${prefix}', 'prefix': '${prefix}/local'}
sys.path.append(get_path('purelib', vars=vars, expand=True))
try:
import $lib
except:
Expand Down Expand Up @@ -513,6 +530,7 @@ tmpfile TMPSH .sh
tmpfile TMPCXX .cpp
tmpfile TMPASM .asm
tmpfile TMPMAK .mak
tmpfile TMPPRO .pro

unset -f mktemp

Expand Down Expand Up @@ -577,6 +595,11 @@ WEBKIT=$(cat mythconfig.mak | grep -e "^CONFIG_QTWEBKIT=yes")
EXTRALIBS=$(cat mythconfig.mak | grep -e "^EXTRALIBS=")
EXTRALIBS=${EXTRALIBS#EXTRALIBS=}

MYTHTV_VERSION_MAJMIN=$(cat mythconfig.mak | grep -e "^MYTHTV_VERSION_MAJMIN=")
MYTHTV_VERSION_MAJMIN=${MYTHTV_VERSION_MAJMIN#MYTHTV_VERSION_MAJMIN=}
MYTHTV_LIBVERSION=$(cat mythconfig.mak | grep -e "^MYTHTV_LIBVERSION=")
MYTHTV_LIBVERSION=${MYTHTV_LIBVERSION#MYTHTV_LIBVERSION=}

QT_MIN_VERSION=$(cat mythconfig.mak | grep -e "^QT_MIN_VERSION=")
QT_MIN_VERSION=${QT_MIN_VERSION#QT_MIN_VERSION=}
QT_MIN_VERSION_STR=$(cat mythconfig.mak | grep -e "^QT_MIN_VERSION_STR=")
Expand Down Expand Up @@ -624,7 +647,6 @@ if enabled netvision; then
check_py_lib lxml || disable_netvision "Python lxml library (lxml)"
check_py_lib xml || disable_netvision "Python XML library (xml)"
check_py_lib urllib || disable_netvision "Python URL library (urllib)"
check_py_lib oauth || disable_netvision "Python OAuth library (oauth)"

disabled netvision && echo "Disabling MythNetvision due to missing dependencies."
fi
Expand Down Expand Up @@ -714,6 +736,14 @@ if enabled zoneminder ; then
fi
fi

echo "Creating settings2.pro"
echo "MYTHTV_VERSION_MAJMIN: ${MYTHTV_VERSION_MAJMIN}"
echo "MYTHTV_LIBVERSION: ${MYTHTV_LIBVERSION}"
sed -e "s/@MYTHTV_VERSION_MAJMIN@/${MYTHTV_VERSION_MAJMIN}/g" \
-e "s/@MYTHTV_LIBVERSION@/${MYTHTV_LIBVERSION}/g" \
settings2.pro.in > $TMPPRO
cp_if_changed $TMPPRO settings2.pro

###########################################################
# #
# Top level mythplugin.pro file creation #
Expand Down
Loading

0 comments on commit c7c0dfd

Please sign in to comment.