Skip to content

Commit

Permalink
Merge branch 'main' into port/llama-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Sep 29, 2023
2 parents fa127bc + 4702082 commit dc25368
Show file tree
Hide file tree
Showing 18 changed files with 281 additions and 241 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
macos12:
runs-on: "macos-12"
strategy:
fail-fast: false
matrix:
triplet: [x64-osx, arm64-ios]
env:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "GitHub Pages"

on:
workflow_dispatch:
push:
branches:
- "main"

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
mkdocs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.11
architecture: x64

- name: "Run pip install"
run: >
python3 -m pip install -r requirements.txt
- name: "Run MkDocs(build)"
run: >
python3 -m mkdocs build --site-dir _site
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v2
with:
path: '_site'
- uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
vcpkg
images
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

새롭게 정리하고 있습니다.
당분간은 이전처럼 [vcpkg-for-kor.md](./vcpkg-for-kor.md)를 참고해주세요.
67 changes: 67 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@

site_name: "한글로 쓴 Vcpkg 설명서"
site_description: "Learn Vcpkg package manager with 한글(Korean)"
site_author: luncliff@gmail.com
site_url: https://luncliff.github.io/vcpkg-registry

repo_name: luncliff/vcpkg-registry
repo_url: https://github.com/luncliff/vcpkg-registry

copyright: "CC0 1.0 Public Domain"


markdown_extensions:
- admonition
- pymdownx.details
- pymdownx.superfences
- pymdownx.tabbed:
alternate_style: true
- attr_list
- pymdownx.emoji:
emoji_index: !!python/name:material.extensions.emoji.twemoji
emoji_generator: !!python/name:material.extensions.emoji.to_svg

plugins:
- search:
lang:
- en
- ko

extra:
social:
- icon: fontawesome/brands/github
link: https://github.com/luncliff
- icon: fontawesome/brands/facebook
link: https://facebook.com/luncliff
- icon: fontawesome/solid/paper-plane
link: mailto:luncliff@gmail.com

theme:
name: "material"
language: "ko"
extra:
search:
language: "ko"
font:
text: "Nanum Gothic"
code: "Nanum Gothic Coding"
icon:
repo: fontawesome/brands/github
admonition:
tip: fontawesome/solid/gears
palette:
- scheme: slate
primary: "Indigo"
accent: "blue"
features:
- content.tabs.link
- search.suggest
- search.highlight
- navigation.path
- toc.integrate
icon:
logo: material/book

docs_dir: docs
nav:
- Home: vcpkg-for-kor.md
84 changes: 53 additions & 31 deletions ports/apple-crypto/fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,67 +1,88 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9831cee..a98a16c 100644
index 9831cee..a7b477e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,7 @@ project(SwiftCrypto
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
@@ -16,6 +16,7 @@ cmake_minimum_required(VERSION 3.15.1)

include(SwiftSupport)
project(SwiftCrypto
LANGUAGES ASM C Swift)
+include(GNUInstallDirs)

if(CMAKE_VERSION VERSION_LESS 3.16 AND CMAKE_SYSTEM_NAME STREQUAL Windows)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)

@@ -37,13 +38,13 @@ if(BUILD_SHARED_LIBS)
set(CMAKE_POSITION_INDEPENDENT_CODE YES)
endif()

-if(CMAKE_SYSTEM_NAME STREQUAL Darwin AND NOT CMAKE_CROSSCOMPILING)
+if(FALSE)
set(CMAKE_AR "/usr/bin/ar")
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
set(CMAKE_RANLIB "/usr/bin/ranlib")
endif()

-if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
+if(NOT APPLE)
find_package(dispatch CONFIG)
find_package(Foundation CONFIG)
endif()
diff --git a/Sources/CCryptoBoringSSL/CMakeLists.txt b/Sources/CCryptoBoringSSL/CMakeLists.txt
index 3ff897a..b24db63 100644
index ddf4786..29577a4 100644
--- a/Sources/CCryptoBoringSSL/CMakeLists.txt
+++ b/Sources/CCryptoBoringSSL/CMakeLists.txt
@@ -392,10 +392,17 @@ endif()
@@ -12,7 +12,8 @@
##
##===----------------------------------------------------------------------===##

target_include_directories(CCryptoBoringSSL PUBLIC
include)
-add_library(CCryptoBoringSSL STATIC
+file(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)

+add_library(CCryptoBoringSSL STATIC ${headers}
"crypto/asn1/a_bitstr.c"
"crypto/asn1/a_bool.c"
"crypto/asn1/a_d2i_fp.c"
@@ -397,6 +398,11 @@ target_include_directories(CCryptoBoringSSL PUBLIC
target_compile_definitions(CCryptoBoringSSL PRIVATE
$<$<PLATFORM_ID:Windows>:WIN32_LEAN_AND_MEAN>)
set_target_properties(CCryptoBoringSSL PROPERTIES
+ PUBLIC_HEADER "${headers}"
+ FRAMEWORK true
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include;${CMAKE_Swift_MODULE_DIRECTORY}")

set_property(GLOBAL APPEND PROPERTY SWIFT_CRYPTO_EXPORTS CCryptoBoringSSL)
+
+install(TARGETS CCryptoBoringSSL
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
+install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CCryptoBoringSSL)
+install(TARGETS CCryptoBoringSSL FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
\ No newline at end of file
diff --git a/Sources/CCryptoBoringSSLShims/CMakeLists.txt b/Sources/CCryptoBoringSSLShims/CMakeLists.txt
index 5550b15..6cd29af 100644
index 5550b15..bcabdb8 100644
--- a/Sources/CCryptoBoringSSLShims/CMakeLists.txt
+++ b/Sources/CCryptoBoringSSLShims/CMakeLists.txt
@@ -18,11 +18,18 @@ add_library(CCryptoBoringSSLShims STATIC
target_include_directories(CCryptoBoringSSLShims PUBLIC
include
$<TARGET_PROPERTY:CCryptoBoringSSL,INCLUDE_DIRECTORIES>)
@@ -12,7 +12,8 @@
##
##===----------------------------------------------------------------------===##

-add_library(CCryptoBoringSSLShims STATIC
+file(GLOB headers ${CMAKE_CURRENT_SOURCE_DIR}/include/*.h)
+add_library(CCryptoBoringSSLShims STATIC ${headers}
"shims.c")

target_link_libraries(CCryptoBoringSSLShims PUBLIC
target_include_directories(CCryptoBoringSSLShims PUBLIC
@@ -23,6 +24,10 @@ target_link_libraries(CCryptoBoringSSLShims PUBLIC
CCryptoBoringSSL)

set_target_properties(CCryptoBoringSSLShims PROPERTIES
+ PUBLIC_HEADER "${headers}"
+ FRAMEWORK true
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})

set_property(GLOBAL APPEND PROPERTY SWIFT_CRYPTO_EXPORTS CCryptoBoringSSLShims)
+
+install(TARGETS CCryptoBoringSSLShims
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+)
\ No newline at end of file
+install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/CCryptoBoringSSLShims)
+install(TARGETS CCryptoBoringSSLShims FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/cmake/modules/SwiftSupport.cmake b/cmake/modules/SwiftSupport.cmake
index 889edcd..f9d01d2 100644
index c11d56d..c62bb38 100644
--- a/cmake/modules/SwiftSupport.cmake
+++ b/cmake/modules/SwiftSupport.cmake
@@ -79,9 +79,9 @@ function(_install_target module)
@@ -81,9 +81,10 @@ function(_install_target module)
endif()

install(TARGETS ${module}
Expand All @@ -70,11 +91,12 @@ index 889edcd..f9d01d2 100644
- RUNTIME DESTINATION bin)
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ )
if(type STREQUAL EXECUTABLE)
return()
endif()
@@ -95,14 +95,14 @@ function(_install_target module)
@@ -97,14 +98,14 @@ function(_install_target module)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
install(FILES $<TARGET_PROPERTY:${module},Swift_MODULE_DIRECTORY>/${module_name}.swiftdoc
DESTINATION lib/${swift}/${swift_os}/${module_name}.swiftmodule
Expand Down
13 changes: 4 additions & 9 deletions ports/apple-crypto/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
if(VCPKG_TARGET_IS_IOS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apple/swift-crypto
REF 2.2.4
SHA512 9b9e5e2bd038cbe8064bcbc56089219c2241bff2555abda09bc713741576e54d591a442fc6063abe2d0f78529054a7857b24179f6159b25a2447d36293951241
REF 3.0.0
SHA512 2d79147d32bfb8449726c73c8b267262cf1ddc7c18637f4168e3fd848ba71c0719b23b5683ca513260cbc537fc439e38488ae16010717303625bceb7d5edd36f
HEAD_REF main
PATCHES
fix-cmake.patch
Expand All @@ -15,9 +13,6 @@ vcpkg_from_github(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
GENERATOR Xcode
OPTIONS
-DBUILD_SHARED_LIBS=ON
-DCMAKE_POSITION_INDEPENDENT_CODE=ON
)
vcpkg_cmake_install()

Expand All @@ -29,4 +24,4 @@ file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/lib/swift"
)

file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
8 changes: 2 additions & 6 deletions ports/apple-crypto/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
{
"name": "apple-crypto",
"version": "2.2.4",
"version": "3.0.0",
"description": "Open-source implementation of a substantial portion of the API of Apple CryptoKit suitable for use on Linux platforms",
"homepage": "https://apple.github.io/swift-crypto",
"homepage": "https://github.com/apple/swift-crypto",
"license": "Apache-2.0",
"supports": "osx | ios",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Package.swift b/Package.swift
index 8f696fd..e4ff201 100644
index a02b8ed..5ee71f3 100644
--- a/Package.swift
+++ b/Package.swift
@@ -52,9 +52,7 @@ let package = Package(
Expand Down
Loading

0 comments on commit dc25368

Please sign in to comment.