Skip to content

Commit

Permalink
[loguru,libosip2] Fix build check failure on Android platform (micros…
Browse files Browse the repository at this point in the history
  • Loading branch information
jimwang118 authored Aug 29, 2024
1 parent f2deec1 commit f0c8848
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 102 deletions.
4 changes: 2 additions & 2 deletions ports/libosip2/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ vcpkg_extract_source_archive(
PATCHES ${PATCHES}
)

if(VCPKG_TARGET_IS_WINDOWS)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
# Use /Z7 rather than /Zi to avoid "fatal error C1090: PDB API call failed, error code '23': (0x00000006)"
foreach(VCXPROJ IN ITEMS
"${SOURCE_PATH}/platform/vsnet/osip2.vcxproj"
Expand All @@ -39,7 +39,7 @@ if(VCPKG_TARGET_IS_WINDOWS)
PROJECT_SUBPATH "platform/vsnet/osipparser2.vcxproj"
)

elseif(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
else()
vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}")
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
Expand Down
1 change: 1 addition & 0 deletions ports/libosip2/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "libosip2",
"version": "5.3.1",
"port-version": 1,
"description": "oSIP is an LGPL implementation of SIP. It's stable, portable, flexible and compliant! -may be more-! It is used mostly with eXosip2 stack (GPL) which provides simpler API for User-Agent implementation.",
"homepage": "https://www.gnu.org/software/osip/",
"supports": "!(windows & arm) & !uwp",
Expand Down
55 changes: 0 additions & 55 deletions ports/loguru/CMakeLists.txt

This file was deleted.

9 changes: 0 additions & 9 deletions ports/loguru/loguruConfig.cmake.in

This file was deleted.

50 changes: 23 additions & 27 deletions ports/loguru/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO emilk/loguru
REF 9c2fea0d4530657f23259be4132f8101c98b579e #v2.1.0
SHA512 49eebf8648f9d29273af76dca0a4e49155daa3664e98979df005e64eb0fa9f4eeb4228245327d469772c51076571acbe39a644eba531444d8676d9709a7e3914
REF 4adaa185883e3c04da25913579c451d3c32cfac1 #v2.1.0
SHA512 813c9f9171a828a40270a3ad9f98124586eb56d37f263d55cd1ea6ac997d64431e2ae846f3dc0b477f8bf30873270c53b4bd7e6b6fc52259d2fd36126b24bbe6
HEAD_REF master
)

if(VCPKG_TARGET_IS_WINDOWS)
file(INSTALL ${SOURCE_PATH}/loguru.hpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru)
file(INSTALL ${SOURCE_PATH}/loguru.cpp DESTINATION ${CURRENT_PACKAGES_DIR}/include/loguru)
endif()

if(VCPKG_TARGET_IS_LINUX OR VCPKG_TARGET_IS_OSX)
configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
configure_file(${CMAKE_CURRENT_LIST_DIR}/loguruConfig.cmake.in ${SOURCE_PATH}/loguruConfig.cmake.in COPYONLY)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
fmt BUILD_WITH_FMT
)

vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
fmt BUILD_WITH_FMT
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
OPTIONS
${FEATURE_OPTIONS}
)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS_DEBUG
-DINSTALL_HEADERS=OFF
OPTIONS
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/loguru")
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()

vcpkg_cmake_install()
vcpkg_cmake_config_fixup()
vcpkg_copy_pdbs()
endif()

file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/copyright DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
vcpkg_install_copyright(FILE_LIST "${CMAKE_CURRENT_LIST_DIR}/copyright")
2 changes: 1 addition & 1 deletion ports/loguru/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "loguru",
"version": "2.1.0",
"port-version": 3,
"port-version": 4,
"description": "A lightweight and flexible C++ logging library",
"homepage": "https://github.com/emilk/loguru",
"dependencies": [
Expand Down
6 changes: 0 additions & 6 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -605,9 +605,6 @@ libmysql:x86-windows=skip
libopensp:arm-neon-android=fail
libopensp:arm64-android=fail
libopensp:x64-android=fail
libosip2:arm-neon-android=fail
libosip2:arm64-android=fail
libosip2:x64-android=fail
libp7client:x64-android=fail
libpng-apng:arm64-windows = skip
libpng-apng:arm64-uwp = skip
Expand Down Expand Up @@ -700,9 +697,6 @@ llvm:x64-android=fail
log4cplus:arm64-uwp=fail
log4cplus:x64-uwp=fail
log4cpp:x64-linux=fail # dynamic exception specifications
loguru:arm-neon-android=fail
loguru:arm64-android=fail
loguru:x64-android=fail
# 32-bit needs android-24
lua:arm-neon-android=fail
magma:x64-linux=fail
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -4854,7 +4854,7 @@
},
"libosip2": {
"baseline": "5.3.1",
"port-version": 0
"port-version": 1
},
"libosmium": {
"baseline": "2.20.0",
Expand Down Expand Up @@ -5510,7 +5510,7 @@
},
"loguru": {
"baseline": "2.1.0",
"port-version": 3
"port-version": 4
},
"lpeg": {
"baseline": "1.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/libosip2.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "21f43364595f76ad0ef3d516ac68f7473fa30c24",
"version": "5.3.1",
"port-version": 1
},
{
"git-tree": "cb02960c7156b49272969e224ccb0903c0a42a24",
"version": "5.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/l-/loguru.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fb3e7c33bf919ef01ff262f2b3b40ab89270a12b",
"version": "2.1.0",
"port-version": 4
},
{
"git-tree": "827f85e170a1d4548088fa36cf46817e146184d0",
"version": "2.1.0",
Expand Down

0 comments on commit f0c8848

Please sign in to comment.