diff options
author | hans <hans@pkgsrc.org> | 2011-10-04 14:23:17 +0000 |
---|---|---|
committer | hans <hans@pkgsrc.org> | 2011-10-04 14:23:17 +0000 |
commit | fc577e353825d59fbadb53af48e7bf00f7e19395 (patch) | |
tree | 1e165f3200c86e8e5bf681ffe3ba5c7e7684276c /devel/libuuid | |
parent | cb10bc206379298a55157223c4d578e2ba0ce7a5 (diff) | |
download | pkgsrc-fc577e353825d59fbadb53af48e7bf00f7e19395.tar.gz |
Add a builtin.mk to allow using a native libuuid if available.
Diffstat (limited to 'devel/libuuid')
-rw-r--r-- | devel/libuuid/builtin.mk | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/devel/libuuid/builtin.mk b/devel/libuuid/builtin.mk new file mode 100644 index 00000000000..fb43240df12 --- /dev/null +++ b/devel/libuuid/builtin.mk @@ -0,0 +1,45 @@ +# $NetBSD: builtin.mk,v 1.1 2011/10/04 14:23:17 hans Exp $ + +BUILTIN_PKG:= libuuid + +BUILTIN_FIND_FILES_VAR= H_UUID +BUILTIN_FIND_FILES.H_UUID= /usr/include/uuid/uuid.h +BUILTIN_FIND_GREP.H_UUID= uuid_generate +BUILTIN_FIND_LIBS:= uuid + +.include "../../mk/buildlink3/bsd.builtin.mk" + +.if !empty(BUILTIN_LIB_FOUND.uuid:M[yY][eE][sS]) && \ + empty(H_UUID:M__nonexistent__) + +IS_BUILTIN.libuuid= yes +USE_BUILTIN.libuuid= yes +BUILTIN_PKG.libuuid= libuuid-2.18 # whatever, as long as it is big enough + +. if !empty(USE_TOOLS:C/:.*//:Mpkg-config) +do-configure-pre-hook: override-libuuid-pkgconfig + +BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig +LIBUUID_PKGCFGF= uuid.pc + +override-libuuid-pkgconfig: override-message-libuuid-pkgconfig +override-message-libuuid-pkgconfig: + @${STEP_MSG} "Magical transformations for libuuid on Solaris." + +override-libuuid-pkgconfig: + ${RUN} \ + ${MKDIR} ${BLKDIR_PKGCFG}; \ + { \ + ${ECHO} "prefix=/usr"; \ + ${ECHO} "exec_prefix=\$${prefix}"; \ + ${ECHO} "libdir=\$${exec_prefix}/lib"; \ + ${ECHO} "includedir=\$${prefix}/include"; \ + ${ECHO} ""; \ + ${ECHO} "Name: uuid"; \ + ${ECHO} "Description: Universally unique id library"; \ + ${ECHO} "Version: ${BUILTIN_VERSION.libuuid}"; \ + ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -luuid"; \ + ${ECHO} "Cflags: -I\$${includedir}"; \ + } >> ${BLKDIR_PKGCFG}/${LIBUUID_PKGCFGF}; +. endif +.endif |