forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-perl/Filesys-SmbClient: Make it build with samba-4, bug 581338
Thanks to Dennis Lichtenthäler Package-Manager: Portage-2.3.3, Repoman-2.3.1
- Loading branch information
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r2.ebuild
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
DIST_AUTHOR=ALIAN | ||
DIST_VERSION=3.2 | ||
inherit perl-module autotools | ||
|
||
DESCRIPTION="Provide Perl API for libsmbclient.so" | ||
|
||
SLOT="0" | ||
KEYWORDS="~amd64" | ||
IUSE="" | ||
|
||
RDEPEND=">=net-fs/samba-4.2[client]" | ||
DEPEND="${RDEPEND} | ||
virtual/perl-ExtUtils-MakeMaker | ||
virtual/pkgconfig | ||
" | ||
|
||
# tests are not designed to work on a non-developer system. | ||
RESTRICT=test | ||
|
||
PATCHES=( | ||
"${FILESDIR}/${P}-pkg_config.patch" | ||
"${FILESDIR}/${P}-close_fn.patch" | ||
) | ||
|
||
src_prepare() { | ||
perl-module_src_prepare | ||
eautoreconf | ||
} |
18 changes: 18 additions & 0 deletions
18
dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-close_fn.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
diff --git a/configure.in b/configure.in | ||
index 9660e93..f1d2350 100644 | ||
--- a/configure.in | ||
+++ b/configure.in | ||
@@ -48,8 +48,8 @@ fi | ||
|
||
dnl This is context->close_fn or context close ? | ||
AC_TRY_COMPILE([#include <libsmbclient.h>], | ||
- [SMBCCTX *c; c->close_fn(c,0);], | ||
- smbctxclosefn=yes, smbctxclosefn=no) | ||
+ [SMBCCTX *c; c->close(c,0);], | ||
+ smbctxclosefn=no, smbctxclosefn=yes) | ||
if test "$smbctxclosefn" = yes; then | ||
AC_DEFINE(HAVE_CLOSEFN,, [define if SMBCTXX->close_fn exist.]) | ||
AC_MSG_RESULT([You use SMBCTXX->close_fn (release >= 3.0.20). ]) | ||
-- | ||
2.7.3 | ||
|
36 changes: 36 additions & 0 deletions
36
dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.200.0-pkg_config.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From fa320a06147079458aa5f4834ae8b22cfe278481 Mon Sep 17 00:00:00 2001 | ||
From: Dennis Lichtenthaeler <[email protected]> | ||
Date: Wed, 27 Apr 2016 10:57:17 +0200 | ||
Subject: [PATCH 3/3] Use pkg-config instead of trickery to find samba-4 | ||
libs/headers | ||
|
||
--- | ||
Makefile.PL | 12 ++++++++++++ | ||
1 file changed, 12 insertions(+) | ||
|
||
diff --git a/Makefile.PL b/Makefile.PL | ||
index 954df92..ed9d846 100755 | ||
--- a/Makefile.PL | ||
+++ b/Makefile.PL | ||
@@ -110,6 +110,18 @@ sub find_path { | ||
push(@path, $_."/$ext") if !$defaultsDir->{$_}; | ||
} | ||
foreach (keys %$defaultsDir) { push(@path, $_."/$ext"); } | ||
+ | ||
+ ## get default paths from pkg-config | ||
+ my $pkgconfig; | ||
+ if($_[0]=~m!\.h$!) { | ||
+ $pkgconfig = qx/pkg-config --variable=includedir smbclient/; | ||
+ } | ||
+ else { | ||
+ $pkgconfig = qx/pkg-config --variable=libdir smbclient/; | ||
+ } | ||
+ $pkgconfig =~ s/\n//g; | ||
+ push(@path, $pkgconfig); | ||
+ | ||
print "I search in: ",(join "\n", @path),"\n"; | ||
return @path; | ||
} | ||
-- | ||
2.7.3 | ||
|