public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmmaiload/, x11-plugins/wmmaiload/files/
@ 2020-12-20 21:14 Bernard Cafarelli
  0 siblings, 0 replies; 3+ messages in thread
From: Bernard Cafarelli @ 2020-12-20 21:14 UTC (permalink / raw
  To: gentoo-commits

commit:     842ae0293d658d623527ccdadac7a4d25496a3d3
Author:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Sun Dec 20 21:13:58 2020 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Dec 20 21:14:16 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=842ae029

x11-plugins/wmmaiload: multiple build fixes

Fix build with -fno-common
Set CPP
Use patch for SSL fix, bump EAPI

Closes: https://bugs.gentoo.org/708542
Closes: https://bugs.gentoo.org/760588
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 .../files/wmmaiload-2.3.0-fno-common.patch         | 113 +++++++++++++++++++++
 .../wmmaiload/files/wmmaiload-2.3.0-ssl.patch      |  24 +++++
 x11-plugins/wmmaiload/wmmaiload-2.3.0-r2.ebuild    |  46 +++++++++
 3 files changed, 183 insertions(+)

diff --git a/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-fno-common.patch b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-fno-common.patch
new file mode 100644
index 00000000000..f4c0eb9763b
--- /dev/null
+++ b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-fno-common.patch
@@ -0,0 +1,113 @@
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload-config/main.c wmmaiload-2.3.0/wmmaiload-config/main.c
+--- wmmaiload-2.3.0.orig/wmmaiload-config/main.c	2005-07-13 21:51:28.000000000 +0200
++++ wmmaiload-2.3.0/wmmaiload-config/main.c	2020-12-20 22:04:03.170530520 +0100
+@@ -11,6 +11,18 @@
+ #include "mainwindow.h"
+ #include "actions.h"
+ 
++int backlight;
++int update_interval;
++int boxnum;
++int check_delay;
++int switch_authorized;
++int run_once;
++int test_size;
++char *config_file;
++char *light_color;
++char *command;
++char *notif_cmd;
++MailBox *mboxes;
+ 
+ void Usage ()
+ {
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload-config/mainwindow.c wmmaiload-2.3.0/wmmaiload-config/mainwindow.c
+--- wmmaiload-2.3.0.orig/wmmaiload-config/mainwindow.c	2009-02-23 03:58:00.000000000 +0100
++++ wmmaiload-2.3.0/wmmaiload-config/mainwindow.c	2020-12-20 22:05:14.978622375 +0100
+@@ -9,6 +9,19 @@
+ #include "mainwindow.h"
+ #include "actions.h"
+ 
++GtkWidget *application;
++GtkWidget *filelist;
++GtkWidget *wid_backlight;
++GtkWidget *wid_blink;
++GtkWidget *wid_interval;
++GtkWidget *wid_checkdelay;
++GtkWidget *wid_color;
++GtkWidget *wid_command;
++GtkWidget *wid_notify;
++GtkWidget *wid_runonce;
++GtkWidget *wid_testsize;
++
++int selected_row;
+ 
+ static GtkWidget *b_edit;
+ static GtkWidget *b_set;
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload-config/mainwindow.h wmmaiload-2.3.0/wmmaiload-config/mainwindow.h
+--- wmmaiload-2.3.0.orig/wmmaiload-config/mainwindow.h	2005-07-07 20:54:17.000000000 +0200
++++ wmmaiload-2.3.0/wmmaiload-config/mainwindow.h	2020-12-20 22:05:14.978622375 +0100
+@@ -7,19 +7,19 @@
+ 
+ #include <gtk/gtk.h>
+ 
+-GtkWidget *application;
+-GtkWidget *filelist;
+-GtkWidget *wid_backlight;
+-GtkWidget *wid_blink;
+-GtkWidget *wid_interval;
+-GtkWidget *wid_checkdelay;
+-GtkWidget *wid_color;
+-GtkWidget *wid_command;
+-GtkWidget *wid_notify;
+-GtkWidget *wid_runonce;
+-GtkWidget *wid_testsize;
++extern GtkWidget *application;
++extern GtkWidget *filelist;
++extern GtkWidget *wid_backlight;
++extern GtkWidget *wid_blink;
++extern GtkWidget *wid_interval;
++extern GtkWidget *wid_checkdelay;
++extern GtkWidget *wid_color;
++extern GtkWidget *wid_command;
++extern GtkWidget *wid_notify;
++extern GtkWidget *wid_runonce;
++extern GtkWidget *wid_testsize;
+ 
+-int selected_row;
++extern int selected_row;
+ 
+ gint list_unsel_cb (GtkCList *clist,
+                     gint row,
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload-config/variables.h wmmaiload-2.3.0/wmmaiload-config/variables.h
+--- wmmaiload-2.3.0.orig/wmmaiload-config/variables.h	2005-07-07 20:54:17.000000000 +0200
++++ wmmaiload-2.3.0/wmmaiload-config/variables.h	2020-12-20 22:04:03.170530520 +0100
+@@ -7,17 +7,17 @@
+ 
+ #include "defines.h"
+ 
+-int backlight;
+-int update_interval;
+-int boxnum;
+-int check_delay;
+-int switch_authorized;
+-int run_once;
+-int test_size;
+-char *config_file;
+-char *light_color;
+-char *command;
+-char *notif_cmd;
+-MailBox *mboxes;
++extern int backlight;
++extern int update_interval;
++extern int boxnum;
++extern int check_delay;
++extern int switch_authorized;
++extern int run_once;
++extern int test_size;
++extern char *config_file;
++extern char *light_color;
++extern char *command;
++extern char *notif_cmd;
++extern MailBox *mboxes;
+ 
+ #endif

diff --git a/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-ssl.patch b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-ssl.patch
new file mode 100644
index 00000000000..81256348625
--- /dev/null
+++ b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-ssl.patch
@@ -0,0 +1,24 @@
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload/Init.make wmmaiload-2.3.0/wmmaiload/Init.make
+--- wmmaiload-2.3.0.orig/wmmaiload/Init.make	2005-08-28 21:14:57.000000000 +0200
++++ wmmaiload-2.3.0/wmmaiload/Init.make	2020-12-20 22:10:24.487996211 +0100
+@@ -45,7 +45,7 @@
+ # SPECIFIC INFORMATIONS :
+ #
+ 
+-LIB_SSL = $(shell grep -q '^OPTIONS.*HAVE_SSL' ../Config.make && echo '-lssl')
++LIB_SSL = $(shell grep -q '^OPTIONS.*HAVE_SSL' ../Config.make && echo '-lssl -lcrypto')
+ LIB_THREADS = $(shell grep -q '^OPTIONS.*HAVE_THREADS' ../Config.make && echo '-lpthread')
+ 
+ CROSS_COMPILE =
+diff -Naur wmmaiload-2.3.0.orig/wmmaiload/ssl.c wmmaiload-2.3.0/wmmaiload/ssl.c
+--- wmmaiload-2.3.0.orig/wmmaiload/ssl.c	2005-07-30 15:52:55.000000000 +0200
++++ wmmaiload-2.3.0/wmmaiload/ssl.c	2020-12-20 22:10:30.327001632 +0100
+@@ -39,7 +39,7 @@
+ 
+         OpenSSL_add_all_algorithms();
+ 
+-        method = SSLv2_client_method();
++        method = SSLv23_client_method();
+         ctx = SSL_CTX_new(method);
+         return ctx;
+ }

diff --git a/x11-plugins/wmmaiload/wmmaiload-2.3.0-r2.ebuild b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r2.ebuild
new file mode 100644
index 00000000000..79edd2c03eb
--- /dev/null
+++ b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r2.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit toolchain-funcs
+
+DESCRIPTION="dockapp that monitors one or more mailboxes"
+HOMEPAGE="http://tnemeth.free.fr/projets/dockapps.html"
+SRC_URI="http://tnemeth.free.fr/projets/programmes/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE=""
+
+RDEPEND="x11-libs/gtk+:2
+	x11-libs/libXpm"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.2.1-checkthread.patch
+	"${FILESDIR}"/${P}-fno-common.patch
+	"${FILESDIR}"/${P}-ssl.patch
+)
+
+src_configure() {
+	# The ./configure script is not autoconf based, therefore don't use econf:
+	./configure -p /usr || die
+}
+
+src_compile() {
+	emake \
+		CC="$(tc-getCC)" \
+		CPP="$(tc-getCPP)" \
+		CFLAGS="${CFLAGS}" \
+		DEBUG_LDFLAGS="" \
+		LDFLAGS="${LDFLAGS}" \
+		DEBUG_CFLAGS=""
+}
+
+src_install() {
+	dobin ${PN}/${PN} ${PN}-config/${PN}-config
+	doman doc/*.1
+	dodoc AUTHORS ChangeLog FAQ NEWS README THANKS TODO doc/sample.${PN}rc
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmmaiload/, x11-plugins/wmmaiload/files/
@ 2025-02-16 20:09 Bernard Cafarelli
  0 siblings, 0 replies; 3+ messages in thread
From: Bernard Cafarelli @ 2025-02-16 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     7f1d6f96e35804b93d84429cb9399fd095a2efc6
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Feb 15 07:07:15 2025 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 20:09:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7f1d6f96

x11-plugins/wmmaiload: update EAPI 7 -> 8, port to C23

Also add dependency on openssl in build system that was missing from
ebuild.

Closes: https://bugs.gentoo.org/943914
Closes: https://bugs.gentoo.org/921310
Closes: https://bugs.gentoo.org/875470
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 .../wmmaiload/files/wmmaiload-2.3.0-c23.patch      | 34 +++++++++++++++
 x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild    | 48 ++++++++++++++++++++++
 2 files changed, 82 insertions(+)

diff --git a/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-c23.patch b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-c23.patch
new file mode 100644
index 000000000000..6a8b25fb21ea
--- /dev/null
+++ b/x11-plugins/wmmaiload/files/wmmaiload-2.3.0-c23.patch
@@ -0,0 +1,34 @@
+diff --git a/wmmaiload/dockapp.c b/wmmaiload/dockapp.c
+index f29ec9c..ee659a4 100644
+--- a/wmmaiload/dockapp.c
++++ b/wmmaiload/dockapp.c
+@@ -27,6 +27,7 @@
+ #include <sys/time.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <stdlib.h>
+ 
+ #define WINDOWED_SIZE_W 64
+ #define WINDOWED_SIZE_H 64
+diff --git a/wmmaiload/main.c b/wmmaiload/main.c
+index a3d0b52..78ed1bb 100644
+--- a/wmmaiload/main.c
++++ b/wmmaiload/main.c
+@@ -138,7 +138,7 @@ static void mbox_add(MailBox **list, const char *value);
+ static BoxType getboxtype(const char *t);
+ static void free_mbox(MailBox **list);
+ static int nb_mbox(MailBox *list);
+-static void check_cfg_values();
++static void check_cfg_values(Bool wait);
+ static void replace_box_list(MailBox *replace);
+ 
+ 
+@@ -167,7 +167,7 @@ int main(int argc, char **argv)
+ #if DEBUG_LEVEL>0
+         printf("arguments parsed.\n");
+ #endif
+-        check_cfg_values();
++        check_cfg_values(False);
+         /* Load default configuration */
+         if (! config_file)
+         {

diff --git a/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild
new file mode 100644
index 000000000000..e679cd0294c4
--- /dev/null
+++ b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+inherit toolchain-funcs
+
+DESCRIPTION="dockapp that monitors one or more mailboxes"
+HOMEPAGE="http://tnemeth.free.fr/projets/dockapps.html"
+SRC_URI="http://tnemeth.free.fr/projets/programmes/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND="x11-libs/gtk+:2
+	x11-libs/libXpm
+	dev-libs/openssl"
+
+DEPEND="${RDEPEND}
+	virtual/pkgconfig"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-2.2.1-checkthread.patch
+	"${FILESDIR}"/${P}-fno-common.patch
+	"${FILESDIR}"/${P}-ssl.patch
+	"${FILESDIR}"/${P}-c23.patch
+)
+
+src_configure() {
+	# The ./configure script is not autoconf based, therefore don't use econf:
+	./configure -p /usr || die
+}
+
+src_compile() {
+	emake \
+		CC="$(tc-getCC)" \
+		CPP="$(tc-getCPP)" \
+		CFLAGS="${CFLAGS}" \
+		DEBUG_LDFLAGS="" \
+		LDFLAGS="${LDFLAGS}" \
+		DEBUG_CFLAGS=""
+}
+
+src_install() {
+	dobin ${PN}/${PN} ${PN}-config/${PN}-config
+	doman doc/*.1
+	dodoc AUTHORS ChangeLog FAQ NEWS README THANKS TODO doc/sample.${PN}rc
+}


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmmaiload/, x11-plugins/wmmaiload/files/
@ 2025-02-16 20:09 Bernard Cafarelli
  0 siblings, 0 replies; 3+ messages in thread
From: Bernard Cafarelli @ 2025-02-16 20:09 UTC (permalink / raw
  To: gentoo-commits

commit:     0bbfb8c456266ce3e192d329bbf1f47f4c51f6cc
Author:     NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com>
AuthorDate: Sat Feb 15 07:12:42 2025 +0000
Commit:     Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Feb 16 20:09:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bbfb8c4

x11-plugins/wmmaiload: Switch build system to meson

Original build system was made by someone who didn't know how to use
make correctly and was too smart about it. Eg. it uses call to compiler:
`$(CPP) $(ALL_CPPFLAGS) -MM $$i >> .dependencies` to generate actual build
commands and `$(shell ls *.c)` to find source files in the directory.
There is no propagation of errors upwards, so if one of two executables
fails to compile, it would only be seen at install stage.
Meson.build replicates end product of configure by passing build
parameters defined in Config.make. Builds in Gentoo enabled all if them,
unconditionally.
Meson.build also gets rid of per-executable config.h and replaces it with
more build paratemers, as config.h only contains build metadata, like
OS type, author name, package name and build date. Original build system
regenerated this mostly-static metadata file on compile, I pass static
parameters explicitly, with date being an empty string.
This is supported in program.
I do not like the end result, but original system is not fit for purpose.

Bug: https://bugs.gentoo.org/943914
Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40578
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>

 x11-plugins/wmmaiload/files/meson.build         | 77 +++++++++++++++++++++++++
 x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild | 23 +++-----
 2 files changed, 85 insertions(+), 15 deletions(-)

diff --git a/x11-plugins/wmmaiload/files/meson.build b/x11-plugins/wmmaiload/files/meson.build
new file mode 100644
index 000000000000..5791ebb405db
--- /dev/null
+++ b/x11-plugins/wmmaiload/files/meson.build
@@ -0,0 +1,77 @@
+project('wmmaiload', 'c', version: '2.3.0')
+
+add_project_arguments(
+    '-DHAVE_THREADS',
+    '-DHAVE_IMAP',
+    '-DHAVE_MAILDIR',
+    '-DHAVE_MBOX',
+    '-DHAVE_MH',
+    '-DHAVE_POP3',
+    '-DHAVE_SSL',
+    '-DHAVE_SELECT',
+    '-DHAVE_STRING_H',
+    '-DHAVE_STRINGS_H',
+    '-DHAVE_UNISTD_H',
+    language: 'c',
+)
+
+# Originally, this was generated and regenerated
+# by a set of shell functions embedded into makefile
+# replacing with sane defaults
+
+add_project_arguments(
+    '-DVERSION="2.3.0"',
+    '-DAUTHORS="Thomas Nemeth"',
+    '-DOSTYPE="linux"',
+    '-DBUILD=""',
+    language: 'c',
+)
+
+threads_dep = dependency('threads')
+ssl = dependency('openssl')
+xext = dependency('xext')
+xpm = dependency('xpm')
+gtk = dependency('gtk+-2.0')
+x11 = dependency('X11')
+
+wmmaiload_sources = [
+    'wmmaiload/checkthread.c',
+    'wmmaiload/dockapp.c',
+    'wmmaiload/imapclient.c',
+    'wmmaiload/main.c',
+    'wmmaiload/options.c',
+    'wmmaiload/pop3client.c',
+    'wmmaiload/ssl.c',
+]
+
+wmmaiload_include = include_directories('wmmaiload')
+
+wmmaiload = executable(
+    'wmmaiload',
+    wmmaiload_sources,
+    include_directories: wmmaiload_include,
+    dependencies: [threads_dep, ssl, xext, xpm],
+    install: true,
+    c_args: ['-DPACKAGE="WMMaiLoad"', '-DPROGRAM="wmmaiload"'],
+)
+
+wmmail_conf_sources = [
+    'wmmaiload-config/actions.c',
+    'wmmaiload-config/dialogs.c',
+    'wmmaiload-config/main.c',
+    'wmmaiload-config/mainwindow.c',
+    'wmmaiload-config/popedit.c',
+    'wmmaiload-config/tools.c',
+]
+
+wmmail_conf_include = include_directories('wmmaiload-config')
+
+wmmail_conf = executable(
+    'wmmaiload-config',
+    wmmail_conf_sources,
+    dependencies: [gtk, x11],
+    include_directories: wmmail_conf_include,
+    c_args: ['-DPACKAGE="WMMaiLoad-Config"', '-DPROGRAM="wmmaiload-config"'],
+    install: true,
+)
+

diff --git a/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild
index e679cd0294c4..c364c8d24fcd 100644
--- a/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild
+++ b/x11-plugins/wmmaiload/wmmaiload-2.3.0-r3.ebuild
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
-inherit toolchain-funcs
+inherit meson
 
 DESCRIPTION="dockapp that monitors one or more mailboxes"
 HOMEPAGE="http://tnemeth.free.fr/projets/dockapps.html"
@@ -18,7 +18,6 @@ RDEPEND="x11-libs/gtk+:2
 
 DEPEND="${RDEPEND}
 	virtual/pkgconfig"
-
 PATCHES=(
 	"${FILESDIR}"/${PN}-2.2.1-checkthread.patch
 	"${FILESDIR}"/${P}-fno-common.patch
@@ -26,23 +25,17 @@ PATCHES=(
 	"${FILESDIR}"/${P}-c23.patch
 )
 
-src_configure() {
-	# The ./configure script is not autoconf based, therefore don't use econf:
-	./configure -p /usr || die
-}
+src_prepare() {
+	default
 
-src_compile() {
-	emake \
-		CC="$(tc-getCC)" \
-		CPP="$(tc-getCPP)" \
-		CFLAGS="${CFLAGS}" \
-		DEBUG_LDFLAGS="" \
-		LDFLAGS="${LDFLAGS}" \
-		DEBUG_CFLAGS=""
+	cp "${FILESDIR}"/meson.build . || die "No new build file"
+	rm -f wmmaiload/config.h && touch wmmaiload/config.h || die "Can't remove stale config"
+	rm -f wmmaiload-config/config.h && touch wmmaiload-config/config.h || die "Can't remove stale config"
 }
 
 src_install() {
-	dobin ${PN}/${PN} ${PN}-config/${PN}-config
+	meson_install
+
 	doman doc/*.1
 	dodoc AUTHORS ChangeLog FAQ NEWS README THANKS TODO doc/sample.${PN}rc
 }


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-16 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-20 21:14 [gentoo-commits] repo/gentoo:master commit in: x11-plugins/wmmaiload/, x11-plugins/wmmaiload/files/ Bernard Cafarelli
  -- strict thread matches above, loose matches on Subject: below --
2025-02-16 20:09 Bernard Cafarelli
2025-02-16 20:09 Bernard Cafarelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox