commit:     8e1cf657aed74faa706d9fabc9b7a6290b8d9fc4
Author:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
AuthorDate: Wed Sep  9 23:57:09 2020 +0000
Commit:     Kent Fredric <kentnl <AT> gentoo <DOT> org>
CommitDate: Thu Sep 10 15:02:12 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e1cf657

dev-perl/Filesys-SmbClient: -r bump for EAPI7 + misc toolchain love

- EAPI7
- Ensure CFLAGS passed to compiler
- Rework the lib/inc handling stuff entirely, as the existing code still
  added its own "special" in injecting useless stuff like "/usr/lib/"
  into the libdir discovery, which caused linking to attempt to link
  64bit code with 32bit code, before the real link. On GCC this doesn't
  fatal, but clang can..., so the whole thing is ripped out, the paths
  are hard-forced from ENV vars, and the pkgconfig magic is done
  in-ebuild instead of in Makefile.PL, making it less crazy, and also
  making it easier to change this later if its wrong.
- Relocate configure.in to configure.ac to avoid an autotools.eclass
  AWOOOOOOOGA notice.

Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org>

 .../Filesys-SmbClient-3.200.0-r4.ebuild            | 68 ++++++++++++++++++++++
 .../Filesys-SmbClient-3.2-no-magic-libdir.patch    | 52 +++++++++++++++++
 2 files changed, 120 insertions(+)

diff --git a/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r4.ebuild 
b/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r4.ebuild
new file mode 100644
index 00000000000..adf20536a0e
--- /dev/null
+++ b/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r4.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DIST_AUTHOR=ALIAN
+DIST_VERSION=3.2
+inherit perl-module autotools
+
+DESCRIPTION="Provide Perl API for libsmbclient.so"
+
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND=">=net-fs/samba-4.2[client]"
+DEPEND=">=net-fs/samba-4.2[client]"
+BDEPEND="${RDEPEND}
+       virtual/perl-ExtUtils-MakeMaker
+       virtual/pkgconfig
+       test? (
+               virtual/perl-Test-Simple
+       )
+"
+
+PATCHES=(
+       "${FILESDIR}/${P}-close_fn.patch"
+       "${FILESDIR}/${PN}-3.2-no-magic-libdir.patch"
+)
+
+src_prepare() {
+       perl-module_src_prepare
+       cp -vf configure.in configure.ac || die "Can't copy configure.in"
+       perl_rm_files configure.in
+       eautoreconf
+}
+src_configure() {
+       GENTOO_INC_SMBCLIENT="$( pkg-config --variable=includedir smbclient )" \
+               GENTOO_LIB_SMBCLIENT="$( pkg-config --variable=libdir smbclient 
)" \
+               perl-module_src_configure
+}
+src_compile() {
+       mymake=(
+               "OPTIMIZE=${CFLAGS}"
+       )
+       perl-module_src_compile
+}
+src_test() {
+       local MODULES=(
+               "Filesys::SmbClient ${DIST_VERSION}"
+       )
+       local failed=()
+       for dep in "${MODULES[@]}"; do
+               ebegin "Compile testing ${dep}"
+                       perl -Mblib="${S}" -M"${dep} ()" -e1
+               eend $? || failed+=( "$dep" )
+       done
+       if [[ ${failed[@]} ]]; then
+               echo
+               eerror "One or more modules failed compile:";
+               for dep in "${failed[@]}"; do
+                       eerror "  ${dep}"
+               done
+               die "Failing due to module compilation errors";
+       fi
+       # standard tests are not designed to work on a non-developer system.
+}

diff --git 
a/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.2-no-magic-libdir.patch 
b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.2-no-magic-libdir.patch
new file mode 100644
index 00000000000..337a2338607
--- /dev/null
+++ 
b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.2-no-magic-libdir.patch
@@ -0,0 +1,52 @@
+From 9f3c784d483623edb65f6e9579fd1a34e885f766 Mon Sep 17 00:00:00 2001
+From: Kent Fredric <[email protected]>
+Date: Thu, 10 Sep 2020 11:34:38 +1200
+Subject: Strip automagic detection if include/ and lib/ dirs.
+
+---
+ Makefile.PL | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+diff --git a/Makefile.PL b/Makefile.PL
+index 954df92..ccd842a 100755
+--- a/Makefile.PL
++++ b/Makefile.PL
+@@ -6,14 +6,14 @@ my ($define, $ccfl);
+ ($^O =~ m/AIX/i) ? ($ccfl = '-qcpluscmt') : ($ccfl = '');
+ 
+ # path libsmbclient.h
+-my $include = try_to_find("libsmbclient.h");
+-$include = prompt("Where can I find libsmbclient.h ?", $include);
+-warn_user("$include/libsmbclient.h") if (!-r "$include/libsmbclient.h");
++my $include = $ENV{GENTOO_INC_SMBCLIENT};
++die "No GENTOO_INC_SMBCLIENT" if not defined $include;
++die "No $include/libsmbclient.h" if not -r "$include/libsmbclient.h";
+ 
+ # path libsmbclient.so
+-my $lib = try_to_find("libsmbclient.so");
+-$lib = prompt("Where can I find libsmbclient.so ?",$lib);
+-warn_user("libsmbclient.so") if (!-r "$lib/libsmbclient.so");
++my $lib = $ENV{GENTOO_LIB_SMBCLIENT};
++die "No GENTOO_LIB_SMBCLIENT" if not defined $lib;
++die "No $lib/libsmbclient.so" if not -r "$lib/libsmbclient.so";
+ 
+ # tests demande ?
+ my $ans = 
+@@ -87,6 +87,8 @@ EOF
+ 
+   }
+ 
++=cut
++
+ sub try_to_find {
+   my $name = shift;
+   my @path = find_path($name);
+@@ -113,3 +115,5 @@ sub find_path {
+   print "I search in: ",(join "\n", @path),"\n";
+   return @path;
+ }
++
++=cut
+-- 
+2.28.0
+

Reply via email to