void-packages/srcpkgs/graphviz/patches/pkgconfig.patch
2020-01-12 11:53:34 +01:00

72 lines
3.1 KiB
Diff

From: Nathan Owens <ndowens04@gmail.com>
Upstream Patch Proposed: https://gitlab.com/graphviz/graphviz/merge_requests/1322
--
diff --git CMakeLists.txt CMakeLists.txt
index 35f47f649..b20f80314 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -52,6 +52,7 @@ set(LIBRARY_INSTALL_DIR lib)
set(PLUGIN_INSTALL_DIR ${LIBRARY_INSTALL_DIR}/graphviz)
set(HEADER_INSTALL_DIR include/graphviz)
set(MAN_INSTALL_DIR share/man/man3)
+set(PKGCONFIG_DIR lib/pkgconfig)
# TODO: Find a way to check for groff and ps2pdf for manpage pdf generation
# set(MAN_PDF_INSTALL_DIR share/graphviz/doc/pdf)
set(TOP_SOURCE_DIR "${CMAKE_SOURCE_DIR}")
@@ -97,8 +98,8 @@ endif()
# ============================ Set Graphviz version ============================
set(GRAPHVIZ_VERSION_MAJOR 2)
-set(GRAPHVIZ_VERSION_MINOR 41)
-set(GRAPHVIZ_VERSION_PATCH 0)
+set(GRAPHVIZ_VERSION_MINOR 42)
+set(GRAPHVIZ_VERSION_PATCH 2)
set(GRAPHVIZ_VERSION_STRING "${GRAPHVIZ_VERSION_MAJOR}.${GRAPHVIZ_VERSION_MINOR}.${GRAPHVIZ_VERSION_PATCH}")
configure_file(graphviz_version.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/graphviz_version.h DESTINATION ${HEADER_INSTALL_DIR})
@@ -166,5 +167,24 @@ add_subdirectory(cmd)
enable_testing()
add_subdirectory(tests)
+MATH(EXPR GRAPHVIZ_PLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}+1")
+set(GVPLUGIN_VERSION "${GRAPHVIZ_PLUGIN_VERSION}")
+set(VERSION "${GRAPHVIZ_VERSION_STRING}")
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
+set(libdir "${CMAKE_INSTALL_PREFIX}/lib")
+set(includedir "${CMAKE_INSTALL_PREFIX}/include")
+set(PACKAGE "graphviz")
+configure_file(${CMAKE_SOURCE_DIR}/lib/cdt/libcdt.pc.in ${CMAKE_SOURCE_DIR}/libcdt.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/cgraph/libcgraph.pc.in ${CMAKE_SOURCE_DIR}/libcgraph.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/gvc/libgvc.pc.in ${CMAKE_SOURCE_DIR}/libgvc.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/gvpr/libgvpr.pc.in ${CMAKE_SOURCE_DIR}/libgvpr.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/edgepaint/liblab_gamut.pc.in ${CMAKE_SOURCE_DIR}/liblab_gamut.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/pathplan/libpathplan.pc.in ${CMAKE_SOURCE_DIR}/libpathplan.pc @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/lib/xdot/libxdot.pc.in ${CMAKE_SOURCE_DIR}/libxdot.pc @ONLY)
+file(GLOB pcfiles "${CMAKE_SOURCE_DIR}/*.pc")
+foreach(file "${pcfiles}")
+ install(FILES ${file} DESTINATION "${PKGCONFIG_DIR}")
+endforeach(file)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git lib/gvc/CMakeLists.txt lib/gvc/CMakeLists.txt
index 1e83671..9bd6d22 100644
--- lib/gvc/CMakeLists.txt
+++ lib/gvc/CMakeLists.txt
@@ -59,6 +59,7 @@ target_link_libraries(gvc
${EXPAT_LIBRARIES}
${RXSPENCER_LIBRARIES}
${ZLIB_LIBRARIES}
+ m
)
if (NOT WIN32)
diff --git lib/pathplan/CMakeLists.txt lib/pathplan/CMakeLists.txt
index 6c0e8b5..988f48c 100644
--- lib/pathplan/CMakeLists.txt
+++ lib/pathplan/CMakeLists.txt
@@ -52,3 +52,4 @@ set_target_properties(pathplan PROPERTIES
VERSION 4.0.0
SOVERSION 4
)
+target_link_libraries(pathplan m)