diff options
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/sage/Makefile | 114 | ||||
-rw-r--r-- | math/sage/distinfo | 2 | ||||
-rw-r--r-- | math/sage/files/patch_devel_sage-main_sage_symbolic_pynac_cc.h | 41 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-gap-4.4.12.p6_-_patches_sysfiles.c | 74 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-linbox-1.1.6.p6_-_spkg-install | 12 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-linbox-1.1.6.p6_-_src_linbox_util_commentator.h | 11 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-pycrypto-2.1.0_-_src_libtom_tomcrypt_pk.h | 11 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-python-2.6.4.p13_-_src_setup.py | 29 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-sage-4.8_-_sage_symbolic_pynac_cc.h | 41 | ||||
-rw-r--r-- | math/sage/files/spkg-patch-singular-3-1-3-3.p3_-_src_omalloc_configure | 12 | ||||
-rw-r--r-- | math/sage/pkg-descr | 12 |
12 files changed, 360 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index f543741f2146..032f476826f6 100644 --- a/math/Makefile +++ b/math/Makefile @@ -550,6 +550,7 @@ SUBDIR += ruby-numru_misc SUBDIR += ruby-numru_units SUBDIR += saga + SUBDIR += sage SUBDIR += sc SUBDIR += scalapack SUBDIR += scilab diff --git a/math/sage/Makefile b/math/sage/Makefile new file mode 100644 index 000000000000..d5a8a3a65ecd --- /dev/null +++ b/math/sage/Makefile @@ -0,0 +1,114 @@ +# New ports collection makefile for: sage +# Date created: 24 January 2012 +# Whom: Stephen Montgomery-Smith <stephen@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= sage +PORTVERSION= 4.8 +CATEGORIES= math +MASTER_SITES= http://modular.math.jmu.edu/src/ \ + http://boxen.math.washington.edu/sage/src/ \ + http://mirrors.xmission.com/sage/src/ +EXTRACT_SUFX= .tar + +MAINTAINER= stephen@FreeBSD.org +COMMENT= Open source Mathematics software + +BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \ + latex:${PORTSDIR}/print/teTeX-base \ + autoconf-2.68:${PORTSDIR}/devel/autoconf +LIB_DEPENDS= iconv:${PORTSDIR}/converters/libiconv \ + atlas:${PORTSDIR}/math/atlas \ + lapack:${PORTSDIR}/math/lapack \ + jpeg:${PORTSDIR}/graphics/jpeg +RUN_DEPENDS= bash:${PORTSDIR}/shells/bash + +PLIST_FILES= bin/sage + +USE_FORTRAN= yes +USE_TK= yes +USE_GMAKE= yes +MAKE_JOBS_SAFE= yes + +MAKE_ENV+= SAGE_PORT=yes \ + SAGE_FORTRAN=${LOCALBASE}/bin/${FC} \ + SAGE_FORTRAN_LIB=${LOCALBASE}/lib/gcc${FC:S/gfortran//}/libgfortran.so \ + SAGE_ATLAS_LIB=${LOCALBASE}/lib + +# The following is needed for the lapack subpackage. +MAKE_ARGS+= ARCH="${AR}" + +post-patch: + @${MKDIR} ${WRKSRC}/local/bin + @${LN} -s ${LOCALBASE}/bin/gmake ${WRKSRC}/local/bin/make + @${LN} -s ${LOCALBASE}/bin/bash ${WRKSRC}/local/bin/sh + @${LN} -s ${LOCALBASE}/bin/${FC} ${WRKSRC}/local/bin/gfortran + @${MKDIR} ${WRKSRC}/tmp + @for p in ${FILESDIR}/spkg-patch-*; do \ + t=`${ECHO_CMD} $$p | ${SED} -e "s+^${FILESDIR}/spkg-patch-++" -e 's+_-_.*++'`; \ + if ! [ -e ${WRKSRC}/spkg/standard/$$t.spkg ]; then \ + ${ECHO_CMD} "$$t not found."; \ + exit 1; \ + fi; \ + tarballs="$$tarballs $$t"; \ + done ;\ + tarballs=`for t in $$tarballs; do ${ECHO_CMD} $$t; done | uniq`; \ + \ + cd ${WRKSRC}/tmp || exit 1; \ + for t in $$tarballs; do \ + f=${WRKSRC}/spkg/standard/$$t.spkg; \ + if [ -e $$f-orig ]; then \ + ${MV} $$f-orig $$f; \ + fi; \ + bunzip2 -c $$f | ${TAR} -xf -; \ + ${ECHO_CMD} "Patching $$t:"; \ + for p in ${FILESDIR}/spkg-patch-$${t}_-_*; do \ + ${ECHO_CMD} " applying $$p" | ${SED} -e 's#${FILESDIR}/.*_-_##' ; \ + ${PATCH} < $$p 2>/dev/null || exit 1; \ + done; \ + ${MV} $$f $$f-orig; \ + ${TAR} -cf - $$t | bzip2 -c > $$f; \ + ${RM} -rf $$t; \ + done + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 701106 +IGNORE= POSIX semaphores are required, and the support only works in FreeBSD 7-STABLE and later +.endif +.if ${OSVERSION} >= 900000 +IGNORE= the port isn't tested for FreeBSD 9 or later +.endif + +.if !defined(DISABLE_MAKE_JOBS) +MAKE_ENV+= MAKE="make -j${MAKE_JOBS_NUMBER}" +.endif + +# The following code is copied from bsd.port.mk, but with extra code that +# removes an extra space from ${LDFLAGS}. The space messes up the build of +# the maxima subpackage. See +# http://www.freebsd.org/cgi/query-pr.cgi?pr=164361 +do-build: + LDFLAGS=`${ECHO_CMD} ${LDFLAGS}`; \ + cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} LDFLAGS="$${LDFLAGS}" ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET} + ${MKDIR} ${WRKDIR}/bin + ${SED} -e "s+#SAGE_ROOT.*+SAGE_ROOT=${INSTALL_SAGE_DIR}+" ${WRKSRC}/sage > ${WRKDIR}/bin/sage + +INSTALL_SAGE_DIR= ${PREFIX}/${PORTNAME}-${PORTVERSION} +do-install: + cd ${WRKDIR} && ${FIND} -s ${WRKSRC} | ${SED} -e 's#${WRKDIR}/##' | \ + ${CPIO} -pmud -R root:wheel ${PREFIX} + ${ECHO_CMD} | ${INSTALL_SAGE_DIR}/sage + ${INSTALL_SCRIPT} ${WRKDIR}/bin/sage ${PREFIX}/bin + +post-install: + ${FIND} -s ${INSTALL_SAGE_DIR} -not -type d | \ + ${SED} -e 's#${PREFIX}/##' >> ${TMPPLIST} + ${FIND} -s ${INSTALL_SAGE_DIR} -type d -empty | \ + ${SED} -e 's#${PREFIX}/#@exec ${MKDIR} %D/#' >> ${TMPPLIST} + ${FIND} -s ${INSTALL_SAGE_DIR} -type d -depth | \ + ${SED} -e 's#${PREFIX}/#@dirrm #' >> ${TMPPLIST} + +.include <bsd.port.post.mk> diff --git a/math/sage/distinfo b/math/sage/distinfo new file mode 100644 index 000000000000..76d6d0d3b35a --- /dev/null +++ b/math/sage/distinfo @@ -0,0 +1,2 @@ +SHA256 (sage-4.8.tar) = 7fcda2b5f86fb5669a871e4d69fcaca0a3c3624255e5836666c4180a175e7d6d +SIZE (sage-4.8.tar) = 339159040 diff --git a/math/sage/files/patch_devel_sage-main_sage_symbolic_pynac_cc.h b/math/sage/files/patch_devel_sage-main_sage_symbolic_pynac_cc.h new file mode 100644 index 000000000000..8758e0a9fafa --- /dev/null +++ b/math/sage/files/patch_devel_sage-main_sage_symbolic_pynac_cc.h @@ -0,0 +1,41 @@ +--- devel/sage-main/sage/symbolic/pynac_cc.h-orig 2012-01-21 22:54:39.000000000 +0000 ++++ devel/sage-main/sage/symbolic/pynac_cc.h 2012-01-21 22:55:10.000000000 +0000 +@@ -1,37 +1,21 @@ +-#include <math.h> ++#include <cmath> + + inline long double sage_logl(long double x) + { +-#if defined(__CYGWIN__) + return log(x); +-#else +- return logl(x); +-#endif + } + + inline long double sage_sqrtl(long double x) + { +-#if defined(__CYGWIN__) + return sqrt(x); +-#else +- return sqrtl(x); +-#endif + } + + inline long double sage_tgammal(long double x) + { +-#if defined(__CYGWIN__) + return tgamma(x); +-#else +- return tgammal(x); +-#endif + } + + inline long double sage_lgammal(long double x) + { +-#if defined(__CYGWIN__) + return lgamma(x); +-#else +- return lgammal(x); +-#endif + } diff --git a/math/sage/files/spkg-patch-gap-4.4.12.p6_-_patches_sysfiles.c b/math/sage/files/spkg-patch-gap-4.4.12.p6_-_patches_sysfiles.c new file mode 100644 index 000000000000..a74d6fe8199d --- /dev/null +++ b/math/sage/files/spkg-patch-gap-4.4.12.p6_-_patches_sysfiles.c @@ -0,0 +1,74 @@ +--- gap-4.4.12.p6/patches/sysfiles.c.orig 2010-04-29 01:30:00.000000000 +1000 ++++ gap-4.4.12.p6/patches/sysfiles.c 2010-07-26 05:25:58.334562226 +1000 +@@ -1524,7 +1524,7 @@ + ** to cooked mode before stopping GAP and back to raw mode when continueing. + */ + +-#if !SYS_IS_DARWIN && (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) ++#if !SYS_IS_DARWIN && (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) && !HAVE_TERMIOS_H + + #ifndef SYS_SGTTY_H /* terminal control functions */ + # include <sgtty.h> +@@ -2073,7 +2073,7 @@ + ** + *f syStopraw( <fid> ) . . . . . . . . . . . . . . . . . . . . . . BSD/MACH + */ +-#if !SYS_IS_DARWIN && (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) ++#if !SYS_IS_DARWIN && (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) && !HAVE_TERMIOS_H + + void syStopraw ( + Int fid ) +@@ -2760,7 +2760,7 @@ + ** + *f syEchoch( <ch>, <fid> ) . . . . . . . . . . . . . . . . . . . . BSD/MACH + */ +-#if SYS_BSD || SYS_MACH || HAVE_SGTTY_H ++#if (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) && !HAVE_TERMIOS_H + + void syEchoch ( + Int ch, +@@ -2786,7 +2786,7 @@ + ** + *f syEchoch( <ch>, <fid> ) . . . . . . . . . . . . . . . . . . . . . . . USG + */ +-#if SYS_USG || HAVE_TERMIO_H ++#if SYS_USG || HAVE_TERMIO_H || HAVE_TERMIOS_H + + void syEchoch ( + Int ch, +@@ -2974,7 +2974,7 @@ + ** + *f syEchos( <ch>, <fid> ) . . . . . . . . . . . . . . . . . . . . BSD/MACH + */ +-#if SYS_BSD || SYS_MACH || HAVE_SGTTY_H ++#if (SYS_BSD || SYS_MACH || HAVE_SGTTY_H) && !HAVE_TERMIOS_H + + void syEchos ( + Char * str, +@@ -2996,7 +2996,7 @@ + ** + *f syEchos( <ch>, <fid> ) . . . . . . . . . . . . . . . . . . . . . . . USG + */ +-#if SYS_USG || HAVE_TERMIO_H ++#if SYS_USG || HAVE_TERMIO_H || HAVE_TERMIOS_H + + void syEchos ( + Char * str, +@@ -3149,7 +3149,7 @@ + ** + *f SyFputs( <line>, <fid> ) . . . . . . . BSD/MACH/USG/OS2 EMX/VMS/MAC MPW + */ +-#if SYS_BSD||SYS_MACH||SYS_USG||SYS_OS2_EMX||SYS_VMS||SYS_MAC_MPW||HAVE_SGTTY_H||HAVE_TERMIO_H ++#if SYS_BSD||SYS_MACH||SYS_USG||SYS_OS2_EMX||SYS_VMS||SYS_MAC_MPW||HAVE_SGTTY_H||HAVE_TERMIO_H||HAVE_TERMIOS_H + + void SyFputs ( + Char * line, +@@ -3476,7 +3476,7 @@ + ** that return odd things rather than waiting for a key + ** + */ +-#if SYS_BSD || SYS_MACH || HAVE_SGTTY_H ||SYS_USG || HAVE_TERMIO_H ++#if SYS_BSD || SYS_MACH || HAVE_SGTTY_H ||SYS_USG || HAVE_TERMIO_H || HAVE_TERMIOS_H + + /* In the cygwin environment it is not predictable if text files get the + * '\r' in their line ends filtered out *before* GAP sees them. This leads diff --git a/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_spkg-install b/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_spkg-install new file mode 100644 index 000000000000..16ebc8e53d73 --- /dev/null +++ b/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_spkg-install @@ -0,0 +1,12 @@ +--- linbox-1.1.6.p6/spkg-install-orig 2012-01-23 04:02:57.000000000 +0000 ++++ linbox-1.1.6.p6/spkg-install 2012-01-23 04:03:12.000000000 +0000 +@@ -8,9 +8,6 @@ + + CUR=`pwd` + +-echo "Copying commentator patch" +-cp patches/commentator.C src/linbox/util/ +- + if [ $? -ne 0 ]; then + echo "Error copying commentator OSX 10.4 fix" + exit 1 diff --git a/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_src_linbox_util_commentator.h b/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_src_linbox_util_commentator.h new file mode 100644 index 000000000000..02aa3255667c --- /dev/null +++ b/math/sage/files/spkg-patch-linbox-1.1.6.p6_-_src_linbox_util_commentator.h @@ -0,0 +1,11 @@ +--- linbox-1.1.6.p6/src/linbox/util/commentator.h-orig 2012-01-23 03:20:53.000000000 +0000 ++++ linbox-1.1.6.p6/src/linbox/util/commentator.h 2012-01-23 03:21:22.000000000 +0000 +@@ -76,7 +76,7 @@ + #define LVL_BLABLA = 10, + #define LVL_NEVER = (2*PRINT_EVERYTHING) + +-#ifndef DISABLE_COMMENTATOR ++#ifndef XXDISABLE_COMMENTATOR + namespace LinBox + { + // Forward declaration diff --git a/math/sage/files/spkg-patch-pycrypto-2.1.0_-_src_libtom_tomcrypt_pk.h b/math/sage/files/spkg-patch-pycrypto-2.1.0_-_src_libtom_tomcrypt_pk.h new file mode 100644 index 000000000000..e4916df23ee1 --- /dev/null +++ b/math/sage/files/spkg-patch-pycrypto-2.1.0_-_src_libtom_tomcrypt_pk.h @@ -0,0 +1,11 @@ +--- pycrypto-2.1.0/src/src/libtom/tomcrypt_pk.h-orig 2012-01-21 19:43:56.000000000 +0000 ++++ pycrypto-2.1.0/src/src/libtom/tomcrypt_pk.h 2012-01-21 19:45:01.000000000 +0000 +@@ -496,7 +496,7 @@ + int der_printable_value_decode(int v); + + /* UTF-8 */ +-#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED)) && !defined(LTC_NO_WCHAR) ++#if (defined(SIZE_MAX) || __STDC_VERSION__ >= 199901L || defined(WCHAR_MAX) || defined(_WCHAR_T) || defined(_WCHAR_T_DEFINED) || defined(_GCC_WCHAR_T)) && !defined(LTC_NO_WCHAR) + #include <wchar.h> + #else + typedef ulong32 wchar_t; diff --git a/math/sage/files/spkg-patch-python-2.6.4.p13_-_src_setup.py b/math/sage/files/spkg-patch-python-2.6.4.p13_-_src_setup.py new file mode 100644 index 000000000000..815551cdcb18 --- /dev/null +++ b/math/sage/files/spkg-patch-python-2.6.4.p13_-_src_setup.py @@ -0,0 +1,29 @@ +--- python-2.6.4.p13/src/setup.py-orig 2012-01-21 21:42:43.000000000 +0000 ++++ python-2.6.4.p13/src/setup.py 2012-01-21 21:45:11.000000000 +0000 +@@ -1273,16 +1273,24 @@ + ) + libraries = [] + +- elif platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'): ++ elif platform in ('freebsd4', 'freebsd5', 'freebsd6'): + # FreeBSD's P1003.1b semaphore support is very experimental + # and has many known problems. (as of June 2008) +- macros = dict( # FreeBSD ++ macros = dict( # FreeBSD 4-6 + HAVE_SEM_OPEN=0, + HAVE_SEM_TIMEDWAIT=0, + HAVE_FD_TRANSFER=1, + ) + libraries = [] + ++ elif platform in ('freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'): ++ macros = dict( # FreeBSD 7+ ++ HAVE_SEM_OPEN=1, ++ HAVE_SEM_TIMEDWAIT=1, ++ HAVE_FD_TRANSFER=1, ++ ) ++ libraries = [] ++ + elif platform.startswith('openbsd'): + macros = dict( # OpenBSD + HAVE_SEM_OPEN=0, # Not implemented diff --git a/math/sage/files/spkg-patch-sage-4.8_-_sage_symbolic_pynac_cc.h b/math/sage/files/spkg-patch-sage-4.8_-_sage_symbolic_pynac_cc.h new file mode 100644 index 000000000000..fd4c26c6d695 --- /dev/null +++ b/math/sage/files/spkg-patch-sage-4.8_-_sage_symbolic_pynac_cc.h @@ -0,0 +1,41 @@ +--- sage-4.8/sage/symbolic/pynac_cc.h.orig 2010-06-28 16:37:01.000000000 +0000 ++++ sage-4.8/sage/symbolic/pynac_cc.h 2012-01-21 22:48:22.000000000 +0000 +@@ -1,37 +1,21 @@ +-#include <math.h> ++#include <cmath> + + inline long double sage_logl(long double x) + { +-#if defined(__CYGWIN__) + return log(x); +-#else +- return logl(x); +-#endif + } + + inline long double sage_sqrtl(long double x) + { +-#if defined(__CYGWIN__) + return sqrt(x); +-#else +- return sqrtl(x); +-#endif + } + + inline long double sage_tgammal(long double x) + { +-#if defined(__CYGWIN__) + return tgamma(x); +-#else +- return tgammal(x); +-#endif + } + + inline long double sage_lgammal(long double x) + { +-#if defined(__CYGWIN__) + return lgamma(x); +-#else +- return lgammal(x); +-#endif + } diff --git a/math/sage/files/spkg-patch-singular-3-1-3-3.p3_-_src_omalloc_configure b/math/sage/files/spkg-patch-singular-3-1-3-3.p3_-_src_omalloc_configure new file mode 100644 index 000000000000..3d574426ca52 --- /dev/null +++ b/math/sage/files/spkg-patch-singular-3-1-3-3.p3_-_src_omalloc_configure @@ -0,0 +1,12 @@ +--- singular-3-1-3-3.p3/src/omalloc/configure-orig 2012-01-21 19:51:08.000000000 +0000 ++++ singular-3-1-3-3.p3/src/omalloc/configure 2012-01-21 19:51:32.000000000 +0000 +@@ -1293,9 +1293,6 @@ + echo "$ac_t""no" 1>&6 + fi + +-if test "$ac_cv_prog_AR" != ar; then +- { echo "configure: error: *** ar program not found" 1>&2; exit 1; } +-fi + for ac_prog in perl + do + # Extract the first word of "$ac_prog", so it can be a program name with args. diff --git a/math/sage/pkg-descr b/math/sage/pkg-descr new file mode 100644 index 000000000000..fefc0f5361df --- /dev/null +++ b/math/sage/pkg-descr @@ -0,0 +1,12 @@ +Sage is a free open-source mathematics software system licensed under the GPL. +It combines the power of many existing open-source packages into a common +Python-based interface. + +Mission: Creating a viable free open source alternative to Magma, Maple, +Mathematica and Matlab. + +This port is a work in progress. It creates a sage that is mostly functional, +but it does fail a few tests. Suggestions for improvement to the maintainer +are welcome. + +WWW: http://www.sagemath.org/ |