pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/libexecinfo Add builtin.mk file for built-in lib...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a82ff03fb932
branches: trunk
changeset: 620965:a82ff03fb932
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Wed Jul 03 14:47:04 2013 +0000
description:
Add builtin.mk file for built-in libexecinfo support.
* Tested on NetBSD 6.99.23 and 6.1 with graphics/fotoxx.
diffstat:
devel/libexecinfo/builtin.mk | 68 ++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 68 insertions(+), 0 deletions(-)
diffs (72 lines):
diff -r 27862b9db5cc -r a82ff03fb932 devel/libexecinfo/builtin.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libexecinfo/builtin.mk Wed Jul 03 14:47:04 2013 +0000
@@ -0,0 +1,68 @@
+# $NetBSD: builtin.mk,v 1.1 2013/07/03 14:47:04 ryoon Exp $
+
+BUILTIN_PKG:= libexecinfo
+
+BUILTIN_FIND_FILES_VAR:= H_EXECINFO
+BUILTIN_FIND_FILES.H_EXECINFO= /usr/include/execinfo.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+###
+### Determine if there is a built-in implementation of the package and
+### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
+###
+.if !defined(IS_BUILTIN.libexecinfo)
+IS_BUILTIN.libexecinfo= no
+. if empty(H_EXECINFO:M__nonexistent__) && empty(H_EXECINFO:M${LOCALBASE}/*)
+IS_BUILTIN.libexecinfo= yes
+. endif
+.endif # IS_BUILTIN.libexecinfo
+MAKEVARS+= IS_BUILTIN.libexecinfo
+
+###
+### Determine whether we should use the built-in implementation if it
+### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
+###
+.if !defined(USE_BUILTIN.libexecinfo)
+. if ${PREFER.libexecinfo} == "pkgsrc"
+USE_BUILTIN.libexecinfo= no
+. else
+USE_BUILTIN.libexecinfo= ${IS_BUILTIN.libexecinfo}
+. if defined(BUILTIN_PKG.libexecinfo) && \
+ !empty(IS_BUILTIN.libexecinfo:M[yY][eE][sS])
+USE_BUILTIN.libexecinfo= yes
+. for _dep_ in ${BUILDLINK_API_DEPENDS.libexecinfo}
+. if !empty(USE_BUILTIN.libexecinfo:M[yY][eE][sS])
+USE_BUILTIN.libexecinfo!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${BUILTIN_PKG.libexecinfo:Q}; then \
+ ${ECHO} yes; \
+ else \
+ ${ECHO} no; \
+ fi
+. endif
+. endfor
+. endif
+. endif # PREFER.libexecinfo
+.endif
+MAKEVARS+= USE_BUILTIN.libexecinfo
+
+###
+### The section below only applies if we are not including this file
+### solely to determine whether a built-in implementation exists.
+###
+CHECK_BUILTIN.libexecinfo?= no
+.if !empty(CHECK_BUILTIN.libexecinfo:M[nN][oO])
+
+. if !empty(USE_BUILTIN.libexecinfo:M[nN][oO])
+_BLTN_LIBEXECINFO= -lexecinfo
+. else
+. if exists(/usr/include/execinfo.h) && (${OPSYS} == "NetBSD")
+_BLTN_LIBEXECINFO= -lexecinfo
+. else
+_BLTN_LIBEXECINFO= # empty
+. endif
+. endif
+BUILDLINK_LDADD.libexecinfo?= ${_BLTN_LIBEXECINFO}
+BUILDLINK_LDFLAGS.libexecinfo?= ${_BLTN_LIBEXECINFO}
+
+.endif # CHECK_BUILTIN.libexecinfo
Home |
Main Index |
Thread Index |
Old Index