Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-libs/mozldap/files/, dev-libs/mozldap/
Date: Fri, 08 Jul 2016 17:58:46
Message-Id: 1468000662.16c6579daa190223ff44787904e5346180787ce9.wizardedit@gentoo
1 commit: 16c6579daa190223ff44787904e5346180787ce9
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jul 8 17:54:21 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Fri Jul 8 17:57:42 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=16c6579d
7
8 dev-libs/mozldap: bump to EAPI 6, add maintainer-needed
9
10 Package-Manager: portage-2.2.28
11
12 dev-libs/mozldap/files/mozldap-6.0.6-ldflags.patch | 4 +-
13 dev-libs/mozldap/files/nspr-m4.patch | 4 +-
14 dev-libs/mozldap/files/nss-m4.patch | 6 +-
15 dev-libs/mozldap/metadata.xml | 1 +
16 dev-libs/mozldap/mozldap-6.0.7-r1.ebuild | 121 +++++++++++++++++++++
17 5 files changed, 129 insertions(+), 7 deletions(-)
18
19 diff --git a/dev-libs/mozldap/files/mozldap-6.0.6-ldflags.patch b/dev-libs/mozldap/files/mozldap-6.0.6-ldflags.patch
20 index 60593c6..904b0f7 100644
21 --- a/dev-libs/mozldap/files/mozldap-6.0.6-ldflags.patch
22 +++ b/dev-libs/mozldap/files/mozldap-6.0.6-ldflags.patch
23 @@ -2,8 +2,8 @@ Respect LDFLAGS
24
25 http://bugs.gentoo.org/show_bug.cgi?id=327335
26
27 ---- config/autoconf.mk.in
28 -+++ config/autoconf.mk.in
29 +--- a/config/autoconf.mk.in
30 ++++ b/config/autoconf.mk.in
31 @@ -117,7 +117,7 @@
32
33 MKSHLIB = @MKSHLIB@
34
35 diff --git a/dev-libs/mozldap/files/nspr-m4.patch b/dev-libs/mozldap/files/nspr-m4.patch
36 index 7a9b969..531f566 100644
37 --- a/dev-libs/mozldap/files/nspr-m4.patch
38 +++ b/dev-libs/mozldap/files/nspr-m4.patch
39 @@ -1,5 +1,5 @@
40 ---- config.orig/autoconf/nspr.m4 2009-10-06 11:21:10.898930843 +0300
41 -+++ config/autoconf/nspr.m4 2009-10-06 11:27:43.638925618 +0300
42 +--- a/config/autoconf/nspr.m4 2009-10-06 11:21:10.898930843 +0300
43 ++++ b/config/autoconf/nspr.m4 2009-10-06 11:27:43.638925618 +0300
44 @@ -86,39 +86,6 @@
45
46 ])
47
48 diff --git a/dev-libs/mozldap/files/nss-m4.patch b/dev-libs/mozldap/files/nss-m4.patch
49 index 6a855e2..a3fa41d 100644
50 --- a/dev-libs/mozldap/files/nss-m4.patch
51 +++ b/dev-libs/mozldap/files/nss-m4.patch
52 @@ -1,6 +1,6 @@
53 -diff -uNr config.orig/autoconf/nss.m4 config/autoconf/nss.m4
54 ---- config.orig/autoconf/nss.m4 2009-10-06 11:21:10.898930843 +0300
55 -+++ config/autoconf/nss.m4 2009-10-06 11:23:37.754923372 +0300
56 +diff -uNr a/config/autoconf/nss.m4 b/config/autoconf/nss.m4
57 +--- a/config/autoconf/nss.m4 2009-10-06 11:21:10.898930843 +0300
58 ++++ b/config/autoconf/nss.m4 2009-10-06 11:23:37.754923372 +0300
59 @@ -86,41 +86,6 @@
60
61 ])
62
63 diff --git a/dev-libs/mozldap/metadata.xml b/dev-libs/mozldap/metadata.xml
64 index 097975e..6f49eba 100644
65 --- a/dev-libs/mozldap/metadata.xml
66 +++ b/dev-libs/mozldap/metadata.xml
67 @@ -1,4 +1,5 @@
68 <?xml version="1.0" encoding="UTF-8"?>
69 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
70 <pkgmetadata>
71 +<!-- maintainer-needed -->
72 </pkgmetadata>
73
74 diff --git a/dev-libs/mozldap/mozldap-6.0.7-r1.ebuild b/dev-libs/mozldap/mozldap-6.0.7-r1.ebuild
75 new file mode 100644
76 index 0000000..74afefa
77 --- /dev/null
78 +++ b/dev-libs/mozldap/mozldap-6.0.7-r1.ebuild
79 @@ -0,0 +1,121 @@
80 +# Copyright 1999-2016 Gentoo Foundation
81 +# Distributed under the terms of the GNU General Public License v2
82 +# $Id$
83 +
84 +EAPI="6"
85 +
86 +WANT_AUTOCONF="2.1"
87 +
88 +inherit eutils multilib versionator autotools
89 +
90 +DESCRIPTION="Mozilla LDAP C SDK"
91 +HOMEPAGE="http://wiki.mozilla.org/LDAP_C_SDK"
92 +SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/directory/c-sdk/releases/v${PV}/src/${P}.tar.gz"
93 +
94 +LICENSE="MPL-1.1 GPL-2 LGPL-2.1"
95 +SLOT="0"
96 +KEYWORDS="~amd64 ~x86"
97 +IUSE="ipv6 debug +sasl"
98 +
99 +COMMON_DEPEND=">=dev-libs/nss-3.11.4
100 + >=dev-libs/nspr-4.0.1
101 + >=dev-libs/svrcore-4.0.0
102 + sasl? ( dev-libs/cyrus-sasl )"
103 +DEPEND="${COMMON_DEPEND}
104 + virtual/pkgconfig"
105 +RDEPEND="${COMMON_DEPEND}"
106 +
107 +S="${WORKDIR}/${P}/c-sdk"
108 +
109 +PATCHES=(
110 + "${FILESDIR}"/${PN}-6.0.4-pkgconfig.patch
111 + "${FILESDIR}"/${P}-configure.in.patch
112 + "${FILESDIR}"/nss-m4.patch
113 + "${FILESDIR}"/nspr-m4.patch
114 + "${FILESDIR}"/${PN}-6.0.6-ldflags.patch
115 +)
116 +
117 +src_prepare() {
118 + default
119 + eautoreconf
120 +}
121 +
122 +src_configure() {
123 + local myconf="--libdir=/usr/$(get_libdir)/mozldap"
124 + econf $(use_enable debug) \
125 + $(use_enable ipv6) \
126 + $(use_enable amd64 64bit) \
127 + $(use_with sasl) \
128 + --with-svrcore-inc=/usr/include/svrcore \
129 + --with-svrcore-lib=/usr/$(get_libdir)/svrcore \
130 + --enable-clu \
131 + --enable-optimize \
132 + ${myconf} || die "econf failed"
133 +}
134 +
135 +src_install () {
136 + # Their build system is royally fucked, as usual
137 + sed -e "s,%libdir%,\$\{exec_prefix\}/$(get_libdir)/${PN},g" \
138 + -e "s,%prefix%,/usr,g" \
139 + -e "s,%major%,$(get_major_version ${PV}),g" \
140 + -e "s,%minor%,$(get_version_component_range 2 ${PV}),g" \
141 + -e "s,%submin%,$(get_version_component_range 3 ${PV}),g" \
142 + -e "s,%libsuffix%,$(get_major_version ${PV})$(get_version_component_range 2 ${PV}),g" \
143 + -e "s,%bindir%,\$\{exec_prefix\}/$(get_libdir)/${PN},g" \
144 + -e "s,%exec_prefix%,\$\{prefix\},g" \
145 + -e "s,%includedir%,\$\{exec_prefix\}/include/${PN},g" \
146 + -e "s,%NSPR_VERSION%,$(pkg-config --modversion nspr),g" \
147 + -e "s,%NSS_VERSION%,$(pkg-config --modversion nss),g" \
148 + -e "s,%SVRCORE_VERSION%,$(pkg-config --modversion svrcore),g" \
149 + -e "s,%MOZLDAP_VERSION%,${PV},g" \
150 + "${S}"/"${PN}".pc.in > "${S}"/"${PN}".pc || die "sed in install failed"
151 +
152 + emake install
153 + local MY_S="${WORKDIR}"/dist/
154 +
155 + rm -rf "${MY_S}/bin/"lib*.so || die
156 + rm -rf "${MY_S}/public/ldap-private" || die
157 +
158 + exeinto /usr/$(get_libdir)/mozldap
159 + doexe "${MY_S}"/lib/*so*
160 + doexe "${MY_S}"/lib/*.a
161 + doexe "${MY_S}"/bin/*
162 +
163 + # create compatibility PATH link
164 + for i in ldapcmp ldapcompare ldapdelete ldapmodify ldappasswd ldapsearch ; do
165 + dosym /usr/$(get_libdir)/mozldap/$i /usr/bin/moz"${i}" || die
166 + # compat for 389-project
167 + dosym /usr/$(get_libdir)/mozldap/$i /usr/bin/389-"${i}" || die
168 + done
169 +
170 + # move the headers around
171 + insinto /usr/include/mozldap
172 + doins "${MY_S}/public/ldap/"*.h
173 +
174 + # add sample config
175 + insinto /usr/share/mozldap
176 + doins "${MY_S}"/etc/*.conf
177 +
178 + # and while at it move them to files with versions-ending
179 + # and link them back :)
180 + cd "${D}"/usr/$(get_libdir)/mozldap || die
181 +
182 + # create compatibility Link
183 + ln -sf libldap$(get_major_version ${PV})$(get_version_component_range 2 ${PV}).so \
184 + liblber$(get_major_version ${PV})$(get_version_component_range 2 ${PV}).so || die
185 + # so let's move
186 + for file in *.so; do
187 + mv ${file} ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) || die
188 + ln -sf ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) ${file} || die
189 + ln -sf ${file}.$(get_major_version ${PV}).$(get_version_component_range 2 ${PV}) \
190 + ${file}.$(get_major_version ${PV}) || die
191 + done
192 +
193 + # cope with libraries being in /usr/lib/mozldap
194 + dodir /etc/env.d
195 + echo "LDPATH=/usr/$(get_libdir)/mozldap" > "${D}"/etc/env.d/08mozldap || die
196 +
197 + # create pkg-config file
198 + insinto /usr/$(get_libdir)/pkgconfig/
199 + doins "${S}"/mozldap.pc
200 +}