mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 06:28:00 +08:00
[glib/gts] Add pkgconfig files (#11884)
* [glib/gts] Add pkgconfig files * Update the patch * Update ports/glib/CMakeLists.txt
This commit is contained in:
parent
d690c9bf7f
commit
df99d8dcc2
@ -360,3 +360,35 @@ message(STATUS " " ${ICONV_LIBRARY})
|
||||
message(STATUS " " ${CHARSET_LIBRARY})
|
||||
message(STATUS " " ${FFI_LIBRARY})
|
||||
message(STATUS " " ${LIBINTL_LIBRARY})
|
||||
|
||||
set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/glib-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gobject-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gobject-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-export-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-export-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gmodule-no-export-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gmodule-no-export-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gthread-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gthread-2.0.pc" @ONLY)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-2.0.pc" @ONLY)
|
||||
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/glib-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gobject-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gmodule-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gmodule-export-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gmodule-no-export-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gthread-2.0.pc"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/gio-2.0.pc"
|
||||
DESTINATION lib/pkgconfig)
|
||||
|
||||
if(WIN32)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-windows-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-windows-2.0.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-windows-2.0.pc" DESTINATION lib/pkgconfig)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gio-unix-2.0.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gio-unix-2.0.pc" @ONLY)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gio-unix-2.0.pc" DESTINATION lib/pkgconfig)
|
||||
endif()
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: glib
|
||||
Version: 2.52.3-14-6
|
||||
Version: 2.52.3-14-7
|
||||
Homepage: https://developer.gnome.org/glib/
|
||||
Description: Portable, general-purpose utility library.
|
||||
Build-Depends: zlib, pcre, libffi, gettext, libiconv
|
||||
|
@ -22,7 +22,7 @@ vcpkg_extract_source_archive_ex(
|
||||
fix-arm-builds.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt ${SOURCE_PATH}/CMakeLists.txt COPYONLY)
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake DESTINATION ${SOURCE_PATH})
|
||||
file(REMOVE_RECURSE ${SOURCE_PATH}/glib/pcre)
|
||||
file(WRITE ${SOURCE_PATH}/glib/pcre/Makefile.in)
|
||||
@ -54,4 +54,6 @@ vcpkg_copy_tool_dependencies(${CURRENT_PACKAGES_DIR}/tools/${PORT})
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: gts
|
||||
Version: 0.7.6-2
|
||||
Version: 0.7.6-3
|
||||
Homepage: https://github.com/finetjul/gts
|
||||
Description: A Library intended to provide a set of useful functions to deal with 3D surfaces meshed with interconnected triangles
|
||||
Build-Depends: glib
|
||||
|
28
ports/gts/fix-pkgconfig.patch
Normal file
28
ports/gts/fix-pkgconfig.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f458c35..8035507 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -124,3 +124,11 @@ INSTALL(FILES
|
||||
src/gtsconfig.h
|
||||
DESTINATION include COMPONENT Development
|
||||
)
|
||||
+
|
||||
+set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
+set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
+set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
+
|
||||
+configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gts.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" @ONLY)
|
||||
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/gts.pc" DESTINATION lib/pkgconfig)
|
||||
\ No newline at end of file
|
||||
diff --git a/gts.pc.in b/gts.pc.in
|
||||
index 39626d7..bcd4014 100644
|
||||
--- a/gts.pc.in
|
||||
+++ b/gts.pc.in
|
||||
@@ -7,5 +7,5 @@ Name: GTS
|
||||
Description: GNU Triangulated Surface Library
|
||||
Version: @VERSION@
|
||||
Requires: glib-2.0,gthread-2.0,gmodule-2.0
|
||||
-Libs: -L${libdir} @LIBS@ -lgts -lm
|
||||
+Libs: -L${libdir} @LIBS@ -lgts
|
||||
Cflags: -I${includedir}
|
@ -9,6 +9,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
fix-M_PI-in-windows.patch
|
||||
support-unix.patch
|
||||
fix-pkgconfig.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -19,7 +20,7 @@ vcpkg_install_cmake()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
|
Loading…
x
Reference in New Issue
Block a user