1 |
commit: 8e1cf657aed74faa706d9fabc9b7a6290b8d9fc4 |
2 |
Author: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 9 23:57:09 2020 +0000 |
4 |
Commit: Kent Fredric <kentnl <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 10 15:02:12 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8e1cf657 |
7 |
|
8 |
dev-perl/Filesys-SmbClient: -r bump for EAPI7 + misc toolchain love |
9 |
|
10 |
- EAPI7 |
11 |
- Ensure CFLAGS passed to compiler |
12 |
- Rework the lib/inc handling stuff entirely, as the existing code still |
13 |
added its own "special" in injecting useless stuff like "/usr/lib/" |
14 |
into the libdir discovery, which caused linking to attempt to link |
15 |
64bit code with 32bit code, before the real link. On GCC this doesn't |
16 |
fatal, but clang can..., so the whole thing is ripped out, the paths |
17 |
are hard-forced from ENV vars, and the pkgconfig magic is done |
18 |
in-ebuild instead of in Makefile.PL, making it less crazy, and also |
19 |
making it easier to change this later if its wrong. |
20 |
- Relocate configure.in to configure.ac to avoid an autotools.eclass |
21 |
AWOOOOOOOGA notice. |
22 |
|
23 |
Package-Manager: Portage-3.0.4, Repoman-3.0.1 |
24 |
Signed-off-by: Kent Fredric <kentnl <AT> gentoo.org> |
25 |
|
26 |
.../Filesys-SmbClient-3.200.0-r4.ebuild | 68 ++++++++++++++++++++++ |
27 |
.../Filesys-SmbClient-3.2-no-magic-libdir.patch | 52 +++++++++++++++++ |
28 |
2 files changed, 120 insertions(+) |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 00000000000..adf20536a0e |
33 |
--- /dev/null |
34 |
+++ b/dev-perl/Filesys-SmbClient/Filesys-SmbClient-3.200.0-r4.ebuild |
35 |
@@ -0,0 +1,68 @@ |
36 |
+# Copyright 1999-2020 Gentoo Authors |
37 |
+# Distributed under the terms of the GNU General Public License v2 |
38 |
+ |
39 |
+EAPI=7 |
40 |
+ |
41 |
+DIST_AUTHOR=ALIAN |
42 |
+DIST_VERSION=3.2 |
43 |
+inherit perl-module autotools |
44 |
+ |
45 |
+DESCRIPTION="Provide Perl API for libsmbclient.so" |
46 |
+ |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~amd64" |
49 |
+IUSE="test" |
50 |
+RESTRICT="!test? ( test )" |
51 |
+ |
52 |
+RDEPEND=">=net-fs/samba-4.2[client]" |
53 |
+DEPEND=">=net-fs/samba-4.2[client]" |
54 |
+BDEPEND="${RDEPEND} |
55 |
+ virtual/perl-ExtUtils-MakeMaker |
56 |
+ virtual/pkgconfig |
57 |
+ test? ( |
58 |
+ virtual/perl-Test-Simple |
59 |
+ ) |
60 |
+" |
61 |
+ |
62 |
+PATCHES=( |
63 |
+ "${FILESDIR}/${P}-close_fn.patch" |
64 |
+ "${FILESDIR}/${PN}-3.2-no-magic-libdir.patch" |
65 |
+) |
66 |
+ |
67 |
+src_prepare() { |
68 |
+ perl-module_src_prepare |
69 |
+ cp -vf configure.in configure.ac || die "Can't copy configure.in" |
70 |
+ perl_rm_files configure.in |
71 |
+ eautoreconf |
72 |
+} |
73 |
+src_configure() { |
74 |
+ GENTOO_INC_SMBCLIENT="$( pkg-config --variable=includedir smbclient )" \ |
75 |
+ GENTOO_LIB_SMBCLIENT="$( pkg-config --variable=libdir smbclient )" \ |
76 |
+ perl-module_src_configure |
77 |
+} |
78 |
+src_compile() { |
79 |
+ mymake=( |
80 |
+ "OPTIMIZE=${CFLAGS}" |
81 |
+ ) |
82 |
+ perl-module_src_compile |
83 |
+} |
84 |
+src_test() { |
85 |
+ local MODULES=( |
86 |
+ "Filesys::SmbClient ${DIST_VERSION}" |
87 |
+ ) |
88 |
+ local failed=() |
89 |
+ for dep in "${MODULES[@]}"; do |
90 |
+ ebegin "Compile testing ${dep}" |
91 |
+ perl -Mblib="${S}" -M"${dep} ()" -e1 |
92 |
+ eend $? || failed+=( "$dep" ) |
93 |
+ done |
94 |
+ if [[ ${failed[@]} ]]; then |
95 |
+ echo |
96 |
+ eerror "One or more modules failed compile:"; |
97 |
+ for dep in "${failed[@]}"; do |
98 |
+ eerror " ${dep}" |
99 |
+ done |
100 |
+ die "Failing due to module compilation errors"; |
101 |
+ fi |
102 |
+ # standard tests are not designed to work on a non-developer system. |
103 |
+} |
104 |
|
105 |
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 |
106 |
new file mode 100644 |
107 |
index 00000000000..337a2338607 |
108 |
--- /dev/null |
109 |
+++ b/dev-perl/Filesys-SmbClient/files/Filesys-SmbClient-3.2-no-magic-libdir.patch |
110 |
@@ -0,0 +1,52 @@ |
111 |
+From 9f3c784d483623edb65f6e9579fd1a34e885f766 Mon Sep 17 00:00:00 2001 |
112 |
+From: Kent Fredric <kentnl@g.o> |
113 |
+Date: Thu, 10 Sep 2020 11:34:38 +1200 |
114 |
+Subject: Strip automagic detection if include/ and lib/ dirs. |
115 |
+ |
116 |
+--- |
117 |
+ Makefile.PL | 16 ++++++++++------ |
118 |
+ 1 file changed, 10 insertions(+), 6 deletions(-) |
119 |
+ |
120 |
+diff --git a/Makefile.PL b/Makefile.PL |
121 |
+index 954df92..ccd842a 100755 |
122 |
+--- a/Makefile.PL |
123 |
++++ b/Makefile.PL |
124 |
+@@ -6,14 +6,14 @@ my ($define, $ccfl); |
125 |
+ ($^O =~ m/AIX/i) ? ($ccfl = '-qcpluscmt') : ($ccfl = ''); |
126 |
+ |
127 |
+ # path libsmbclient.h |
128 |
+-my $include = try_to_find("libsmbclient.h"); |
129 |
+-$include = prompt("Where can I find libsmbclient.h ?", $include); |
130 |
+-warn_user("$include/libsmbclient.h") if (!-r "$include/libsmbclient.h"); |
131 |
++my $include = $ENV{GENTOO_INC_SMBCLIENT}; |
132 |
++die "No GENTOO_INC_SMBCLIENT" if not defined $include; |
133 |
++die "No $include/libsmbclient.h" if not -r "$include/libsmbclient.h"; |
134 |
+ |
135 |
+ # path libsmbclient.so |
136 |
+-my $lib = try_to_find("libsmbclient.so"); |
137 |
+-$lib = prompt("Where can I find libsmbclient.so ?",$lib); |
138 |
+-warn_user("libsmbclient.so") if (!-r "$lib/libsmbclient.so"); |
139 |
++my $lib = $ENV{GENTOO_LIB_SMBCLIENT}; |
140 |
++die "No GENTOO_LIB_SMBCLIENT" if not defined $lib; |
141 |
++die "No $lib/libsmbclient.so" if not -r "$lib/libsmbclient.so"; |
142 |
+ |
143 |
+ # tests demande ? |
144 |
+ my $ans = |
145 |
+@@ -87,6 +87,8 @@ EOF |
146 |
+ |
147 |
+ } |
148 |
+ |
149 |
++=cut |
150 |
++ |
151 |
+ sub try_to_find { |
152 |
+ my $name = shift; |
153 |
+ my @path = find_path($name); |
154 |
+@@ -113,3 +115,5 @@ sub find_path { |
155 |
+ print "I search in: ",(join "\n", @path),"\n"; |
156 |
+ return @path; |
157 |
+ } |
158 |
++ |
159 |
++=cut |
160 |
+-- |
161 |
+2.28.0 |
162 |
+ |