Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 480400 - dev-libs/libgcrypt-1.6.1-r1 - add multilib support
Summary: dev-libs/libgcrypt-1.6.1-r1 - add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords: PATCH, REVIEWED
Depends on: 480396
Blocks: gx86-multilib 480402
  Show dependency tree
 
Reported: 2013-08-09 17:59 UTC by David Heidelberg (okias)
Modified: 2014-03-18 22:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
libgcrypt-1.5.3-r1.ebuild (libgcrypt-1.5.3-r1.ebuild,1.59 KB, text/plain)
2013-08-09 17:59 UTC, David Heidelberg (okias)
Details
libgcrypt-1.5.3-r1.ebuild (libgcrypt-1.5.3-r1.ebuild,2.11 KB, text/plain)
2013-08-09 21:36 UTC, Mike Lothian
Details
libgcrypt-1.6.0-r1.ebuild.diff (libgcrypt-1.6.0-r1.ebuild.diff,1.63 KB, patch)
2014-01-04 01:27 UTC, David Heidelberg (okias)
Details | Diff
libgcrypt-1.6.0.ebuild.diff (libgcrypt-1.6.0.ebuild.diff,1.78 KB, patch)
2014-01-04 09:56 UTC, Michał Górny
Details | Diff
libgcrypt-1.6.1-r1.ebuild.patch (tno,1.75 KB, patch)
2014-02-06 01:10 UTC, David Heidelberg (okias)
Details | Diff
Compat slot 11 ebuild (libgcrypt-1.5.3-r100.ebuild,1.88 KB, text/plain)
2014-02-28 10:24 UTC, Michał Górny
Details
Diff for the compat slot (libgcrypt-1.5.3-r100.ebuild.diff,1.79 KB, patch)
2014-02-28 10:32 UTC, Michał Górny
Details | Diff
Updated patch to 1.6.1 (libgcrypt-1.6.1-r1.ebuild.diff,1.37 KB, patch)
2014-02-28 10:32 UTC, Michał Górny
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Heidelberg (okias) 2013-08-09 17:59:17 UTC
ebuild

Reproducible: Always
Comment 1 David Heidelberg (okias) 2013-08-09 17:59:47 UTC
Created attachment 355514 [details]
libgcrypt-1.5.3-r1.ebuild
Comment 2 Alexis Ballier gentoo-dev 2013-08-09 18:01:50 UTC
missing MULTILIB_USEDEP too
Comment 3 Mike Lothian 2013-08-09 21:36:53 UTC
Created attachment 355560 [details]
libgcrypt-1.5.3-r1.ebuild
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-11 12:59:33 UTC
Comment on attachment 355514 [details]
libgcrypt-1.5.3-r1.ebuild

--- libgcrypt-1.5.3.ebuild      2013-08-09 15:07:44.251748455 +0200
+++ -   2013-08-11 14:59:27.968544868 +0200
@@ -5,7 +5,7 @@
 EAPI=5
 AUTOTOOLS_AUTORECONF=1
 
-inherit autotools-utils
+inherit autotools-multilib
 
 DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
 HOMEPAGE="http://www.gnupg.org/"
@@ -44,5 +44,5 @@
                $([[ ${CHOST} == *86*-darwin* ]] && echo "--disable-asm")
                $([[ ${CHOST} == sparcv9-*-solaris* ]] && echo "--disable-asm")
        )
-       autotools-utils_src_configure
+       autotools-multilib_src_configure
 }
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2013-08-11 13:00:08 UTC
Comment on attachment 355560 [details]
libgcrypt-1.5.3-r1.ebuild

--- libgcrypt-1.5.3.ebuild      2013-08-09 15:07:44.251748455 +0200
+++ -   2013-08-11 14:59:54.505979958 +0200
@@ -5,7 +5,7 @@
 EAPI=5
 AUTOTOOLS_AUTORECONF=1

-inherit autotools-utils
+inherit autotools-utils multilib-minimal
 
 DESCRIPTION="General purpose crypto library based on the code used in GnuPG"
 HOMEPAGE="http://www.gnupg.org/"
@@ -17,7 +17,7 @@
 KEYWORDS="alpha amd64 arm hppa ia64 ~m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
 IUSE="static-libs"

-RDEPEND=">=dev-libs/libgpg-error-1.8"
+RDEPEND=">=dev-libs/libgpg-error-1.8[${MULTILIB_USEDEP}]"
 DEPEND="${RDEPEND}"
 
 DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO )
@@ -27,7 +27,13 @@
        "${FILESDIR}"/${PN}-multilib-syspath.patch
 )

-src_configure() {
+src_prepare() {
+       default
+
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
        local myeconfargs=(
                --disable-padlock-support # bug 201917
                --disable-dependency-tracking
@@ -46,3 +52,20 @@
        )
        autotools-utils_src_configure
 }
+
+multilib_src_install() {
+       default
+
+       if multilib_is_native_abi; then
+               # Move files back.
+               if path_exists -o "${ED}"/tmp/libgcrypt-config.*; then
+                       mv "${ED}"/tmp/libgcrypt-config.* "${ED}"/usr/bin || die
+               fi
+       else
+               # Preserve ABI-variant of libgcrypt-config,
+               # then drop all the executables
+               mkdir -p "${ED}"/tmp || die
+               mv "${ED}"/usr/bin/libgcrypt-config "${ED}"/tmp/libgcrypt-config.${ABI} || die
+               rm -r "${ED}"/usr/bin || die
+       fi
+}
Comment 6 Alexandre Rostovtsev (RETIRED) gentoo-dev 2013-12-30 05:22:53 UTC
We need this for multilib libxslt.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-12-30 09:14:17 UTC
It doesn't have pkg-config? That makes me real sad.

FYI, I prefer /usr/bin/${CHOST}-foo-config nowadays. This one gets picked up by configure automatically more often.
Comment 8 David Heidelberg (okias) 2014-01-03 22:28:32 UTC
dev-libs/libgcrypt-1.6.0-r1::ixit
Comment 9 David Heidelberg (okias) 2014-01-04 01:27:13 UTC
Created attachment 366922 [details, diff]
libgcrypt-1.6.0-r1.ebuild.diff
Comment 10 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-04 08:57:28 UTC
Comment on attachment 366922 [details, diff]
libgcrypt-1.6.0-r1.ebuild.diff

>+multilib_src_install() {
>+	emake DESTDIR="${D}" "${_at_args[@]}" install

_at_args is private, backwards compat and deprecated. Drop that, please, it's not meaningful here.

>+	if ! multilib_build_binaries; then
>+		newbin "${D}"/usr/bin/libgcrypt-config "${ABI}"-libgcrypt-config || die

"${CHOST}"-libgcrypt-config, you mean. And ${ED}, please. And this EAPI doesn't deserve an explicit death.

You may prefer the lazy-typer variant:

  newbin {"${ED}"/usr/bin/,"${CHOST}"-}libgcrypt-config
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-04 09:56:24 UTC
Created attachment 366946 [details, diff]
libgcrypt-1.6.0.ebuild.diff

This one's got everything right, including wrapping gpg-error-config, and disabling clisp in lib32. It has the multilib team REVIEWED badge :).
Comment 12 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-04 09:57:43 UTC
(In reply to Michał Górny from comment #11)
> Created attachment 366946 [details, diff] [details, diff]
> libgcrypt-1.6.0.ebuild.diff
> 
> This one's got everything right, including wrapping gpg-error-config, and
> disabling clisp in lib32. It has the multilib team REVIEWED badge :).

Sorry, clisp was about gpg-error.
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-01-24 04:53:17 UTC
Ping. Any news here?
Comment 14 David Heidelberg (okias) 2014-02-06 01:10:08 UTC
Created attachment 369670 [details, diff]
libgcrypt-1.6.1-r1.ebuild.patch

dev-libs/libgcrypt-1.6.1-r1::ixit diff
Comment 15 Tim Harder gentoo-dev 2014-02-06 01:20:25 UTC
We should probably slot libgcrypt first and convert both slots to multilib otherwise some binary stuff might break.
Comment 16 David Heidelberg (okias) 2014-02-06 01:27:46 UTC
I can confirm, that I encountered some binary breaks. Not sure if caused by multilib, but probably yes.
Comment 17 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-28 10:24:34 UTC
Created attachment 371414 [details]
Compat slot 11 ebuild

Here's a properly slotted and multilibbed compat ebuild for .so.11 :).
Comment 18 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-28 10:32:22 UTC
Created attachment 371416 [details, diff]
Diff for the compat slot
Comment 19 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-28 10:32:44 UTC
Created attachment 371418 [details, diff]
Updated patch to 1.6.1
Comment 20 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-02-28 10:35:34 UTC
That should be all there is possible ;). Please let me know if it's ok to commit.

Both ebuilds need to block emul-linux since :0 installs .so, and :11 installs .so.11*; emul-linux will only have to dep on :11 though.

We also need to update all regular rev-deps to use :0=.

64-bit binary packages can use:

  || ( dev-libs/libgcrypt:11 dev-libs/libgcrypt:0/11 )

to support both compat & regular package.

32-bit binary packages can use:

  dev-libs/libgcrypt:11[${MULTILIB_USEDEP}]

since I doubt there's a point in converting :0/11.
Comment 21 Tim Harder gentoo-dev 2014-02-28 20:24:42 UTC
Ebuilds now in the tree.