2006-10-21 22:25:21 +02:00
|
|
|
# $NetBSD: Makefile,v 1.21 2006/10/21 20:25:21 markd Exp $
|
2004-05-03 02:38:34 +02:00
|
|
|
#
|
|
|
|
|
2006-10-19 13:51:27 +02:00
|
|
|
PKGNAME= sge-6.0.8
|
|
|
|
DISTNAME= sge-V60u8_TAG-src
|
2004-05-03 02:38:34 +02:00
|
|
|
CATEGORIES= parallel sysutils
|
2006-10-19 13:51:27 +02:00
|
|
|
MASTER_SITES= # empty
|
|
|
|
#MASTER_SITES= http://gridengine.sunsource.net/files/documents/7/78/
|
2004-05-03 02:38:34 +02:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2004-05-03 02:38:34 +02:00
|
|
|
HOMEPAGE= http://gridengine.sunsource.net/
|
|
|
|
COMMENT= Sun Grid Engine distributed resource management system
|
2006-10-19 13:51:27 +02:00
|
|
|
DOWNLOAD= http://gridengine.sunsource.net/servlets/ProjectDocumentList
|
2004-05-03 02:38:34 +02:00
|
|
|
|
2006-10-21 22:25:21 +02:00
|
|
|
INTERACTIVE_STAGE= fetch
|
|
|
|
|
2004-05-03 02:38:34 +02:00
|
|
|
BUILD_DEPENDS+= {standalone-tcsh,tcsh}-[0-9]*:../../shells/tcsh
|
|
|
|
|
|
|
|
GNU_CONFIGURE= YES
|
2005-07-16 03:19:06 +02:00
|
|
|
USE_TOOLS+= gmake perl:run
|
2004-05-03 02:38:34 +02:00
|
|
|
|
2006-10-19 13:51:27 +02:00
|
|
|
WRKSRC= ${WRKDIR}/gridengine
|
2004-05-03 02:38:34 +02:00
|
|
|
CFLAGS+= -D${UPPER_OPSYS}
|
|
|
|
CONFIGURE_ENV+= REMOTE=sge
|
2005-12-05 21:49:47 +01:00
|
|
|
CONFIGURE_ENV+= CFLAGS=${CFLAGS:M*:Q}
|
2005-12-06 00:55:01 +01:00
|
|
|
CONFIGURE_ARGS+= --with-grd=${SGE_BUILDARCH:Q}
|
2005-12-05 21:49:47 +01:00
|
|
|
PLIST_SUBST+= SGE_ARCH=${SGE_ARCH:Q}
|
2004-05-03 02:38:34 +02:00
|
|
|
MESSAGE_SUBST+= SGE_ROOT=${SGE_ROOT}
|
2005-12-05 21:49:47 +01:00
|
|
|
MAKE_ENV+= PERL5=${PERL5:Q}
|
2004-05-03 02:38:34 +02:00
|
|
|
|
2006-10-19 13:51:27 +02:00
|
|
|
FETCH_MESSAGE= " The file ${DISTNAME}${EXTRACT_SUFX} containing the"
|
|
|
|
FETCH_MESSAGE+= " Grid Engine source snapshot must be fetched into:"
|
|
|
|
FETCH_MESSAGE+= ""
|
|
|
|
FETCH_MESSAGE+= " ${DISTDIR}"
|
|
|
|
FETCH_MESSAGE+= " from:"
|
|
|
|
FETCH_MESSAGE+= " ${DOWNLOAD}"
|
|
|
|
|
2004-05-03 02:38:34 +02:00
|
|
|
SGE_USER?= sgeadmin
|
|
|
|
SGE_GROUP?= sgeadmin
|
|
|
|
PKG_GROUPS= ${SGE_GROUP}
|
2006-10-19 13:51:27 +02:00
|
|
|
PKG_USERS= ${SGE_USER}:${SGE_GROUP}::Sun\ Grid\ Engine\ Administrator
|
2004-05-03 02:38:34 +02:00
|
|
|
|
|
|
|
EVAL_PREFIX+= PKGSRC_SSL_PREFIX=openssl
|
|
|
|
|
|
|
|
AIMK= ${SETENV} ${MAKE_ENV} tcsh -fb ${WRKSRC}/source/aimk
|
|
|
|
|
2004-07-21 00:34:03 +02:00
|
|
|
CONFIG_GUESS_OVERRIDE= source/3rdparty/qmake/config.guess \
|
|
|
|
source/3rdparty/qtcsh/config.guess
|
|
|
|
CONFIG_SUB_OVERRIDE= source/3rdparty/qmake/config.sub \
|
|
|
|
source/3rdparty/qtcsh/config.sub
|
|
|
|
|
2004-05-03 02:38:34 +02:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
|
|
|
# SGE_ARCH should match the putput of ${WRKSRC}/source/dist/util/arch
|
|
|
|
# SGE_BUILDARCH should match whats in ${WRKSRC}/source/aimk
|
2005-04-29 01:17:53 +02:00
|
|
|
UPPER_OPSYS_cmd= ${ECHO} "${OPSYS}" | ${TR} a-z A-Z
|
|
|
|
UPPER_OPSYS= ${UPPER_OPSYS_cmd:sh}
|
2004-05-03 02:38:34 +02:00
|
|
|
|
|
|
|
.if ${OPSYS} == "NetBSD"
|
|
|
|
SGE_ARCH= nbsd-${MACHINE_ARCH}
|
2005-04-29 01:17:53 +02:00
|
|
|
SGE_BUILDARCH_cmd= ${ECHO} "${OPSYS}_${MACHINE_ARCH}" | ${TR} a-z A-Z
|
2004-05-03 02:38:34 +02:00
|
|
|
.elif ${OPSYS} == "FreeBSD"
|
|
|
|
SGE_ARCH= fbsd-${MACHINE_ARCH}
|
2005-04-29 01:17:53 +02:00
|
|
|
SGE_BUILDARCH_cmd= ${ECHO} "${OPSYS}_${MACHINE_ARCH}" | ${TR} a-z A-Z
|
2004-05-03 02:38:34 +02:00
|
|
|
.elif ${OPSYS} == "SunOS"
|
|
|
|
. if ${MACHINE_ARCH} == "i386"
|
|
|
|
SGE_ARCH= solaris86
|
|
|
|
. else
|
2004-06-27 16:22:18 +02:00
|
|
|
_ISAINFO!= isainfo
|
|
|
|
. if !empty(_ISAINFO:Msparcv9)
|
|
|
|
SGE_ARCH= solaris64
|
|
|
|
. else
|
2004-05-03 02:38:34 +02:00
|
|
|
SGE_ARCH= solaris
|
2004-06-27 16:22:18 +02:00
|
|
|
. endif
|
2004-05-03 02:38:34 +02:00
|
|
|
. endif
|
2005-04-29 01:17:53 +02:00
|
|
|
SGE_BUILDARCH_cmd= ${ECHO} "${SGE_ARCH}" | ${TR} a-z A-Z
|
2004-05-03 02:38:34 +02:00
|
|
|
.elif ${OPSYS} == "Darwin"
|
|
|
|
SGE_ARCH= darwin
|
|
|
|
SGE_BUILDARCH= DARWIN
|
|
|
|
.else
|
2005-12-05 21:49:47 +01:00
|
|
|
PKG_FAIL_REASON+= "SGE_ARCH and SGE_BUILDARCH need to be configured for your OS"
|
2004-05-03 02:38:34 +02:00
|
|
|
.endif
|
2005-04-29 01:17:53 +02:00
|
|
|
SGE_BUILDARCH?= ${SGE_BUILDARCH_cmd:sh}
|
2004-05-03 02:38:34 +02:00
|
|
|
|
|
|
|
LDFLAGS+= -R${SGE_ROOT}/lib/${SGE_ARCH}
|
|
|
|
BUILDLINK_PASSTHRU_RPATHDIRS+= ${SGE_ROOT}/lib/${SGE_ARCH}
|
|
|
|
|
|
|
|
SGE_ROOT= ${PREFIX}/sge
|
|
|
|
|
2005-06-17 05:50:19 +02:00
|
|
|
INSTALLATION_DIRS= bin
|
|
|
|
|
2004-05-03 02:38:34 +02:00
|
|
|
post-patch:
|
|
|
|
@if [ "`${WRKSRC}/source/dist/util/arch`" != "${SGE_ARCH}" ]; then \
|
|
|
|
${ECHO} "ERROR: SGE_ARCH as set in the pkgsrc Makefile," ;\
|
|
|
|
${ECHO} " ${SGE_ARCH}, does not agree with that returned by" ; \
|
|
|
|
${ECHO} " ${WRKSRC}/source/dist/util/arch," ; \
|
|
|
|
${ECHO} " `${WRKSRC}/source/dist/util/arch`" ; \
|
|
|
|
${FALSE} ; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
.for __tmp__ in source/dist/util/arch_variables source/scripts/distinst.site source/aimk.site
|
|
|
|
${MV} ${WRKSRC}/${__tmp__} ${WRKSRC}/${__tmp__}.bak
|
|
|
|
${SED} -e 's;@rcd_dir@;${RCD_SCRIPTS_DIR};g' -e 's;@ssl_prefix@;${SSL_PREFIX};g' \
|
2006-10-19 13:51:27 +02:00
|
|
|
-e 's;@db4_prefix@;${BUILDLINK_PREFIX.db4};g' \
|
2004-05-03 02:38:34 +02:00
|
|
|
-e 's;@perl5@;${PERL5};g' ${WRKSRC}/${__tmp__}.bak > \
|
|
|
|
${WRKSRC}/${__tmp__}
|
|
|
|
${RM} ${WRKSRC}/${__tmp__}.bak
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
do-configure:
|
|
|
|
.for __prog__ in qmake qtcsh
|
|
|
|
${MKDIR} ${WRKSRC}/source/3rdparty/${__prog__}/${SGE_BUILDARCH}
|
|
|
|
cd ${WRKSRC}/source/3rdparty/${__prog__}/${SGE_BUILDARCH} && \
|
|
|
|
${SETENV} ${CONFIGURE_ENV} \
|
|
|
|
SGE_ARCH=`${WRKSRC}/source/dist/util/arch` \
|
|
|
|
../configure ${CONFIGURE_ARGS} --srcdir=..
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
do-build:
|
2006-10-19 13:51:27 +02:00
|
|
|
cd ${WRKSRC}/source && ${AIMK} -no-jni -only-depend
|
2004-05-03 02:38:34 +02:00
|
|
|
cd ${WRKSRC}/source && ${SETENV} ${MAKE_ENV} ./scripts/zerodepend
|
2006-10-19 13:51:27 +02:00
|
|
|
cd ${WRKSRC}/source && ${AIMK} -no-jni -no-qmake -no-qtcsh depend
|
|
|
|
cd ${WRKSRC}/source && ${AIMK} -no-jni
|
|
|
|
cd ${WRKSRC}/source && ${AIMK} -no-jni -man
|
2004-05-03 02:38:34 +02:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${MKDIR} ${SGE_ROOT}
|
|
|
|
${CHOWN} ${SGE_USER} ${SGE_ROOT}
|
|
|
|
${CHGRP} ${SGE_GROUP} ${SGE_ROOT}
|
|
|
|
cd ${WRKSRC}/source && \
|
2006-10-19 13:51:27 +02:00
|
|
|
${ECHO} "Y" | ${SETENV} LOCALBASE=${LOCALBASE} SGE_ROOT=${SGE_ROOT} ./scripts/distinst -local -allall -nobdb -noopenssl ${SGE_ARCH}
|
|
|
|
for f in archive checkpoint deadlock dump load printlog recover stat upgrade verify ; do \
|
|
|
|
ln -s ${LOCALBASE}/bin/db4_$${f} ${SGE_ROOT}/utilbin/${SGE_ARCH}/db_$${f} ; done
|
|
|
|
ln -s ${LOCALBASE}/bin/berkeley_db4_svc ${SGE_ROOT}/utilbin/${SGE_ARCH}/berkeley_db_svc
|
|
|
|
ln -s ${SSL_PREFIX}/bin/openssl ${SGE_ROOT}/utilbin/${SGE_ARCH}/openssl
|
|
|
|
cd ${SGE_ROOT} && ${SETENV} SGE_ROOT=${SGE_ROOT} ./util/setfileperm.sh -auto \
|
|
|
|
${SGE_ROOT}
|
2004-05-03 02:38:34 +02:00
|
|
|
for f in ${SGE_ROOT}/bin/${SGE_ARCH}/q* ; do \
|
|
|
|
cd ${PREFIX}/bin && ${LN} -fs $$f ; done
|
|
|
|
|
2006-10-19 13:51:27 +02:00
|
|
|
#% scripts/distinst -local"
|
|
|
|
|
|
|
|
.include "../../databases/db4/buildlink3.mk"
|
2004-05-03 02:38:34 +02:00
|
|
|
.include "../../graphics/xpm/buildlink3.mk"
|
|
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
|
|
.include "../../mk/motif.buildlink3.mk"
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|
|
|
|
.if ${USE_BUILTIN.openssl} == "yes"
|
|
|
|
SSL_PREFIX= /usr
|
|
|
|
.else
|
|
|
|
SSL_PREFIX= ${PKGSRC_SSL_PREFIX}
|
|
|
|
.endif
|