Skip to content

Commit

Permalink
Added support for linux-arm (raspberry pi)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfoidl committed Sep 26, 2017
1 parent d8ae21d commit 22c59eb
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CairoSharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CairoDemo", "demos\CairoDem
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CairoDemo.netFull", "demos\CairoDemo.netFull\CairoDemo.netFull.csproj", "{A5ABB6FF-478E-4151-B67F-CBC93429EC87}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "linux-arm", "linux-arm", "{86EC6648-74C4-48F4-9F67-56C8BF066F76}"
ProjectSection(SolutionItems) = preProject
source\Native\stubs\linux-arm\create.sh = source\Native\stubs\linux-arm\create.sh
source\Native\stubs\linux-arm\libcairo.so = source\Native\stubs\linux-arm\libcairo.so
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -195,6 +201,7 @@ Global
{14490FDB-3D83-4528-AA5A-D4A0E15AF88E} = {12F028EE-B05E-4E8A-8BCA-3B3A8667974C}
{48DDFBF9-782E-4DE7-B47F-D4587B863819} = {44C3FE0B-59BA-4941-95DB-68037305C4B1}
{A5ABB6FF-478E-4151-B67F-CBC93429EC87} = {44C3FE0B-59BA-4941-95DB-68037305C4B1}
{86EC6648-74C4-48F4-9F67-56C8BF066F76} = {12F028EE-B05E-4E8A-8BCA-3B3A8667974C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BC48780D-A7F3-406F-83B9-9A4DB2A5DE76}
Expand Down
3 changes: 2 additions & 1 deletion source/CairoSharp/CairoSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<Version>1.15.6</Version>
<AssemblyVersion>1.15.75.6</AssemblyVersion>
<AssemblyVersion>1.15.84.6</AssemblyVersion>
<Description>Cairo Graphics Library -- .net standard 1.6 wrapper

Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available.
Expand All @@ -29,6 +29,7 @@ On Linux it is assumed that cairo is intalled via a paket manager like `sudo apt
<Content Include="..\Native\Output\bin\win-x64\cairo.dll" PackagePath="runtimes\win-x64\native" Visible="false" />
<Content Include="..\Native\Output\bin\win-x86\cairo.dll" PackagePath="runtimes\win-x86\native" Visible="false" />
<Content Include="..\Native\stubs\linux-x64\libcairo.so" PackagePath="runtimes\linux-x64\native" Visible="false" />
<Content Include="..\Native\stubs\linux-arm\libcairo.so" PackagePath="runtimes\linux-arm\native" Visible="false" />
<Content Include="CairoSharp.props" PackagePath="build\net45" />
</ItemGroup>
</Project>
16 changes: 16 additions & 0 deletions source/Native/stubs/linux-arm/create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

dllName=libcairo.so
soName=libcairo.so.2

echo "generating linux stub for $soName..."

touch empty.c
gcc -shared -o "$soName" empty.c
gcc -Wl,--no-as-needed -shared -o "$dllName" -fPIC -L. -l:"$soName"
rm -f "$soName"
rm -f empty.c

readelf -d "$dllName"

echo "stub $dllName generated to maps to $soName"
Binary file added source/Native/stubs/linux-arm/libcairo.so
Binary file not shown.

0 comments on commit 22c59eb

Please sign in to comment.