media-libs/glm: respect EPREFIX
authorTupone Alfredo <tupone@gentoo.org>
Tue, 10 Sep 2019 17:17:00 +0000 (19:17 +0200)
committerTupone Alfredo <tupone@gentoo.org>
Tue, 10 Sep 2019 17:17:00 +0000 (19:17 +0200)
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
media-libs/glm/files/glm.pc.in [moved from media-libs/glm/files/glm.pc with 64% similarity]
media-libs/glm/glm-0.9.9.6.ebuild

similarity index 64%
rename from media-libs/glm/files/glm.pc
rename to media-libs/glm/files/glm.pc.in
index e3bb5acc1aff92c62618ca08c4d9080d2eb921d3..fc5c7bb7f90c3b69cefd8f41182ff71b8a165afd 100644 (file)
@@ -1,7 +1,7 @@
-prefix=/usr
+prefix=@CMAKE_INSTALL_PREFIX@
 includedir=${prefix}/include
 
 Name: GLM
 Description: OpenGL Mathematics
-Version: 0.9.9
+Version: @GLM_VERSION@
 Cflags: -I${includedir}
index 8b84a358e2b79ef71a5ad63c928e79a053bdf058..89d9894cf71ec64ea7f00e644aa8e1660b92893e 100644 (file)
@@ -16,6 +16,14 @@ IUSE="test cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_avx cpu_flags_x86
 
 RDEPEND="virtual/opengl"
 
+src_prepare() {
+       cmake-utils_src_prepare
+       sed \
+               -e "s:@CMAKE_INSTALL_PREFIX@:${EPREFIX}/usr:" \
+               -e "s:@GLM_VERSION@:0.9.9:" \
+               "${FILESDIR}"/glm.pc.in > glm.pc || die
+}
+
 src_configure() {
        if use test; then
                local mycmakeargs=(
@@ -34,5 +42,5 @@ src_install() {
        doheader -r glm
        dodoc -r *md doc/*
        insinto /usr/$(get_libdir)/pkgconfig
-       doins "${FILESDIR}"/glm.pc
+       doins glm.pc
 }