From ea8fb318d50993ba9a824c3f4c69755bc59145fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jack=C2=B7Boos=C2=B7Yu?= <47264268+JackBoosY@users.noreply.github.com> Date: Sat, 1 May 2021 02:25:01 +0800 Subject: [libui] Export system libs on OSX (#17095) * [libui] Export system libs on OSX * update version record * Update ports/libui/portfile.cmake * Update versions/l-/libui.json --- ports/libui/003-fix-system-link.patch | 17 +++++++++++++++++ ports/libui/CONTROL | 3 --- ports/libui/portfile.cmake | 7 ++++--- ports/libui/vcpkg.json | 7 +++++++ versions/baseline.json | 4 ++-- versions/l-/libui.json | 5 +++++ 6 files changed, 35 insertions(+), 8 deletions(-) create mode 100644 ports/libui/003-fix-system-link.patch delete mode 100644 ports/libui/CONTROL create mode 100644 ports/libui/vcpkg.json diff --git a/ports/libui/003-fix-system-link.patch b/ports/libui/003-fix-system-link.patch new file mode 100644 index 000000000..42dd23c0d --- /dev/null +++ b/ports/libui/003-fix-system-link.patch @@ -0,0 +1,17 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a23b84d..9892dfc 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,6 +172,12 @@ if(BUILD_SHARED_LIBS) + target_link_libraries(libui + PRIVATE ${_LIBUI_LIBS}) + endif() ++ ++if (APPLE) ++ find_library(Foundation Foundation) ++ find_library(AppKit AppKit) ++ target_link_libraries(libui PUBLIC $<$:${Foundation};${AppKit}>) ++endif() + # TODO INTERFACE libs don't inherit to grandhcildren? + # on Windows the linker for static libraries is different; don't give it the flags + if(BUILD_SHARED_LIBS) diff --git a/ports/libui/CONTROL b/ports/libui/CONTROL deleted file mode 100644 index 919f7a12c..000000000 --- a/ports/libui/CONTROL +++ /dev/null @@ -1,3 +0,0 @@ -Source: libui -Version: 2018-11-03-1 -Description: Simple and portable (but not inflexible) native GUI library in C. diff --git a/ports/libui/portfile.cmake b/ports/libui/portfile.cmake index 9ac341e01..d975cdfe8 100644 --- a/ports/libui/portfile.cmake +++ b/ports/libui/portfile.cmake @@ -7,6 +7,7 @@ vcpkg_from_github( PATCHES "001-fix-cmake.patch" "002-fix-macosx-build.patch" + "003-fix-system-link.patch" ) vcpkg_configure_cmake( @@ -16,11 +17,11 @@ vcpkg_configure_cmake( vcpkg_install_cmake() +vcpkg_copy_pdbs() + vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/libui TARGET_PATH share/unofficial-libui) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) # Handle copyright -configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/libui/copyright COPYONLY) - -vcpkg_copy_pdbs() +configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY) diff --git a/ports/libui/vcpkg.json b/ports/libui/vcpkg.json new file mode 100644 index 000000000..5d7ff38eb --- /dev/null +++ b/ports/libui/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "libui", + "version-date": "2018-11-03", + "port-version": 2, + "description": "Simple and portable (but not inflexible) native GUI library in C.", + "homepage": "https://github.com/andlabs/libui" +} diff --git a/versions/baseline.json b/versions/baseline.json index 70e73edaf..827c47fd2 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3577,8 +3577,8 @@ "port-version": 0 }, "libui": { - "baseline": "2018-11-03-1", - "port-version": 0 + "baseline": "2018-11-03", + "port-version": 2 }, "libunibreak": { "baseline": "4.3-0", diff --git a/versions/l-/libui.json b/versions/l-/libui.json index 4e1fa2dfa..2c5c16298 100644 --- a/versions/l-/libui.json +++ b/versions/l-/libui.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "941bfc035a8cfa6020be3475769732b027249a1d", + "version-date": "2018-11-03", + "port-version": 2 + }, { "git-tree": "c3d3ba8694ca2465c505735531cd10dfc8cf150d", "version-string": "2018-11-03-1", -- cgit v1.2.3