commit:     9ac3b599ab69b5b1d7d10a38b649fb3100fbe238
Author:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 28 18:32:59 2022 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Thu Jul 28 18:34:45 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ac3b599

net-misc/smbc: update EAPI 7 -> 8, lots of build fixes, ~amd64 keyword

Closes: https://bugs.gentoo.org/833344
Closes: https://bugs.gentoo.org/731698
Closes: https://bugs.gentoo.org/725206

Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../smbc-1.2.2-multiple-definitions-gcc10.patch    | 46 ++++++++++
 .../smbc/files/smbc-1.2.2-samba4-includes.patch    | 99 ++++++++++++++++++++++
 net-misc/smbc/files/smbc-1.2.2-tinfo.patch         | 18 ++++
 net-misc/smbc/smbc-1.2.2-r3.ebuild                 | 18 ++--
 4 files changed, 176 insertions(+), 5 deletions(-)

diff --git a/net-misc/smbc/files/smbc-1.2.2-multiple-definitions-gcc10.patch 
b/net-misc/smbc/files/smbc-1.2.2-multiple-definitions-gcc10.patch
new file mode 100644
index 000000000000..37dcedc4cc1c
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-multiple-definitions-gcc10.patch
@@ -0,0 +1,46 @@
+--- smbc-1.2.2.orig/src/static_str.c
++++ smbc-1.2.2/src/static_str.c
+@@ -21,6 +21,32 @@
+ #include "static_str.h"
+ #include "fnet.h"
+ 
++char *Rm1, *Rm2, *Rm3, *Rm4, *Rm5, *Rm6, *Rm7, *Rm8, *Rm9, *Rm10, *Rm11,
++
++     *Rm18, *Rm19,
++     *Rm20, *Rm21, *Rm22, *Rm23, *Rm24, *Rm25, *Rm26, *Rm27, *Rm28, *Rm29,
++     *Rm30, *Rm31, *Rm32, *Rm33, *Rm34, *Rm35, *Rm36, *Rm37, *Rm38, *Rm39,
++     *Rm40, *Rm41, *Rm42, *Rm43, *Rm44, *Rm45, *Rm46,        *Rm48, *Rm49,
++     *Rm50, *Rm51, *Rm52, *Rm53, *Rm54, *Rm55,               *Rm58, *Rm59,
++     *Rm60, *Rm61, *Rm62, *Rm63, *Rm64, *Rm65,        *Rm67, *Rm68, *Rm69,
++     *Rm70, *Rm71, *Rm72, *Rm73, *Rm74, *Rm75, *Rm76, *Rm77, *Rm78, *Rm79,
++     *Rm80, *Rm81, *Rm82, *Rm83, *Rm84, *Rm85, *Rm86, *Rm87, *Rm88,
++     *Rm90, *Rm91, *Rm92, *Rm93, *Rm94, *Rm95, *Rm96, *Rm97, *Rm98, *Rm99,
++     *Rm100, *Rm101, *Rm102, *Rm103, *Rm104, *Rm105, *Rm106, *Rm107, *Rm108,
++             *Rm111,         *Rm113, *Rm114, *Rm115, *Rm116, *Rm117, *Rm118, 
*Rm119,
++             *Rm121,         *Rm123, *Rm124, *Rm125,                         
*Rm129,
++             *Rm131,         *Rm133, *Rm134, *Rm135, *Rm136, *Rm137, *Rm138, 
*Rm139,
++     *Rm140, *Rm141, *Rm142, *Rm143, *Rm144, *Rm145, *Rm146, *Rm147, *Rm148, 
*Rm149,
++     *Rm150, *Rm151, *Rm152, *Rm153, *Rm154,         *Rm156, *Rm157, *Rm158, 
*Rm159,
++     *Rm160,         *Rm162, *Rm163,                                 *Rm168, 
*Rm169,
++     *Rm170, *Rm171, *Rm172, *Rm173,         *Rm175, *Rm176, *Rm177, *Rm178, 
*Rm179,
++     *Rm180, *Rm181, *Rm182,
++
++     *Rm231, *Rm232, *Rm233, *Rm234, *Rm235, *Rm236, *Rm237, *Rm238, *Rm239,
++     *Rm240, *Rm241, *Rm242, *Rm243, *Rm244, *Rm245,
++
++     *Rm300, *Rm301, *Rm302, *Rm303, *Rm304, *Rm305, *Rm306, *Rm307;
++
+ void 
+ RinitStrings()
+ {
+--- smbc-1.2.2.orig/src/static_str.h
++++ smbc-1.2.2/src/static_str.h
+@@ -9,7 +9,7 @@
+ */
+ // -------------------------------------------------------------------
+ 
+-char *Rm1, *Rm2, *Rm3, *Rm4, *Rm5, *Rm6, *Rm7, *Rm8, *Rm9, *Rm10, *Rm11,
++extern char *Rm1, *Rm2, *Rm3, *Rm4, *Rm5, *Rm6, *Rm7, *Rm8, *Rm9, *Rm10, 
*Rm11,
+ 
+      *Rm18, *Rm19,
+      *Rm20, *Rm21, *Rm22, *Rm23, *Rm24, *Rm25, *Rm26, *Rm27, *Rm28, *Rm29,

diff --git a/net-misc/smbc/files/smbc-1.2.2-samba4-includes.patch 
b/net-misc/smbc/files/smbc-1.2.2-samba4-includes.patch
new file mode 100644
index 000000000000..3238fc035e4b
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-samba4-includes.patch
@@ -0,0 +1,99 @@
+--- smbc-1.2.2.orig/src/bookmarks.c
++++ smbc-1.2.2/src/bookmarks.c
+@@ -23,7 +23,7 @@
+ #endif /* not HAVE_STRING_H */
+ 
+ #include <libintl.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include "dulist.h"
+--- smbc-1.2.2.orig/src/dulist.c
++++ smbc-1.2.2/src/dulist.c
+@@ -22,7 +22,7 @@
+ 
+ #include <libintl.h>
+ #include <dirent.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include "fnet.h"
+--- smbc-1.2.2.orig/src/find-index-manage.c
++++ smbc-1.2.2/src/find-index-manage.c
+@@ -23,7 +23,7 @@
+ #include <stdio.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <stdlib.h>
+ #include <math.h>
+ #include "find-index-manage.h"
+--- smbc-1.2.2.orig/src/fnet.c
++++ smbc-1.2.2/src/fnet.c
+@@ -20,7 +20,7 @@
+ #endif /* HAVE_STRINGS_H */
+ #endif /* not HAVE_STRING_H */
+ 
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <unistd.h>
+--- smbc-1.2.2.orig/src/smb-pack.c
++++ smbc-1.2.2/src/smb-pack.c
+@@ -21,7 +21,7 @@
+ #include <sys/types.h>
+ #include <signal.h>
+ #include <curses.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+ #include "smb-pack.h"
+--- smbc-1.2.2.orig/src/smb-pack.h
++++ smbc-1.2.2/src/smb-pack.h
+@@ -18,7 +18,7 @@
+ #endif /* HAVE_STRINGS_H */
+ #endif /* not HAVE_STRING_H */
+ 
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ 
+ #define RstrCmp(src, dst) (!strcmp(src, dst))
+ 
+--- smbc-1.2.2.orig/src/smbc.c
++++ smbc-1.2.2/src/smbc.c
+@@ -31,7 +31,7 @@
+ #include <dirent.h>
+ #include <time.h>
+ #include <errno.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <popt.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+--- smbc-1.2.2.orig/src/ttlist.c
++++ smbc-1.2.2/src/ttlist.c
+@@ -20,7 +20,7 @@
+ #endif /* HAVE_STRINGS_H */
+ #endif /* not HAVE_STRING_H */
+ 
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <fcntl.h>
+ #include <stdio.h>
+ #include <unistd.h>
+--- smbc-1.2.2.orig/src/winpopup.c
++++ smbc-1.2.2/src/winpopup.c
+@@ -11,7 +11,7 @@
+ 
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <libsmbclient.h>
++#include <samba-4.0/libsmbclient.h>
+ #include <unistd.h>
+ #include "winpopup.h"
+ #include "debug.h"

diff --git a/net-misc/smbc/files/smbc-1.2.2-tinfo.patch 
b/net-misc/smbc/files/smbc-1.2.2-tinfo.patch
new file mode 100644
index 000000000000..8c35c4b0b0d0
--- /dev/null
+++ b/net-misc/smbc/files/smbc-1.2.2-tinfo.patch
@@ -0,0 +1,18 @@
+diff -ur a/configure.in b/configure.in
+--- a/configure.in     2022-07-28 13:24:38.673242313 -0500
++++ b/configure.in     2022-07-28 13:27:43.726466613 -0500
+@@ -94,11 +94,9 @@
+              [AC_CHECK_LIB(popt, main)]
+             )
+ 
+-AC_CHECK_LIB(ncurses,  
+-             main, 
+-             [], 
+-             [AC_CHECK_LIB(ncurses, main)]
+-            )
++PKG_CHECK_MODULES([NCURSES], [ncurses], [
++      LIBS="$NCURSES_LIBS $LIBS"
++], [:])
+ 
+ AC_CHECK_LIB(smbclient, 
+              main, 

diff --git a/net-misc/smbc/smbc-1.2.2-r3.ebuild 
b/net-misc/smbc/smbc-1.2.2-r3.ebuild
index 87ebd6eea0a6..434ea97b5718 100644
--- a/net-misc/smbc/smbc-1.2.2-r3.ebuild
+++ b/net-misc/smbc/smbc-1.2.2-r3.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
 
 inherit autotools
 
@@ -11,20 +11,28 @@ SRC_URI="mirror://sourceforge/${PN}/${P}.tgz"
 
 LICENSE="GPL-2+"
 SLOT="0"
-KEYWORDS="~ppc ~x86"
+KEYWORDS="~amd64 ~ppc ~x86"
 IUSE="nls debug"
 
+BDEPEND="virtual/pkgconfig"
 DEPEND="dev-libs/popt
        net-fs/samba
        sys-libs/ncurses
        nls? ( sys-devel/gettext )"
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}"/${P}-cflags.patch
+       "${FILESDIR}"/${P}-size_t.patch
+       "${FILESDIR}"/${P}-samba4-includes.patch
+       "${FILESDIR}"/${P}-multiple-definitions-gcc10.patch
+       "${FILESDIR}"/${P}-tinfo.patch
+)
+
 src_prepare() {
        default
        mv configure.{in,ac} || die
-       eapply "${FILESDIR}"/${P}-cflags.patch
-       eapply "${FILESDIR}"/${P}-size_t.patch
+       # for some reason some build 32bit x86 objects are bundled
+       rm src/*.o
        eautoreconf
 }
 

Reply via email to