Annotation of pkgsrc/math/scilab/Makefile, Revision 1.83
1.83 ! asau 1: # $NetBSD: Makefile,v 1.82 2010/07/30 10:36:31 asau Exp $
1.1 agc 2: #
3:
1.64 dmcmahil 4: DISTNAME= ${SCIBASE}-src
1.80 asau 5: PKGREVISION= 4
1.28 hubertf 6: PKGNAME= ${SCIBASE}
1.1 agc 7: CATEGORIES= math
1.72 dmcmahil 8: MASTER_SITES= http://www.scilab.org/download/4.1/
1.2 garbled 9:
1.40 grant 10: MAINTAINER= dmcmahill@NetBSD.org
1.54 dmcmahil 11: HOMEPAGE= http://www.scilab.org/
1.21 wiz 12: COMMENT= High-level scientific math programming environment with graphics
1.1 agc 13:
1.83 ! asau 14: PKG_DESTDIR_SUPPORT= user-destdir
1.77 ahoka 15: MAKE_JOBS_SAFE= no
16:
1.72 dmcmahil 17: SCIBASE= scilab-4.1
1.66 dmcmahil 18: # don't forget to update SCI and SCIVERSION in the buildlink3.mk file when
19: # SCIBASE is updated.
1.45 agc 20: WRKSRC= ${WRKDIR}/${SCIBASE}
1.42 dmcmahil 21:
1.81 joerg 22: NOT_FOR_PLATFORM+= ${LP64PLATFORMS}
1.22 dmcmahil 23:
1.82 asau 24: USE_LANGUAGES= c fortran77
1.32 jlam 25: USE_X11BASE= yes
1.22 dmcmahil 26: USE_LIBTOOL= yes
1.63 jlam 27: USE_TOOLS+= tee
1.32 jlam 28:
1.22 dmcmahil 29: GNU_CONFIGURE= yes
1.65 dmcmahil 30: CONFIGURE_ARGS+= --without-local-xaw
1.75 markd 31: CONFIGURE_ARGS+= --without-java
1.50 dmcmahil 32:
1.52 dmcmahil 33: EVAL_PREFIX+= TCL_PREFIX=tcl
34: EVAL_PREFIX+= TK_PREFIX=tk
35: CONFIGURE_ARGS+= --with-tcl-library=${TCL_PREFIX}/lib
36: CONFIGURE_ARGS+= --with-tcl-include=${TCL_PREFIX}/include
37: CONFIGURE_ARGS+= --with-tk-library=${TK_PREFIX}/lib
38: CONFIGURE_ARGS+= --with-tk-include=${TK_PREFIX}/include
39: CONFIGURE_ENV+= TCL_CONFIG_SH=${BUILDLINK_PREFIX.tcl}/lib/tclConfig.sh
40: CONFIGURE_ENV+= TK_CONFIG_SH=${BUILDLINK_PREFIX.tk}/lib/tkConfig.sh
1.70 joerg 41: CONFIGURE_ENV+= CC_LDFLAGS=${X11_LDFLAGS:Q}\ ${COMPILER_RPATH_FLAG:Q}${BUILDLINK_PREFIX.tk:Q}/lib
42: CONFIGURE_ENV+= FC_LDFLAGS=${X11_LDFLAGS:Q}\ ${COMPILER_RPATH_FLAG:Q}${BUILDLINK_PREFIX.tk:Q}/lib
1.1 agc 43:
1.32 jlam 44: # override HOME to avoid picking up a bad ${HOME}/.scilab during the build
1.67 rillig 45: MAKE_ENV+= HOME=${WRKSRC:Q}
46: MAKE_ENV+= PVM_ROOT=${PVM_ROOT:Q}
47: CONFIGURE_ENV+= LOCALBASE=${LOCALBASE:Q}
1.32 jlam 48:
1.78 dmcmahil 49: # FIXME -- this ugly hack will go away on newer versions of scilab where the build
50: # system has been improved significantly see:
51: #
52: # scilab-4.1/routines/os_specific/getarg.c
53: #
54: .include "../../mk/compiler.mk"
1.79 tnn 55: . if !empty(FC:Mgfortran) || (defined(PKGSRC_FORTRAN) && !empty(PKGSRC_FORTRAN:Mg95))
1.78 dmcmahil 56: CFLAGS+= -DG95_FORTRAN=1
57: .endif
58:
1.32 jlam 59: PVM_ROOT?= ${LOCALBASE}/pvm3
1.67 rillig 60: CONFIGURE_ENV+= PVM_ROOT=${PVM_ROOT:Q}
61: CONFIGURE_ENV+= X11BASE=${X11BASE:Q}
62: PLIST_SUBST+= SCIBASE=${SCIBASE:Q}
1.1 agc 63:
1.55 jlam 64: UNWRAP_FILES+= Makemex config/configuration config/Makeso.incl
1.50 dmcmahil 65:
1.54 dmcmahil 66: BUILDLINK_DEPMETHOD.sablotron= build
67:
1.30 dmcmahil 68: .include "../../mk/bsd.prefs.mk"
69:
70: .if (${MACHINE_ARCH} == "alpha")
1.60 dmcmahil 71: pre-fetch: ${WRKDIR}
1.30 dmcmahil 72: @${ECHO} "===> Checking if you have working FPC"
73: ${CC} ${CFLAGS} -o ${WRKDIR}/chk_ieee ${FILESDIR}/chk_ieee.c
74: @cd ${WRKDIR} && if ./chk_ieee ; then ${ECHO} "yes" ; else \
75: ${ECHO} "no" ; \
76: ${ECHO} "${PKGNAME} requires floating point completion on this system" ;\
77: ${ECHO} "Possible causes for this check failing are:" ;\
78: ${ECHO} " - you have an old /usr/lib/* which was not compiled with -mieee" ;\
79: ${ECHO} " - you have overridden CFLAGS for pkgsrc removing the -mieee flag" ;\
80: ${ECHO} "Without fixing this problem ${PKGNAME} will not work." ; ${FALSE} ; fi
1.31 dmcmahil 81: .endif
1.35 dmcmahil 82:
1.42 dmcmahil 83: EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
1.54 dmcmahil 84: #post-extract:
85: #.for f in scicos scicos_blocks
86: # @extract_file=${DISTDIR}/${DIST_SUBDIR}/${f}.tar.gz ; export extract_file ; \
87: # cd ${WRKSRC}/macros/${f} && ${EXTRACT_CMD}
88: #.endfor
1.42 dmcmahil 89:
1.72 dmcmahil 90: # Scilab has runtime support for building shared objects that can be
91: # loaded. It needs to know the right 'make' program.
1.64 dmcmahil 92: post-patch:
93: ${MV} ${WRKSRC}/macros/util/ilib_compile.sci ${WRKSRC}/macros/util/ilib_compile.sci.bak
94: ${SED} 's|make -f|export PATH ; ${MAKE_PROGRAM} -f|g' \
95: ${WRKSRC}/macros/util/ilib_compile.sci.bak > \
96: ${WRKSRC}/macros/util/ilib_compile.sci
97: ${RM} ${WRKSRC}/macros/util/ilib_compile.sci.bak
98:
99:
1.50 dmcmahil 100: # clean up any possible leftovers from 'make test' so that our PLIST
101: # will still be right. Also clean up a reference to WRKSRC.
102: pre-install:
103: cd ${WRKSRC}/examples && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} distclean
1.71 tv 104: ${FIND} ${WRKSRC}/examples -name \*.blsav -print | ${XARGS} ${RM} -f
1.54 dmcmahil 105: ${MV} ${WRKSRC}/maple/maple2scilab.mpl ${WRKSRC}/maple/maple2scilab.mpl.bak
1.50 dmcmahil 106: ${SED} 's;${WRKSRC};${PREFIX}/lib/${SCIBASE};g' ${WRKSRC}/maple/maple2scilab.mpl.bak > \
107: ${WRKSRC}/maple/maple2scilab.mpl
108: ${RM} -f ${WRKSRC}/maple/maple2scilab.mpl.bak
109:
1.36 jmmv 110: # delete some .orig files that got created by patching
1.44 dmcmahil 111: # also fix the libtool link
1.35 dmcmahil 112: post-install:
1.83 ! asau 113: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/bin/scilink.orig
! 114: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/config/Makeso.incl.in.orig
! 115: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/macros/util/scipad.sci.orig
! 116: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/util/scidem.orig
! 117: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/util/scidoc.orig
! 118: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/libtool
! 119: ${LN} -s ${LOCALBASE}/bin/libtool ${DESTDIR}${PREFIX}/lib/${SCIBASE}/libtool
! 120: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/bin/dold
! 121: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/config/*.subst.sav
! 122: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/config/config.guess
! 123: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/config/config.sub
1.76 dmcmahil 124:
1.73 dmcmahil 125: .for __tmp__ in scilab.g scilab.g.in scilab-gtk.g scilab-gtk.g.in
1.83 ! asau 126: ${RM} -f ${DESTDIR}${PREFIX}/lib/${SCIBASE}/scripts/${__tmp__}
1.73 dmcmahil 127: .endfor
1.31 dmcmahil 128:
1.38 abs 129: .if ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "arm32"
1.47 jlam 130: GCC_REQD+= 2.95.3
1.30 dmcmahil 131: .endif
132:
1.22 dmcmahil 133: # the "SCI=0 && unset SCI" is done because some of the tests really will
134: # fail if SCI is set to anything.
1.67 rillig 135: MAKE_ENV+= SCI=${WRKSRC:Q}
1.39 dillo 136: do-test:
1.64 dmcmahil 137: cd ${WRKSRC}/examples && \
1.22 dmcmahil 138: ${MAKE_ENV} ${MAKE_PROGRAM} tests 2>&1 | \
1.54 dmcmahil 139: ${TEE} ${WRKDIR}/examples.log
1.1 agc 140:
1.57 dmcmahil 141: # scilab wants ocamlopt so use the same list here as in the
142: # lang/ocaml package
143: .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \
144: (${MACHINE_ARCH} == "sparc")
145: PLIST_SRC= ${PKGDIR}/PLIST.opt ${PKGDIR}/PLIST
146: .include "../../lang/ocaml/buildlink3.mk"
147: .else
148: PLIST_SRC= ${PKGDIR}/PLIST
149: CONFIGURE_ARGS+= --without-ocaml
150: .endif
1.50 dmcmahil 151: .include "../../parallel/pvm3/buildlink3.mk"
1.54 dmcmahil 152: .include "../../textproc/sablotron/buildlink3.mk"
1.51 dmcmahil 153: .include "../../x11/tk/buildlink3.mk"
1.65 dmcmahil 154: .include "../../x11/Xaw3d/buildlink3.mk"
1.1 agc 155: .include "../../mk/bsd.pkg.mk"
CVSweb <webmaster@jp.NetBSD.org>