Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 363225
Collapse All | Expand All

(-)openmesh-2.0_rc5.ebuild (-26 / +20 lines)
Lines 2-32 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/media-gfx/openmesh/openmesh-2.0_rc5.ebuild,v 1.3 2011/04/05 14:18:20 jsbronder Exp $
3
# $Header: /var/cvsroot/gentoo-x86/media-gfx/openmesh/openmesh-2.0_rc5.ebuild,v 1.3 2011/04/05 14:18:20 jsbronder Exp $
4
4
5
EAPI="3"
5
EAPI=4
6
CMAKE_VERBOSE==1
7
6
inherit eutils cmake-utils
8
inherit eutils cmake-utils
7
9
8
MY_PN="OpenMesh"
10
MY_PN=OpenMesh
9
MY_PV="${PV/_rc/-RC}"
11
MY_P=${MY_PN}-${PV}
10
S="${WORKDIR}/${MY_PN}-${MY_PV}"
11
12
12
DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
13
DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes"
13
HOMEPAGE="http://www.openmesh.org/"
14
HOMEPAGE="http://www.openmesh.org/"
14
SRC_URI="http://openmesh.org/fileadmin/${PN}-files/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2"
15
SRC_URI="http://openmesh.org/fileadmin/${PN}-files/${PV}/${MY_P}.tar.bz2"
15
16
16
# See COPYING.EXCEPTIONS
17
# See COPYING.EXCEPTIONS
17
LICENSE="LGPL-3 as-is"
18
LICENSE="LGPL-3 as-is"
18
SLOT="0"
19
SLOT="0"
19
KEYWORDS="~amd64 ~x86"
20
KEYWORDS="~amd64 ~x86"
20
IUSE="qt4 debug static-libs"
21
IUSE="qt4 static-libs"
21
22
22
RDEPEND="qt4? ( x11-libs/qt-gui:4
23
RDEPEND="qt4? ( x11-libs/qt-gui:4
23
	x11-libs/qt-opengl:4
24
	x11-libs/qt-opengl:4
24
	media-libs/freeglut )"
25
	media-libs/freeglut )"
25
DEPEND="${RDEPEND}"
26
DEPEND="${RDEPEND}"
26
27
28
S=${WORKDIR}/${MY_P}
29
30
DOCS=( LICENSE/COPYING.EXCEPTIONS README CHANGELOG )
31
27
src_prepare() {
32
src_prepare() {
28
	# Fix libdir and remove rpath.
33
	# Fix libdir and remove rpath.
29
	cd "${S}"
30
	sed -i \
34
	sed -i \
31
		-e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
35
		-e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \
32
		-e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \
36
		-e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \
Lines 34-60 Link Here
34
		-e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
38
		-e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \
35
		-e '/^ *INSTALL_RPATH/d' \
39
		-e '/^ *INSTALL_RPATH/d' \
36
		cmake/ACGCommon.cmake || die
40
		cmake/ACGCommon.cmake || die
41
	if ! use static-libs; then
42
		sed -i src/${MY_PN}/{Core,Tools}/CMakeLists.txt \
43
			-e "s/SHAREDANDSTATIC/SHARED/g" || die
44
		sed -e '/OpenMeshToolsStatic\|OpenMeshCoreStatic/d' \
45
			-i src/${MY_PN}/Tools/CMakeLists.txt || die
46
	fi
37
}
47
}
38
48
39
src_configure() {
49
src_configure() {
40
	if use debug; then
50
	mycmakeargs=(
41
		CMAKE_BUILD_TYPE=Debug
51
		$(cmake-utils_use_build "qt4" "APPS")
42
	else
52
	)
43
		CMAKE_BUILD_TYPE=Release
44
		append-cppflags -DNDEBUG
45
	fi
46
	mycmakeargs="$(cmake-utils_use_build "qt4" "APPS")"
47
	cmake-utils_src_configure
53
	cmake-utils_src_configure
48
}
54
}
49
50
src_install() {
51
	cmake-utils_src_install
52
53
	if ! use static-libs; then
54
		# No way to set this in the build system as of 2.0_rc5
55
		rm -f "${D}"/usr/$(get_libdir)/*.a \
56
			|| die "Failed to remove static libraries."
57
	fi
58
	cd "${S}"
59
	dodoc LICENSE/* README CHANGELOG || die
60
}

Return to bug 363225