2020-05-01 18:16:41 +00:00
|
|
|
#!/usr/bin/env pwsh
|
|
|
|
|
2023-11-01 12:09:45 +00:00
|
|
|
$global:DBusVersion = '1.14.10'
|
2020-05-01 18:16:41 +00:00
|
|
|
|
|
|
|
$global:DBusDeps = @(
|
|
|
|
'Expat'
|
|
|
|
)
|
|
|
|
|
|
|
|
function global:Build-DBus([string] $PrefixDir, [string] $Arch, [string] $DepsPrefixDir) {
|
2022-11-04 18:38:28 +00:00
|
|
|
$Filename = "dbus-${DBusVersion}.tar.xz"
|
2020-05-01 18:16:41 +00:00
|
|
|
$Url = "https://dbus.freedesktop.org/releases/dbus/${Filename}"
|
|
|
|
|
|
|
|
$SourceDir = Invoke-DownloadAndUnpack $Url $Filename
|
|
|
|
$BuildDir = Join-Path $SourceDir .build
|
|
|
|
|
|
|
|
$ConfigOptions = @(
|
|
|
|
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${PrefixDir}"
|
|
|
|
"-DCMAKE_PREFIX_PATH=${DepsPrefixDir}"
|
|
|
|
'-DDBUS_BUILD_TESTS=OFF'
|
2022-11-04 18:38:28 +00:00
|
|
|
'-DDBUS_ENABLE_PKGCONFIG=OFF'
|
|
|
|
'-DDBUS_ENABLE_DOXYGEN_DOCS=OFF'
|
|
|
|
'-DDBUS_ENABLE_XML_DOCS=OFF'
|
2020-05-01 18:16:41 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Patch to remove "-3" (or whatever) revision suffix part from DLL name since Qt doesn't seem to support that and we don't really need it
|
|
|
|
Edit-TextFile (Join-Path $SourceDir cmake modules MacrosAutotools.cmake) '^.*_LIBRARY_REVISION.*' ''
|
|
|
|
|
2022-11-04 18:38:28 +00:00
|
|
|
Invoke-CMakeBuildAndInstall $SourceDir $BuildDir $ConfigOptions
|
2020-05-01 18:16:41 +00:00
|
|
|
Copy-Item -Path (Join-Path $BuildDir bin dbus-1.pdb) -Destination (Join-Path $PrefixDir bin)
|
|
|
|
}
|