[BACK]Return to Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / parallel / sge

Annotation of pkgsrc/parallel/sge/Makefile, Revision 1.60

1.60    ! wiz         1: # $NetBSD: Makefile,v 1.59 2014/02/12 23:18:28 tron Exp $
1.1       dmcmahil    2: #
                      3:
1.58      markd       4: DISTNAME=              sge-8.1.6
1.60    ! wiz         5: PKGREVISION=           2
1.1       dmcmahil    6: CATEGORIES=            parallel sysutils
1.58      markd       7: MASTER_SITES=          http://arc.liv.ac.uk/downloads/SGE/releases/8.1.6/
1.1       dmcmahil    8:
1.18      jlam        9: MAINTAINER=            pkgsrc-users@NetBSD.org
1.42      asau       10: HOMEPAGE=              https://arc.liv.ac.uk/trac/SGE
                     11: COMMENT=               Son of Grid Engine distributed resource management system
1.46      markd      12: LICENSE=               sun-iss AND 2-clause-bsd AND gnu-gpl-v2 AND gnu-lgpl-v2
1.21      markd      13:
1.1       dmcmahil   14: GNU_CONFIGURE=         YES
1.47      dholland   15: USE_TOOLS+=            gmake csh perl:run
1.1       dmcmahil   16:
1.44      markd      17: MANINSTALL=            maninstall catinstall
                     18:
1.1       dmcmahil   19: CFLAGS+=               -D${UPPER_OPSYS}
                     20: CONFIGURE_ENV+=                REMOTE=sge
1.13      rillig     21: CONFIGURE_ENV+=                CFLAGS=${CFLAGS:M*:Q}
1.26      markd      22: CONFIGURE_ARGS+=       --with-sge=${SGE_BUILDARCH:Q}
1.13      rillig     23: PLIST_SUBST+=          SGE_ARCH=${SGE_ARCH:Q}
1.1       dmcmahil   24: MESSAGE_SUBST+=                SGE_ROOT=${SGE_ROOT}
1.13      rillig     25: MAKE_ENV+=             PERL5=${PERL5:Q}
1.1       dmcmahil   26:
                     27: SGE_USER?=             sgeadmin
                     28: SGE_GROUP?=            sgeadmin
                     29: PKG_GROUPS=            ${SGE_GROUP}
1.56      jperkin    30: PKG_USERS=             ${SGE_USER}:${SGE_GROUP}
                     31: PKG_GECOS.${SGE_USER}= Sun Grid Engine Administrator
1.25      jlam       32: PKG_GROUPS_VARS+=      SGE_GROUP
                     33: PKG_USERS_VARS+=       SGE_USER
1.1       dmcmahil   34:
                     35: EVAL_PREFIX+=  PKGSRC_SSL_PREFIX=openssl
                     36:
1.47      dholland   37: AIMK=  ${SETENV} ${MAKE_ENV} ${CSH} -fb ${WRKSRC}/source/aimk
1.1       dmcmahil   38:
1.3       kristerw   39: CONFIG_GUESS_OVERRIDE= source/3rdparty/qmake/config.guess \
                     40:                source/3rdparty/qtcsh/config.guess
                     41: CONFIG_SUB_OVERRIDE=   source/3rdparty/qmake/config.sub \
                     42:                source/3rdparty/qtcsh/config.sub
                     43:
1.36      markd      44: REPLACE_INTERPRETER+=  tclsh
                     45: REPLACE.tclsh.old=     .*tclsh
                     46: REPLACE.tclsh.new=     ${PREFIX}/bin/tclsh
                     47: REPLACE_FILES.tclsh=   source/dist/util/resources/jsv/jsv.tcl
                     48: REPLACE_PERL+=         source/dist/util/resources/jsv/jsv.pl
1.58      markd      49: REPLACE_PERL+=         source/dist/util/resources/scripts/qsched
                     50: REPLACE_PERL+=         source/dist/util/resources/scripts/process-scheduler-log
                     51: REPLACE_PERL+=         source/dist/util/resources/scripts/jobstats
                     52: REPLACE_PERL+=         source/dist/util/resources/wrappers/rshd-wrapper
1.36      markd      53:
1.1       dmcmahil   54: .include "../../mk/bsd.prefs.mk"
                     55:
                     56: # SGE_ARCH should match the putput of ${WRKSRC}/source/dist/util/arch
                     57: # SGE_BUILDARCH should match whats in ${WRKSRC}/source/aimk
1.7       jlam       58: UPPER_OPSYS_cmd=       ${ECHO} "${OPSYS}" | ${TR} a-z A-Z
                     59: UPPER_OPSYS=           ${UPPER_OPSYS_cmd:sh}
1.1       dmcmahil   60:
                     61: .if ${OPSYS} == "NetBSD"
1.26      markd      62: AIMK+=                 -DFD_SETSIZE=2048
1.1       dmcmahil   63: SGE_ARCH=              nbsd-${MACHINE_ARCH}
1.7       jlam       64: SGE_BUILDARCH_cmd=     ${ECHO} "${OPSYS}_${MACHINE_ARCH}" | ${TR} a-z A-Z
1.1       dmcmahil   65: .elif ${OPSYS} == "FreeBSD"
                     66: SGE_ARCH=              fbsd-${MACHINE_ARCH}
1.7       jlam       67: SGE_BUILDARCH_cmd=     ${ECHO} "${OPSYS}_${MACHINE_ARCH}" | ${TR} a-z A-Z
1.1       dmcmahil   68: .elif ${OPSYS} == "SunOS"
                     69: .  if ${MACHINE_ARCH} == "i386"
                     70: SGE_ARCH=              solaris86
                     71: .  else
1.2       grant      72: _ISAINFO!=             isainfo
                     73: .    if !empty(_ISAINFO:Msparcv9)
                     74: SGE_ARCH=              solaris64
                     75: .    else
1.1       dmcmahil   76: SGE_ARCH=              solaris
1.2       grant      77: .    endif
1.1       dmcmahil   78: .  endif
1.7       jlam       79: SGE_BUILDARCH_cmd=     ${ECHO} "${SGE_ARCH}" | ${TR} a-z A-Z
1.1       dmcmahil   80: .elif ${OPSYS} == "Darwin"
                     81: SGE_ARCH=              darwin
                     82: SGE_BUILDARCH=         DARWIN
1.39      markd      83: .elif ${OPSYS} == "Linux"
1.58      markd      84: #AIMK+=                        -no-dump
1.51      markd      85: .  if ${MACHINE_ARCH} == "i386"
1.44      markd      86: SGE_ARCH=              lx-x86
1.39      markd      87: SGE_BUILDARCH=         LINUX86
1.51      markd      88: .  else
                     89: SGE_ARCH=              lx-amd64
                     90: SGE_BUILDARCH=         LINUXAMD64
                     91: .  endif
1.1       dmcmahil   92: .else
1.13      rillig     93: PKG_FAIL_REASON+=      "SGE_ARCH and SGE_BUILDARCH need to be configured for your OS"
1.1       dmcmahil   94: .endif
1.7       jlam       95: SGE_BUILDARCH?=                ${SGE_BUILDARCH_cmd:sh}
1.1       dmcmahil   96:
1.52      markd      97: JAVA_ARGS=             -no-java -no-jni
                     98: #JAVA_ARGS=            -no-gui-inst -no-herd
                     99: #.include "../../mk/java-vm.mk"
                    100:
1.42      asau      101: # Some hacks to get it properly linked:
1.44      markd     102: MAKE_ENV+=     SGE_ARCH=${SGE_ARCH} SGE_ROOT=${SGE_ROOT}
1.42      asau      103:
1.44      markd     104: LDFLAGS+=      ${COMPILER_RPATH_FLAG}${SGE_ROOT}/lib/${SGE_ARCH}
1.1       dmcmahil  105: BUILDLINK_PASSTHRU_RPATHDIRS+= ${SGE_ROOT}/lib/${SGE_ARCH}
                    106:
                    107: SGE_ROOT=      ${PREFIX}/sge
                    108:
1.10      jlam      109: INSTALLATION_DIRS=     bin
                    110:
1.1       dmcmahil  111: post-patch:
                    112:        @if [ "`${WRKSRC}/source/dist/util/arch`" != "${SGE_ARCH}" ]; then \
                    113:                ${ECHO} "ERROR:  SGE_ARCH as set in the pkgsrc Makefile," ;\
                    114:                ${ECHO} "        ${SGE_ARCH}, does not agree with that returned by" ; \
                    115:                ${ECHO} "        ${WRKSRC}/source/dist/util/arch," ; \
                    116:                ${ECHO} "        `${WRKSRC}/source/dist/util/arch`" ; \
                    117:                ${FALSE} ; \
                    118:        fi
1.35      markd     119:        ( ${ECHO} "set OPENSSL_HOME = ${SSL_PREFIX}" ; \
                    120:        ${ECHO} "set BERKELEYDB_HOME = ${BUILDLINK_PREFIX.db4}" ; \
                    121:        ${ECHO} "set BDB_INCLUDE_SUBDIR = db4" ; \
                    122:        ${ECHO} "set BDB_LIB_SUFFIX = 4" ; \
                    123:        ${ECHO} "set PERL = ${PERL5}" ) > ${WRKSRC}/source/aimk.private
                    124:        ( ${ECHO} "OPENSSLBASE=${SSL_PREFIX}" ; \
                    125:        ${ECHO} "BERKELEYDBBASE=${BUILDLINK_PREFIX.db4}" ) > ${WRKSRC}/source/distinst.private
1.44      markd     126:        rm ${WRKSRC}/source/dist/util/*.orig
1.35      markd     127:
                    128: SUBST_CLASSES+=                paths
                    129: SUBST_STAGE.paths=     post-patch
                    130: SUBST_FILES.paths=     source/dist/util/arch_variables
1.44      markd     131: SUBST_SED.paths=       -e 's;@rcd_dir@;${RCD_SCRIPTS_DIR};'
1.1       dmcmahil  132:
                    133: do-configure:
                    134: .for __prog__ in qmake qtcsh
                    135:        ${MKDIR} ${WRKSRC}/source/3rdparty/${__prog__}/${SGE_BUILDARCH}
                    136:        cd ${WRKSRC}/source/3rdparty/${__prog__}/${SGE_BUILDARCH} && \
                    137:                ${SETENV} ${CONFIGURE_ENV} \
                    138:                SGE_ARCH=`${WRKSRC}/source/dist/util/arch` \
                    139:                ../configure ${CONFIGURE_ARGS} --srcdir=..
                    140: .endfor
                    141:
                    142: do-build:
1.52      markd     143:        cd ${WRKSRC}/source && ${AIMK} ${JAVA_ARGS} -no-hwloc -only-depend
1.1       dmcmahil  144:        cd ${WRKSRC}/source && ${SETENV} ${MAKE_ENV} ./scripts/zerodepend
1.52      markd     145:        cd ${WRKSRC}/source && ${AIMK} ${JAVA_ARGS} -no-hwloc -no-qmake -no-qtcsh depend
                    146:        cd ${WRKSRC}/source && ${AIMK} ${JAVA_ARGS} -no-hwloc
                    147:        cd ${WRKSRC}/source && ${AIMK} ${JAVA_ARGS} -no-hwloc -man
1.1       dmcmahil  148:
1.58      markd     149: CHECK_INTERPRETER_SKIP=        sge/bin/qstatus \
1.44      markd     150:                        sge/ckpt/cpr_* \
1.42      asau      151:                        sge/examples/drmaa/ruby/* \
                    152:                        sge/hadoop/pestart.sh \
                    153:                        sge/hadoop/pestop.sh \
                    154:                        sge/hadoop/setup.pl \
                    155:                        sge/hadoop/wait.sh \
1.44      markd     156:                        sge/mpi/myrinet/* \
1.42      asau      157:                        sge/util/resources/drmaa4ruby/* \
                    158:                        sge/util/resources/drmaa4ruby/samples/* \
1.58      markd     159:                        sge/util/resources/jsv/jsv.sh \
                    160:                        sge/util/resources/loadsensors/interix-loadsensor.sh
1.42      asau      161:
1.1       dmcmahil  162: do-install:
1.32      ahoka     163:        ${MKDIR} ${DESTDIR}${SGE_ROOT}
                    164:        #${CHOWN} ${SGE_USER} ${DESTDIR}${SGE_ROOT}
                    165:        #${CHGRP} ${SGE_GROUP} ${DESTDIR}${SGE_ROOT}
1.1       dmcmahil  166:        cd ${WRKSRC}/source && \
1.36      markd     167:                ${ECHO} "Y" | ${SETENV} LOCALBASE=${LOCALBASE} DESTDIR=${DESTDIR} SGE_ROOT=${SGE_ROOT} ./scripts/distinst -local -all -nobdb -noopenssl -mansrc sge ${SGE_ARCH} -- doc man
1.20      markd     168:        for f in archive checkpoint deadlock dump load printlog recover stat upgrade verify ; do \
1.46      markd     169:                ln -s ${LOCALBASE}/bin/db4_$${f} ${DESTDIR}${SGE_ROOT}/utilbin/${SGE_ARCH}/db_$${f} ; done
                    170:        ln -s ${LOCALBASE}/bin/berkeley_db4_svc ${DESTDIR}${SGE_ROOT}/utilbin/${SGE_ARCH}/berkeley_db_svc
                    171:        ln -s ${SSL_PREFIX}/bin/openssl ${DESTDIR}${SGE_ROOT}/utilbin/${SGE_ARCH}/openssl
1.32      ahoka     172:        cd ${DESTDIR}${SGE_ROOT} && ${SETENV} SGE_ROOT=${SGE_ROOT} DESTDIR=${DESTDIR} ./util/setfileperm.sh -auto \
1.20      markd     173:                ${SGE_ROOT}
1.32      ahoka     174:        for f in ${DESTDIR}${SGE_ROOT}/bin/${SGE_ARCH}/q* ; do \
                    175:                cd ${DESTDIR}${PREFIX}/bin && ln -fs $$f ; done
1.1       dmcmahil  176:
1.20      markd     177: #% scripts/distinst -local"
                    178:
1.32      ahoka     179: PLIST_SUBST+=  SGE_ARCH=${SGE_ARCH}
                    180:
                    181: .include "../../databases/db4/buildlink3.mk" # 4.2 at least
1.42      asau      182: .include "../../x11/Xbae/buildlink3.mk"
1.22      joerg     183: .include "../../x11/libXpm/buildlink3.mk"
1.1       dmcmahil  184: .include "../../security/openssl/buildlink3.mk"
1.40      dholland  185: .include "../../lang/tcl/buildlink3.mk"
1.1       dmcmahil  186: .include "../../mk/motif.buildlink3.mk"
1.45      dholland  187: .include "../../mk/pam.buildlink3.mk"
1.1       dmcmahil  188: .include "../../mk/bsd.pkg.mk"
                    189: .if ${USE_BUILTIN.openssl} == "yes"
                    190: SSL_PREFIX=    /usr
                    191: .else
                    192: SSL_PREFIX=    ${PKGSRC_SSL_PREFIX}
                    193: .endif

CVSweb <webmaster@jp.NetBSD.org>