From c1f733a1523676d9bcd6717812045757fddd77e4 Mon Sep 17 00:00:00 2001 From: adam Date: Tue, 22 Mar 2005 09:44:33 +0000 Subject: [PATCH] Added support for Darwin/MacOSX --- meta-pkgs/xorg/Makefile | 15 +++++----- meta-pkgs/xorg/Makefile.common | 55 ++++++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 23 deletions(-) diff --git a/meta-pkgs/xorg/Makefile b/meta-pkgs/xorg/Makefile index fd3cfa89ae0f..f93a2821baf8 100644 --- a/meta-pkgs/xorg/Makefile +++ b/meta-pkgs/xorg/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2004/09/21 17:38:53 xtraeme Exp $ +# $NetBSD: Makefile,v 1.4 2005/03/22 09:44:33 adam Exp $ DISTNAME= # empty PKGNAME= xorg-${XORG_VER} @@ -23,15 +23,16 @@ DEPENDS+= xorg-fontsTruetype>=${XORG_VER}:../../fonts/xorg-fontsTruetype DEPENDS+= xorg-fontsType1>=${XORG_VER}:../../fonts/xorg-fontsType1 #DEPENDS+= xorg-docs>=${XORG_VER}:../../misc/xorg-docs -NO_BUILD= # defined -NO_BUILDLINK= # defined -NO_CHECKSUM= # defined -NO_MTREE= # defined -NO_XORG_TARGETS= # defined +NO_BUILD= yes +NO_BUILDLINK= yes +NO_CHECKSUM= yes +NO_MTREE= yes +NO_XORG_TARGETS= yes USE_DIRS+= xorg-1.0 -NO_CONFIGURE= # defined +NO_CONFIGURE= yes do-install: .include "Makefile.common" + .include "../../mk/bsd.pkg.mk" diff --git a/meta-pkgs/xorg/Makefile.common b/meta-pkgs/xorg/Makefile.common index 503ad1fdd8c8..dda5edc4ae86 100644 --- a/meta-pkgs/xorg/Makefile.common +++ b/meta-pkgs/xorg/Makefile.common @@ -1,12 +1,12 @@ -# $NetBSD: Makefile.common,v 1.21 2005/03/19 20:11:14 hira Exp $ +# $NetBSD: Makefile.common,v 1.22 2005/03/22 09:44:33 adam Exp $ # -# XBUILD_DIRS is the group of directories under ${WRKSRC} that will +# XBUILD_DIRS is the group of directories under ${WRKSRC} that will # be built in. # XINCLUDE_DIRS is the group of directories under ${WRKSRC} that need # to be Makefilesed or included in besides XBUILD_DIRS -# XINSTALL_DIRS is the group of directories which will have +# XINSTALL_DIRS is the group of directories which will have # their install targets run. -# XINSTALL_MAN_DIRS is the group of directories which will have +# XINSTALL_MAN_DIRS is the group of directories which will have # their install.man targets run. .if !defined(XORG_MAKEFILE_COMMON) @@ -60,6 +60,31 @@ KERNMAN_SUFFIX= 4 FILEMAN_SUFFIX= 5 MISCMAN_SUFFIX= 7 +.elif ${OPSYS} == "Darwin" + +# Use Quartz and Apple OpenGL on MacOSX; IOKit driver on pure Darwin +.if exists(/System/Library/Frameworks/OpenGL.framework) +DARWIN_USE_QUARTZ= YES +DARWIN_QUARTZ= +.else +DARWIN_USE_QUARTZ= NO +DARWIN_QUARTZ= '@comment ' +.endif +XF86RUSH= '@comment ' +IMAKE_MANTOOLS= +LIBDRI= '@comment ' +MANSOURCEPATH= man/man +MAN_DIR= ${MANSOURCEPATH}1 +LIBMAN_DIR= ${MANSOURCEPATH}3 +KERNMAN_DIR= ${MANSOURCEPATH}4 +FILEMAN_DIR= ${MANSOURCEPATH}5 +MISCMAN_DIR= ${MANSOURCEPATH}7 +MAN_SUFFIX= 1 +LIBMAN_SUFFIX= 3 +KERNMAN_SUFFIX= 4 +FILEMAN_SUFFIX= 5 +MISCMAN_SUFFIX= 7 + .elif ${OPSYS} == "Linux" XF86RUSH= @@ -99,6 +124,7 @@ MISCMAN_SUFFIX= ${MAN_SUFFIX} .if !defined(XORG_ONLY_DIRS) || empty(XORG_ONLY_DIRS:M[Yy][Ee][Ss]) +PLIST_SUBST+= DARWIN_QUARTZ=${DARWIN_QUARTZ} PLIST_SUBST+= XTHRSTUB_MINOR=${XTHRSTUB_MINOR} PLIST_SUBST+= LIBXTHRSTUB=${LIBXTHRSTUB} PLIST_SUBST+= XF86RUSH=${XF86RUSH} @@ -136,7 +162,7 @@ MESSAGE_SUBST+= X11ROOT=${X11ROOT} # # Any volunteer to test any platform not listed here? :) # -ONLY_FOR_PLATFORM= FreeBSD-*-* Linux-*-* NetBSD-*-* \ +ONLY_FOR_PLATFORM= Darwin-*-* FreeBSD-*-* Linux-*-* NetBSD-*-* \ OpenBSD-*-* SunOS-*-* DragonFly-*-* MASTER_SITE_XORG+= \ @@ -162,7 +188,7 @@ _XINCLUDE_DIRS= include ${XBUILD_DIRS} ${XINCLUDE_DIRS} # # Operating Systems to pass our compiler options (CC, CXX, CPP, CFLAGS). # -SYSTEMS= FreeBSD NetBSD OpenBSD linux DragonFly +SYSTEMS= FreeBSD NetBSD OpenBSD darwin linux DragonFly .if !defined(NO_XORG_TARGETS) @@ -185,7 +211,6 @@ SUBST_SED.nada= -e 's|@@NETBSD_THREADLIB@@||' USE_LANGUAGES= c c++ . if !target(post-extract) - GLOBAL_LDFLAGS= -L${LOCALBASE}/lib -L${X11ROOT}/lib \ ${COMPILER_RPATH_FLAG}${LOCALBASE}/lib \ ${COMPILER_RPATH_FLAG}${X11BASE}/lib @@ -219,14 +244,12 @@ post-extract: @${LN} -sf ${X11ROOT}/bin/pswrap ${WRKSRC}/config/pswrap @${LN} -sf ${X11ROOT}/lib/X11/config/version.def ${WRKSRC}/config/cf @${LN} -sf ${X11ROOT}/lib/X11/config/date.def ${WRKSRC}/config/cf - @${CP} ${PKGSRCDIR}/x11/xorg-libs/files/DragonFly.cf ${WRKSRC}/config/cf . for F in ${SYSTEMS} @${MV} ${WRKSRC}/config/cf/${F}.cf ${WRKSRC}/config/cf/${F}.cf.in . endfor . undef F - . endif . if !target(pre-configure) @@ -236,13 +259,13 @@ pre-configure: -e "s|@@PKGSRC_CXX@@|${CXX}|g" \ -e "s|@@PKGSRC_CPP@@|${CPP}|g" \ -e "s|@@PKGSRC_CFLAGS@@|${CFLAGS:C/-I.*//}|g" \ + -e "s|@@DARWIN_USE_QUARTZ@@|${DARWIN_USE_QUARTZ}|g" \ -e "s|-I${LOCALBASE}/include||" \ -e "s|-I${X11BASE}/include||" \ ${WRKSRC}/config/cf/${F}.cf.in > \ ${WRKSRC}/config/cf/${F}.cf . endfor . undef F - . endif . if !target(do-configure) @@ -253,30 +276,30 @@ do-configure: -I${WRKSRC}/config/cf; \ done @for dir in ${_XINCLUDE_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} Makefiles; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} Makefiles; \ done @for dir in ${_XINCLUDE_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} includes; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} includes; \ done @for dir in include ${XBUILD_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} depend; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} depend; \ done . endif . if !target(do-build) do-build: @for dir in ${XBUILD_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} all; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} all; \ done . endif . if !target(do-install) do-install: @for dir in ${XINSTALL_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} install; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} install; \ done @for dir in ${XINSTALL_MAN_DIRS}; do \ - cd ${WRKSRC}/$${dir} && ${MAKE} install.man; \ + cd ${WRKSRC}/$${dir} && ${MAKE_PROGRAM} install.man; \ done . endif