- Update to 6.0. This was quite an overhaul since the directory structure

greatly changed.
- Provide support for FreeBSD-10.
This commit is contained in:
Stephen Montgomery-Smith 2014-01-30 01:00:13 +00:00
parent fbb4cb2328
commit 127fcb9e76
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=341797
32 changed files with 1613 additions and 388 deletions

View file

@ -2,19 +2,20 @@
# $FreeBSD$
PORTNAME= sage
PORTVERSION= 5.13
PORTVERSION= 6.0
CATEGORIES= math
MASTER_SITES= http://boxen.math.washington.edu/home/sagemath/sage-mirror/src/ \
http://mirrors.xmission.com/sage/src/ \
http://www-ftp.lip6.fr/pub/math/sagemath/src/ \
http://www.sagemath.org/src-old/
PKGNAMESUFFIX= -math
EXTRACT_SUFX= .tar
MAINTAINER= stephen@FreeBSD.org
COMMENT= Open source Mathematics software
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash
BUILD_DEPENDS= bash:${PORTSDIR}/shells/bash \
convert:${PORTSDIR}/graphics/ImageMagick \
ffmpeg:${PORTSDIR}/multimedia/ffmpeg
LIB_DEPENDS= atlas:${PORTSDIR}/math/atlas \
lapack:${PORTSDIR}/math/lapack \
jpeg:${PORTSDIR}/graphics/jpeg
@ -26,7 +27,9 @@ RUN_DEPENDS= bash:${PORTSDIR}/shells/bash
OPTIONS_DEFINE_amd64= 387
387_DESC= Use 387 instead of SSE FPU
# Keep NO_SAGE set, since otherwise the resulting package is huge.
NO_STAGE= yes
.include <bsd.port.options.mk>
PLIST_FILES= bin/sage
@ -36,6 +39,7 @@ USE_TK= yes
USE_GMAKE= yes
USE_TEX= latex:build
USES= iconv
MAKE_JOBS_SAFE= yes
LDFLAGS:= -Wl,-rpath=${WRKSRC}/local/lib ${LDFLAGS}
FFLAGS+= -Wl,-rpath=${WRKSRC}/local/lib ${FPM_FLAG}
CFLAGS+= -Wl,-rpath=${WRKSRC}/local/lib ${FPM_FLAG}
@ -66,6 +70,8 @@ LATEST_LINK= sage-math # Conflicts with graphics/sage.
MAKE_ARGS+= ARCH="${AR}"
post-patch:
${REINPLACE_CMD} 's/$$MAKE $$gettext/$$MAKE PTHREAD_LIBS=${PTHREAD_LIBS} $$gettext/' ${WRKSRC}/build/pkgs/git/spkg-install
# Create the wrappers for the compiler invocations.
@${MKDIR} ${WRKSRC}/local/bin
@${LN} -s -f ${LOCALBASE}/bin/gmake ${WRKSRC}/local/bin/make
@ -84,44 +90,6 @@ post-patch:
${FILESDIR}/gcc.in > ${WRKSRC}/local/bin/gfortran
@${CHMOD} +x ${WRKSRC}/local/bin/gfortran
# Apply the patches to the appropriate xz'ed tarballs contained in
# ${WRKSRC}/spkg/standard. The names of the patches are
# spkg-${GENERIC_NAME_OF_TARBALL}_-_${NAME_OF_PATCH}.
# The actual name of the tarball will be deduced from the second line of the
# patch.
@${MKDIR} ${WRKSRC}/tmp
@${RM} -rf ${WRKSRC}/tmp/*
@for p in ${FILESDIR}/spkg-patch-*; do \
q=$${p#*/spkg-patch-}; \
original_name=$${q%_-_*}; \
actual_name=`cat $$p | ${HEAD} -2 | ${TAIL} -1 | ${SED} -e 's/+++ //' -e 's|/.*||'`; \
if ! [ -e ${WRKSRC}/spkg/standard/$$actual_name.spkg ]; then \
${ECHO_MSG} "$$actual_name not found."; \
exit 1; \
fi; \
tarballs="$$tarballs $$original_name|$$actual_name"; \
done ;\
tarballs=`${PRINTF} "%s\n" $$tarballs | ${SORT} -u`; \
\
cd ${WRKSRC}/tmp || exit 1; \
for t in $$tarballs; do \
original_name=$${t%|*}; actual_name=$${t#*|}; \
f=${WRKSRC}/spkg/standard/$$actual_name.spkg; \
if [ -e $$f-orig ]; then \
${MV} $$f-orig $$f; \
fi; \
${TAR} -xf $$f; \
${ECHO_MSG} "Patching $$actual_name:"; \
for p in ${FILESDIR}/spkg-patch-$${original_name}_-_*; do \
${ECHO_MSG} " applying $${p#*_-_}" ; \
${PATCH} < $$p 2>/dev/null || exit 1; \
done; \
${MV} $$f $$f-orig; \
${TAR} -cyf $$f $$actual_name; \
${RM} -rf $$actual_name; \
done
post-build:
${RM} -rf ${WRKSRC}/tmp/.sage
${CHMOD} -R a+rX ${WRKSRC}
@ -130,18 +98,31 @@ check regression-test test: build
@${ECHO_MSG} This test can also be performed after installation by typing \"sage -testall\".
@${ECHO_MSG}
cd ${WRKSRC} && ${SETENV} DOT_SAGE=${WRKSRC}/tmp/.sage ./sage -testall
${RM} -f ${WRKSRC}/python.core
${RM} -f ${WRKSRC}/python*.core
INSTALL_SAGE_DIR= ${PREFIX}/${PORTNAME}-${PORTVERSION}
pre-install:
@${ECHO_MSG}
@${ECHO_MSG} \# Instead of doing \"make install\", you can simply perform the commands:
@${ECHO_MSG}
@${ECHO_MSG} ${MV} ${WRKSRC} ${PREFIX}/.
@${ECHO_MSG}
@${ECHO_MSG} \# The next four lines are only needed if you want sage in ${PREFIX}/bin.
@${ECHO_MSG}
@${ECHO_MSG} "${SED} -e \"s+#SAGE_ROOT.*+SAGE_ROOT=${INSTALL_SAGE_DIR}+\" \\"
@${ECHO_MSG} " ${INSTALL_SAGE_DIR}/sage > ${PREFIX}/bin/sage"
@${ECHO_MSG} ${CHOWN} ${BINOWN}:${BINGRP} ${PREFIX}/bin/sage
@${ECHO_MSG} ${CHMOD} ${BINMODE} ${PREFIX}/bin/sage
@${ECHO_MSG}
@${ECHO_MSG} \# The next line will provide write protection for sage.
@${ECHO_MSG} ${CHOWN} -hR ${BINOWN}:${BINGRP} ${INSTALL_SAGE_DIR}
@${ECHO_MSG}
@sleep 60
do-install:
cd ${WRKDIR} && ${FIND} -s ${WRKSRC} | \
${GREP} -v '^${WRKSRC}/spkg/standard/' | \
${GREP} -v '^${WRKSRC}/spkg/optional/' | \
${GREP} -v '^${WRKSRC}/spkg/logs/' | \
${GREP} -v '^${WRKSRC}/spkg/build/' | \
${GREP} -v '^${WRKSRC}/upstream/' | \
${GREP} -v '^${WRKSRC}/tmp' | \
${GREP} -v -E '^${WRKSRC}/[^\/]+\.log$$' | \
${GREP} -v '^${WRKSRC}/Makefile' | \
${SED} -e 's#${WRKDIR}/##' | \
${CPIO} -pmud -R ${BINOWN}:${BINGRP} ${PREFIX}
${ECHO_CMD} | ${SETENV} DOT_SAGE=${INSTALL_SAGE_DIR}/tmp/.sage ${INSTALL_SAGE_DIR}/sage

View file

@ -1,2 +1,2 @@
SHA256 (sage-5.13.tar) = 6e62495954bdc1c397fa1b7658b2825b4e6d1c26ac12b842a15eab61a5dabc97
SIZE (sage-5.13.tar) = 361799680
SHA256 (sage-6.0.tar) = 40a76473efa1c725ccfb3955bf5b95ea4578cc654f079b0f92fad4f4243302df
SIZE (sage-6.0.tar) = 404654517

View file

@ -0,0 +1,11 @@
--- build/pkgs/cephes/spkg-install-orig 2013-03-30 20:48:35.000000000 +0000
+++ build/pkgs/cephes/spkg-install 2013-03-30 20:48:57.000000000 +0000
@@ -24,6 +24,8 @@
fi
done
+sed -i .orig 's|.*printf|//&1|' */mtherr.c
+
echo "Building Cephes..."
$MAKE
if [ $? -ne 0 ]; then

View file

@ -0,0 +1,13 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/eclib/fbsd-patch-src_libsrc_eclib_interface.h 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,10 @@
+--- src/libsrc/eclib/interface.h-orig 2013-04-26 23:46:24.000000000 +0000
++++ src/libsrc/eclib/interface.h 2013-04-26 23:47:09.000000000 +0000
+@@ -48,6 +48,7 @@
+ #include <iterator>
+ using namespace std;
+ #include "templates.h"
++#include <stdint.h>
+
+ #ifndef MININT
+ #define MININT numeric_limits<int>::min()

View file

@ -0,0 +1,23 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/maxima/fbsd-patch-src_interfaces_xmaxima_Makefile.in 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,20 @@
+--- src/interfaces/xmaxima/Makefile.in-orig 2013-05-09 02:26:31.000000000 +0000
++++ src/interfaces/xmaxima/Makefile.in 2013-05-09 02:30:12.000000000 +0000
+@@ -624,14 +624,10 @@
+ tclIndex:: $(TKSOURCES)
+ echo "source ../ObjTcl/Object.tcl; auto_mkindex . $(TKSOURCES)" | $(TCLSH)
+
+-# Create Tkmaxima/tclIndex if tclsh is available. Otherwise, create empty file
+-# to satisfy make.
++# Create empty Tkmaxima/tclIndex, because attempting to create it using tclsh
++# seems to soak up huge amounts of resources.
+ Tkmaxima/tclIndex: $(TKSOURCES)
+- $(TCLSH) < /dev/null > /dev/null 2>&1 && \
+- (cd Tkmaxima ; \
+- echo "source ../ObjTcl/Object.tcl; auto_mkindex . $(ALLFILES)" | \
+- $(TCLSH)) || \
+- touch Tkmaxima/tclIndex
++ touch Tkmaxima/tclIndex
+
+ FORCE:
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,14 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/ncurses/fbsd-patch-src_configure 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,11 @@
+--- src/configure.orig 2013-08-21 02:51:59.000000000 +0000
++++ src/configure 2013-08-21 02:53:23.000000000 +0000
+@@ -5719,7 +5719,7 @@
+ cf_cv_shared_soname='`basename $@`'
+ fi
+
+- MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
++ MK_SHARED_LIB='${CC} -shared -Bshareable -soname=`basename $@` -o $@'
+ ;;
+ netbsd*) #(vi
+ CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"

View file

@ -0,0 +1,16 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/numpy/fbsd-patch-src_numpy_distutils_system_info.py 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,13 @@
+--- src/numpy/distutils/system_info.py.orig 2013-02-09 21:04:56.000000000 +0000
++++ src/numpy/distutils/system_info.py 2013-05-27 21:51:12.000000000 +0000
+@@ -983,8 +983,8 @@
+ dir_env_var = 'ATLAS'
+ _lib_names = ['f77blas', 'cblas']
+ if sys.platform[:7] == 'freebsd':
+- _lib_atlas = ['atlas_r']
+- _lib_lapack = ['alapack_r']
++ _lib_atlas = ['atlas']
++ _lib_lapack = ['alapack']
+ else:
+ _lib_atlas = ['atlas']
+ _lib_lapack = ['lapack']

View file

@ -0,0 +1,14 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/ppl/fbsd-patch-src_demos_ppl_lpsol_ppl_lpsol.c 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,11 @@
+--- src/demos/ppl_lpsol/ppl_lpsol.c.orig 2013-06-20 17:21:39.000000000 +0000
++++ src/demos/ppl_lpsol/ppl_lpsol.c 2013-06-20 17:39:44.000000000 +0000
+@@ -534,7 +534,7 @@
+ if (getrlimit(RLIMIT_AS, &t) != 0)
+ fatal("getrlimit failed: %s", strerror(errno));
+
+- if (bytes < t.rlim_cur) {
++ if (bytes < (unsigned long)(t.rlim_cur)) {
+ t.rlim_cur = bytes;
+ if (setrlimit(RLIMIT_AS, &t) != 0)
+ fatal("setrlimit failed: %s", strerror(errno));

View file

@ -1,5 +1,5 @@
--- /dev/null 2012-04-08 01:30:00.000000000 +0000
+++ pycrypto-2.1.0/patches_src.libtom.tomcrypt_pk.h 2012-04-08 01:30:26.000000000 +0000
+++ build/pkgs/pycrypto/fbsd-patch-src.libtom.tomcrypt_pk.h 2012-04-08 01:30:26.000000000 +0000
@@ -0,0 +1,11 @@
+--- src/src/libtom/tomcrypt_pk.h-orig 2012-01-21 19:43:56.000000000 +0000
++++ src/src/libtom/tomcrypt_pk.h 2012-01-21 19:45:01.000000000 +0000

View file

@ -0,0 +1,14 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/python/fbsd-patch-src_Doc_library_fcntl.rst 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,11 @@
+--- src/src/Doc/library/fcntl.rst.orig 2011-06-11 15:46:23.000000000 +0000
++++ src/Doc/library/fcntl.rst 2012-04-22 00:31:48.000000000 +0000
+@@ -50,8 +50,6 @@
+ operations are typically defined in the library module :mod:`termios` and the
+ argument handling is even more complicated.
+
+- The op parameter is limited to values that can fit in 32-bits.
+-
+ The parameter *arg* can be one of an integer, absent (treated identically to the
+ integer ``0``), an object supporting the read-only buffer interface (most likely
+ a plain Python string) or an object supporting the read-write buffer interface.

View file

@ -0,0 +1,24 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/python/fbsd-patch-src_Modules__ctypes_libffi_configure 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,21 @@
+--- src/src/Modules/_ctypes/libffi/configure.orig 2011-06-11 15:46:26.000000000 +0000
++++ src/Modules/_ctypes/libffi/configure 2012-04-22 00:23:14.000000000 +0000
+@@ -6289,7 +6289,7 @@
+ rm -rf conftest*
+ ;;
+
+-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
++amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+@@ -11275,6 +11275,9 @@
+ powerpc-*-freebsd*)
+ TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
+ ;;
++ powerpc64-*-freebsd*)
++ TARGET=POWERPC; TARGETDIR=powerpc
++ ;;
+ powerpc*-*-rtems*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;

View file

@ -0,0 +1,56 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/python/fbsd-patch-src_Modules_fcntlmodule.c 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,53 @@
+--- src/src/Modules/fcntlmodule.c.orig 2011-06-11 15:46:27.000000000 +0000
++++ src/Modules/fcntlmodule.c 2012-04-22 00:23:34.000000000 +0000
+@@ -97,20 +97,15 @@
+ {
+ #define IOCTL_BUFSZ 1024
+ int fd;
+- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
++ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
+ format for the 'code' parameter because Python turns 0x8000000
+ into either a large positive number (PyLong or PyInt on 64-bit
+ platforms) or a negative number on others (32-bit PyInt)
+ whereas the system expects it to be a 32bit bit field value
+ regardless of it being passed as an int or unsigned long on
+- various platforms. See the termios.TIOCSWINSZ constant across
+- platforms for an example of thise.
+-
+- If any of the 64bit platforms ever decide to use more than 32bits
+- in their unsigned long ioctl codes this will break and need
+- special casing based on the platform being built on.
++ various platforms.
+ */
+- unsigned int code;
++ unsigned long code;
+ int arg;
+ int ret;
+ char *str;
+@@ -118,7 +113,7 @@
+ int mutate_arg = 1;
+ char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
+
+- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
++ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
+ conv_descriptor, &fd, &code,
+ &str, &len, &mutate_arg)) {
+ char *arg;
+@@ -169,7 +164,7 @@
+ }
+
+ PyErr_Clear();
+- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
++ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
+ conv_descriptor, &fd, &code, &str, &len)) {
+ if (len > IOCTL_BUFSZ) {
+ PyErr_SetString(PyExc_ValueError,
+@@ -191,7 +186,7 @@
+ PyErr_Clear();
+ arg = 0;
+ if (!PyArg_ParseTuple(args,
+- "O&I|i;ioctl requires a file or file descriptor,"
++ "O&k|i;ioctl requires a file or file descriptor,"
+ " an integer and optionally an integer or buffer argument",
+ conv_descriptor, &fd, &code, &arg)) {
+ return NULL;

View file

@ -0,0 +1,58 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/python/fbsd-patch-src_Python_thread_pthread.h 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,55 @@
+--- src/src/Python/thread_pthread.h.orig 2011-06-11 15:46:28.000000000 +0000
++++ src/Python/thread_pthread.h 2012-04-22 00:23:46.000000000 +0000
+@@ -38,13 +38,18 @@
+ #endif
+ #endif
+
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#endif
++
+ /* The POSIX spec says that implementations supporting the sem_*
+ family of functions must indicate this by defining
+ _POSIX_SEMAPHORES. */
+ #ifdef _POSIX_SEMAPHORES
+ /* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
+ we need to add 0 to make it work there as well. */
+-#if (_POSIX_SEMAPHORES+0) == -1
++#if defined(__FreeBSD__) && __FreeBSD_version < 701104 && \
++ (_POSIX_SEMAPHORES+0) == -1
+ #define HAVE_BROKEN_POSIX_SEMAPHORES
+ #else
+ #include <semaphore.h>
+@@ -56,7 +61,6 @@
+ in default setting. So the process scope is preferred to get
+ enough number of threads to work. */
+ #ifdef __FreeBSD__
+-#include <osreldate.h>
+ #if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
+ #undef PTHREAD_SYSTEM_SCHED_SUPPORTED
+ #endif
+@@ -161,6 +165,7 @@
+ {
+ pthread_t th;
+ int status;
++ sigset_t set, oset;
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_t attrs;
+ #endif
+@@ -189,6 +194,8 @@
+ #if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
+ #endif
++ sigfillset(&set);
++ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
+
+ status = pthread_create(&th,
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+@@ -200,6 +207,7 @@
+ (void *)arg
+ );
+
++ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
+ #if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
+ pthread_attr_destroy(&attrs);
+ #endif

View file

@ -0,0 +1,100 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/python/fbsd-patch-src_setup.py 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,97 @@
+--- src/setup.py-orig 2013-03-17 03:13:46.000000000 +0000
++++ src/setup.py 2013-03-17 03:15:11.000000000 +0000
+@@ -642,7 +642,7 @@
+ # use the same library for the readline and curses modules.
+ if 'curses' in readline_termcap_library:
+ curses_library = readline_termcap_library
+- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
++ elif self.compiler.find_library_file(lib_dirs, 'xxxncursesw'):
+ curses_library = 'ncursesw'
+ elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
+ curses_library = 'ncurses'
+@@ -681,7 +681,7 @@
+ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+- library_dirs=['/usr/lib/termcap'],
++ library_dirs=['/usr/lib', '/usr/lib/termcap'],
+ extra_link_args=readline_extra_link_args,
+ libraries=readline_libs) )
+ else:
+@@ -1120,7 +1122,7 @@
+ sysroot = macosx_sdk_root()
+ f = os.path.join(sysroot, f[1:])
+
+- if os.path.exists(f) and not db_incs:
++ if os.path.exists(f):
+ data = open(f).read()
+ m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
+ if m is not None:
+@@ -1246,12 +1248,13 @@
+ # provided by the ncurses library.
+ panel_library = 'panel'
+ if curses_library.startswith('ncurses'):
+- if curses_library == 'ncursesw':
++ if curses_library == 'xxxncursesw':
+ # Bug 1464056: If _curses.so links with ncursesw,
+ # _curses_panel.so must link with panelw.
+ panel_library = 'panelw'
+ curses_libs = [curses_library]
+ exts.append( Extension('_curses', ['_cursesmodule.c'],
++ library_dirs = ['/usr/lib'],
+ libraries = curses_libs) )
+ elif curses_library == 'curses' and platform != 'darwin':
+ # OSX has an old Berkeley curses, not good enough for
+@@ -1264,6 +1267,7 @@
+ curses_libs = ['curses']
+
+ exts.append( Extension('_curses', ['_cursesmodule.c'],
++ library_dirs = ['/usr/lib'],
+ libraries = curses_libs) )
+ else:
+ missing.append('_curses')
+@@ -1432,10 +1436,22 @@
+ macros = dict()
+ libraries = []
+
+- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
++ elif host_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()
++ macros = dict( # FreeBSD 4-6
++ HAVE_SEM_OPEN=0,
++ HAVE_SEM_TIMEDWAIT=0,
++ HAVE_FD_TRANSFER=1,
++ )
++ libraries = []
++
++ elif host_platform in ('freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'):
++ macros = dict( # FreeBSD 7+
++ HAVE_SEM_OPEN=1,
++ HAVE_SEM_TIMEDWAIT=1,
++ HAVE_FD_TRANSFER=1,
++ )
+ libraries = []
+
+ elif host_platform.startswith('openbsd'):
+@@ -1484,7 +1500,7 @@
+ missing.append('linuxaudiodev')
+
+ if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
+- 'freebsd7', 'freebsd8')
++ 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10')
+ or host_platform.startswith("gnukfreebsd")):
+ exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
+ else:
+@@ -2066,9 +2082,7 @@
+ ext_modules=[Extension('_struct', ['_struct.c'])],
+
+ # Scripts to install
+- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
+- 'Tools/scripts/2to3',
+- 'Lib/smtpd.py']
++ scripts = []
+ )
+
+ # --install-platlib

View file

@ -0,0 +1,14 @@
--- /dev/null 2014-01-29 03:00:00.000000000 +0000
+++ build/pkgs/sympow/fbsd-patch-src_disk.c 2014-01-29 03:01:19.000000000 +0000
@@ -0,0 +1,11 @@
+--- src/disk.c-orig 2012-04-19 02:33:51.000000000 +0000
++++ src/disk.c 2012-04-19 02:34:22.000000000 +0000
+@@ -39,7 +39,7 @@
+ else if (((sp&3)==0) && CM_CASE) {if (2*ep==sp) S[3]='l'; else S[3]='h';}
+ else {if (2*ep==sp) S[3]='L'; else S[3]='H';}
+ if (HECKE && dv) {TACKS[which]=malloc(dv*sizeof(QD)); TACKON[which]=dv;}
+- else if (dv<=sp/2) TACKON[which]=0;
++ else if (dv<=sp/2) {TACKS[which]=NULL; TACKON[which]=0;}
+ else {TACKS[which]=malloc((dv-sp/2)*sizeof(QD)); TACKON[which]=dv-sp/2;}
+ S[4]=0; F=fopen("datafiles/param_data","r"); strcpy(U,S);
+ if (ANAL_RANK) {if (dv>0) U[0]='A'; else U[0]='m';}

View file

@ -0,0 +1,32 @@
--- src/bin/sage-spkg-orig 2014-01-29 17:26:07.000000000 +0000
+++ src/bin/sage-spkg 2014-01-29 17:41:25.000000000 +0000
@@ -593,6 +593,29 @@
exit 1
fi
+if ls fbsd-patch-* > /dev/null 2>&1; then
+ echo "===> Applying FreeBSD patches"
+ cat fbsd-patch-* | patch -p0 || exit 1
+ echo "===> Done applying FreeBSD patches"
+fi
+
+# Inspired by run-autotools-fixup target in Mk/bsd.port.mk.
+# Work around an issue where FreeBSD 10.0 is detected as FreeBSD 1.x.
+for f in `find src -type f \( -name config.libpath -o \
+ -name config.rpath -o -name configure -o -name libtool.m4 -o \
+ -name ltconfig -o -name libtool -o -name aclocal.m4 -o \
+ -name acinclude.m4 \)` ; do \
+ sed -i.fbsd10bak \
+ -e 's|freebsd1\*)|freebsd1.\*)|g' \
+ -e 's|freebsd\[12\]\*)|freebsd[12].*)|g' \
+ -e 's|freebsd\[123\]\*)|freebsd[123].*)|g' \
+ -e 's|freebsd\[\[12\]\]\*)|freebsd[[12]].*)|g' \
+ -e 's|freebsd\[\[123\]\]\*)|freebsd[[123]].*)|g' \
+ ${f}
+ rm -f ${f}.fbsd10bak
+ echo "===> FreeBSD 10 autotools fix applied to ${f}"; \
+done
+
# When there is no spkg-install, assume the "spkg" is a tarball not
# specifically made for Sage. Since we want it to be as easy as
# possible to install such a package, we "guess" spkg-install.

View file

@ -1,5 +1,5 @@
--- sage-5.8.rc0/doc/common/builder.py-orig 2013-03-17 20:50:38.000000000 +0000
+++ sage-5.13/doc/common/builder.py 2013-03-17 20:56:42.000000000 +0000
--- src/doc/common/builder.py-orig 2013-03-17 20:50:38.000000000 +0000
+++ src/doc/common/builder.py 2013-03-17 20:56:42.000000000 +0000
@@ -272,13 +272,16 @@
# build the other documents in parallel

View file

@ -1,11 +0,0 @@
--- cephes-2.8.p1/spkg-install-orig 2013-03-30 20:48:35.000000000 +0000
+++ cephes-2.8.p1/spkg-install 2013-03-30 20:48:57.000000000 +0000
@@ -24,6 +24,8 @@
fi
done
+sed -i .orig 's|.*printf|//&1|' */mtherr.c
+
echo "Building Cephes..."
$MAKE
if [ $? -ne 0 ]; then

View file

@ -1,10 +0,0 @@
--- eclib-20120830/src/libsrc/eclib/interface.h-orig 2013-04-26 23:46:24.000000000 +0000
+++ eclib-20120830/src/libsrc/eclib/interface.h 2013-04-26 23:47:09.000000000 +0000
@@ -48,6 +48,7 @@
#include <iterator>
using namespace std;
#include "templates.h"
+#include <stdint.h>
#ifndef MININT
#define MININT numeric_limits<int>::min()

View file

@ -1,20 +0,0 @@
--- maxima-5.29.1.p1/src/interfaces/xmaxima/Makefile.in-orig 2013-05-09 02:26:31.000000000 +0000
+++ maxima-5.29.1.p3/src/interfaces/xmaxima/Makefile.in 2013-05-09 02:30:12.000000000 +0000
@@ -624,14 +624,10 @@
tclIndex:: $(TKSOURCES)
echo "source ../ObjTcl/Object.tcl; auto_mkindex . $(TKSOURCES)" | $(TCLSH)
-# Create Tkmaxima/tclIndex if tclsh is available. Otherwise, create empty file
-# to satisfy make.
+# Create empty Tkmaxima/tclIndex, because attempting to create it using tclsh
+# seems to soak up huge amounts of resources.
Tkmaxima/tclIndex: $(TKSOURCES)
- $(TCLSH) < /dev/null > /dev/null 2>&1 && \
- (cd Tkmaxima ; \
- echo "source ../ObjTcl/Object.tcl; auto_mkindex . $(ALLFILES)" | \
- $(TCLSH)) || \
- touch Tkmaxima/tclIndex
+ touch Tkmaxima/tclIndex
FORCE:
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -1,11 +0,0 @@
--- ncurses-5.9/src/configure.orig 2013-08-21 02:51:59.000000000 +0000
+++ ncurses-5.9.p2/src/configure 2013-08-21 02:53:23.000000000 +0000
@@ -5719,7 +5719,7 @@
cf_cv_shared_soname='`basename $@`'
fi
- MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
+ MK_SHARED_LIB='${CC} -shared -Bshareable -soname=`basename $@` -o $@'
;;
netbsd*) #(vi
CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"

View file

@ -1,13 +0,0 @@
--- numpy-1.7.0/src/numpy/distutils/system_info.py.orig 2013-02-09 21:04:56.000000000 +0000
+++ numpy-1.7.0/src/numpy/distutils/system_info.py 2013-05-27 21:51:12.000000000 +0000
@@ -983,8 +983,8 @@
dir_env_var = 'ATLAS'
_lib_names = ['f77blas', 'cblas']
if sys.platform[:7] == 'freebsd':
- _lib_atlas = ['atlas_r']
- _lib_lapack = ['alapack_r']
+ _lib_atlas = ['atlas']
+ _lib_lapack = ['alapack']
else:
_lib_atlas = ['atlas']
_lib_lapack = ['lapack']

View file

@ -1,11 +0,0 @@
--- ppl-1.0.p0/src/demos/ppl_lpsol/ppl_lpsol.c.orig 2013-06-20 17:21:39.000000000 +0000
+++ ppl-1.1pre9.p0/src/demos/ppl_lpsol/ppl_lpsol.c 2013-06-20 17:39:44.000000000 +0000
@@ -534,7 +534,7 @@
if (getrlimit(RLIMIT_AS, &t) != 0)
fatal("getrlimit failed: %s", strerror(errno));
- if (bytes < t.rlim_cur) {
+ if (bytes < (unsigned long)(t.rlim_cur)) {
t.rlim_cur = bytes;
if (setrlimit(RLIMIT_AS, &t) != 0)
fatal("setrlimit failed: %s", strerror(errno));

View file

@ -1,11 +0,0 @@
--- pycrypto-2.1.0/spkg-install-orig 2012-04-08 01:30:47.000000000 +0000
+++ pycrypto-2.1.0/spkg-install 2012-04-08 01:31:41.000000000 +0000
@@ -12,6 +12,8 @@
LDFLAGS="-m64 "; export LDFLAGS
fi
+patch -p0 < patches_src.libtom.tomcrypt_pk.h
+
CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib $CFLAGS"
export CFLAGS

View file

@ -1,11 +0,0 @@
--- python-2.7.3.p0/src/Doc/library/fcntl.rst.orig 2011-06-11 15:46:23.000000000 +0000
+++ python-2.7.5.p1/src/Doc/library/fcntl.rst 2012-04-22 00:31:48.000000000 +0000
@@ -50,8 +50,6 @@
operations are typically defined in the library module :mod:`termios` and the
argument handling is even more complicated.
- The op parameter is limited to values that can fit in 32-bits.
-
The parameter *arg* can be one of an integer, absent (treated identically to the
integer ``0``), an object supporting the read-only buffer interface (most likely
a plain Python string) or an object supporting the read-write buffer interface.

View file

@ -1,21 +0,0 @@
--- python-2.7.3.p0/src/Modules/_ctypes/libffi/configure.orig 2011-06-11 15:46:26.000000000 +0000
+++ python-2.7.5.p1/src/Modules/_ctypes/libffi/configure 2012-04-22 00:23:14.000000000 +0000
@@ -6289,7 +6289,7 @@
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+amd64-*-freebsd*|x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
# Find out which ABI we are using.
echo 'int i;' > conftest.$ac_ext
@@ -11275,6 +11275,9 @@
powerpc-*-freebsd*)
TARGET=POWERPC_FREEBSD; TARGETDIR=powerpc
;;
+ powerpc64-*-freebsd*)
+ TARGET=POWERPC; TARGETDIR=powerpc
+ ;;
powerpc*-*-rtems*)
TARGET=POWERPC; TARGETDIR=powerpc
;;

View file

@ -1,53 +0,0 @@
--- python-2.7.3.p0/src/Modules/fcntlmodule.c.orig 2011-06-11 15:46:27.000000000 +0000
+++ python-2.7.5.p1/src/Modules/fcntlmodule.c 2012-04-22 00:23:34.000000000 +0000
@@ -97,20 +97,15 @@
{
#define IOCTL_BUFSZ 1024
int fd;
- /* In PyArg_ParseTuple below, we use the unsigned non-checked 'I'
+ /* In PyArg_ParseTuple below, we use the unsigned non-checked 'k'
format for the 'code' parameter because Python turns 0x8000000
into either a large positive number (PyLong or PyInt on 64-bit
platforms) or a negative number on others (32-bit PyInt)
whereas the system expects it to be a 32bit bit field value
regardless of it being passed as an int or unsigned long on
- various platforms. See the termios.TIOCSWINSZ constant across
- platforms for an example of thise.
-
- If any of the 64bit platforms ever decide to use more than 32bits
- in their unsigned long ioctl codes this will break and need
- special casing based on the platform being built on.
+ various platforms.
*/
- unsigned int code;
+ unsigned long code;
int arg;
int ret;
char *str;
@@ -118,7 +113,7 @@
int mutate_arg = 1;
char buf[IOCTL_BUFSZ+1]; /* argument plus NUL byte */
- if (PyArg_ParseTuple(args, "O&Iw#|i:ioctl",
+ if (PyArg_ParseTuple(args, "O&kw#|i:ioctl",
conv_descriptor, &fd, &code,
&str, &len, &mutate_arg)) {
char *arg;
@@ -169,7 +164,7 @@
}
PyErr_Clear();
- if (PyArg_ParseTuple(args, "O&Is#:ioctl",
+ if (PyArg_ParseTuple(args, "O&ks#:ioctl",
conv_descriptor, &fd, &code, &str, &len)) {
if (len > IOCTL_BUFSZ) {
PyErr_SetString(PyExc_ValueError,
@@ -191,7 +186,7 @@
PyErr_Clear();
arg = 0;
if (!PyArg_ParseTuple(args,
- "O&I|i;ioctl requires a file or file descriptor,"
+ "O&k|i;ioctl requires a file or file descriptor,"
" an integer and optionally an integer or buffer argument",
conv_descriptor, &fd, &code, &arg)) {
return NULL;

View file

@ -1,55 +0,0 @@
--- python-2.7.3.p0/src/Python/thread_pthread.h.orig 2011-06-11 15:46:28.000000000 +0000
+++ python-2.7.5.p1/src/Python/thread_pthread.h 2012-04-22 00:23:46.000000000 +0000
@@ -38,13 +38,18 @@
#endif
#endif
+#ifdef __FreeBSD__
+#include <osreldate.h>
+#endif
+
/* The POSIX spec says that implementations supporting the sem_*
family of functions must indicate this by defining
_POSIX_SEMAPHORES. */
#ifdef _POSIX_SEMAPHORES
/* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
we need to add 0 to make it work there as well. */
-#if (_POSIX_SEMAPHORES+0) == -1
+#if defined(__FreeBSD__) && __FreeBSD_version < 701104 && \
+ (_POSIX_SEMAPHORES+0) == -1
#define HAVE_BROKEN_POSIX_SEMAPHORES
#else
#include <semaphore.h>
@@ -56,7 +61,6 @@
in default setting. So the process scope is preferred to get
enough number of threads to work. */
#ifdef __FreeBSD__
-#include <osreldate.h>
#if __FreeBSD_version >= 500000 && __FreeBSD_version < 504101
#undef PTHREAD_SYSTEM_SCHED_SUPPORTED
#endif
@@ -161,6 +165,7 @@
{
pthread_t th;
int status;
+ sigset_t set, oset;
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_t attrs;
#endif
@@ -189,6 +194,8 @@
#if defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_setscope(&attrs, PTHREAD_SCOPE_SYSTEM);
#endif
+ sigfillset(&set);
+ SET_THREAD_SIGMASK(SIG_BLOCK, &set, &oset);
status = pthread_create(&th,
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
@@ -200,6 +207,7 @@
(void *)arg
);
+ SET_THREAD_SIGMASK(SIG_SETMASK, &oset, NULL);
#if defined(THREAD_STACK_SIZE) || defined(PTHREAD_SYSTEM_SCHED_SUPPORTED)
pthread_attr_destroy(&attrs);
#endif

View file

@ -1,97 +0,0 @@
--- python-2.7.5.p1/src/setup.py-orig 2013-03-17 03:13:46.000000000 +0000
+++ python-2.7.5.p1/src/setup.py 2013-03-17 03:15:11.000000000 +0000
@@ -642,7 +642,7 @@
# use the same library for the readline and curses modules.
if 'curses' in readline_termcap_library:
curses_library = readline_termcap_library
- elif self.compiler.find_library_file(lib_dirs, 'ncursesw'):
+ elif self.compiler.find_library_file(lib_dirs, 'xxxncursesw'):
curses_library = 'ncursesw'
elif self.compiler.find_library_file(lib_dirs, 'ncurses'):
curses_library = 'ncurses'
@@ -681,7 +681,7 @@
'termcap'):
readline_libs.append('termcap')
exts.append( Extension('readline', ['readline.c'],
- library_dirs=['/usr/lib/termcap'],
+ library_dirs=['/usr/lib', '/usr/lib/termcap'],
extra_link_args=readline_extra_link_args,
libraries=readline_libs) )
else:
@@ -1120,7 +1122,7 @@
sysroot = macosx_sdk_root()
f = os.path.join(sysroot, f[1:])
- if os.path.exists(f) and not db_incs:
+ if os.path.exists(f):
data = open(f).read()
m = re.search(r"#s*define\s+HASHVERSION\s+2\s*", data)
if m is not None:
@@ -1246,12 +1248,13 @@
# provided by the ncurses library.
panel_library = 'panel'
if curses_library.startswith('ncurses'):
- if curses_library == 'ncursesw':
+ if curses_library == 'xxxncursesw':
# Bug 1464056: If _curses.so links with ncursesw,
# _curses_panel.so must link with panelw.
panel_library = 'panelw'
curses_libs = [curses_library]
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
libraries = curses_libs) )
elif curses_library == 'curses' and platform != 'darwin':
# OSX has an old Berkeley curses, not good enough for
@@ -1264,6 +1267,7 @@
curses_libs = ['curses']
exts.append( Extension('_curses', ['_cursesmodule.c'],
+ library_dirs = ['/usr/lib'],
libraries = curses_libs) )
else:
missing.append('_curses')
@@ -1432,10 +1436,22 @@
macros = dict()
libraries = []
- elif host_platform in ('freebsd4', 'freebsd5', 'freebsd6', 'freebsd7', 'freebsd8'):
+ elif host_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()
+ macros = dict( # FreeBSD 4-6
+ HAVE_SEM_OPEN=0,
+ HAVE_SEM_TIMEDWAIT=0,
+ HAVE_FD_TRANSFER=1,
+ )
+ libraries = []
+
+ elif host_platform in ('freebsd7', 'freebsd8', 'freebsd9', 'freebsd10'):
+ macros = dict( # FreeBSD 7+
+ HAVE_SEM_OPEN=1,
+ HAVE_SEM_TIMEDWAIT=1,
+ HAVE_FD_TRANSFER=1,
+ )
libraries = []
elif host_platform.startswith('openbsd'):
@@ -1484,7 +1500,7 @@
missing.append('linuxaudiodev')
if (host_platform in ('linux2', 'freebsd4', 'freebsd5', 'freebsd6',
- 'freebsd7', 'freebsd8')
+ 'freebsd7', 'freebsd8', 'freebsd9', 'freebsd10')
or host_platform.startswith("gnukfreebsd")):
exts.append( Extension('ossaudiodev', ['ossaudiodev.c']) )
else:
@@ -2066,9 +2082,7 @@
ext_modules=[Extension('_struct', ['_struct.c'])],
# Scripts to install
- scripts = ['Tools/scripts/pydoc', 'Tools/scripts/idle',
- 'Tools/scripts/2to3',
- 'Lib/smtpd.py']
+ scripts = []
)
# --install-platlib

View file

@ -1,11 +0,0 @@
--- sympow-1.018.1.p11/src/disk.c-orig 2012-04-19 02:33:51.000000000 +0000
+++ sympow-1.018.1.p11/src/disk.c 2012-04-19 02:34:22.000000000 +0000
@@ -39,7 +39,7 @@
else if (((sp&3)==0) && CM_CASE) {if (2*ep==sp) S[3]='l'; else S[3]='h';}
else {if (2*ep==sp) S[3]='L'; else S[3]='H';}
if (HECKE && dv) {TACKS[which]=malloc(dv*sizeof(QD)); TACKON[which]=dv;}
- else if (dv<=sp/2) TACKON[which]=0;
+ else if (dv<=sp/2) {TACKS[which]=NULL; TACKON[which]=0;}
else {TACKS[which]=malloc((dv-sp/2)*sizeof(QD)); TACKON[which]=dv-sp/2;}
S[4]=0; F=fopen("datafiles/param_data","r"); strcpy(U,S);
if (ANAL_RANK) {if (dv>0) U[0]='A'; else U[0]='m';}

View file

@ -7,4 +7,7 @@ Mathematica and Matlab.
For instructions on adding optional packages, see files/optional-packages.txt.
You may want to avoid the command "make install" and instead simply use the
bin/mv command to move the ${WRKSRC} directory to where-ever you want it.
WWW: http://www.sagemath.org/