mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-07-23 14:03:33 -04:00
x11-libs/gtk-fortran: add USE="static-libs" conditional patch
Closes: https://bugs.gentoo.org/781812 Signed-off-by: Sergey Torokhov <torokhov-s-a@yandex.ru>
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -73,17 +73,16 @@
|
||||||
|
endif()
|
||||||
|
|
||||||
|
#======================================================
|
||||||
|
-# Defining the static and shared gtk-fortran libraries:
|
||||||
|
+# Defining the shared gtk-fortran libraries:
|
||||||
|
#======================================================
|
||||||
|
add_library(gtk-fortran_object OBJECT ${sources})
|
||||||
|
# To build position independent shared libraries:
|
||||||
|
set_property(TARGET gtk-fortran_object PROPERTY POSITION_INDEPENDENT_CODE TRUE)
|
||||||
|
|
||||||
|
-add_library(gtk-fortran_static STATIC $<TARGET_OBJECTS:gtk-fortran_object>)
|
||||||
|
add_library(gtk-fortran_shared SHARED $<TARGET_OBJECTS:gtk-fortran_object>)
|
||||||
|
target_link_libraries(gtk-fortran_shared ${GTK_LIBRARIES})
|
||||||
|
|
||||||
|
-set_target_properties(gtk-fortran_static gtk-fortran_shared PROPERTIES
|
||||||
|
+set_target_properties(gtk-fortran_shared PROPERTIES
|
||||||
|
OUTPUT_NAME ${gtk_V_fortran}
|
||||||
|
VERSION "0.1"
|
||||||
|
SOVERSION "0.1")
|
||||||
|
@@ -131,7 +130,7 @@
|
||||||
|
#==================
|
||||||
|
# Files to install:
|
||||||
|
#==================
|
||||||
|
-install(TARGETS gtk-fortran_static gtk-fortran_shared
|
||||||
|
+install(TARGETS gtk-fortran_shared
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
@@ -18,7 +18,7 @@ LICENSE="GPL-3"
|
|||||||
SLOT="0"
|
SLOT="0"
|
||||||
KEYWORDS="~amd64 ~x86"
|
KEYWORDS="~amd64 ~x86"
|
||||||
|
|
||||||
IUSE="examples high-level plplot"
|
IUSE="examples high-level plplot static-libs"
|
||||||
REQUIRED_USE="plplot? ( high-level )"
|
REQUIRED_USE="plplot? ( high-level )"
|
||||||
|
|
||||||
RDEPEND="
|
RDEPEND="
|
||||||
@@ -43,6 +43,8 @@ src_prepare() {
|
|||||||
sed -i -e "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):" \
|
sed -i -e "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):" \
|
||||||
-e "s: add_subdirectory(sketcher)::" CMakeLists.txt || die
|
-e "s: add_subdirectory(sketcher)::" CMakeLists.txt || die
|
||||||
|
|
||||||
|
use !static-libs && eapply "${FILESDIR}/${P}_skip-static-build.patch"
|
||||||
|
|
||||||
cmake_src_prepare
|
cmake_src_prepare
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user