pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/libusb1 Add builtin.mk for FreeBSD's libusb in b...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e1a2354fa1d4
branches: trunk
changeset: 635153:e1a2354fa1d4
user: ryoon <ryoon%pkgsrc.org@localhost>
date: Sun Jun 01 06:13:53 2014 +0000
description:
Add builtin.mk for FreeBSD's libusb in base.
diffstat:
devel/libusb1/builtin.mk | 49 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diffs (53 lines):
diff -r 26f4b9d8df91 -r e1a2354fa1d4 devel/libusb1/builtin.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/libusb1/builtin.mk Sun Jun 01 06:13:53 2014 +0000
@@ -0,0 +1,49 @@
+# $NetBSD: builtin.mk,v 1.1 2014/06/01 06:13:53 ryoon Exp $
+
+BUILTIN_PKG:= libusb1
+
+BUILTIN_FIND_HEADERS_VAR:= H_LIBUSB
+BUILTIN_FIND_HEADERS.H_LIBUSB= libusb.h
+
+.include "../../mk/buildlink3/bsd.builtin.mk"
+
+.if !defined(IS_BUILTIN.libusb1)
+IS_BUILTIN.libusb1= no
+. if empty(H_LIBUSB:M__nonexistent__)
+IS_BUILTIN.libusb1= yes
+. endif
+.endif
+MAKEVARS+= IS_BUILTIN.libusb1
+
+.if !defined(USE_BUILTIN.libusb1)
+USE_BUILTIN.libusb1= ${IS_BUILTIN.libusb1}
+.endif
+
+.if !empty(USE_BUILTIN.libusb1:M[yY][eE][sS])
+. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
+do-configure-pre-hook: override-libusb-pkgconfig
+
+BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
+LIBUSB_PKGCFGF= libusb-1.0.pc
+
+override-libusb-pkgconfig: override-message-libusb-pkgconfig
+override-message-libusb-pkgconfig:
+ @${STEP_MSG} "Magical transformations for libusb on FreeBSD."
+
+override-libusb-pkgconfig:
+ ${RUN} \
+ ${MKDIR} ${BLKDIR_PKGCFG}; \
+ { \
+ ${ECHO} "prefix=${LIBUSB_PREFIX}"; \
+ ${ECHO} "exec_prefix=\$${prefix}"; \
+ ${ECHO} "libdir=\$${exec_prefix}/lib"; \
+ ${ECHO} "includedir=\$${prefix}/include"; \
+ ${ECHO} ""; \
+ ${ECHO} "Name: libusb-1.0"; \
+ ${ECHO} "Description: library for USB access"; \
+ ${ECHO} "Version: ${BUILTIN_VERSION.libusb1}"; \
+ ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lusb"; \
+ ${ECHO} "Cflags: -I\$${includedir}"; \
+ } >> ${BLKDIR_PKGCFG}/${LIBUSB_PKGCFGF};
+. endif
+.endif
Home |
Main Index |
Thread Index |
Old Index