diff options
author | Julian Ospald <hasufell@gentoo.org> | 2014-04-18 15:52:32 +0000 |
---|---|---|
committer | Julian Ospald <hasufell@gentoo.org> | 2014-04-18 15:52:32 +0000 |
commit | c3af18dc36ae746b28ea19a43efbceff3f75b540 (patch) | |
tree | 7fe813b300deb544d4cb4ce9e92a450c3bf42081 /media-libs/libcaca | |
parent | fix typo (diff) | |
download | gentoo-2-c3af18dc36ae746b28ea19a43efbceff3f75b540.tar.gz gentoo-2-c3af18dc36ae746b28ea19a43efbceff3f75b540.tar.bz2 gentoo-2-c3af18dc36ae746b28ea19a43efbceff3f75b540.zip |
add multilib support wrt #497776, patches by Michael Mair-Keimberger
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key BDEED020)
Diffstat (limited to 'media-libs/libcaca')
-rw-r--r-- | media-libs/libcaca/ChangeLog | 10 | ||||
-rw-r--r-- | media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch | 61 | ||||
-rw-r--r-- | media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild | 147 |
3 files changed, 216 insertions, 2 deletions
diff --git a/media-libs/libcaca/ChangeLog b/media-libs/libcaca/ChangeLog index 82e14500ad16..b9f914199af5 100644 --- a/media-libs/libcaca/ChangeLog +++ b/media-libs/libcaca/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for media-libs/libcaca -# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/libcaca/ChangeLog,v 1.111 2013/08/14 18:51:15 aballier Exp $ +# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libcaca/ChangeLog,v 1.112 2014/04/18 15:52:32 hasufell Exp $ + +*libcaca-0.99_beta18-r2 (18 Apr 2014) + + 18 Apr 2014; Julian Ospald <hasufell@gentoo.org> + +libcaca-0.99_beta18-r2.ebuild, +files/libcaca-0.99_beta18-fix-tests.patch: + add multilib support wrt #497776, patches by Michael Mair-Keimberger 14 Aug 2013; Alexis Ballier <aballier@gentoo.org> libcaca-0.99_beta18-r1.ebuild: diff --git a/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch new file mode 100644 index 000000000000..c88af4654a44 --- /dev/null +++ b/media-libs/libcaca/files/libcaca-0.99_beta18-fix-tests.patch @@ -0,0 +1,61 @@ +--- libcaca-0.99.beta18/test/Makefile.am 2014-01-08 15:28:40.567140658 -0500 ++++ libcaca-0.99.beta18.new/test/Makefile.am 2014-01-08 15:24:51.295134240 -0500 +@@ -1,3 +1,5 @@ ++AM_TESTS_ENVIRONMENT = \ ++ top_srcdir="$(top_srcdir)" + + AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/caca -I../caca + +--- libcaca-0.99.beta18/test/check-copyright 2010-02-15 18:36:37.000000000 -0500 ++++ libcaca-0.99.beta18.new/test/check-copyright 2014-01-08 15:18:27.514123495 -0500 +@@ -3,10 +3,11 @@ + # + # Check that the copyright information is valid + # ++echo "top srcdir: ${top_srcdir:=..}" + nfails=0 + nfiles=0 + for dir in $(make -s echo-dirs -C ..); do +- if [ ! -d "../$dir" ]; then continue; fi ++ if [ ! -d "$top_srcdir/$dir" ]; then continue; fi + for x in $(make -s echo-sources -C ../$dir); do + case "$x" in + *.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|.py|.pl) +@@ -14,7 +15,7 @@ + *) + continue ;; + esac +- if ! grep 'Copyright *([cC])' "../$dir/$x" >/dev/null 2>&1; then ++ if ! grep 'Copyright *([cC])' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then + echo "error: $dir/$x lacks proper copyright information" + nfails=$(($nfails + 1)) + elif [ -d ../.git ]; then +--- libcaca-0.99.beta18/test/check-source 2012-04-06 20:46:08.000000000 +0200 ++++ libcaca-0.99.beta18-upd/test/check-source 2014-01-08 21:58:05.015389138 +0100 +@@ -3,6 +3,7 @@ + # + # Check that we have no tabs or trailing spaces in the source code + # ++echo "top srcdir: ${top_srcdir:=..}" + nfails=0 + nfiles=0 + nlines=0 +@@ -12,15 +13,15 @@ + case "$x" in + *.c|*.cpp|*.h|*.m|*.php|*.cs|*.java|*.py|*.pl) + nfiles=$(($nfiles + 1)); +- nlines=$(($nlines + `grep -c . "../$dir/$x"`)) ;; ++ nlines=$(($nlines + `grep -c . "$top_srcdir/$dir/$x"`)) ;; + *) + continue ;; + esac +- if grep '[[:space:]]$' "../$dir/$x" >/dev/null 2>&1; then ++ if grep '[[:space:]]$' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then + echo "error: $dir/$x contains trailing spaces" + nfails=$(($nfails + 1)) + fi +- if grep ' ' "../$dir/$x" >/dev/null 2>&1; then ++ if grep ' ' "$top_srcdir/$dir/$x" >/dev/null 2>&1; then + echo "error: $dir/$x contains tabs" + nfails=$(($nfails + 1)) + fi diff --git a/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild b/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild new file mode 100644 index 000000000000..11148ea606f7 --- /dev/null +++ b/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/libcaca/libcaca-0.99_beta18-r2.ebuild,v 1.1 2014/04/18 15:52:32 hasufell Exp $ + +EAPI=5 +PYTHON_COMPAT=( python{2_6,2_7} ) +inherit autotools-multilib eutils flag-o-matic mono multilib java-pkg-opt-2 python-single-r1 + +MY_P=${P/_/.} +DESCRIPTION="A library that creates colored ASCII-art graphics" +HOMEPAGE="http://libcaca.zoy.org/" +SRC_URI="http://libcaca.zoy.org/files/${PN}/${MY_P}.tar.gz" + +LICENSE="GPL-2 ISC LGPL-2.1 WTFPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="cxx doc imlib java mono ncurses opengl python ruby slang static-libs test truetype X" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +COMMON_DEPEND="imlib? ( media-libs/imlib2[${MULTILIB_USEDEP}] ) + mono? ( dev-lang/mono ) + ncurses? ( >=sys-libs/ncurses-5.3[${MULTILIB_USEDEP}] ) + opengl? ( + virtual/glu[${MULTILIB_USEDEP}] + virtual/opengl[${MULTILIB_USEDEP}] + media-libs/freeglut[${MULTILIB_USEDEP}] + truetype? ( >=media-libs/ftgl-2.1.3_rc5 ) + ) + python? ( ${PYTHON_DEPS} ) + ruby? ( =dev-lang/ruby-1.8* ) + slang? ( >=sys-libs/slang-2[${MULTILIB_USEDEP}] ) + X? ( x11-libs/libX11[${MULTILIB_USEDEP}] x11-libs/libXt[${MULTILIB_USEDEP}] )" +RDEPEND="${COMMON_DEPEND} + java? ( >=virtual/jre-1.5 )" +DEPEND="${COMMON_DEPEND} + virtual/pkgconfig + doc? ( + app-doc/doxygen + virtual/latex-base + >=dev-texlive/texlive-fontsrecommended-2012 + >=dev-texlive/texlive-latexextra-2012 + dev-tex/xcolor + ) + java? ( >=virtual/jdk-1.5 ) + test? ( dev-util/cppunit )" + +S=${WORKDIR}/${MY_P} + +DOCS=( AUTHORS ChangeLog NEWS NOTES README THANKS ) + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + sed -i -e '/doxygen_tests = check-doxygen/d' test/Makefile.am || die #339962 + + sed -i \ + -e 's:-g -O2 -fno-strength-reduce -fomit-frame-pointer::' \ + -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \ + configure.ac || die + + sed -i \ + -e 's:$(JAVAC):$(JAVAC) $(JAVACFLAGS):' \ + -e 's:libcaca_java_la_CPPFLAGS =:libcaca_java_la_CPPFLAGS = -I../caca:' \ + java/Makefile.am || die + + if ! use truetype; then + sed -i -e '/PKG_CHECK_MODULES/s:ftgl:dIsAbLe&:' configure.ac || die + fi + + if use imlib && ! use X; then + append-cflags -DX_DISPLAY_MISSING + fi + + has_version '>=dev-texlive/texlive-latex-2013' && epatch "${FILESDIR}/${P}-latex_hacks.patch" + + # fix out of source tests + epatch "${FILESDIR}/${P}-fix-tests.patch" + + eautoreconf + + java-pkg-opt-2_src_prepare +} + +multilib_src_configure() { + local myeconfargs=( + $(use_enable static-libs static) + $(use_enable slang) + $(use_enable ncurses) + $(use_enable X x11) $(use_with X x) --x-libraries=/usr/$(get_libdir) + $(use_enable opengl gl) + $(use_enable cxx) + $(use_enable imlib imlib2) + $(use_enable test cppunit) + ) + + if multilib_build_binaries; then + if use java; then + export JAVACFLAGS="$(java-pkg_javac-args)" + append-cflags "$(java-pkg_get-jni-cflags)" + fi + + use mono && export CSC="$(type -P gmcs)" #329651 + export VARTEXFONTS="${T}/fonts" #44128 + + myeconfargs+=( + $(use_enable java) + $(use_enable ruby) + $(use_enable python) + $(use_enable mono csharp) + $(use_enable doc) + ) + else + myeconfargs+=( + --disable-java + --disable-ruby + --disable-python + --disable-csharp + --disable-doc + ) + fi + + autotools-utils_src_configure +} + +src_compile() { + local _java_makeopts + use java && _java_makeopts="-j1" #480864 + autotools-multilib_src_compile ${_java_makeopts} +} + +multilib_src_test() { + emake -j1 check +} + +src_install() { + autotools-multilib_src_install + + if use java; then + java-pkg_newjar java/libjava.jar + fi + + rm -rf "${D}"/usr/share/java + + prune_libtool_files --modules +} |