summaryrefslogtreecommitdiff
path: root/mk/fuse.buildlink3.mk
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2007-02-18 22:07:56 +0000
committerxtraeme <xtraeme@pkgsrc.org>2007-02-18 22:07:56 +0000
commit18ff518e6efd9483933075f59c9de5e18233f99f (patch)
tree1c5032746c95e0fb4cff0938e9a7d9d7a3c8d1fb /mk/fuse.buildlink3.mk
parent5cd5dfed4e7195f3db0198bedff457a40ce83235 (diff)
downloadpkgsrc-18ff518e6efd9483933075f59c9de5e18233f99f.tar.gz
FUSE framework for pkgsrc, in a very rudimentary state.
Seems to work fine on NetBSD with librefuse and some packages, will need modifications for other systems. Requested by agc@.
Diffstat (limited to 'mk/fuse.buildlink3.mk')
-rw-r--r--mk/fuse.buildlink3.mk64
1 files changed, 64 insertions, 0 deletions
diff --git a/mk/fuse.buildlink3.mk b/mk/fuse.buildlink3.mk
new file mode 100644
index 00000000000..6453cf8244d
--- /dev/null
+++ b/mk/fuse.buildlink3.mk
@@ -0,0 +1,64 @@
+# $NetBSD: fuse.buildlink3.mk,v 1.1 2007/02/18 22:07:56 xtraeme Exp $
+#
+# Makefile fragment for packages using the FUSE framework.
+#
+
+.if !defined(FUSE_BUILDLINK3_MK)
+FUSE_BUILDLINK3_MK= # defined
+
+.include "../../mk/bsd.prefs.mk"
+
+# NetBSD
+.if (!empty(OPSYS:MNetBSD) && exists(/usr/include/fuse.h))
+
+. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
+do-configure-pre-hook: override-fuse-pkgconfig
+
+BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
+FUSE_PKGCFGF= fuse.pc
+
+override-fuse-pkgconfig: override-message-fuse-pkgconfig
+override-message-fuse-pkgconfig:
+ @${STEP_MSG} "Magical transformations for fuse on NetBSD."
+
+override-fuse-pkgconfig:
+ ${_PKG_SILENT}${_PKG_DEBUG}set -e; \
+ ${MKDIR} ${BLKDIR_PKGCFG}; \
+ { \
+ ${ECHO} "prefix=/usr"; \
+ ${ECHO} "exec_prefix=\$${prefix}"; \
+ ${ECHO} "libdir=\$${exec_prefix}/lib"; \
+ ${ECHO} "includedir=\$${prefix}/include"; \
+ ${ECHO} ""; \
+ ${ECHO} "Name: FuSE"; \
+ ${ECHO} "Description: Filesystem USEr Space"; \
+ ${ECHO} "Version: 2.6.0"; \
+ ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \
+ ${ECHO} "Cflags: -I\$${includedir}"; \
+ } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF};
+
+. endif # pkg-config
+
+# To make sure
+BUILDLINK_TRANSFORM+= l:fuse:refuse
+
+# Undefined reference to fuse_main()... use fuse_exit() for now.
+. if defined(GNU_CONFIGURE)
+SUBST_CLASSES+= refuse
+SUBST_STAGE.refuse= pre-configure
+SUBST_FILES.refuse= configure
+. for _f_ in configure.in configure.ac
+. if exists(${WRKSRC}/${_f_})
+SUBST_FILES.refuse+= ${_f_}
+. endif
+. endfor
+SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g"
+. endif
+
+. endif # NetBSD - pkg-config
+
+.else # Linux
+
+.include "${PKGSRCDIR}/filesystems/fusefs/buildlink3.mk"
+
+.endif