Add native dports support
authorJohn Marino <draco@marino.st>
Wed, 26 Dec 2012 15:13:39 +0000 (16:13 +0100)
committerJohn Marino <draco@marino.st>
Thu, 27 Dec 2012 14:57:42 +0000 (15:57 +0100)
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
share/mk/bsd.port.mk [new file with mode: 0644]
share/mk/bsd.port.options.mk [new file with mode: 0644]
share/mk/bsd.port.post.mk [new file with mode: 0644]
share/mk/bsd.port.pre.mk [new file with mode: 0644]
share/mk/bsd.port.subdir.mk [new file with mode: 0644]

index e6ee1de..55f2242 100644 (file)
@@ -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 (file)
index 0000000..aec413a
--- /dev/null
@@ -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 <bsd.own.mk>
+.include "${BSDPORTMK}"
diff --git a/share/mk/bsd.port.options.mk b/share/mk/bsd.port.options.mk
new file mode 100644 (file)
index 0000000..1bbfb42
--- /dev/null
@@ -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 <bsd.port.mk>
+
+.undef INOPTIONSMK
diff --git a/share/mk/bsd.port.post.mk b/share/mk/bsd.port.post.mk
new file mode 100644 (file)
index 0000000..33c1526
--- /dev/null
@@ -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 <bsd.port.mk>
+
+.undef AFTERPORTMK
diff --git a/share/mk/bsd.port.pre.mk b/share/mk/bsd.port.pre.mk
new file mode 100644 (file)
index 0000000..f4aeada
--- /dev/null
@@ -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 <bsd.port.mk>
+
+.undef BEFOREPORTMK
diff --git a/share/mk/bsd.port.subdir.mk b/share/mk/bsd.port.subdir.mk
new file mode 100644 (file)
index 0000000..a6cf0b8
--- /dev/null
@@ -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}"