Skip to content

Commit

Permalink
media-libs/cal3d: port to EAPI 8
Browse files Browse the repository at this point in the history
Signed-off-by: David Seifert <[email protected]>
  • Loading branch information
SoapGentoo committed Oct 16, 2021
1 parent c671b43 commit d72ae6a
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 32 deletions.
45 changes: 21 additions & 24 deletions media-libs/cal3d/cal3d-0.11.0-r1.ebuild
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=5
inherit epatch autotools
EAPI=8

inherit autotools

DESCRIPTION="Cal3D is a skeletal based character animation library"
HOMEPAGE="http://home.gna.org/cal3d"
HOMEPAGE="https://mp3butcher.github.io/Cal3D/"
SRC_URI="http://download.gna.org/cal3d/sources/${P}.tar.gz"

LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="amd64 ~ia64 ppc x86"
IUSE="16bit-indices debug doc"

DEPEND="doc? (
BDEPEND="
doc? (
app-doc/doxygen
app-text/docbook-sgml-utils
)"
RDEPEND=""

PATCHES=(
"${FILESDIR}"/${P}-gcc43.patch
"${FILESDIR}"/${P}-tests.patch
"${FILESDIR}"/${P}-verbose.patch
"${FILESDIR}"/${P}-gcc6.patch
"${FILESDIR}"/${P}-docbook2html.patch
)

src_prepare() {
epatch \
"${FILESDIR}"/${P}-gcc43.patch \
"${FILESDIR}"/${P}-tests.patch \
"${FILESDIR}"/${P}-verbose.patch \
"${FILESDIR}"/${P}-gcc6.patch
sed -i \
-e "s:db2html:docbook2html:g" \
configure.in \
docs/Makefile.am \
|| die "sed for doc failed"
default
eautoreconf
}

Expand All @@ -41,17 +41,14 @@ src_configure() {

src_compile() {
emake

if use doc; then
cd docs
cd docs || die
emake doc-api
emake doc-guide
mkdir -p html/{guide,api}
mv *.{html,gif} html/guide/
mv api/html/* html/api/
mkdir -p html/{guide,api} || die
mv *.{html,gif} html/guide/ || die
mv api/html/* html/api/ || die
HTML_DOCS=( docs/html/api docs/html/guide )
fi
}

src_install() {
default
use doc && dohtml -r docs/html/api docs/html/guide
}
25 changes: 25 additions & 0 deletions media-libs/cal3d/files/cal3d-0.11.0-docbook2html.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
--- a/configure.in
+++ b/configure.in
@@ -50,9 +50,9 @@
AC_MSG_WARN([cannot find doxygen, unable to generate Cal3D API Reference!])
fi

-AC_CHECK_PROG(DB2HTML, db2html, true, false)
+AC_CHECK_PROG(DB2HTML, docbook2html, true, false)
if test "$DB2HTML" = false; then
- AC_MSG_WARN([cannot find db2html, unable to generate Cal3D User's Guide!])
+ AC_MSG_WARN([cannot find docbook2html, unable to generate Cal3D User's Guide!])
fi

AC_PATH_PROG(BLENDER, [blender])
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -18,7 +18,7 @@
doxygen cal3d.doxygen

doc-guide:
- db2html guide.sgml
+ docbook2html guide.sgml

clean-local:
rm -rf guide guide.junk
4 changes: 2 additions & 2 deletions media-libs/cal3d/files/cal3d-0.11.0-gcc43.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- src/cal3d/platform.h.old 2008-04-27 23:08:41.000000000 +0200
+++ src/cal3d/platform.h 2008-04-27 23:08:56.000000000 +0200
--- a/src/cal3d/platform.h
+++ b/src/cal3d/platform.h
@@ -77,6 +77,7 @@
// standard includes
#include <stdlib.h>
Expand Down
4 changes: 2 additions & 2 deletions media-libs/cal3d/files/cal3d-0.11.0-gcc6.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- cal3d-0.11.0/src/cal3d/loader.cpp.old 2016-09-24 00:58:09.968689367 -0400
+++ cal3d-0.11.0/src/cal3d/loader.cpp 2016-09-24 01:06:54.867068386 -0400
--- a/src/cal3d/loader.cpp
+++ b/src/cal3d/loader.cpp
@@ -886,7 +886,7 @@
if(!dataSrc.ok())
{
Expand Down
4 changes: 2 additions & 2 deletions media-libs/cal3d/files/cal3d-0.11.0-tests.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- tests/Makefile.am.old 2014-10-27 12:14:44.534607920 +0100
+++ tests/Makefile.am 2014-10-27 12:16:00.825891248 +0100
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -14,7 +14,7 @@
EXTRA_DIST = \
$(wildcard cal3d_converter/base.??f)
Expand Down
4 changes: 2 additions & 2 deletions media-libs/cal3d/files/cal3d-0.11.0-verbose.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- tests/run.in.old 2012-06-29 13:27:55.413765822 +0200
+++ tests/run.in 2012-06-29 13:29:02.092084095 +0200
--- a/tests/run.in
+++ b/tests/run.in
@@ -43,7 +43,7 @@
exit 1
;;
Expand Down

0 comments on commit d72ae6a

Please sign in to comment.