1 # $NetBSD: fuse.buildlink3.mk,v 1.9 2009/03/17 22:13:36 rillig 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} == "Darwin"
13 . if !exists(/usr/local/include/fuse.h)
14 PKG_FAIL_REASON+= "Couldn't find fuse headers; please install MacFUSE."
17 do-configure-pre-hook: override-fuse-pkgconfig
19 override-fuse-pkgconfig: override-message-fuse-pkgconfig
20 override-message-fuse-pkgconfig:
21 @${STEP_MSG} "Setting up usage of native MacFUSE."
23 override-fuse-pkgconfig:
25 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
26 ${LN} -s /usr/local/lib/pkgconfig/fuse.pc \
27 ${BUILDLINK_DIR}/lib/pkgconfig/fuse.pc
29 BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/fuse
31 . elif ${OPSYS} == "Linux"
33 . include "../../filesystems/fuse/buildlink3.mk"
35 . elif ${OPSYS} == "NetBSD"
36 . if !exists(/usr/include/fuse.h)
37 PKG_FAIL_REASON+= "Couldn't find fuse headers, please install librefuse."
40 . if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
41 do-configure-pre-hook: override-fuse-pkgconfig
43 BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
46 override-fuse-pkgconfig: override-message-fuse-pkgconfig
47 override-message-fuse-pkgconfig:
48 @${STEP_MSG} "Magical transformations for fuse on NetBSD."
50 override-fuse-pkgconfig:
52 ${MKDIR} ${BLKDIR_PKGCFG}; \
54 ${ECHO} "prefix=/usr"; \
55 ${ECHO} "exec_prefix=\$${prefix}"; \
56 ${ECHO} "libdir=\$${exec_prefix}/lib"; \
57 ${ECHO} "includedir=\$${prefix}/include"; \
59 ${ECHO} "Name: FuSE"; \
60 ${ECHO} "Description: Filesystem USEr Space"; \
61 ${ECHO} "Version: 2.6.0"; \
62 ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \
63 ${ECHO} "Cflags: -I\$${includedir}"; \
64 } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF};
69 BUILDLINK_TRANSFORM+= l:fuse:refuse
71 # Undefined reference to fuse_main()... use fuse_exit() for now.
72 . if defined(GNU_CONFIGURE)
73 SUBST_CLASSES+= refuse
74 SUBST_STAGE.refuse= pre-configure
75 SUBST_FILES.refuse= configure
76 . for _f_ in configure.in configure.ac
77 . if exists(${WRKSRC}/${_f_})
78 SUBST_FILES.refuse+= ${_f_}
81 SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g"
86 PKG_FAIL_REASON+= "Your OS is not supported by the FUSE pkgsrc framework."
88 . endif # end of Operating Systems
90 .endif # FUSE_BUILDLINK3_MK