1 # $NetBSD: fuse.buildlink3.mk,v 1.7 2007/03/06 00:03:40 xtraeme Exp $
3 # Makefile fragment for packages using the FUSE framework.
6 .if !defined(FUSE_BUILDLINK3_MK)
7 FUSE_BUILDLINK3_MK= # defined
9 .include "bsd.fast.prefs.mk"
11 . if ${OPSYS} == "Linux"
13 . include "../../filesystems/fuse/buildlink3.mk"
15 . elif ${OPSYS} == "NetBSD"
16 . if !exists(/usr/include/fuse.h)
17 PKG_FAIL_REASON+= "Couldn't find fuse headers, please install librefuse."
20 . if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
21 do-configure-pre-hook: override-fuse-pkgconfig
23 BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
26 override-fuse-pkgconfig: override-message-fuse-pkgconfig
27 override-message-fuse-pkgconfig:
28 @${STEP_MSG} "Magical transformations for fuse on NetBSD."
30 override-fuse-pkgconfig:
31 ${_PKG_SILENT}${_PKG_DEBUG}set -e; \
32 ${MKDIR} ${BLKDIR_PKGCFG}; \
34 ${ECHO} "prefix=/usr"; \
35 ${ECHO} "exec_prefix=\$${prefix}"; \
36 ${ECHO} "libdir=\$${exec_prefix}/lib"; \
37 ${ECHO} "includedir=\$${prefix}/include"; \
39 ${ECHO} "Name: FuSE"; \
40 ${ECHO} "Description: Filesystem USEr Space"; \
41 ${ECHO} "Version: 2.6.0"; \
42 ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \
43 ${ECHO} "Cflags: -I\$${includedir}"; \
44 } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF};
49 BUILDLINK_TRANSFORM+= l:fuse:refuse
51 # Undefined reference to fuse_main()... use fuse_exit() for now.
52 . if defined(GNU_CONFIGURE)
53 SUBST_CLASSES+= refuse
54 SUBST_STAGE.refuse= pre-configure
55 SUBST_FILES.refuse= configure
56 . for _f_ in configure.in configure.ac
57 . if exists(${WRKSRC}/${_f_})
58 SUBST_FILES.refuse+= ${_f_}
61 SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g"
66 PKG_FAIL_REASON+= "Your OS is not supported by the FUSE pkgsrc framework."
68 . endif # end of Operating Systems
70 .endif # FUSE_BUILDLINK3_MK