summaryrefslogtreecommitdiff
blob: e295638ad5261a84bbe109a57bb1169ed7fe6c5f (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
60
61
62
63
64
65
66
67
68
69
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6
inherit eutils multilib

DESCRIPTION="Wings 3D is an advanced subdivision modeler"
HOMEPAGE="http://www.wings3d.com/"
SRC_URI="mirror://sourceforge/wings/${P}.tar.bz2"

LICENSE="BSD"
SLOT="0"
KEYWORDS="~amd64 ~x86"

RDEPEND="
	>=dev-lang/erlang-18.1[wxwidgets]
	dev-libs/cl
	media-libs/libsdl[opengl]
"
DEPEND="${RDEPEND}"

PATCHES=(
	"${FILESDIR}"/${PN}-2.0.4-wx.patch
)

src_prepare() {
	default

	sed -i \
		-e '/include_lib/s|wings/|../|' \
		plugins_src/primitives/wpc_knot.erl \
		plugins_src/primitives/wpc_plane.erl \
		plugins_src/primitives/wpc_spiral.erl \
		plugins_src/primitives/wpc_torus.erl \
		plugins_src/wp9_dialogs.erl \
		src/wings_text.erl \
		|| die

	eapply_user
}

src_configure() {
	export ERL_PATH="/usr/$(get_libdir)/erlang/lib/"
	export ESDL_PATH="${ERL_PATH}/$(best_version media-libs/esdl | cut -d/ -f2)"
}

src_compile() {
	# Work around parallel make issues
	emake vsn.mk
	for subdir in intl_tools src e3d icons plugins_src; do
		emake ESDL_PATH="${ESDL_PATH}" -C ${subdir}
	done
}

src_install() {
	WINGS_PATH=${ERL_PATH}/${P}
	dodir ${WINGS_PATH}

	find -name 'Makefile*' -exec rm -f '{}' \;

	insinto ${WINGS_PATH}
	doins -r e3d ebin icons plugins psd shaders src textures tools

	dosym ${WINGS_PATH} ${ERL_PATH}/${PN}
	dosym ${ESDL_PATH} ${ERL_PATH}/esdl
	newbin "${FILESDIR}"/wings.sh wings
	dodoc AUTHORS README
}