summaryrefslogtreecommitdiff
blob: c77dbee3d4ba7514f11eb92662875ab8a0fc88d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit edos2unix flag-o-matic toolchain-funcs

MY_P=OpenCTM-${PV}

DESCRIPTION="OpenCTM - the Open Compressed Triangle Mesh"
HOMEPAGE="http://openctm.sourceforge.net"
SRC_URI="https://downloads.sourceforge.net/project/openctm/${MY_P}/${MY_P}-src.tar.bz2 -> ${P}-src.tar.bz2"
S="${WORKDIR}/${MY_P}"

LICENSE="GPL-2"
SLOT="0/1"
KEYWORDS="~amd64 ~x86"

DEPEND="
	dev-libs/tinyxml
	media-libs/freeglut
	media-libs/glew:0=
	media-libs/pnglite
	sys-libs/zlib
	virtual/jpeg:0
	virtual/opengl
	x11-libs/gtk+:2
"
RDEPEND="${DEPEND}"
BDEPEND="virtual/pkgconfig"

PATCHES=(
	"${FILESDIR}/${P}-escape-hyphens-in-ctmconv-man-page.patch"
	"${FILESDIR}/${P}-link-ctmviewer-with-libGLU.patch"
	"${FILESDIR}/${P}-use-system-libs.patch"
	"${FILESDIR}/${P}-do-not-set-rpath.patch"
	"${FILESDIR}/${P}-link-ctmviewer-only-with-necessary-gtk-libs.patch"
	"${FILESDIR}/${P}-link-ctmviewer-with-libGL.patch"
	"${FILESDIR}/${P}-create-lib-with-correct-soname-and-symlinks.patch"
	"${FILESDIR}/${P}-fix-install-paths.patch"
	"${FILESDIR}/${P}-respect-flags.patch"
	"${FILESDIR}/${P}-no-strip.patch"
)

src_prepare() {
	edos2unix lib/Makefile.linux

	default
}

src_compile() {
	tc-export PKG_CONFIG

	emake CC=$(tc-getCC) CXX="$(tc-getCXX)" -f Makefile.linux
}

src_install() {
	emake DESTDIR="${ED}" LIBDIR="${ED}/usr/$(get_libdir)" -f Makefile.linux install
}