Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-libs/gd/files/, media-libs/gd/
Date: Fri, 24 Jun 2016 08:16:21
Message-Id: 1466756156.ede657b970d1deee8305dbefaf5651c37aea115c.vapier@gentoo
1 commit: ede657b970d1deee8305dbefaf5651c37aea115c
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 08:15:56 2016 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 08:15:56 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ede657b9
7
8 media-libs/gd: add upstream fix for building under OS X #583584
9
10 media-libs/gd/files/gd-2.2.2-osx-libtool.patch | 37 ++++++++++++++++++++++++++
11 media-libs/gd/gd-2.2.2.ebuild | 4 +++
12 2 files changed, 41 insertions(+)
13
14 diff --git a/media-libs/gd/files/gd-2.2.2-osx-libtool.patch b/media-libs/gd/files/gd-2.2.2-osx-libtool.patch
15 new file mode 100644
16 index 0000000..4d20f33
17 --- /dev/null
18 +++ b/media-libs/gd/files/gd-2.2.2-osx-libtool.patch
19 @@ -0,0 +1,37 @@
20 +https://bugs.gentoo.org/583584
21 +https://github.com/libgd/libgd/issues/241
22 +
23 +From dd6615fd138e53656a7883015d4a6b2d02292b26 Mon Sep 17 00:00:00 2001
24 +From: Mike Frysinger <vapier@g.o>
25 +Date: Sat, 21 May 2016 15:00:53 -0400
26 +Subject: [PATCH] libtool: rework revision to fix OS X breakage
27 +
28 +It seems the OS X linker restricts the revision field to 8 bits.
29 +Rework how we calculate that value and pack it in closer to fit.
30 +It might produce some collisions if we get to like 2.2.8, but oh
31 +well ... this field doesn't need to be super exact.
32 +
33 +Fixes #214 and fixes #241.
34 +---
35 + configure.ac | 7 ++++++-
36 + 1 file changed, 6 insertions(+), 1 deletion(-)
37 +
38 +--- a/configure
39 ++++ b/configure
40 +@@ -2460,7 +2460,12 @@ AC_SUBST(GDLIB_VERSION)
41 + # See http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
42 +
43 + GDLIB_LT_CURRENT=3
44 ++# This is the version where the soname (current above) changes. We use it
45 ++# to reset the revision base back to zero. It's a bit of a pain, but some
46 ++# systems restrict the revision range below to [0..255] (like OS X).
47 ++GDLIB_PREV_MAJOR=2
48 ++GDLIB_PREV_MINOR=2
49 +-GDLIB_LT_REVISION=$(printf '%i%02i%02i' $GDLIB_MAJOR $GDLIB_MINOR $GDLIB_REVISION)
50 ++GDLIB_LT_REVISION=$(( ((GDLIB_MAJOR - GDLIB_PREV_MAJOR) << 6) | ((GDLIB_MINOR - GDLIB_PREV_MINOR) << 3) | GDLIB_REVISION ))
51 + GDLIB_LT_AGE=0
52 +
53 +
54 +--
55 +2.8.2
56 +
57
58 diff --git a/media-libs/gd/gd-2.2.2.ebuild b/media-libs/gd/gd-2.2.2.ebuild
59 index 9571241..e7f8742 100644
60 --- a/media-libs/gd/gd-2.2.2.ebuild
61 +++ b/media-libs/gd/gd-2.2.2.ebuild
62 @@ -30,6 +30,10 @@ DEPEND="${RDEPEND}
63
64 S="${WORKDIR}/lib${P}"
65
66 +PATCHES=(
67 + "${FILESDIR}"/${P}-osx-libtool.patch #583584
68 +)
69 +
70 src_prepare() {
71 default
72 elibtoolize # for shared library on Solaris