diff options
author | 2021-06-28 10:45:12 +0200 | |
---|---|---|
committer | 2021-06-28 10:47:52 +0200 | |
commit | 61ce36d41de01d56f42f4daedf677050ce302a21 (patch) | |
tree | 91bf1bd2679b4578ab12d76c4c8ada772b05d2c4 /sys-cluster/dlb | |
parent | dev-libs/octetos-coreutils: fixed fail with build 0.12 (diff) | |
download | guru-61ce36d41de01d56f42f4daedf677050ce302a21.tar.gz guru-61ce36d41de01d56f42f4daedf677050ce302a21.tar.bz2 guru-61ce36d41de01d56f42f4daedf677050ce302a21.zip |
sys-cluster/dlb: statically link tests
Closes: https://bugs.gentoo.org/784698
Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri@gmail.com>
Diffstat (limited to 'sys-cluster/dlb')
-rw-r--r-- | sys-cluster/dlb/dlb-2.1-r2.ebuild (renamed from sys-cluster/dlb/dlb-2.1-r1.ebuild) | 28 | ||||
-rw-r--r-- | sys-cluster/dlb/files/dlb-2.1-tkinter.patch | 102 |
2 files changed, 111 insertions, 19 deletions
diff --git a/sys-cluster/dlb/dlb-2.1-r1.ebuild b/sys-cluster/dlb/dlb-2.1-r2.ebuild index b78440590..e9674f7bc 100644 --- a/sys-cluster/dlb/dlb-2.1-r1.ebuild +++ b/sys-cluster/dlb/dlb-2.1-r2.ebuild @@ -15,9 +15,10 @@ SRC_URI="https://github.com/bsc-pm/dlb/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="LGPL-3" SLOT="0" KEYWORDS="~amd64" +IUSE="hwloc instrumentation mpi openmp test" -IUSE="hwloc instrumentation mpi openmp" REQUIRED_USE="${PYTHON_REQUIRED_USE}" +RESTRICT="!test? ( test )" DEPEND=" hwloc? ( sys-apps/hwloc ) @@ -29,40 +30,28 @@ RDEPEND=" dev-lang/tk $(python_gen_cond_dep 'dev-python/matplotlib[tk,${PYTHON_USEDEP}]') " +BDEPEND="test? ( sys-devel/bc )" -PATCHES=( "${FILESDIR}/${P}-pygen-python3.patch" ) +PATCHES=( + "${FILESDIR}/${P}-pygen-python3.patch" + "${FILESDIR}/${P}-tkinter.patch" +) src_prepare() { default sed -e "s|chmod +x \$(|chmod +x ${ED}/\$(|g" -i Makefile.am || die - - # Python3 fixes - sed -e "s/Tkinter/tkinter/" \ - -e "s/import ttk/from tkinter import ttk/" \ - -e "s/import tkMessageBox/from tkinter import messagebox/" \ - -e "s/tkMessageBox/messagebox/g" \ - -i scripts/viewer/dlb_cpu_usage.in || die - - sed -e "s/Tkinter/tkinter/" \ - -e "s/import ttk/from tkinter import ttk/" \ - -e "s/, NavigationToolbar2TkAgg//" \ - -e "/FigureCanvasTkAgg$/a from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT" \ - -e "s/NavigationToolbar2TkAgg/NavigationToolbar2QT/g" \ - -i scripts/viewer/dlb_viewer.py.in || die - sed -e "s|lib/|$(get_libdir)/|" -i scripts/viewer/dlb_wrapper.py || die - sed -e "s|Tkinter|tkinter|" -i scripts/viewer/progressmeter.py || die eautoreconf } src_configure() { local myconf=( - --disable-static --enable-shared --with-pic $(use_enable instrumentation) $(use_enable openmp) + $(use_enable test static) $(use_with hwloc) $(use_with mpi) ) @@ -72,4 +61,5 @@ src_configure() { src_install() { default find "${D}" -name '*.la' -delete || die + find "${D}" -name '*.a' -delete || die } diff --git a/sys-cluster/dlb/files/dlb-2.1-tkinter.patch b/sys-cluster/dlb/files/dlb-2.1-tkinter.patch new file mode 100644 index 000000000..37f5783d7 --- /dev/null +++ b/sys-cluster/dlb/files/dlb-2.1-tkinter.patch @@ -0,0 +1,102 @@ +--- a/scripts/viewer/dlb_cpu_usage.in ++++ b/scripts/viewer/dlb_cpu_usage.in +@@ -1,8 +1,8 @@ + #!/usr/bin/env python2 + +-import Tkinter as tk +-import ttk +-import tkMessageBox ++import tkinter as tk ++from tkinter import ttk ++from tkinter import messagebox + import random + + import sys +@@ -46,7 +46,7 @@ + + def start(self): + if self.viewer.empty(): +- tkMessageBox.showinfo("Warning", "Add some process before starting") ++ messagebox.showinfo("Warning", "Add some process before starting") + if self.viewer: + self.viewer.start() + +--- a/scripts/viewer/dlb_viewer.py.in ++++ b/scripts/viewer/dlb_viewer.py.in +@@ -3,11 +3,12 @@ + import time + from collections import deque + # GUI +-import Tkinter as tk +-import ttk ++import tkinter as tk ++from tkinter import ttk + import progressmeter + from matplotlib.figure import Figure, figaspect +-from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg ++from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg ++from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT + #DLB + import dlb_wrapper + +@@ -39,7 +40,7 @@ + self.canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1) + + if self.debug: +- self.toolbar = NavigationToolbar2TkAgg(self.canvas, self ) ++ self.toolbar = NavigationToolbar2QT(self.canvas, self ) + self.toolbar.pack() + self.toolbar.update() + +--- a/scripts/viewer/progressmeter.py ++++ b/scripts/viewer/progressmeter.py +@@ -1,10 +1,10 @@ + #!/usr/bin/env python2 + + '''Michael Lange <klappnase (at) freakmail (dot) de> +-The Meter class provides a simple progress bar widget for Tkinter. ++The Meter class provides a simple progress bar widget for tkinter. + + INITIALIZATION OPTIONS: +-The widget accepts all options of a Tkinter.Frame plus the following: ++The widget accepts all options of a tkinter.Frame plus the following: + + fillcolor -- the color that is used to indicate the progress of the + corresponding process; default is "orchid1". +@@ -18,22 +18,22 @@ + textcolor -- the color to use for the widget's text; default is "black". + + WIDGET METHODS: +-All methods of a Tkinter.Frame can be used; additionally there are two widget specific methods: ++All methods of a tkinter.Frame can be used; additionally there are two widget specific methods: + + get() -- returns a tuple of the form (value, text) + set(value, text) -- updates the widget's value and the displayed text; + if value is omitted it defaults to 0.0 , text defaults to None . + ''' + +-import Tkinter ++import tkinter + +-class Meter(Tkinter.Frame): ++class Meter(tkinter.Frame): + def __init__(self, master, width=300, height=20, bg='white', fillcolor='orchid1',\ + value=0.0, text=None, font=None, textcolor='black', *args, **kw): +- Tkinter.Frame.__init__(self, master, bg=bg, width=width, height=height, *args, **kw) ++ tkinter.Frame.__init__(self, master, bg=bg, width=width, height=height, *args, **kw) + self._value = value + +- self._canv = Tkinter.Canvas(self, bg=self['bg'], width=self['width'], height=self['height'],\ ++ self._canv = tkinter.Canvas(self, bg=self['bg'], width=self['width'], height=self['height'],\ + highlightthickness=0, relief='flat', bd=0) + self._canv.pack(fill='both', expand=1) + self._rect = self._canv.create_rectangle(0, 0, 0, self._canv.winfo_reqheight(), fill=fillcolor,\ +@@ -84,7 +84,7 @@ + meter.set(value, 'Demo successfully finished') + + if __name__ == '__main__': +- root = Tkinter.Tk(className='meter demo') ++ root = tkinter.Tk(className='meter demo') + m = Meter(root, relief='ridge', bd=3) + m.pack(fill='x') + m.set(0.0, 'Starting demo...') |