1 # $NetBSD: fuse.buildlink3.mk,v 1.15 2012/08/17 12:50:15 marino Exp $
3 # Makefile fragment for packages using the FUSE framework.
6 # The symbol FUSE_BUILDLINK3_MK is used by filesystems/fuse's bl3.mk,
7 # so use something else for our include guard.
8 .if
!defined
(MK_FUSE_BUILDLINK3_MK
)
9 MK_FUSE_BUILDLINK3_MK
= # defined
11 .
include "bsd.fast.prefs.mk"
13 . if
${OPSYS} == "Darwin"
15 . if
!exists
(/usr
/local
/lib
/pkgconfig
/fuse.
pc)
17 "Couldn't find fuse; please install MacFUSE or OSXFUSE."
20 do-configure-pre-hook
: override-fuse-pkgconfig
22 override-fuse-pkgconfig
: override-message-fuse-pkgconfig
23 override-message-fuse-pkgconfig
:
24 @
${STEP_MSG} "Setting up usage of native fuse."
26 override-fuse-pkgconfig
:
28 ${MKDIR} ${BUILDLINK_DIR}/lib
/pkgconfig
; \
29 ${LN} -s
/usr
/local
/lib
/pkgconfig
/fuse.
pc \
30 ${BUILDLINK_DIR}/lib
/pkgconfig
/fuse.
pc
32 BUILDLINK_PASSTHRU_DIRS
+= /usr
/local
/include/fuse
33 BUILDLINK_PASSTHRU_DIRS
+= /usr
/local
/include/macfuse
34 BUILDLINK_PASSTHRU_DIRS
+= /usr
/local
/include/osxfuse
36 . elif
${OPSYS} == "Linux"
38 .
include "../../filesystems/fuse/buildlink3.mk"
40 . elif
!empty
(MACHINE_PLATFORM
:MSunOS-5.11
-*)
42 . if
!exists
(/usr
/include/fuse
/fuse.h
)
43 PKG_FAIL_REASON
+= "Couldn't find fuse headers, please install libfuse."
45 .
include "../../filesystems/fuse/buildlink3.mk"
47 . elif
${OPSYS} == "NetBSD" ||
${OPSYS} == "Minix" || \
48 !empty
(MACHINE_PLATFORM
:MDragonFly-
[3-9]*-*)
49 . if
!exists
(/usr
/include/fuse.h
)
50 PKG_FAIL_REASON
+= "Couldn't find fuse headers, please install librefuse."
53 LDFLAGS.DragonFly
+= -lpuffs
55 . if
!empty
(USE_TOOLS
:C
/:.
*//:Mpkg-config
)
56 do-configure-pre-hook
: override-fuse-pkgconfig
58 BLKDIR_PKGCFG
= ${BUILDLINK_DIR}/lib
/pkgconfig
61 override-fuse-pkgconfig
: override-message-fuse-pkgconfig
62 override-message-fuse-pkgconfig
:
63 @
${STEP_MSG} "Magical transformations for fuse on NetBSD."
65 override-fuse-pkgconfig
:
67 ${MKDIR} ${BLKDIR_PKGCFG}; \
69 ${ECHO} "prefix=/usr"; \
70 ${ECHO} "exec_prefix=\$${prefix}"; \
71 ${ECHO} "libdir=\$${exec_prefix}/lib"; \
72 ${ECHO} "includedir=\$${prefix}/include"; \
74 ${ECHO} "Name: FuSE"; \
75 ${ECHO} "Description: Filesystem USEr Space"; \
76 ${ECHO} "Version: 2.6.0"; \
77 ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \
78 ${ECHO} "Cflags: -I\$${includedir}"; \
79 } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF};
84 BUILDLINK_TRANSFORM
+= l
:fuse
:refuse
86 # Undefined reference to fuse_main()... use fuse_exit() for now.
87 . if defined
(GNU_CONFIGURE
)
88 SUBST_CLASSES
+= refuse
89 SUBST_STAGE.refuse
= pre-configure
90 SUBST_FILES.refuse
= configure configure.ac configure.in
91 SUBST_SED.refuse
= -e
"s|fuse_main|fuse_exit|g"
96 PKG_FAIL_REASON
+= "Your OS is not supported by the FUSE pkgsrc framework."
98 .
endif # end of Operating Systems
100 .
endif # MK_FUSE_BUILDLINK3_MK