head 1.5; access; symbols pkgsrc-2020Q1:1.4.0.16 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.38 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.34 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.32 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.30 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.28 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.26 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.24 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.22 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.20 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.18 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.14 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.12 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.10 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.8 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.6 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.4 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.2 pkgsrc-2015Q4-base:1.4; locks; strict; comment @// @; 1.5 date 2020.04.23.17.16.40; author nia; state dead; branches; next 1.4; commitid DD1aFVbW0irt5x5C; 1.4 date 2015.11.18.23.27.23; author jmcneill; state Exp; branches; next 1.3; commitid NkFimmwaXzBJ9DJy; 1.3 date 2015.11.17.18.15.33; author jmcneill; state Exp; branches; next 1.2; commitid Wayo86sxwZyOstJy; 1.2 date 2015.11.17.18.14.07; author jmcneill; state Exp; branches; next 1.1; commitid 98OrcHl1ZX4kstJy; 1.1 date 2015.11.17.14.56.07; author jmcneill; state Exp; branches; next ; commitid RGLmvn5GiLiimsJy; desc @@ 1.5 log @multimedia: Remove kodi - broken for a long time now If anyone wants to attempt re-packaging a more recent version of kodi I'd recommend starting over (also, happy to help and provide advice). @ text @$NetBSD: patch-xbmc_utils_CPUInfo.cpp,v 1.4 2015/11/18 23:27:23 jmcneill Exp $ --- xbmc/utils/CPUInfo.cpp.orig 2015-10-19 06:31:15.000000000 +0000 +++ xbmc/utils/CPUInfo.cpp @@@@ -36,7 +36,7 @@@@ #endif #endif -#if defined(TARGET_FREEBSD) +#if defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) #include #include #include @@@@ -234,7 +234,7 @@@@ CCPUInfo::CCPUInfo(void) } else m_cpuQueryLoad = NULL; -#elif defined(TARGET_FREEBSD) +#elif defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) size_t len; int i; char cpumodel[512]; @@@@ -538,6 +538,12 @@@@ float CCPUInfo::getCPUFrequency() if (sysctlbyname("dev.cpu.0.freq", &hz, &len, NULL, 0) != 0) hz = 0; return (float)hz; +#elif defined(TARGET_NETBSD) + int hz = 0; + size_t len = sizeof(hz); + if (sysctlbyname("machdep.cpu.frequency.current", &hz, &len, NULL, 0) != 0) + hz = 0; + return (float)hz; #else int value = 0; if (m_fCPUFreq && !m_cpuInfoForFreq) @@@@ -699,7 +705,8 @@@@ bool CCPUInfo::readProcStat(unsigned lon else for (std::map::iterator it = m_cores.begin(); it != m_cores.end(); ++it) it->second.m_fPct = double(m_lastUsedPercentage); // use CPU average as fallback -#elif defined(TARGET_FREEBSD) +#elif defined(TARGET_FREEBSD) || defined(TARGET_NETBSD) +#if defined(TARGET_FREEBSD) long *cptimes; size_t len; int i; @@@@ -715,6 +722,19 @@@@ bool CCPUInfo::readProcStat(unsigned lon free(cptimes); return false; } +#elif defined(TARGET_NETBSD) + uint64_t *cptimes; + size_t len; + int i; + + len = sizeof(*cptimes) * m_cpuCount * CPUSTATES; + cptimes = (uint64_t*)malloc(len); + if (sysctlbyname("kern.cp_time", cptimes, &len, NULL, 0) != 0) + { + free(cptimes); + return false; + } +#endif user = 0; nice = 0; system = 0; @@@@ -722,7 +742,11 @@@@ bool CCPUInfo::readProcStat(unsigned lon io = 0; for (i = 0; i < m_cpuCount; i++) { +#if defined(TARGET_NETBSD) + int64_t coreUser, coreNice, coreSystem, coreIdle, coreIO; +#else long coreUser, coreNice, coreSystem, coreIdle, coreIO; +#endif double total; coreUser = cptimes[i * CPUSTATES + CP_USER]; @@@@ -741,7 +765,9 @@@@ bool CCPUInfo::readProcStat(unsigned lon coreIO -= iter->second.m_io; total = (double)(coreUser + coreNice + coreSystem + coreIdle + coreIO); - if(total != 0.0f) + if(total == 0.0f) + iter->second.m_fPct = 0.0f; + else iter->second.m_fPct = ((double)(coreUser + coreNice + coreSystem) * 100.0) / total; iter->second.m_user += coreUser; @@@@ -931,6 +957,18 @@@@ bool CCPUInfo::HasNeon() #elif defined(TARGET_DARWIN_IOS) has_neon = 1; +#elif defined(TARGET_NETBSD) && defined(__ARM_NEON__) + if (has_neon == -1) + { + has_neon = 0; + int flag; + size_t len = sizeof(flag); + if (sysctlbyname("machdep.neon_present", &flag, &len, NULL, 0) == 0) + { + has_neon = 1; + } + } + #elif defined(TARGET_LINUX) && defined(__ARM_NEON__) if (has_neon == -1) { @ 1.4 log @Improve CPU / memory / system information on NetBSD. @ text @d1 1 a1 1 $NetBSD: patch-xbmc_utils_CPUInfo.cpp,v 1.3 2015/11/17 18:15:33 jmcneill Exp $ @ 1.3 log @use the actual value of the machdep.neon_present sysctl @ text @d1 1 a1 1 $NetBSD: patch-xbmc_utils_CPUInfo.cpp,v 1.2 2015/11/17 18:14:07 jmcneill Exp $ d23 1 a23 1 @@@@ -538,6 +538,8 @@@@ float CCPUInfo::getCPUFrequency() d28 5 a32 1 + return 0.f; d36 13 a48 2 @@@@ -758,6 +760,8 @@@@ bool CCPUInfo::readProcStat(unsigned lon } a49 1 free(cptimes); d51 39 a89 5 + return false; #else if (m_fProcStat == NULL) return false; @@@@ -931,6 +935,18 @@@@ bool CCPUInfo::HasNeon() d101 1 a101 1 + has_neon = flag; @ 1.2 log @enable NEON for armv7 @ text @d1 1 a1 1 $NetBSD$ d53 1 a53 1 + has_neon = 1; @ 1.1 log @Initial import of kodi-15.2 Kodi (formerly known as XBMC) is an award-winning free and open source (GPL) software media center for playing videos, music, pictures, games, and more. Kodi features a 10-foot user interface for use with televisions and remote controls. It allows users to play and view most videos, music, podcasts, and other digital media files from local and network storage media and the internet. @ text @d41 19 @