Skip to content

Commit 74e6536

Browse files
authored
[lexilla] add port (#47852)
Signed-off-by: Gordon Smith <[email protected]>
1 parent 980c981 commit 74e6536

File tree

7 files changed

+138
-0
lines changed

7 files changed

+138
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
2+
index 82aa9b7..5eac42f 100644
3+
--- a/src/Lexilla.vcxproj
4+
+++ b/src/Lexilla.vcxproj
5+
@@ -36,7 +36,7 @@
6+
</PropertyGroup>
7+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
8+
<PropertyGroup>
9+
- <ConfigurationType>DynamicLibrary</ConfigurationType>
10+
+ <ConfigurationType>StaticLibrary</ConfigurationType>
11+
<CharacterSet>Unicode</CharacterSet>
12+
<PlatformToolset>v143</PlatformToolset>
13+
</PropertyGroup>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
2+
index 82aa9b7..6b6f340 100644
3+
--- a/src/Lexilla.vcxproj
4+
+++ b/src/Lexilla.vcxproj
5+
@@ -95,6 +95,7 @@
6+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7+
<ClCompile>
8+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
9+
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
10+
</ClCompile>
11+
<Link>
12+
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
13+
@@ -103,6 +104,7 @@
14+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
15+
<ClCompile>
16+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
17+
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
18+
</ClCompile>
19+
<Link>
20+
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
21+
@@ -111,6 +113,7 @@
22+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
23+
<ClCompile>
24+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
25+
+ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
26+
</ClCompile>
27+
<Link>
28+
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
29+
@@ -122,6 +125,7 @@
30+
<FunctionLevelLinking>true</FunctionLevelLinking>
31+
<IntrinsicFunctions>true</IntrinsicFunctions>
32+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
33+
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
34+
</ClCompile>
35+
<Link>
36+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
37+
@@ -133,6 +137,7 @@
38+
<FunctionLevelLinking>true</FunctionLevelLinking>
39+
<IntrinsicFunctions>true</IntrinsicFunctions>
40+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
41+
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
42+
</ClCompile>
43+
<Link>
44+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
45+
@@ -144,6 +149,7 @@
46+
<FunctionLevelLinking>true</FunctionLevelLinking>
47+
<IntrinsicFunctions>true</IntrinsicFunctions>
48+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
49+
+ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
50+
</ClCompile>
51+
<Link>
52+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
2+
index 82aa9b7..5eac42f 100644
3+
--- a/src/Lexilla.vcxproj
4+
+++ b/src/Lexilla.vcxproj
5+
@@ -75,7 +75,7 @@
6+
<ItemDefinitionGroup>
7+
<ClCompile>
8+
<WarningLevel>Level4</WarningLevel>
9+
- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
10+
- <AdditionalIncludeDirectories>..\include;..\..\scintilla\include;..\lexlib;</AdditionalIncludeDirectories>
11+
+ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;LEXILLA_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
12+
+ <AdditionalIncludeDirectories>..\include;$(VcpkgInstalledDir)\$(VcpkgTriplet)\include\scintilla;..\lexlib;</AdditionalIncludeDirectories>
13+
<BrowseInformation>true</BrowseInformation>
14+
<MultiProcessorCompilation>true</MultiProcessorCompilation>

ports/lexilla/portfile.cmake

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
vcpkg_download_distfile(ARCHIVE
2+
URLS "https://www.scintilla.org/lexilla545.zip"
3+
FILENAME "lexilla545.zip"
4+
SHA512 03e590a883e31135abc7eccdd089fbe3fe074955db70cbd546b58f32a77109f252c2283519e43f6a6e4c69fae9a99912c2bd828a771ceebeabf67655dde45877
5+
)
6+
7+
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
8+
list(APPEND PATCHES 0001-static-lib.patch)
9+
endif()
10+
11+
if(VCPKG_CRT_LINKAGE STREQUAL "static")
12+
list(APPEND PATCHES 0002-static-crt.patch)
13+
endif()
14+
15+
list(APPEND PATCHES 0003-fix-include-path.patch)
16+
17+
vcpkg_extract_source_archive(
18+
SOURCE_PATH
19+
ARCHIVE ${ARCHIVE}
20+
SOURCE_BASE ${VERSION}
21+
PATCHES ${PATCHES}
22+
)
23+
24+
vcpkg_install_msbuild(
25+
SOURCE_PATH "${SOURCE_PATH}"
26+
PROJECT_SUBPATH src/Lexilla.vcxproj
27+
)
28+
29+
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
30+
file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}" FILES_MATCHING PATTERN "*.*")
31+
file(INSTALL "${SOURCE_PATH}/lexlib/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/lexlib" FILES_MATCHING PATTERN "*.h")

ports/lexilla/vcpkg.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "lexilla",
3+
"version": "5.4.5",
4+
"description": "Lexilla is a free library of language lexers that can be used with the Scintilla editing component. It comes with complete source code and a license that permits use in any free project or commercial product.",
5+
"homepage": "https://www.scintilla.org/Lexilla.html",
6+
"supports": "windows & !uwp & !mingw",
7+
"dependencies": [
8+
"scintilla",
9+
{
10+
"name": "vcpkg-msbuild",
11+
"host": true,
12+
"platform": "windows"
13+
}
14+
]
15+
}

versions/baseline.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4520,6 +4520,10 @@
45204520
"baseline": "2.5.0",
45214521
"port-version": 0
45224522
},
4523+
"lexilla": {
4524+
"baseline": "5.4.5",
4525+
"port-version": 0
4526+
},
45234527
"lfreist-hwinfo": {
45244528
"baseline": "2025-07-10",
45254529
"port-version": 0

versions/l-/lexilla.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"versions": [
3+
{
4+
"git-tree": "8f604b968642a903f1066078ab7b7c154a9736fb",
5+
"version": "5.4.5",
6+
"port-version": 0
7+
}
8+
]
9+
}

0 commit comments

Comments
 (0)