On Sat, May 01, 2021 at 01:12:55PM +0200, Marc Espie wrote:
> Simple and straightforward enough. A bit approximative probably but better
> than nothing.
> 
> (if it looks fine, I'll try upstreaming this)
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/graphics/gimp/stable/Makefile,v
> retrieving revision 1.144
> diff -u -p -r1.144 Makefile
> --- Makefile  1 Apr 2021 10:01:06 -0000       1.144
> +++ Makefile  1 May 2021 11:11:42 -0000
> @@ -3,6 +3,7 @@
>  COMMENT=     GNU Image Manipulation Program
>  
>  DISTNAME =   gimp-2.10.24
> +REVISION =   0
>  
>  .for i in gimp gimpbase gimpcolor gimpconfig gimpmath gimpmodule \
>       gimpthumb gimpui gimpwidgets
> Index: patches/patch-app_widgets_gimpdashboard_c
> ===================================================================
> RCS file: patches/patch-app_widgets_gimpdashboard_c
> diff -N patches/patch-app_widgets_gimpdashboard_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-app_widgets_gimpdashboard_c 1 May 2021 11:11:42 -0000
> @@ -0,0 +1,52 @@
> +$OpenBSD$
> +
> +Index: app/widgets/gimpdashboard.c
> +--- app/widgets/gimpdashboard.c.orig
> ++++ app/widgets/gimpdashboard.c
> +@@ -2512,6 +2512,46 @@ gimp_dashboard_sample_memory_available (GimpDashboard 
> +   variable_data->value.size = ms.ullAvailPhys;
> + }
> + 
> ++#elif defined(__OpenBSD__)
> ++#include <sys/resource.h>
> ++#include <sys/types.h>
> ++#include <sys/sysctl.h>
> ++
> ++static void
> ++gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
> ++                                   Variable       variable)
> ++{
> ++  GimpDashboardPrivate *priv          = dashboard->priv;
> ++  VariableData         *variable_data = &priv->variables[variable];
> ++  struct rusage rusage;
> ++
> ++  variable_data->available = FALSE;
> ++
> ++  if (getrusage(RUSAGE_SELF, &rusage) == -1)
> ++    return;
> ++  variable_data->available  = TRUE;
> ++  variable_data->value.size = (guint64)(rusage.ru_maxrss * 1024);
> ++}
> ++
> ++static void
> ++gimp_dashboard_sample_memory_available (GimpDashboard *dashboard,
> ++                                        Variable       variable)
> ++{
> ++  GimpDashboardPrivate *priv            = dashboard->priv;
> ++  VariableData         *variable_data   = &priv->variables[variable];
> ++  int mib[] = {CTL_HW, HW_PHYSMEM64};
> ++  int64_t result;
> ++  size_t sz = sizeof(int64_t);
> ++
> ++
> ++  variable_data->available = FALSE;
> ++
> ++  if (sysctl(mib, 2, &result, &sz, NULL, 0) == -1)
> ++    return;
> ++  variable_data->available  = TRUE;
> ++  variable_data->value.size = (guint64)result;
> ++}
> ++
> + #else /* ! G_OS_WIN32 && ! PLATFORM_OSX */
> + static void
> + gimp_dashboard_sample_memory_used (GimpDashboard *dashboard,
> 
> 
Just in case you want to test-drive it: it's not really hidden. The dashboard
is at the bottom of Windows/Dockable Dialogs/Dashboard

In case you're looking for a specific feature in gimp, you can search for
things by name using "/" (yeah, they added a search feature a few releases
back).

Also: it's one of those professional programs (not kidding) which has
a huge learning curve. I did import "grokking-the-gimp" a few years ago.
I'm probably going to decommission it at some point, because it's very
much behind the curve.

If you want to learn gimp "in depth", there's this guy (Davies Media
Design) on youtube who is posting amazing videos.

He is partly responsible for me taking an interest back in that program
and improving a few details which were sub-par in our port.  Not quite free
software, but definitely a great community resource, showing that GIMP can
go head-to-head with Illustrator on many many tasks.

Reply via email to