mirror of
https://github.com/transmission/transmission
synced 2024-12-30 19:46:56 +00:00
27 lines
909 B
PowerShell
27 lines
909 B
PowerShell
|
#!/usr/bin/env pwsh
|
||
|
|
||
|
$global:ExpatVersion = '2.2.9'
|
||
|
|
||
|
$global:ExpatDeps = @()
|
||
|
|
||
|
function global:Build-Expat([string] $PrefixDir, [string] $Arch, [string] $DepsPrefixDir) {
|
||
|
$Filename = "expat-${ExpatVersion}.tar.bz2"
|
||
|
$Url = "https://github.com/libexpat/libexpat/releases/download/R_$($ExpatVersion.replace(".", "_"))/${Filename}"
|
||
|
|
||
|
$SourceDir = Invoke-DownloadAndUnpack $Url $Filename
|
||
|
$BuildDir = Join-Path $SourceDir .build
|
||
|
|
||
|
$ConfigOptions = @(
|
||
|
'-DCMAKE_BUILD_TYPE=RelWithDebInfo'
|
||
|
"-DCMAKE_INSTALL_PREFIX=${PrefixDir}"
|
||
|
"-DCMAKE_PREFIX_PATH=${DepsPrefixDir}"
|
||
|
'-DEXPAT_BUILD_EXAMPLES=OFF'
|
||
|
'-DEXPAT_BUILD_TESTS=OFF'
|
||
|
'-DEXPAT_BUILD_TOOLS=OFF'
|
||
|
'-DEXPAT_SHARED_LIBS=ON'
|
||
|
)
|
||
|
|
||
|
Invoke-CMakeBuildAndInstall $SourceDir $BuildDir $ConfigOptions
|
||
|
Copy-Item -Path (Join-Path $BuildDir libexpat.pdb) -Destination (Join-Path $PrefixDir bin)
|
||
|
}
|