Thu Jan 28 20:50:08 2016 UTC ()
Deal with type hiding under NetBSD-current to e.g. fix the build
of e.g. the "fuse-ext2" package.


(tron)
diff -r1.18 -r1.19 pkgsrc/mk/fuse.buildlink3.mk

cvs diff -r1.18 -r1.19 pkgsrc/mk/fuse.buildlink3.mk (switch to unified diff)

--- pkgsrc/mk/fuse.buildlink3.mk 2015/02/04 23:44:34 1.18
+++ pkgsrc/mk/fuse.buildlink3.mk 2016/01/28 20:50:07 1.19
@@ -1,103 +1,104 @@ @@ -1,103 +1,104 @@
1# $NetBSD: fuse.buildlink3.mk,v 1.18 2015/02/04 23:44:34 tnn Exp $ 1# $NetBSD: fuse.buildlink3.mk,v 1.19 2016/01/28 20:50:07 tron Exp $
2# 2#
3# Makefile fragment for packages using the FUSE framework. 3# Makefile fragment for packages using the FUSE framework.
4# 4#
5 5
6# The symbol FUSE_BUILDLINK3_MK is used by filesystems/fuse's bl3.mk, 6# The symbol FUSE_BUILDLINK3_MK is used by filesystems/fuse's bl3.mk,
7# so use something else for our include guard. 7# so use something else for our include guard.
8.if !defined(MK_FUSE_BUILDLINK3_MK) 8.if !defined(MK_FUSE_BUILDLINK3_MK)
9MK_FUSE_BUILDLINK3_MK= # defined 9MK_FUSE_BUILDLINK3_MK= # defined
10 10
11.include "bsd.fast.prefs.mk" 11.include "bsd.fast.prefs.mk"
12 12
13. if ${OPSYS} == "Darwin" 13. if ${OPSYS} == "Darwin"
14 14
15# On Darwin, we only attempt to support "Fuse for OS X", known as 15# On Darwin, we only attempt to support "Fuse for OS X", known as
16# "OSXFUSE". MacFuse is dead, and fuse4x is merging into OSXFUSE. 16# "OSXFUSE". MacFuse is dead, and fuse4x is merging into OSXFUSE.
17 17
18. if !exists(/usr/local/lib/pkgconfig/osxfuse.pc) 18. if !exists(/usr/local/lib/pkgconfig/osxfuse.pc)
19PKG_FAIL_REASON+= \ 19PKG_FAIL_REASON+= \
20 "Couldn't find fuse; please install OSXFUSE." 20 "Couldn't find fuse; please install OSXFUSE."
21. endif 21. endif
22 22
23do-configure-pre-hook: override-fuse-pkgconfig 23do-configure-pre-hook: override-fuse-pkgconfig
24 24
25override-fuse-pkgconfig: override-message-fuse-pkgconfig 25override-fuse-pkgconfig: override-message-fuse-pkgconfig
26override-message-fuse-pkgconfig: 26override-message-fuse-pkgconfig:
27 @${STEP_MSG} "Setting up usage of native fuse." 27 @${STEP_MSG} "Setting up usage of native fuse."
28 28
29override-fuse-pkgconfig: 29override-fuse-pkgconfig:
30 ${RUN} \ 30 ${RUN} \
31 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \ 31 ${MKDIR} ${BUILDLINK_DIR}/lib/pkgconfig; \
32 ${LN} -s /usr/local/lib/pkgconfig/osxfuse.pc \ 32 ${LN} -s /usr/local/lib/pkgconfig/osxfuse.pc \
33 ${BUILDLINK_DIR}/lib/pkgconfig/fuse.pc 33 ${BUILDLINK_DIR}/lib/pkgconfig/fuse.pc
34 34
35BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/osxfuse 35BUILDLINK_PASSTHRU_DIRS+= /usr/local/include/osxfuse
36# Too much! But allows -losxfuse to work. 36# Too much! But allows -losxfuse to work.
37BUILDLINK_PASSTHRU_DIRS+= /usr/local/lib 37BUILDLINK_PASSTHRU_DIRS+= /usr/local/lib
38 38
39. elif ${OPSYS} == "Linux" 39. elif ${OPSYS} == "Linux"
40 40
41. include "../../filesystems/fuse/buildlink3.mk" 41. include "../../filesystems/fuse/buildlink3.mk"
42 42
43. elif !empty(MACHINE_PLATFORM:MSunOS-5.11-*) 43. elif !empty(MACHINE_PLATFORM:MSunOS-5.11-*)
44 44
45. if !exists(/usr/include/fuse/fuse.h) 45. if !exists(/usr/include/fuse/fuse.h)
46PKG_FAIL_REASON+= "Couldn't find fuse headers, please install libfuse." 46PKG_FAIL_REASON+= "Couldn't find fuse headers, please install libfuse."
47. endif 47. endif
48. include "../../filesystems/fuse/buildlink3.mk" 48. include "../../filesystems/fuse/buildlink3.mk"
49 49
50. elif ${OPSYS} == "NetBSD" || ${OPSYS} == "Minix" || \ 50. elif ${OPSYS} == "NetBSD" || ${OPSYS} == "Minix" || \
51 !empty(MACHINE_PLATFORM:MDragonFly-[3-9]*-*) 51 !empty(MACHINE_PLATFORM:MDragonFly-[3-9]*-*)
52. if !exists(/usr/include/fuse.h) 52. if !exists(/usr/include/fuse.h)
53PKG_FAIL_REASON+= "Couldn't find fuse headers, please install librefuse." 53PKG_FAIL_REASON+= "Couldn't find fuse headers, please install librefuse."
54. endif 54. endif
55 55
 56CFLAGS.NetBSD+= -D_KERNTYPES
56LDFLAGS.DragonFly+= -lpuffs 57LDFLAGS.DragonFly+= -lpuffs
57 58
58. if !empty(USE_TOOLS:C/:.*//:Mpkg-config) 59. if !empty(USE_TOOLS:C/:.*//:Mpkg-config)
59do-configure-pre-hook: override-fuse-pkgconfig 60do-configure-pre-hook: override-fuse-pkgconfig
60 61
61BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig 62BLKDIR_PKGCFG= ${BUILDLINK_DIR}/lib/pkgconfig
62FUSE_PKGCFGF= fuse.pc 63FUSE_PKGCFGF= fuse.pc
63 64
64override-fuse-pkgconfig: override-message-fuse-pkgconfig 65override-fuse-pkgconfig: override-message-fuse-pkgconfig
65override-message-fuse-pkgconfig: 66override-message-fuse-pkgconfig:
66 @${STEP_MSG} "Generating pkg-config file for builtin fuse package." 67 @${STEP_MSG} "Generating pkg-config file for builtin fuse package."
67 68
68override-fuse-pkgconfig: 69override-fuse-pkgconfig:
69 ${RUN} \ 70 ${RUN} \
70 ${MKDIR} ${BLKDIR_PKGCFG}; \ 71 ${MKDIR} ${BLKDIR_PKGCFG}; \
71 { \ 72 { \
72 ${ECHO} "prefix=/usr"; \ 73 ${ECHO} "prefix=/usr"; \
73 ${ECHO} "exec_prefix=\$${prefix}"; \ 74 ${ECHO} "exec_prefix=\$${prefix}"; \
74 ${ECHO} "libdir=\$${exec_prefix}/lib"; \ 75 ${ECHO} "libdir=\$${exec_prefix}/lib"; \
75 ${ECHO} "includedir=\$${prefix}/include"; \ 76 ${ECHO} "includedir=\$${prefix}/include"; \
76 ${ECHO} ""; \ 77 ${ECHO} ""; \
77 ${ECHO} "Name: FuSE"; \ 78 ${ECHO} "Name: FuSE"; \
78 ${ECHO} "Description: Filesystem USEr Space"; \ 79 ${ECHO} "Description: Filesystem USEr Space"; \
79 ${ECHO} "Version: 2.6.0"; \ 80 ${ECHO} "Version: 2.6.0"; \
80 ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \ 81 ${ECHO} "Libs: -Wl,-R\$${libdir} -L\$${libdir} -lrefuse"; \
81 ${ECHO} "Cflags: -I\$${includedir}"; \ 82 ${ECHO} "Cflags: -I\$${includedir}"; \
82 } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF}; 83 } >> ${BLKDIR_PKGCFG}/${FUSE_PKGCFGF};
83 84
84. endif # pkg-config 85. endif # pkg-config
85 86
86# To make sure 87# To make sure
87BUILDLINK_TRANSFORM+= l:fuse:refuse 88BUILDLINK_TRANSFORM+= l:fuse:refuse
88 89
89# Undefined reference to fuse_main()... use fuse_exit() for now. 90# Undefined reference to fuse_main()... use fuse_exit() for now.
90. if defined(GNU_CONFIGURE) 91. if defined(GNU_CONFIGURE)
91SUBST_CLASSES+= refuse 92SUBST_CLASSES+= refuse
92SUBST_STAGE.refuse= pre-configure 93SUBST_STAGE.refuse= pre-configure
93SUBST_FILES.refuse= configure configure.ac configure.in 94SUBST_FILES.refuse= configure configure.ac configure.in
94SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g" 95SUBST_SED.refuse= -e "s|fuse_main|fuse_exit|g"
95. endif 96. endif
96 97
97. else # !NetBSD 98. else # !NetBSD
98 99
99PKG_FAIL_REASON+= "Your OS is not supported by the FUSE pkgsrc framework." 100PKG_FAIL_REASON+= "Your OS is not supported by the FUSE pkgsrc framework."
100 101
101. endif # end of Operating Systems 102. endif # end of Operating Systems
102 103
103.endif # MK_FUSE_BUILDLINK3_MK 104.endif # MK_FUSE_BUILDLINK3_MK