From 64d65b88fc1c05e66cfd6c890900cb5c3cd8d1a2 Mon Sep 17 00:00:00 2001 From: John Marino Date: Wed, 26 Dec 2012 16:13:39 +0100 Subject: [PATCH] Add native dports support DPorts, the ports building system tailored for Dragonfly, requires five bsd.*.mk scripts to be placed at /usr/share/mk in order to work on DragonFly without any type of bootstrapping. After installing dports using the /usr/Makefile script, any dport can be built using the same instructions as FreeBSD (e.g. make install clean) The resulting packages will be handled by "pkg", which will also be used in the future for downloading prebuild binaries from an official repository. --- share/mk/Makefile | 6 +++++- share/mk/bsd.port.mk | 16 ++++++++++++++++ share/mk/bsd.port.options.mk | 8 ++++++++ share/mk/bsd.port.post.mk | 7 +++++++ share/mk/bsd.port.pre.mk | 7 +++++++ share/mk/bsd.port.subdir.mk | 6 ++++++ 6 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 share/mk/bsd.port.mk create mode 100644 share/mk/bsd.port.options.mk create mode 100644 share/mk/bsd.port.post.mk create mode 100644 share/mk/bsd.port.pre.mk create mode 100644 share/mk/bsd.port.subdir.mk diff --git a/share/mk/Makefile b/share/mk/Makefile index e6ee1de84b..55f2242d0f 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,5 +1,4 @@ # $FreeBSD: src/share/mk/Makefile,v 1.27.2.8 2002/07/22 14:21:51 ru Exp $ -# $DragonFly: src/share/mk/Makefile,v 1.17 2007/01/15 18:29:44 corecode Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 FILES= bsd.README @@ -11,6 +10,11 @@ FILES+= bsd.kmod.mk bsd.hostlib.mk FILES+= bsd.lib.mk bsd.libnames.mk bsd.links.mk bsd.man.mk bsd.nls.mk FILES+= bsd.obj.mk bsd.own.mk FILES+= bsd.hostprog.mk bsd.prog.mk bsd.subdir.mk bsd.sys.mk +FILES+= bsd.port.mk +FILES+= bsd.port.options.mk +FILES+= bsd.port.post.mk +FILES+= bsd.port.pre.mk +FILES+= bsd.port.subdir.mk FILES+= sys.mk NOOBJ= noobj FILESDIR= ${BINDIR}/mk diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk new file mode 100644 index 0000000000..aec413a84f --- /dev/null +++ b/share/mk/bsd.port.mk @@ -0,0 +1,16 @@ +# $FreeBSD: release/9.0.0/share/mk/bsd.port.mk 206082 2010-04-02 06:55:31Z netchild $ + +PORTSDIR?= /usr/dports +BSDPORTMK?= ${PORTSDIR}/Mk/bsd.port.mk + +# Needed to keep bsd.own.mk from reading in /etc/src.conf +# and setting MK_* variables when building ports. +_WITHOUT_SRCCONF= + +# Enable CTF conversion on request. +.if defined(WITH_CTF) +.undef NO_CTF +.endif + +.include +.include "${BSDPORTMK}" diff --git a/share/mk/bsd.port.options.mk b/share/mk/bsd.port.options.mk new file mode 100644 index 0000000000..1bbfb4207d --- /dev/null +++ b/share/mk/bsd.port.options.mk @@ -0,0 +1,8 @@ +# $FreeBSD: release/9.0.0/share/mk/bsd.port.options.mk 170185 2007-06-01 15:17:51Z pav $ + +USEOPTIONSMK= yes +INOPTIONSMK= yes + +.include + +.undef INOPTIONSMK diff --git a/share/mk/bsd.port.post.mk b/share/mk/bsd.port.post.mk new file mode 100644 index 0000000000..33c15260f7 --- /dev/null +++ b/share/mk/bsd.port.post.mk @@ -0,0 +1,7 @@ +# $FreeBSD: release/9.0.0/share/mk/bsd.port.post.mk 95028 2002-04-19 07:42:41Z ru $ + +AFTERPORTMK= yes + +.include + +.undef AFTERPORTMK diff --git a/share/mk/bsd.port.pre.mk b/share/mk/bsd.port.pre.mk new file mode 100644 index 0000000000..f4aeada9a9 --- /dev/null +++ b/share/mk/bsd.port.pre.mk @@ -0,0 +1,7 @@ +# $FreeBSD: release/9.0.0/share/mk/bsd.port.pre.mk 95028 2002-04-19 07:42:41Z ru $ + +BEFOREPORTMK= yes + +.include + +.undef BEFOREPORTMK diff --git a/share/mk/bsd.port.subdir.mk b/share/mk/bsd.port.subdir.mk new file mode 100644 index 0000000000..a6cf0b8e8a --- /dev/null +++ b/share/mk/bsd.port.subdir.mk @@ -0,0 +1,6 @@ +# $FreeBSD: release/9.0.0/share/mk/bsd.port.subdir.mk 131482 2004-07-02 20:47:18Z eik $ + +PORTSDIR?= /usr/dports +BSDPORTSUBDIRMK?= ${PORTSDIR}/Mk/bsd.port.subdir.mk + +.include "${BSDPORTSUBDIRMK}" -- 2.41.0