summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorsalo <salo@pkgsrc.org>2004-07-31 22:13:38 +0000
committersalo <salo@pkgsrc.org>2004-07-31 22:13:38 +0000
commit8f4bded3f54e29bfefbed26a2667309b42b03c8b (patch)
tree31160bca6517076fbadf67acfa66c922cca9e9f4 /sysutils
parent1f1efb1cdda5c7deed0af339f4180b1a41bb3fca (diff)
downloadpkgsrc-8f4bded3f54e29bfefbed26a2667309b42b03c8b.tar.gz
Add buildlink3.mk and builtin.mk files, for software using libmagic.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/file/buildlink3.mk19
-rw-r--r--sysutils/file/builtin.mk22
2 files changed, 41 insertions, 0 deletions
diff --git a/sysutils/file/buildlink3.mk b/sysutils/file/buildlink3.mk
new file mode 100644
index 00000000000..3834e33d8af
--- /dev/null
+++ b/sysutils/file/buildlink3.mk
@@ -0,0 +1,19 @@
+# $NetBSD: buildlink3.mk,v 1.1 2004/07/31 22:13:38 salo Exp $
+#
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH}+
+FILE_BUILDLINK3_MK:= ${FILE_BUILDLINK3_MK}+
+
+.if !empty(BUILDLINK_DEPTH:M+)
+BUILDLINK_DEPENDS+= file
+.endif
+
+BUILDLINK_PACKAGES:= ${BUILDLINK_PACKAGES:Nfile}
+BUILDLINK_PACKAGES+= file
+
+.if !empty(FILE_BUILDLINK3_MK:M+)
+BUILDLINK_DEPENDS.file+= file>=4.09
+BUILDLINK_PKGSRCDIR.file?= ../../sysutils/file
+.endif # FILE_BUILDLINK3_MK
+
+BUILDLINK_DEPTH:= ${BUILDLINK_DEPTH:S/+$//}
diff --git a/sysutils/file/builtin.mk b/sysutils/file/builtin.mk
new file mode 100644
index 00000000000..174f1474989
--- /dev/null
+++ b/sysutils/file/builtin.mk
@@ -0,0 +1,22 @@
+# $NetBSD: builtin.mk,v 1.1 2004/07/31 22:13:38 salo Exp $
+#
+
+_MAGIC_H= /usr/include/magic.h
+
+.if !defined(IS_BUILTIN.file)
+IS_BUILTIN.file= no
+. if exists(${_MAGIC_H})
+IS_BUILTIN.file!= \
+ if ${GREP} -q "magic_file" ${_MAGIC_H}; then \
+ ${ECHO} "yes"; \
+ else \
+ ${ECHO} "no"; \
+ fi
+. endif
+BUILDLINK_VARS+= IS_BUILTIN.file
+.endif # IS_BUILTIN.file
+
+.if !defined(USE_BUILTIN.file)
+USE_BUILTIN.file?= ${IS_BUILTIN.file}
+PREFER.file?= pkgsrc
+.endif # USE_BUILTIN.file