diff options
author | Justin Lecher <jlec@gentoo.org> | 2012-06-19 18:20:26 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2012-06-19 18:20:26 +0000 |
commit | b57f26a2235b597be85c17da437da57d52c9d8b3 (patch) | |
tree | 35f4665137254fa6dbf85d90b3941fb8b504e9b6 /sci-libs | |
parent | Version bump (diff) | |
download | gentoo-2-b57f26a2235b597be85c17da437da57d52c9d8b3.tar.gz gentoo-2-b57f26a2235b597be85c17da437da57d52c9d8b3.tar.bz2 gentoo-2-b57f26a2235b597be85c17da437da57d52c9d8b3.zip |
sci-libs/libsvm: Fix for gcc-4.7, #422099
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs')
-rw-r--r-- | sci-libs/libsvm/ChangeLog | 6 | ||||
-rw-r--r-- | sci-libs/libsvm/files/3.12-makefile2.patch | 45 | ||||
-rw-r--r-- | sci-libs/libsvm/libsvm-3.12.ebuild | 11 |
3 files changed, 57 insertions, 5 deletions
diff --git a/sci-libs/libsvm/ChangeLog b/sci-libs/libsvm/ChangeLog index b339b3f7b95c..466db595dc2f 100644 --- a/sci-libs/libsvm/ChangeLog +++ b/sci-libs/libsvm/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sci-libs/libsvm # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.26 2012/04/17 17:04:23 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/ChangeLog,v 1.27 2012/06/19 18:20:26 jlec Exp $ + + 19 Jun 2012; Justin Lecher <jlec@gentoo.org> +files/3.12-makefile2.patch, + libsvm-3.12.ebuild: + Fix for gcc-4.7, #422099 *libsvm-3.12 (17 Apr 2012) diff --git a/sci-libs/libsvm/files/3.12-makefile2.patch b/sci-libs/libsvm/files/3.12-makefile2.patch new file mode 100644 index 000000000000..8577029f05c2 --- /dev/null +++ b/sci-libs/libsvm/files/3.12-makefile2.patch @@ -0,0 +1,45 @@ + Makefile | 23 ++++++++++++----------- + 1 files changed, 12 insertions(+), 11 deletions(-) + +diff --git a/Makefile b/Makefile +index 6b7b123..f7ec65d 100644 +--- a/Makefile ++++ b/Makefile +@@ -1,25 +1,26 @@ + CXX ?= g++ +-CFLAGS = -Wall -Wconversion -O3 -fPIC ++CXXFLAGS ?= -Wall -Wconversion + SHVER = 2 + OS = $(shell uname) ++PICFLAGS ?= -fPIC + +-all: svm-train svm-predict svm-scale ++all: svm-train svm-predict svm-scale lib + + lib: svm.o + if [ "$(OS)" = "Darwin" ]; then \ +- SHARED_LIB_FLAG="-dynamiclib -W1,-install_name,libsvm.so.$(SHVER)"; \ ++ SHARED_LIB_FLAG="-dynamiclib -Wl,-install_name,libsvm.so.$(SHVER)"; \ + else \ +- SHARED_LIB_FLAG="-shared -W1,-soname,libsvm.so.$(SHVER)"; \ ++ SHARED_LIB_FLAG="-shared -Wl,-soname,libsvm.so.$(SHVER)"; \ + fi; \ +- $(CXX) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER) +- ++ $(CXX) $(LDFLAGS) $${SHARED_LIB_FLAG} svm.o -o libsvm.so.$(SHVER); \ ++ ln -s libsvm.so.$(SHVER) libsvm.so + svm-predict: svm-predict.c svm.o +- $(CXX) $(CFLAGS) svm-predict.c svm.o -o svm-predict -lm ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-predict.c svm.o -o svm-predict -lm + svm-train: svm-train.c svm.o +- $(CXX) $(CFLAGS) svm-train.c svm.o -o svm-train -lm ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-train.c svm.o -o svm-train -lm + svm-scale: svm-scale.c +- $(CXX) $(CFLAGS) svm-scale.c -o svm-scale ++ $(CXX) $(CXXFLAGS) $(LDFLAGS) svm-scale.c -o svm-scale + svm.o: svm.cpp svm.h +- $(CXX) $(CFLAGS) -c svm.cpp ++ $(CXX) $(CXXFLAGS) $(PICFLAGS) -c svm.cpp + clean: +- rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) ++ rm -f *~ svm.o svm-train svm-predict svm-scale libsvm.so.$(SHVER) libsvm.so diff --git a/sci-libs/libsvm/libsvm-3.12.ebuild b/sci-libs/libsvm/libsvm-3.12.ebuild index 30450f62f252..7b6b5a5805be 100644 --- a/sci-libs/libsvm/libsvm-3.12.ebuild +++ b/sci-libs/libsvm/libsvm-3.12.ebuild @@ -1,8 +1,9 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-3.12.ebuild,v 1.1 2012/04/17 17:04:23 bicatali Exp $ +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libsvm/libsvm-3.12.ebuild,v 1.2 2012/06/19 18:20:26 jlec Exp $ + +EAPI=4 -EAPI="4" SUPPORT_PYTHON_ABIS="1" inherit eutils java-pkg-opt-2 python flag-o-matic toolchain-funcs @@ -37,19 +38,21 @@ pkg_setup() { src_prepare() { epatch \ "${FILESDIR}"/3.11-openmp.patch \ - "${FILESDIR}"/3.12-makefile.patch + "${FILESDIR}"/3.12-makefile2.patch sed -i -e "s@\.\./@${EPREFIX}/usr/bin/@g" tools/*.py \ || die "Failed to fix paths in python files" + if use java; then local JAVAC_FLAGS="$(java-pkg_javac-args)" sed -i \ -e "s/JAVAC_FLAGS =/JAVAC_FLAGS=${JAVAC_FLAGS}/g" \ java/Makefile || die "Failed to fix java makefile" fi + tc-export CXX } src_compile() { - emake + default use java && emake -C java } |