summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authordholland <dholland>2013-06-17 05:27:50 +0000
committerdholland <dholland>2013-06-17 05:27:50 +0000
commit49ff8feb883fa98f9c257a224c8cea6b6f426e4e (patch)
tree576eb311426cf11180fa9cabbd1762e33660c488 /graphics
parent02884800359a95d1ca5ae8547946a492aa9420ae (diff)
downloadpkgsrc-49ff8feb883fa98f9c257a224c8cea6b6f426e4e.tar.gz
Fix the builtin version detection by checking the pkgconfig files if
they exist. Now gets 7.8.2 on netbsd-current instead of 4.0.4. (!)
Diffstat (limited to 'graphics')
-rw-r--r--graphics/MesaLib/builtin.mk21
-rw-r--r--graphics/glu/builtin.mk21
2 files changed, 30 insertions, 12 deletions
diff --git a/graphics/MesaLib/builtin.mk b/graphics/MesaLib/builtin.mk
index e67a773febb..517f53133ae 100644
--- a/graphics/MesaLib/builtin.mk
+++ b/graphics/MesaLib/builtin.mk
@@ -1,9 +1,10 @@
-# $NetBSD: builtin.mk,v 1.18 2012/03/19 12:34:13 joerg Exp $
+# $NetBSD: builtin.mk,v 1.19 2013/06/17 05:27:50 dholland Exp $
BUILTIN_PKG:= MesaLib
-BUILTIN_FIND_FILES_VAR:= H_MESALIB
+BUILTIN_FIND_FILES_VAR:= H_MESALIB PC_GL
BUILTIN_FIND_FILES.H_MESALIB= ${X11BASE}/include/GL/glx.h
+BUILTIN_FIND_FILES.PC_GL= ${X11BASE}/lib/pkgconfig/gl.pc
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -12,7 +13,9 @@ BUILTIN_FIND_FILES.H_MESALIB= ${X11BASE}/include/GL/glx.h
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
###
.if !defined(IS_BUILTIN.MesaLib)
-. if empty(H_MESALIB:M__nonexistent__)
+. if empty(PC_GL:M__nonexistent__)
+IS_BUILTIN.MesaLib= yes
+. elif empty(H_MESALIB:M__nonexistent__)
IS_BUILTIN.MesaLib= yes
. else
IS_BUILTIN.MesaLib= no
@@ -25,10 +28,16 @@ MAKEVARS+= IS_BUILTIN.MesaLib
### a package name to represent the built-in package.
###
.if !defined(BUILTIN_PKG.MesaLib) && \
- !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS]) && \
- empty(H_MESALIB:M__nonexistent__)
-. include "../../graphics/Mesa/version.mk"
+ !empty(IS_BUILTIN.MesaLib:M[yY][eE][sS])
+. if empty(PC_GL:M__nonexistent__)
+BUILTIN_VERSION.Mesa!= ${SED} -n -e 's/Version: //p' ${PC_GL}
+. elif empty(H_MESALIB:M__nonexistent__)
+. include "../../graphics/Mesa/version.mk"
+. else # ?
+BUILTIN_VERSION.Mesa:= 0.something-weird-happened
+. endif
BUILTIN_PKG.MesaLib= MesaLib-${BUILTIN_VERSION.Mesa}
+MAKEVARS+= BUILTIN_VERSION.Mesa
.endif
MAKEVARS+= BUILTIN_PKG.MesaLib
diff --git a/graphics/glu/builtin.mk b/graphics/glu/builtin.mk
index 9df82ba2b6d..aaedf939d2a 100644
--- a/graphics/glu/builtin.mk
+++ b/graphics/glu/builtin.mk
@@ -1,9 +1,10 @@
-# $NetBSD: builtin.mk,v 1.13 2012/03/19 12:34:14 joerg Exp $
+# $NetBSD: builtin.mk,v 1.14 2013/06/17 05:27:50 dholland Exp $
BUILTIN_PKG:= glu
-BUILTIN_FIND_FILES_VAR:= H_GLU
+BUILTIN_FIND_FILES_VAR:= H_GLU PC_GLU
BUILTIN_FIND_FILES.H_GLU= ${X11BASE}/include/GL/glu.h
+BUILTIN_FIND_FILES.PC_GLU= ${X11BASE}/lib/pkgconfig/glu.pc
.include "../../mk/buildlink3/bsd.builtin.mk"
@@ -12,7 +13,9 @@ BUILTIN_FIND_FILES.H_GLU= ${X11BASE}/include/GL/glu.h
### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
###
.if !defined(IS_BUILTIN.glu)
-. if empty(H_GLU:M__nonexistent__)
+. if empty(PC_GLU:M__nonexistent__)
+IS_BUILTIN.glu= yes
+. elif empty(H_GLU:M__nonexistent__)
IS_BUILTIN.glu= yes
. else
IS_BUILTIN.glu= no
@@ -25,10 +28,16 @@ MAKEVARS+= IS_BUILTIN.glu
### a package name to represent the built-in package.
###
.if !defined(BUILTIN_PKG.glu) && \
- !empty(IS_BUILTIN.glu:M[yY][eE][sS]) && \
- empty(H_GLU:M__nonexistent__)
-. include "../../graphics/Mesa/version.mk"
+ !empty(IS_BUILTIN.glu:M[yY][eE][sS])
+. if empty(PC_GLU:M__nonexistent__)
+BUILTIN_VERSION.Mesa!= ${SED} -n -e 's/Version: //p' ${PC_GLU}
+. elif empty(H_GLU:M__nonexistent__)
+. include "../../graphics/Mesa/version.mk"
+. else # ?
+BUILTIN_VERSION.Mesa:= 0.something-weird-happened
+. endif
BUILTIN_PKG.glu= glu-${BUILTIN_VERSION.Mesa}
+MAKEVARS+= BUILTIN_VERSION.Mesa
.endif
MAKEVARS+= BUILTIN_PKG.glu