summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/mdsplib/ChangeLog6
-rw-r--r--dev-libs/mdsplib/files/mdsplib-0.11-gentoo.patch46
-rw-r--r--dev-libs/mdsplib/mdsplib-0.11.ebuild20
3 files changed, 64 insertions, 8 deletions
diff --git a/dev-libs/mdsplib/ChangeLog b/dev-libs/mdsplib/ChangeLog
index e41435d1e484..22a9bd965850 100644
--- a/dev-libs/mdsplib/ChangeLog
+++ b/dev-libs/mdsplib/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/mdsplib
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/mdsplib/ChangeLog,v 1.5 2009/01/03 14:14:36 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mdsplib/ChangeLog,v 1.6 2009/08/06 10:34:42 ssuominen Exp $
+
+ 06 Aug 2009; Samuli Suominen <ssuominen@gentoo.org> mdsplib-0.11.ebuild,
+ +files/mdsplib-0.11-gentoo.patch:
+ Fix building with GLIBC 2.10+ wrt #278240.
03 Jan 2009; Christoph Mende <angelos@gentoo.org> mdsplib-0.11.ebuild:
QA: Respect CC (bug 243940)
diff --git a/dev-libs/mdsplib/files/mdsplib-0.11-gentoo.patch b/dev-libs/mdsplib/files/mdsplib-0.11-gentoo.patch
new file mode 100644
index 000000000000..92d96147bb72
--- /dev/null
+++ b/dev-libs/mdsplib/files/mdsplib-0.11-gentoo.patch
@@ -0,0 +1,46 @@
+diff -ur mdsplib-0.11.orig/Makefile mdsplib-0.11/Makefile
+--- mdsplib-0.11.orig/Makefile 2003-12-10 21:56:23.000000000 +0200
++++ mdsplib-0.11/Makefile 2009-08-06 13:33:03.000000000 +0300
+@@ -1,5 +1,6 @@
+-CC = gcc
+-CFLAGS = -O3
++AR ?= ar
++CC ?= gcc
++RANLIB ?= ranlib
+ LIBS =
+
+ library: libmetar.a
+@@ -7,11 +8,11 @@
+ all: dmetar library
+
+ libmetar.a: src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
+- ar ruv libmetar.a src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
+- ranlib libmetar.a
++ $(AR) ruv libmetar.a src/antoi.o src/charcmp.o src/dcdmetar.o src/dcdmtrmk.o src/fracpart.o src/prtdmetr.o src/stspack2.o src/stspack3.o
++ $(RANLIB) libmetar.a
+
+ dmetar: src/drvmetar.o libmetar.a
+- $(CC) $(CFLAGS) -o dmetar src/drvmetar.o libmetar.a $(LIBS)
++ $(CC) $(LDFLAGS) $(CFLAGS) -o dmetar src/drvmetar.o libmetar.a $(LIBS)
+
+ src/antoi.o: src/antoi.c src/local.h
+ $(CC) $(CFLAGS) -c src/antoi.c -o src/antoi.o
+@@ -48,5 +49,5 @@
+ chmod 0644 /usr/local/include/metar.h
+ cp libmetar.a /usr/local/lib/
+ chmod 0644 /usr/local/lib/libmetar.a
+- ranlib /usr/local/lib/libmetar.a
++ $(RANLIB) /usr/local/lib/libmetar.a
+
+diff -ur mdsplib-0.11.orig/src/local.h mdsplib-0.11/src/local.h
+--- mdsplib-0.11.orig/src/local.h 2003-12-10 23:30:56.000000000 +0200
++++ mdsplib-0.11/src/local.h 2009-08-06 13:27:03.000000000 +0300
+@@ -1175,7 +1175,7 @@
+ char *strupr(char *);
+ char *strlwr(char *);
+ /* char *strdup(char *); */
+-char *strndup(char *, int);
++/* char *strndup(char *, int); */
+ int strcmpi(char *, char *);
+
+ /* void *memccpy(void *, void *, int, unsigned); */
diff --git a/dev-libs/mdsplib/mdsplib-0.11.ebuild b/dev-libs/mdsplib/mdsplib-0.11.ebuild
index 7a6b48d67bbe..45df44bbae14 100644
--- a/dev-libs/mdsplib/mdsplib-0.11.ebuild
+++ b/dev-libs/mdsplib/mdsplib-0.11.ebuild
@@ -1,8 +1,9 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/mdsplib/mdsplib-0.11.ebuild,v 1.5 2009/01/03 14:14:36 angelos Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/mdsplib/mdsplib-0.11.ebuild,v 1.6 2009/08/06 10:34:42 ssuominen Exp $
-inherit toolchain-funcs
+EAPI=2
+inherit eutils toolchain-funcs
DESCRIPTION="METAR Decoder Software Package Library"
HOMEPAGE="http://limulus.net/mdsplib/"
@@ -10,18 +11,23 @@ SRC_URI="http://limulus.net/${PN}/${P}.tar.gz"
LICENSE="LGPL-2.1"
SLOT="0"
-KEYWORDS="~x86 ~ppc ~sparc"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE=""
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+}
+
src_compile() {
- emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" all || die "make failed"
+ tc-export AR CC RANLIB
+ emake all || die "emake all failed"
}
src_install() {
insinto /usr/include
insopts -m0644
- newins metar.h metar.h
- dolib.a libmetar.a
+ doins metar.h || die "doins failed"
+ dolib.a libmetar.a || die "dolib.a failed"
dodoc README README.MDSP
- dobin dmetar || die
+ dobin dmetar || die "dobin failed"
}