aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/lexilla
diff options
context:
space:
mode:
Diffstat (limited to 'vcpkg/ports/lexilla')
-rw-r--r--vcpkg/ports/lexilla/0001-static-lib.patch13
-rw-r--r--vcpkg/ports/lexilla/0002-static-crt.patch52
-rw-r--r--vcpkg/ports/lexilla/0003-fix-include-path.patch14
-rw-r--r--vcpkg/ports/lexilla/portfile.cmake31
-rw-r--r--vcpkg/ports/lexilla/vcpkg.json16
5 files changed, 126 insertions, 0 deletions
diff --git a/vcpkg/ports/lexilla/0001-static-lib.patch b/vcpkg/ports/lexilla/0001-static-lib.patch
new file mode 100644
index 0000000..31a0f2f
--- /dev/null
+++ b/vcpkg/ports/lexilla/0001-static-lib.patch
@@ -0,0 +1,13 @@
+diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
+index 82aa9b7..5eac42f 100644
+--- a/src/Lexilla.vcxproj
++++ b/src/Lexilla.vcxproj
+@@ -36,7 +36,7 @@
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup>
+- <ConfigurationType>DynamicLibrary</ConfigurationType>
++ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>Unicode</CharacterSet>
+ <PlatformToolset>v143</PlatformToolset>
+ </PropertyGroup>
diff --git a/vcpkg/ports/lexilla/0002-static-crt.patch b/vcpkg/ports/lexilla/0002-static-crt.patch
new file mode 100644
index 0000000..4be9f7b
--- /dev/null
+++ b/vcpkg/ports/lexilla/0002-static-crt.patch
@@ -0,0 +1,52 @@
+diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
+index 82aa9b7..6b6f340 100644
+--- a/src/Lexilla.vcxproj
++++ b/src/Lexilla.vcxproj
+@@ -95,6 +95,7 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+@@ -103,6 +104,7 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+@@ -111,6 +113,7 @@
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
+ <ClCompile>
+ <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
+@@ -122,6 +125,7 @@
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+@@ -133,6 +137,7 @@
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+@@ -144,6 +149,7 @@
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+ </ClCompile>
+ <Link>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
diff --git a/vcpkg/ports/lexilla/0003-fix-include-path.patch b/vcpkg/ports/lexilla/0003-fix-include-path.patch
new file mode 100644
index 0000000..d82dd87
--- /dev/null
+++ b/vcpkg/ports/lexilla/0003-fix-include-path.patch
@@ -0,0 +1,14 @@
+diff --git a/src/Lexilla.vcxproj b/src/Lexilla.vcxproj
+index 82aa9b7..5eac42f 100644
+--- a/src/Lexilla.vcxproj
++++ b/src/Lexilla.vcxproj
+@@ -75,7 +75,7 @@
+ <ItemDefinitionGroup>
+ <ClCompile>
+ <WarningLevel>Level4</WarningLevel>
+- <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+- <AdditionalIncludeDirectories>..\include;..\..\scintilla\include;..\lexlib;</AdditionalIncludeDirectories>
++ <PreprocessorDefinitions>WIN32;_CRT_SECURE_NO_DEPRECATE;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
++ <AdditionalIncludeDirectories>..\include;$(VcpkgInstalledDir)\$(VcpkgTriplet)\include\scintilla;..\lexlib;</AdditionalIncludeDirectories>
+ <BrowseInformation>true</BrowseInformation>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
diff --git a/vcpkg/ports/lexilla/portfile.cmake b/vcpkg/ports/lexilla/portfile.cmake
new file mode 100644
index 0000000..9c53ec5
--- /dev/null
+++ b/vcpkg/ports/lexilla/portfile.cmake
@@ -0,0 +1,31 @@
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://www.scintilla.org/lexilla545.zip"
+ FILENAME "lexilla545.zip"
+ SHA512 03e590a883e31135abc7eccdd089fbe3fe074955db70cbd546b58f32a77109f252c2283519e43f6a6e4c69fae9a99912c2bd828a771ceebeabf67655dde45877
+)
+
+if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ list(APPEND PATCHES 0001-static-lib.patch)
+endif()
+
+if(VCPKG_CRT_LINKAGE STREQUAL "static")
+ list(APPEND PATCHES 0002-static-crt.patch)
+endif()
+
+list(APPEND PATCHES 0003-fix-include-path.patch)
+
+vcpkg_extract_source_archive(
+ SOURCE_PATH
+ ARCHIVE ${ARCHIVE}
+ SOURCE_BASE ${VERSION}
+ PATCHES ${PATCHES}
+)
+
+vcpkg_install_msbuild(
+ SOURCE_PATH "${SOURCE_PATH}"
+ PROJECT_SUBPATH src/Lexilla.vcxproj
+)
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
+file(INSTALL "${SOURCE_PATH}/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}" FILES_MATCHING PATTERN "*.*")
+file(INSTALL "${SOURCE_PATH}/lexlib/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/${PORT}/lexlib" FILES_MATCHING PATTERN "*.h")
diff --git a/vcpkg/ports/lexilla/vcpkg.json b/vcpkg/ports/lexilla/vcpkg.json
new file mode 100644
index 0000000..35e1143
--- /dev/null
+++ b/vcpkg/ports/lexilla/vcpkg.json
@@ -0,0 +1,16 @@
+{
+ "name": "lexilla",
+ "version": "5.4.5",
+ "port-version": 1,
+ "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.",
+ "homepage": "https://www.scintilla.org/Lexilla.html",
+ "supports": "windows & !uwp & !mingw",
+ "dependencies": [
+ "scintilla",
+ {
+ "name": "vcpkg-msbuild",
+ "host": true,
+ "platform": "windows"
+ }
+ ]
+}