Skip to content

Commit

Permalink
[libuuid] Install uuid.pc file (#11849)
Browse files Browse the repository at this point in the history
* [libuuid] Install uuid.pc file

* [libuuid] Install uuid.pc file

* [libuuid] Install uuid.pc file

* Update portfile.cmake

* Update ports/libuuid/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
  • Loading branch information
LilyWangL and JackBoosY committed Jun 12, 2020
1 parent 4c86b26 commit 0a87852
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
3 changes: 2 additions & 1 deletion ports/libuuid/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Source: libuuid
Version: 1.0.3-3
Version: 1.0.3-4
Homepage: https://sourceforge.net/projects/libuuid
Description: Universally unique id library
Supports: linux|osx
22 changes: 14 additions & 8 deletions ports/libuuid/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
include(vcpkg_common_functions)

if (NOT ((VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux") OR (VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")))
message(FATAL_ERROR "libuuid currently only supports unix platforms.")
endif()
vcpkg_fail_port_install(MESSAGE "${PORT} currently only supports unix platform" ON_TARGET "Windows")

set(LIBUUID_VERSION 1.0.3)
vcpkg_download_distfile(ARCHIVE
URLS "http://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz"
FILENAME libuuid-1.0.3.tar.gz
URLS "http://sourceforge.net/projects/libuuid/files/libuuid-${LIBUUID_VERSION}.tar.gz"
FILENAME libuuid-${LIBUUID_VERSION}.tar.gz
SHA512 77488caccc66503f6f2ded7bdfc4d3bc2c20b24a8dc95b2051633c695e99ec27876ffbafe38269b939826e1fdb06eea328f07b796c9e0aaca12331a787175507
)

Expand All @@ -28,8 +25,17 @@ vcpkg_configure_cmake(

vcpkg_install_cmake()

set(prefix ${CURRENT_INSTALLED_DIR})
set(exec_prefix \$\{prefix\})
set(libdir \$\{exec_prefix\}/lib)
set(includedir \$\{prefix\}/include)
configure_file(${SOURCE_PATH}/uuid.pc.in ${SOURCE_PATH}/uuid.pc @ONLY)
file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/lib/pkgconfig)
file(INSTALL ${SOURCE_PATH}/uuid.pc DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig)
vcpkg_fixup_pkgconfig()

file(INSTALL
${SOURCE_PATH}/COPYING
DESTINATION ${CURRENT_PACKAGES_DIR}/share/libuuid RENAME copyright)
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

vcpkg_copy_pdbs()

0 comments on commit 0a87852

Please sign in to comment.