--- source/dub/dub.d.orig	2017-02-14 02:35:14.000000000 -0700
+++ source/dub/dub.d	2017-03-17 22:27:45.000000000 -0700
@@ -276,7 +276,7 @@
 			migrateRepositoryFromRoaming(m_dirs.userSettings ~"\\packages", m_dirs.localRepository ~ "\\packages");
 
 		} else version(Posix){
-			m_dirs.systemSettings = NativePath("/var/lib/dub/");
+			m_dirs.systemSettings = NativePath("__MACPORTS_PREFIX__/var/lib/dub/");
 			m_dirs.userSettings = NativePath(environment.get("HOME")) ~ ".dub/";
 			if (!m_dirs.userSettings.absolute)
 				m_dirs.userSettings = NativePath(getcwd()) ~ m_dirs.userSettings;
