Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-perl/Filesys-SmbClient/, dev-perl/Filesys-SmbClient/files/
Date: Wed, 04 Jan 2017 09:59:19
Message-Id: 1483523940.7e57da211cb9455800ad9963c41d1429b3606fd3.dilfridge@gentoo
1 commit: 7e57da211cb9455800ad9963c41d1429b3606fd3
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 4 09:57:10 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 4 09:59:00 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7e57da21
7
8 dev-perl/Filesys-SmbClient: Make it build with samba-4, bug 581338
9
10 Thanks to Dennis Lichtenthäler
11
12 Package-Manager: Portage-2.3.3, Repoman-2.3.1
13
14 .../Filesys-SmbClient-3.200.0-r2.ebuild | 34 ++++++++++++++++++++
15 .../files/Filesys-SmbClient-3.200.0-close_fn.patch | 18 +++++++++++
16 .../Filesys-SmbClient-3.200.0-pkg_config.patch | 36 ++++++++++++++++++++++
17 3 files changed, 88 insertions(+)
18
19 diff --git a/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r2.ebuild b/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r2.ebuild
20 new file mode 100644
21 index 00000000..d1ae525
22 --- /dev/null
23 +++ b/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r2.ebuild
24 @@ -0,0 +1,34 @@
25 +# Copyright 1999-2017 Gentoo Foundation
26 +# Distributed under the terms of the GNU General Public License v2
27 +# $Id$
28 +
29 +EAPI=6
30 +
31 +DIST_AUTHOR=ALIAN
32 +DIST_VERSION=3.2
33 +inherit perl-module autotools
34 +
35 +DESCRIPTION="Provide Perl API for libsmbclient.so"
36 +
37 +SLOT="0"
38 +KEYWORDS="~amd64"
39 +IUSE=""
40 +
41 +RDEPEND=">=net-fs/samba-4.2[client]"
42 +DEPEND="${RDEPEND}
43 + virtual/perl-ExtUtils-MakeMaker
44 + virtual/pkgconfig
45 +"
46 +
47 +# tests are not designed to work on a non-developer system.
48 +RESTRICT=test
49 +
50 +PATCHES=(
51 + "${FILESDIR}/${P}-pkg_config.patch"
52 + "${FILESDIR}/${P}-close_fn.patch"
53 +)
54 +
55 +src_prepare() {
56 + perl-module_src_prepare
57 + eautoreconf
58 +}
59
60 diff --git a/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-close_fn.patch b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-close_fn.patch
61 new file mode 100644
62 index 00000000..a923ae1
63 --- /dev/null
64 +++ b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-close_fn.patch
65 @@ -0,0 +1,18 @@
66 +diff --git a/configure.in b/configure.in
67 +index 9660e93..f1d2350 100644
68 +--- a/configure.in
69 ++++ b/configure.in
70 +@@ -48,8 +48,8 @@ fi
71 +
72 + dnl This is context->close_fn or context close ?
73 + AC_TRY_COMPILE([#include <libsmbclient.h>],
74 +- [SMBCCTX *c; c->close_fn(c,0);],
75 +- smbctxclosefn=yes, smbctxclosefn=no)
76 ++ [SMBCCTX *c; c->close(c,0);],
77 ++ smbctxclosefn=no, smbctxclosefn=yes)
78 + if test "$smbctxclosefn" = yes; then
79 + AC_DEFINE(HAVE_CLOSEFN,, [define if SMBCTXX->close_fn exist.])
80 + AC_MSG_RESULT([You use SMBCTXX->close_fn (release >= 3.0.20). ])
81 +--
82 +2.7.3
83 +
84
85 diff --git a/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-pkg_config.patch b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-pkg_config.patch
86 new file mode 100644
87 index 00000000..2a2b080
88 --- /dev/null
89 +++ b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-pkg_config.patch
90 @@ -0,0 +1,36 @@
91 +From fa320a06147079458aa5f4834ae8b22cfe278481 Mon Sep 17 00:00:00 2001
92 +From: Dennis Lichtenthaeler <dennis.lichtenthaeler@××××××××××××××××××.de>
93 +Date: Wed, 27 Apr 2016 10:57:17 +0200
94 +Subject: [PATCH 3/3] Use pkg-config instead of trickery to find samba-4
95 + libs/headers
96 +
97 +---
98 + Makefile.PL | 12 ++++++++++++
99 + 1 file changed, 12 insertions(+)
100 +
101 +diff --git a/Makefile.PL b/Makefile.PL
102 +index 954df92..ed9d846 100755
103 +--- a/Makefile.PL
104 ++++ b/Makefile.PL
105 +@@ -110,6 +110,18 @@ sub find_path {
106 + push(@path, $_."/$ext") if !$defaultsDir->{$_};
107 + }
108 + foreach (keys %$defaultsDir) { push(@path, $_."/$ext"); }
109 ++
110 ++ ## get default paths from pkg-config
111 ++ my $pkgconfig;
112 ++ if($_[0]=~m!\.h$!) {
113 ++ $pkgconfig = qx/pkg-config --variable=includedir smbclient/;
114 ++ }
115 ++ else {
116 ++ $pkgconfig = qx/pkg-config --variable=libdir smbclient/;
117 ++ }
118 ++ $pkgconfig =~ s/\n//g;
119 ++ push(@path, $pkgconfig);
120 ++
121 + print "I search in: ",(join "\n", @path),"\n";
122 + return @path;
123 + }
124 +--
125 +2.7.3
126 +