summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkos Chandras <hwoarang@gentoo.org>2013-04-23 19:27:24 +0000
committerMarkos Chandras <hwoarang@gentoo.org>2013-04-23 19:27:24 +0000
commitc4c1a65a6eea06bc197db5f199390dfb148bfcea (patch)
treec1bbc581e54c33c5934f3ed375be76c40b63a921 /dev-libs/libtommath
parentVersion bump, drop old (diff)
downloadgentoo-2-c4c1a65a6eea06bc197db5f199390dfb148bfcea.tar.gz
gentoo-2-c4c1a65a6eea06bc197db5f199390dfb148bfcea.tar.bz2
gentoo-2-c4c1a65a6eea06bc197db5f199390dfb148bfcea.zip
Fixes cross compilation problems for bug #376643
(Portage version: 2.1.11.62/cvs/Linux x86_64, signed Manifest commit with key C2BA7F3C!)
Diffstat (limited to 'dev-libs/libtommath')
-rw-r--r--dev-libs/libtommath/ChangeLog9
-rw-r--r--dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch24
-rw-r--r--dev-libs/libtommath/libtommath-0.42.0-r1.ebuild24
3 files changed, 41 insertions, 16 deletions
diff --git a/dev-libs/libtommath/ChangeLog b/dev-libs/libtommath/ChangeLog
index 17e5d12da4f7..d2ae3df39b55 100644
--- a/dev-libs/libtommath/ChangeLog
+++ b/dev-libs/libtommath/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-libs/libtommath
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtommath/ChangeLog,v 1.49 2013/03/28 15:43:01 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtommath/ChangeLog,v 1.50 2013/04/23 19:27:24 hwoarang Exp $
+
+ 23 Apr 2013; Markos Chandras <hwoarang@gentoo.org>
+ libtommath-0.42.0-r1.ebuild, files/libtommath-0.42.0-makefile.patch:
+ Create a minimal configure.ac file to build libtool. Fixes cross compilation
+ problems reported in bug #376643. Thanks to Bertrand Jacquin
+ <beber@meleeweb.net> for the upstream patch and Mike Frysinger
+ <vapier@gentoo.org> for the suggestions.
28 Mar 2013; Anthony G. Basile <blueness@gentoo.org>
libtommath-0.42.0-r1.ebuild, libtommath-0.42.0.ebuild:
diff --git a/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch b/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch
index af0b37b9dac2..504d7656430a 100644
--- a/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch
+++ b/dev-libs/libtommath/files/libtommath-0.42.0-makefile.patch
@@ -1,31 +1,33 @@
---- libtommath-0.42.0/makefile.shared.orig
-+++ libtommath-0.42.0/makefile.shared
-@@ -3,7 +3,7 @@
+--- makefile.shared.ori 2011-07-27 20:21:13.014592928 +0200
++++ makefile.shared 2011-07-27 20:22:09.942872962 +0200
+@@ -3,7 +3,8 @@
#Tom St Denis
VERSION=0:41
-CC = libtool --mode=compile --tag=CC gcc
-+LTCOMPILE = libtool --mode=compile --tag=CC $(CC)
++LT ?= libtool
++LTCOMPILE = $(LT) --mode=compile --tag=CC $(CC)
CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare
-@@ -82,21 +82,24 @@
+@@ -82,21 +83,24 @@
objs: $(OBJECTS)
-+.c.o:
++.c.o:
+ $(LTCOMPILE) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
+
$(LIBNAME): $(OBJECTS)
- libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
-+ libtool --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
++ $(LT) --mode=link --tag=CC $(CC) $(LDFLAGS) *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBNAME)
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
-+ install -d $(DESTDIR)$(LIBPATH)
- libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
+- libtool --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
++ install -d $(DESTDIR)$(LIBPATH)
++ $(LT) --mode=install install -c $(LIBNAME) $(DESTDIR)$(LIBPATH)/$(LIBNAME)
+ install -d $(DESTDIR)$(INCPATH)
+ install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH)
@@ -33,7 +35,7 @@
- gcc $(CFLAGS) -c demo/demo.c -o demo/demo.o
- libtool --mode=link gcc -o test demo/demo.o $(LIBNAME_S)
+ $(CC) $(CFLAGS) -c demo/demo.c -o demo/demo.o
-+ libtool --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S)
++ $(LT) --mode=link $(CC) $(LDFLAGS) -o test demo/demo.o $(LIBNAME_S)
mtest: test
- cd mtest ; gcc $(CFLAGS) mtest.c -o mtest
@@ -41,4 +43,4 @@
timing: $(LIBNAME)
- gcc $(CFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest
-+ libtool --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest
++ $(LT) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -DTIMER demo/timing.c $(LIBNAME_S) -o ltmtest
diff --git a/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
index d58330334815..02a2377bb937 100644
--- a/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
+++ b/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild,v 1.5 2013/03/28 15:43:01 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libtommath/libtommath-0.42.0-r1.ebuild,v 1.6 2013/04/23 19:27:24 hwoarang Exp $
EAPI=4
-inherit eutils multilib toolchain-funcs
+inherit autotools eutils multilib toolchain-funcs
DESCRIPTION="highly optimized and portable routines for integer based number theoretic applications"
HOMEPAGE="http://www.libtom.org/"
@@ -20,12 +20,28 @@ DEPEND="sys-devel/libtool"
src_prepare() {
epatch "${FILESDIR}"/${P}-makefile.patch
- [[ ${CHOST} == *-darwin* ]] && \
+ if [[ ${CHOST} == *-darwin* ]]; then
sed -i -e 's/libtool/glibtool/g' makefile.shared
+ export LT="glibtool"
+ else
+ # need libtool for cross compilation. Bug #376643
+ cat <<-EOF > configure.ac
+ AC_INIT(libtommath, 0)
+ AM_INIT_AUTOMAKE
+ LT_INIT
+ AC_CONFIG_FILES(Makefile)
+ AC_OUTPUT
+ EOF
+ touch NEWS README AUTHORS ChangeLog Makefile.am
+ eautoreconf
+ export LT="${S}"/libtool
+ fi
}
src_compile() {
- emake CC=$(tc-getCC) -f makefile.shared IGNORE_SPEED=1 LIBPATH="${EPREFIX}/usr/$(get_libdir)"
+ emake CC=$(tc-getCC) -f makefile.shared \
+ IGNORE_SPEED=1 \
+ LIBPATH="${EPREFIX}/usr/$(get_libdir)"
}
src_install() {