summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortnn <tnn@pkgsrc.org>2015-10-12 17:51:02 +0000
committertnn <tnn@pkgsrc.org>2015-10-12 17:51:02 +0000
commit3d670ebbde0ef1f8f452f87df39a09d2aed7ff7c (patch)
treec6a3441c17135a1885a4bfd020da99349a74cc6e
parent0748a24aa2867bb956f113e6068c9e90de2d60df (diff)
downloadpkgsrc-3d670ebbde0ef1f8f452f87df39a09d2aed7ff7c.tar.gz
Don't rely on Darwin.mk setting OSX_SDK_PATH. It's an internal variable
that will not always get defined. Instead query xcrun directly.
-rw-r--r--wm/libAppleWM/Makefile8
-rw-r--r--x11/modular-xorg-xquartz/Makefile8
2 files changed, 12 insertions, 4 deletions
diff --git a/wm/libAppleWM/Makefile b/wm/libAppleWM/Makefile
index 1609cdfd2d5..db1f6eccb23 100644
--- a/wm/libAppleWM/Makefile
+++ b/wm/libAppleWM/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2015/10/01 11:03:07 tnn Exp $
+# $NetBSD: Makefile,v 1.4 2015/10/12 17:51:02 tnn Exp $
DISTNAME= libAppleWM-1.4.1
CATEGORIES= x11 devel
@@ -20,7 +20,11 @@ USE_TOOLS+= pkg-config
CONFIGURE_ENV+= LIB_MAN_SUFFIX=3
PKGCONFIG_OVERRIDE+= applewm.pc.in
-MAKE_ENV+= OSX_SDK_PATH=${OSX_SDK_PATH}
+.if exists(/usr/bin/xcrun) && exists(/usr/bin/sw_vers)
+MY_OSX_VERS!= /usr/bin/sw_vers -productVersion
+MY_XCODE_SDK_PATH!= /usr/bin/xcrun --sdk macosx${MY_OSX_VERS} --show-sdk-path
+.endif
+MAKE_ENV+= OSX_SDK_PATH=${MY_XCODE_SDK_PATH}
.include "../../wm/applewmproto/buildlink3.mk"
.include "../../x11/libX11/buildlink3.mk"
diff --git a/x11/modular-xorg-xquartz/Makefile b/x11/modular-xorg-xquartz/Makefile
index eee72aeab9e..02cea828a42 100644
--- a/x11/modular-xorg-xquartz/Makefile
+++ b/x11/modular-xorg-xquartz/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2015/10/01 12:55:09 tnn Exp $
+# $NetBSD: Makefile,v 1.2 2015/10/12 17:51:02 tnn Exp $
DISTNAME= xorg-server-1.17.2
PKGNAME= ${DISTNAME:S/xorg-server/modular-xorg-xquartz/}
@@ -80,7 +80,11 @@ CONFIGURE_ENV+= ac_cv_path_RAWCPP="${PREFIX}/bin/tradcpp -Uunix"
.include "../../security/nettle/buildlink3.mk"
CONFIGURE_ARGS+= --with-sha1=libnettle
-MAKE_ENV+= OSX_SDK_PATH=${OSX_SDK_PATH}
+.if exists(/usr/bin/xcrun) && exists(/usr/bin/sw_vers)
+MY_OSX_VERS!= /usr/bin/sw_vers -productVersion
+MY_XCODE_SDK_PATH!= /usr/bin/xcrun --sdk macosx${MY_OSX_VERS} --show-sdk-path
+.endif
+MAKE_ENV+= OSX_SDK_PATH=${MY_XCODE_SDK_PATH}
MESSAGE_SUBST+= PREFIX=${PREFIX}
.include "../../devel/ncurses/buildlink3.mk"