1 |
commit: 203e6852f620e793c5662129ca6e5a911496f652 |
2 |
Author: Sergey Torokhov <torokhov-s-a <AT> yandex <DOT> ru> |
3 |
AuthorDate: Sat Apr 24 11:49:24 2021 +0000 |
4 |
Commit: Theo Anderson <telans <AT> posteo <DOT> de> |
5 |
CommitDate: Sat Apr 24 11:49:24 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=203e6852 |
7 |
|
8 |
x11-libs/gtk-fortran: add USE="static-libs" conditional patch |
9 |
|
10 |
Closes: https://bugs.gentoo.org/781812 |
11 |
|
12 |
Signed-off-by: Sergey Torokhov <torokhov-s-a <AT> yandex.ru> |
13 |
|
14 |
.../gtk-fortran-20.04_skip-static-build.patch | 32 ++++++++++++++++++++++ |
15 |
x11-libs/gtk-fortran/gtk-fortran-20.04.ebuild | 4 ++- |
16 |
2 files changed, 35 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/x11-libs/gtk-fortran/files/gtk-fortran-20.04_skip-static-build.patch b/x11-libs/gtk-fortran/files/gtk-fortran-20.04_skip-static-build.patch |
19 |
new file mode 100644 |
20 |
index 000000000..fb7cdd2cc |
21 |
--- /dev/null |
22 |
+++ b/x11-libs/gtk-fortran/files/gtk-fortran-20.04_skip-static-build.patch |
23 |
@@ -0,0 +1,32 @@ |
24 |
+diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt |
25 |
+--- a/src/CMakeLists.txt |
26 |
++++ b/src/CMakeLists.txt |
27 |
+@@ -73,17 +73,16 @@ |
28 |
+ endif() |
29 |
+ |
30 |
+ #====================================================== |
31 |
+-# Defining the static and shared gtk-fortran libraries: |
32 |
++# Defining the shared gtk-fortran libraries: |
33 |
+ #====================================================== |
34 |
+ add_library(gtk-fortran_object OBJECT ${sources}) |
35 |
+ # To build position independent shared libraries: |
36 |
+ set_property(TARGET gtk-fortran_object PROPERTY POSITION_INDEPENDENT_CODE TRUE) |
37 |
+ |
38 |
+-add_library(gtk-fortran_static STATIC $<TARGET_OBJECTS:gtk-fortran_object>) |
39 |
+ add_library(gtk-fortran_shared SHARED $<TARGET_OBJECTS:gtk-fortran_object>) |
40 |
+ target_link_libraries(gtk-fortran_shared ${GTK_LIBRARIES}) |
41 |
+ |
42 |
+-set_target_properties(gtk-fortran_static gtk-fortran_shared PROPERTIES |
43 |
++set_target_properties(gtk-fortran_shared PROPERTIES |
44 |
+ OUTPUT_NAME ${gtk_V_fortran} |
45 |
+ VERSION "0.1" |
46 |
+ SOVERSION "0.1") |
47 |
+@@ -131,7 +130,7 @@ |
48 |
+ #================== |
49 |
+ # Files to install: |
50 |
+ #================== |
51 |
+-install(TARGETS gtk-fortran_static gtk-fortran_shared |
52 |
++install(TARGETS gtk-fortran_shared |
53 |
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
54 |
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
55 |
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
56 |
|
57 |
diff --git a/x11-libs/gtk-fortran/gtk-fortran-20.04.ebuild b/x11-libs/gtk-fortran/gtk-fortran-20.04.ebuild |
58 |
index 8bb1099e1..02d8cd0a1 100644 |
59 |
--- a/x11-libs/gtk-fortran/gtk-fortran-20.04.ebuild |
60 |
+++ b/x11-libs/gtk-fortran/gtk-fortran-20.04.ebuild |
61 |
@@ -18,7 +18,7 @@ LICENSE="GPL-3" |
62 |
SLOT="0" |
63 |
KEYWORDS="~amd64 ~x86" |
64 |
|
65 |
-IUSE="examples high-level plplot" |
66 |
+IUSE="examples high-level plplot static-libs" |
67 |
REQUIRED_USE="plplot? ( high-level )" |
68 |
|
69 |
RDEPEND=" |
70 |
@@ -43,6 +43,8 @@ src_prepare() { |
71 |
sed -i -e "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):" \ |
72 |
-e "s: add_subdirectory(sketcher)::" CMakeLists.txt || die |
73 |
|
74 |
+ use !static-libs && eapply "${FILESDIR}/${P}_skip-static-build.patch" |
75 |
+ |
76 |
cmake_src_prepare |
77 |
} |