aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'x11-libs/gtk-fortran')
-rw-r--r--x11-libs/gtk-fortran/files/gtk-fortran-NO_BUILD_HL-option.patch96
-rw-r--r--x11-libs/gtk-fortran/gtk-fortran-19.04.ebuild9
-rw-r--r--x11-libs/gtk-fortran/metadata.xml1
3 files changed, 105 insertions, 1 deletions
diff --git a/x11-libs/gtk-fortran/files/gtk-fortran-NO_BUILD_HL-option.patch b/x11-libs/gtk-fortran/files/gtk-fortran-NO_BUILD_HL-option.patch
new file mode 100644
index 000000000..6ead9ceaa
--- /dev/null
+++ b/x11-libs/gtk-fortran/files/gtk-fortran-NO_BUILD_HL-option.patch
@@ -0,0 +1,96 @@
+diff -Naur a/CMakeLists.txt b/CMakeLists.txt
+--- a/CMakeLists.txt 2019-04-24 10:53:11.000000000 +0300
++++ b/CMakeLists.txt 2020-04-13 07:05:14.000000000 +0300
+@@ -194,7 +194,7 @@
+ # As a temporary (?) workaround, we are now using pkg-config.
+ # If a CMake error occurs, add -D EXCLUDE_PLPLOT=true to your CMake command.
+ #===============================================================================
+-if (NOT EXCLUDE_PLPLOT)
++if (NOT EXCLUDE_PLPLOT AND NOT NO_BUILD_HL)
+ find_package(PkgConfig REQUIRED)
+
+ pkg_check_modules(PLPLOT-FORTRAN REQUIRED plplot-fortran)
+@@ -211,9 +211,9 @@
+ include_directories(${PLPLOT_INCLUDE_DIRS})
+ set(CMAKE_REQUIRED_LIBRARIES "${PLPLOT_LIBRARIES}")
+ set(CMAKE_REQUIRED_INCLUDES "${PLPLOT-FORTRAN_INCLUDE_DIRS}")
+-else(NOT EXCLUDE_PLPLOT)
++else(NOT EXCLUDE_PLPLOT AND NOT NO_BUILD_HL)
+ message(STATUS "PLPLOT Excluded as command option")
+-endif(NOT EXCLUDE_PLPLOT)
++endif(NOT EXCLUDE_PLPLOT AND NOT NO_BUILD_HL)
+
+
+ #===============================================================================
+@@ -223,10 +223,10 @@
+ add_subdirectory(test)
+ add_subdirectory(examples)
+
+-if(${GTKv} GREATER 2)
+- add_subdirectory(sketcher)
+-endif()
+-
+-if(PLPLOT_FOUND AND NOT EXCLUDE_PLPLOT)
+- add_subdirectory(plplot)
+-endif(PLPLOT_FOUND AND NOT EXCLUDE_PLPLOT)
++if(NOT NO_BUILD_HL)
++ if(PLPLOT_FOUND AND NOT EXCLUDE_PLPLOT)
++ add_subdirectory(plplot)
++ endif(PLPLOT_FOUND AND NOT EXCLUDE_PLPLOT)
++else(NOT NO_BUILD_HL)
++ message(STATUS "High Level API Excluded as command option")
++endif(NOT NO_BUILD_HL)
+diff -Naur a/src/CMakeLists.txt b/src/CMakeLists.txt
+--- a/src/CMakeLists.txt 2019-04-24 10:53:11.000000000 +0300
++++ b/src/CMakeLists.txt 2020-04-13 11:28:22.000000000 +0300
+@@ -33,28 +33,33 @@
+ "gdk-pixbuf-auto.f90"
+ "glib-auto.f90"
+ "gtk.f90"
+- "gtk-hl.f90"
+- "gtk-hl-container.f90"
+- "gtk-hl-button.f90"
+- "gtk-hl-entry.f90"
+- "gtk-hl-tree.f90"
+- "gtk-hl-menu.f90"
+- "gtk-hl-combobox.f90"
+- "gtk-hl-spin-slider.f90"
+- "gtk-hl-chooser.f90"
+- "gtk-hl-dialog.f90"
+- "gtk-hl-progress.f90"
+- "gtk-hl-accelerator.f90"
+- "gtk-hl-infobar.f90"
+- "gtk-hl-assistant.f90"
+- "gtk-hl-misc.f90"
+- "gtk-draw-hl.f90"
+ "gtk-sup.f90"
+- "gdk-pixbuf-hl.f90"
+ "pango-auto.f90"
+ "gdkevents-auto${GTKv}.f90"
+ )
+
++if(NOT NO_BUILD_HL)
++ set(sources ${sources}
++ "gtk-hl.f90"
++ "gtk-hl-container.f90"
++ "gtk-hl-button.f90"
++ "gtk-hl-entry.f90"
++ "gtk-hl-tree.f90"
++ "gtk-hl-menu.f90"
++ "gtk-hl-combobox.f90"
++ "gtk-hl-spin-slider.f90"
++ "gtk-hl-chooser.f90"
++ "gtk-hl-dialog.f90"
++ "gtk-hl-progress.f90"
++ "gtk-hl-accelerator.f90"
++ "gtk-hl-infobar.f90"
++ "gtk-hl-assistant.f90"
++ "gtk-hl-misc.f90"
++ "gtk-draw-hl.f90"
++ "gdk-pixbuf-hl.f90"
++ )
++endif(NOT NO_BUILD_HL)
++
+ if (CMAKE_HOST_WIN32)
+ set(sources
+ ${sources}
diff --git a/x11-libs/gtk-fortran/gtk-fortran-19.04.ebuild b/x11-libs/gtk-fortran/gtk-fortran-19.04.ebuild
index 18d44cd37..336334191 100644
--- a/x11-libs/gtk-fortran/gtk-fortran-19.04.ebuild
+++ b/x11-libs/gtk-fortran/gtk-fortran-19.04.ebuild
@@ -18,7 +18,8 @@ LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
-IUSE="doc examples plplot"
+IUSE="doc examples high-level plplot"
+REQUIRED_USE="plplot? ( high-level )"
RDEPEND="
x11-libs/gtk+:3
@@ -43,6 +44,11 @@ pkg_setup() {
src_prepare() {
default
+ # Patching here because of failed via PATCHES due to different line endings in files.
+ # Patch is disable building of 'gtkf-sketcher' - it isn't installed and has now documentation;
+ # add upstream 'NO_BUILD_HL' cmake option to disable build of high-level interface to gtk-fortran
+ # that is used by plplot interface (and gtkf-sketcher) and currently causes the TEXTREL QA warnings.
+ eapply "${FILESDIR}"/gtk-fortran-NO_BUILD_HL-option.patch
# Fix library installation path
sed -i "s:CMAKE_INSTALL_LIBDIR lib:CMAKE_INSTALL_LIBDIR $(get_libdir):" CMakeLists.txt || die
# Fix "Some or all of the gtk libraries were not found. (missing: GTK3_GDKCONFIG_INCLUDE_DIR)",
@@ -55,6 +61,7 @@ src_prepare() {
src_configure() {
mycmakeargs+=(
-DEXCLUDE_PLPLOT=$(usex plplot false true)
+ -DNO_BUILD_HL=$(usex high-level false true)
-DINSTALL_EXAMPLES=$(usex examples)
-DNO_BUILD_EXAMPLES=true
)
diff --git a/x11-libs/gtk-fortran/metadata.xml b/x11-libs/gtk-fortran/metadata.xml
index 59ec49c5f..8e7bf31c0 100644
--- a/x11-libs/gtk-fortran/metadata.xml
+++ b/x11-libs/gtk-fortran/metadata.xml
@@ -12,6 +12,7 @@
<use>
<flag name="doc">Build doxygen documentation</flag>
<flag name="examples">Install examples source code files</flag>
+ <flag name="high-level">Build high-level interface to the gtk-fortran package</flag>
<flag name="plplot">Build with <pkg>sci-libs/plplot</pkg> support</flag>
</use>
</pkgmetadata>