2013-03-01 01:08:31 +01:00
|
|
|
# $NetBSD: fuse.buildlink3.mk,v 1.16 2013/03/01 00:08:31 tcort Exp $
|
2007-02-18 23:07:56 +01:00
|
|
|
#
|
|
|
|
# Makefile fragment for packages using the FUSE framework.
|
|
|
|
#
|
|
|
|
|
2010-11-15 05:51:33 +01:00
|
|
|
# The symbol FUSE_BUILDLINK3_MK is used by filesystems/fuse's bl3.mk,
|
|
|
|
# so use something else for our include guard.
|
|
|
|
.if !defined(MK_FUSE_BUILDLINK3_MK)
|
|
|
|
MK_FUSE_BUILDLINK3_MK= # defined
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2007-10-17 12:43:36 +02:00
|
|
|
.include "bsd.fast.prefs.mk"
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2010-02-01 22:51:55 +01:00
|
|
|
. if ${OPSYS} == "Darwin"
|
|
|
|
|
2012-08-04 06:00:00 +02:00
|
|
|
. if !exists(/usr/local/lib/pkgconfig/fuse.pc)
|
|
|
|
PKG_FAIL_REASON+= \
|
|
|
|
"Couldn't find fuse; please install MacFUSE or OSXFUSE."
|
2010-02-01 22:51:55 +01:00
|
|
|
. endif
|
|
|
|
|
|
|
|
do-configure-pre-hook: override-fuse-pkgconfig
|
|
|
|
|
|
|
|
override-fuse-pkgconfig: override-message-fuse-pkgconfig
|
|
|
|
override-message-fuse-pkgconfig:
|
2012-08-04 06:00:00 +02:00
|
|
|
@${STEP_MSG} "Setting up usage of native fuse."
|
2010-02-01 22:51:55 +01:00
|
|
|
|
|
|
|
override-fuse-pkgconfig:
|
|
|
|
${RUN} \
|
|
|
|
${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
|
|
|
|
${LN} -s /usr/local/lib/pkgconfig/fuse.pc \
|
|
|
|
${BUILDLINK_DIR}/lib/pkgconfig/fuse.pc
|
|
|
|
|
|
|
|
BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/fuse
|
2012-08-04 06:00:00 +02:00
|
|
|
BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/macfuse
|
|
|
|
BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/osxfuse
|
2010-02-01 22:51:55 +01:00
|
|
|
|
|
|
|
. elif ${OPSYS} == "Linux"
|
2007-02-20 23:56:35 +01:00
|
|
|
|
2007-02-21 00:49:05 +01:00
|
|
|
. include "../../filesystems/fuse/buildlink3.mk"
|
2007-02-20 23:56:35 +01:00
|
|
|
|
2012-02-28 16:05:07 +01:00
|
|
|
. elif !empty(MACHINE_PLATFORM:MSunOS-5.11-*)
|
|
|
|
|
|
|
|
. if !exists(/usr/include/fuse/fuse.h)
|
|
|
|
PKG_FAIL_REASON+= "Couldn't find fuse headers, please install libfuse."
|
|
|
|
. endif
|
|
|
|
. include "../../filesystems/fuse/buildlink3.mk"
|
|
|
|
|
2013-03-01 01:08:31 +01:00
|
|
|
. elif ${OPSYS} == "NetBSD" || ${OPSYS} == "Minix" || \
|
2012-08-17 14:50:15 +02:00
|
|
|
!empty(MACHINE_PLATFORM:MDragonFly-[3-9]*-*)
|
2007-03-06 01:03:40 +01:00
|
|
|
. if !exists(/usr/include/fuse.h)
|
|
|
|
PKG_FAIL_REASON+= "Couldn't find fuse headers, please install librefuse."
|
|
|
|
. endif
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2012-08-17 14:50:15 +02:00
|
|
|
LDFLAGS.DragonFly+= -lpuffs
|
|
|
|
|
2007-02-18 23:37:06 +01:00
|
|
|
. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
|
2007-02-18 23:07:56 +01:00
|
|
|
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:
|
2009-03-17 23:13:36 +01:00
|
|
|
${RUN} \
|
2007-02-18 23:07:56 +01:00
|
|
|
${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};
|
|
|
|
|
2007-02-18 23:37:06 +01:00
|
|
|
. endif # pkg-config
|
2007-02-18 23:07:56 +01:00
|
|
|
|
|
|
|
# To make sure
|
|
|
|
BUILDLINK_TRANSFORM+= l:fuse:refuse
|
|
|
|
|
|
|
|
# Undefined reference to fuse_main()... use fuse_exit() for now.
|
2007-02-18 23:37:06 +01:00
|
|
|
. if defined(GNU_CONFIGURE)
|
2007-02-18 23:07:56 +01:00
|
|
|
SUBST_CLASSES+= refuse
|
|
|
|
SUBST_STAGE.refuse= pre-configure
|
2011-07-09 14:33:40 +02:00
|
|
|
SUBST_FILES.refuse= configure configure.ac configure.in
|
2007-02-18 23:07:56 +01:00
|
|
|
SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g"
|
2007-02-18 23:37:06 +01:00
|
|
|
. endif
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2007-02-20 23:56:35 +01:00
|
|
|
. else # !NetBSD
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2007-02-20 23:56:35 +01:00
|
|
|
PKG_FAIL_REASON+= "Your OS is not supported by the FUSE pkgsrc framework."
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2007-02-20 23:56:35 +01:00
|
|
|
. endif # end of Operating Systems
|
2007-02-18 23:07:56 +01:00
|
|
|
|
2010-11-15 05:51:33 +01:00
|
|
|
.endif # MK_FUSE_BUILDLINK3_MK
|