pts-core: Couple FreeBSD fixes on PHP 8.2

This commit is contained in:
Michael Larabel
2023-01-22 06:55:42 -06:00
parent 6256e5feaa
commit d44c65a62e
3 changed files with 21 additions and 18 deletions

View File

@@ -201,7 +201,7 @@ elif [ -x /usr/local/sbin/pkg ] || [ -x /usr/sbin/pkg ]
then
# DragonFlyBSD and others
echo "The command to likely run for your operating system is: "
echo "# pkg install php80 php80-dom php80-zip php80-simplexml php80-openssl"
echo "# pkg install php82 php82-dom php82-zip php82-simplexml"
echo " "
elif [ -x /usr/bin/swupd ]
then

View File

@@ -25,7 +25,7 @@
</Package>
<Package>
<GenericName>freetype</GenericName>
<PackageName>freetype</PackageName>
<PackageName>freetype2</PackageName>
</Package>
<Package>
<GenericName>eigen</GenericName>
@@ -174,7 +174,7 @@
</Package>
<Package>
<GenericName>p7zip</GenericName>
<PackageName>p7zip</PackageName>
<PackageName>7-zip</PackageName>
</Package>
<Package>
<GenericName>autoconf</GenericName>
@@ -214,7 +214,7 @@
</Package>
<Package>
<GenericName>python</GenericName>
<PackageName>python3 python py38-pip</PackageName>
<PackageName>python3 python</PackageName>
</Package>
<Package>
<GenericName>yasm</GenericName>

View File

@@ -1236,22 +1236,25 @@ class phodevi_gpu extends phodevi_device_interface
if(empty($info) || strpos($info, 'Mesa ') !== false || strpos($info, 'Gallium ') !== false || strpos($info, 'DRM ') !== false)
{
if(($x = strpos($info, ' on ')) !== false)
if(!empty($info))
{
// to remove section like "Gallium 0.4 on AMD POLARIS"
$info = substr($info, $x + 4);
}
if(strpos($info, 'Intel ') !== false)
{
// Intel usually has e.g. TGL GT2 or other info within
$info = str_replace(array('(', ')'), '', $info);
}
if(($x = strpos($info, ' (')) !== false)
{
$info = substr($info, 0, $x);
if(($x = strpos($info, ' on ')) !== false)
{
// to remove section like "Gallium 0.4 on AMD POLARIS"
$info = substr($info, $x + 4);
}
if(strpos($info, 'Intel ') !== false)
{
// Intel usually has e.g. TGL GT2 or other info within
$info = str_replace(array('(', ')'), '', $info);
}
if(($x = strpos($info, ' (')) !== false)
{
$info = substr($info, 0, $x);
}
}
if(phodevi::is_windows() == false && strpos($info, 'Intel ') === false && !pts_strings::string_contains($info, pts_strings::CHAR_NUMERIC))
if(phodevi::is_windows() == false && (empty($info) || (strpos($info, 'Intel ') === false && !pts_strings::string_contains($info, pts_strings::CHAR_NUMERIC))))
{
$info_pci = phodevi_linux_parser::read_pci('VGA compatible controller', false);
@@ -1332,7 +1335,7 @@ class phodevi_gpu extends phodevi_device_interface
}
}
if(($start_pos = strpos($info, ' DRI ')) > 0)
if(!empty($info) && ($start_pos = strpos($info, ' DRI ')) > 0)
{
$info = substr($info, $start_pos + 5);
}