aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/liblrc
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/liblrc
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/liblrc')
-rw-r--r--vcpkg/ports/liblrc/fix-cmake.patch40
-rw-r--r--vcpkg/ports/liblrc/portfile.cmake18
-rw-r--r--vcpkg/ports/liblrc/set_up_compile_error.patch13
-rw-r--r--vcpkg/ports/liblrc/vcpkg.json18
4 files changed, 89 insertions, 0 deletions
diff --git a/vcpkg/ports/liblrc/fix-cmake.patch b/vcpkg/ports/liblrc/fix-cmake.patch
new file mode 100644
index 0000000..7ef0a61
--- /dev/null
+++ b/vcpkg/ports/liblrc/fix-cmake.patch
@@ -0,0 +1,40 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6b2175e..2aa699b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,8 +1,7 @@
+ cmake_minimum_required(VERSION 3.2.0)
+ project(LRCTools VERSION 1.0.0)
+
+-set(CMAKE_CXX_FLAGS
+- "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -Wno-missing-braces")
++set(CMAKE_CXX_STANDARD 11)
+
+ include_directories(${CMAKE_CURRENT_LIST_DIR})
+
+@@ -12,7 +11,22 @@ include(CPack)
+
+ enable_testing()
+
+-add_subdirectory(third_party)
+ add_subdirectory(liblrc)
+-add_subdirectory(cli)
+-add_subdirectory(test)
++# headers
++install(FILES ${PROJECT_SOURCE_DIR}/liblrc/lrc_parser.h
++ ${PROJECT_SOURCE_DIR}/liblrc/lyrics.h
++ ${PROJECT_SOURCE_DIR}/liblrc/utils.h
++ DESTINATION include/liblrc
++)
++# library with unofficial config
++install(TARGETS lrc
++ EXPORT unofficial-liblrcConfig
++ RUNTIME DESTINATION bin
++ LIBRARY DESTINATION lib
++ ARCHIVE DESTINATION lib
++)
++# share/liblrc will be fixed in portfile.cmake
++install(EXPORT unofficial-liblrcConfig
++ NAMESPACE unofficial::liblrc::
++ DESTINATION share/unofficial-liblrc
++)
diff --git a/vcpkg/ports/liblrc/portfile.cmake b/vcpkg/ports/liblrc/portfile.cmake
new file mode 100644
index 0000000..dcffda4
--- /dev/null
+++ b/vcpkg/ports/liblrc/portfile.cmake
@@ -0,0 +1,18 @@
+vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO ywh233/LRC-Tools
+ REF 1fc3872320cd449933bffefc6527928262ee0629
+ SHA512 5b0a52a557ffb28554b33e77efb3832944facfd4e039d8afe60c322d56872eb12cb93f3974d17f083c659dcddf9c63075d3b09ba6abd3adba7b40b2ffb615f1c
+ PATCHES
+ set_up_compile_error.patch
+ fix-cmake.patch
+)
+
+vcpkg_cmake_configure(SOURCE_PATH ${SOURCE_PATH})
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-liblrc)
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/vcpkg/ports/liblrc/set_up_compile_error.patch b/vcpkg/ports/liblrc/set_up_compile_error.patch
new file mode 100644
index 0000000..875fe0c
--- /dev/null
+++ b/vcpkg/ports/liblrc/set_up_compile_error.patch
@@ -0,0 +1,13 @@
+diff --git a/liblrc/lyrics.cc b/liblrc/lyrics.cc
+index b1a8c87..4fa16fa 100644
+--- a/liblrc/lyrics.cc
++++ b/liblrc/lyrics.cc
+@@ -5,7 +5,7 @@
+ //******************************************
+
+ #include "lyrics.h"
+-
++#include <limits>
+ #include <assert.h>
+
+ #include <algorithm>
diff --git a/vcpkg/ports/liblrc/vcpkg.json b/vcpkg/ports/liblrc/vcpkg.json
new file mode 100644
index 0000000..9f07bb0
--- /dev/null
+++ b/vcpkg/ports/liblrc/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "liblrc",
+ "version": "1.0.0",
+ "description": "Tools for parsing and playing back LRC lyrics.",
+ "homepage": "https://github.com/ywh233/LRC-Tools",
+ "license": "MIT",
+ "supports": "!osx",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}