--- openmesh-2.0_rc5.ebuild 2011-04-11 18:24:14.905837679 +0200 +++ openmesh-2.0.1.ebuild 2011-11-12 14:08:41.697794163 +0100 @@ -2,31 +2,35 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/media-gfx/openmesh/openmesh-2.0_rc5.ebuild,v 1.3 2011/04/05 14:18:20 jsbronder Exp $ -EAPI="3" +EAPI=4 +CMAKE_VERBOSE==1 + inherit eutils cmake-utils -MY_PN="OpenMesh" -MY_PV="${PV/_rc/-RC}" -S="${WORKDIR}/${MY_PN}-${MY_PV}" +MY_PN=OpenMesh +MY_P=${MY_PN}-${PV} DESCRIPTION="A generic and efficient data structure for representing and manipulating polygonal meshes" HOMEPAGE="http://www.openmesh.org/" -SRC_URI="http://openmesh.org/fileadmin/${PN}-files/${MY_PV/-RC/RC}/${MY_PN}-${MY_PV}.tar.bz2" +SRC_URI="http://openmesh.org/fileadmin/${PN}-files/${PV}/${MY_P}.tar.bz2" # See COPYING.EXCEPTIONS LICENSE="LGPL-3 as-is" SLOT="0" KEYWORDS="~amd64 ~x86" -IUSE="qt4 debug static-libs" +IUSE="qt4 static-libs" RDEPEND="qt4? ( x11-libs/qt-gui:4 x11-libs/qt-opengl:4 media-libs/freeglut )" DEPEND="${RDEPEND}" +S=${WORKDIR}/${MY_P} + +DOCS=( LICENSE/COPYING.EXCEPTIONS README CHANGELOG ) + src_prepare() { # Fix libdir and remove rpath. - cd "${S}" sed -i \ -e "s|\(set (ACG_PROJECT_LIBDIR \"\).*|\1$(get_libdir)/\")|" \ -e "s|\(set (ACG_PROJECT_PLUGINDIR \"\)lib\(.*\)|\1$(get_libdir)\2|" \ @@ -34,27 +38,17 @@ -e "s|\(SKIP_BUILD_RPATH\) 0|\1 1|" \ -e '/^ *INSTALL_RPATH/d' \ cmake/ACGCommon.cmake || die + if ! use static-libs; then + sed -i src/${MY_PN}/{Core,Tools}/CMakeLists.txt \ + -e "s/SHAREDANDSTATIC/SHARED/g" || die + sed -e '/OpenMeshToolsStatic\|OpenMeshCoreStatic/d' \ + -i src/${MY_PN}/Tools/CMakeLists.txt || die + fi } src_configure() { - if use debug; then - CMAKE_BUILD_TYPE=Debug - else - CMAKE_BUILD_TYPE=Release - append-cppflags -DNDEBUG - fi - mycmakeargs="$(cmake-utils_use_build "qt4" "APPS")" + mycmakeargs=( + $(cmake-utils_use_build "qt4" "APPS") + ) cmake-utils_src_configure } - -src_install() { - cmake-utils_src_install - - if ! use static-libs; then - # No way to set this in the build system as of 2.0_rc5 - rm -f "${D}"/usr/$(get_libdir)/*.a \ - || die "Failed to remove static libraries." - fi - cd "${S}" - dodoc LICENSE/* README CHANGELOG || die -}