Fredrik Fornwall
9 years ago
2 changed files with 60 additions and 6 deletions
@ -1,13 +1,31 @@ |
|||||
TERMUX_PKG_HOMEPAGE=https://racket-lang.org |
TERMUX_PKG_HOMEPAGE=https://racket-lang.org |
||||
TERMUX_PKG_DESCRIPTION="Full-spectrum programming language going beyond Lisp and Scheme" |
TERMUX_PKG_DESCRIPTION="Full-spectrum programming language going beyond Lisp and Scheme" |
||||
TERMUX_PKG_VERSION=6.3 |
TERMUX_PKG_VERSION=6.4 |
||||
TERMUX_PKG_SRCURL=https://mirror.racket-lang.org/releases/6.3/installers/racket-minimal-${TERMUX_PKG_VERSION}-src-builtpkgs.tgz |
TERMUX_PKG_SRCURL=https://mirror.racket-lang.org/installers/${TERMUX_PKG_VERSION}/racket-minimal-${TERMUX_PKG_VERSION}-src-builtpkgs.tgz |
||||
TERMUX_PKG_DEPENDS="libffi, libandroid-support" |
|
||||
# TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=openssl --disable-iri" |
|
||||
# TERMUX_PKG_HOSTBUILD=true |
|
||||
TERMUX_PKG_FOLDERNAME=racket-${TERMUX_PKG_VERSION} |
TERMUX_PKG_FOLDERNAME=racket-${TERMUX_PKG_VERSION} |
||||
TERMUX_MAKE_PROCESSES=1 |
TERMUX_PKG_HOSTBUILD=true |
||||
|
TERMUX_PKG_DEPENDS="libffi, libandroid-support" |
||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-racket=$TERMUX_PKG_HOSTBUILD_DIR/racket/racketcgc" |
||||
|
# Building racket hits the 'the wrong gcc-problem' detailed at http://www.metastatic.org/text/libtool.html |
||||
|
# due to --tag=CC being used. To avoid that a cross libtool built in termux_step_post_extract_package() |
||||
|
# below and used due to this configure argument: |
||||
|
_CROSS_LIBTOOL_DIR=$TERMUX_PKG_CACHEDIR/libtool-cross-2.4.6-${TERMUX_HOST_PLATFORM} |
||||
|
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --enable-lt=$_CROSS_LIBTOOL_DIR/bin/${TERMUX_HOST_PLATFORM}-libtool" |
||||
|
|
||||
|
LDFLAGS+=" -llog" |
||||
|
|
||||
termux_step_post_extract_package () { |
termux_step_post_extract_package () { |
||||
|
if [ ! -d $_CROSS_LIBTOOL_DIR ]; then |
||||
|
LIBTOOL_TARFILE=$TERMUX_PKG_CACHEDIR/libtool-2.4.6.tar.gz |
||||
|
if [ ! -f $LIBTOOL_TARFILE ]; then |
||||
|
curl -L -o $LIBTOOL_TARFILE http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz |
||||
|
fi |
||||
|
cd $TERMUX_PKG_CACHEDIR |
||||
|
tar xf $LIBTOOL_TARFILE |
||||
|
cd libtool-2.4.6 |
||||
|
./configure --prefix=$_CROSS_LIBTOOL_DIR --host=$TERMUX_HOST_PLATFORM --program-prefix=${TERMUX_HOST_PLATFORM}- |
||||
|
make install |
||||
|
fi |
||||
|
|
||||
export TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/src |
export TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/src |
||||
} |
} |
||||
|
@ -0,0 +1,36 @@ |
|||||
|
"The getdtablesize functions has been deprecated by Posix and has been |
||||
|
removed from Android's LB64 ABI. Replace calls to it with the modern |
||||
|
equivalent sysconf(_SC_OPEN_MAX)." |
||||
|
|
||||
|
- https://groups.google.com/a/chromium.org/forum/#!topic/chromium-reviews/AXhZapYuHi8
|
||||
|
|
||||
|
diff -u -r ../../racket-6.4/src/racket/src/port.c ./racket/src/port.c
|
||||
|
--- ../../racket-6.4/src/racket/src/port.c 2016-01-14 12:11:20.000000000 -0500
|
||||
|
+++ ./racket/src/port.c 2016-04-10 17:43:40.039414493 -0400
|
||||
|
@@ -1090,7 +1090,7 @@
|
||||
|
# ifdef USE_ULIMIT |
||||
|
dynamic_fd_size = ulimit(4, 0); |
||||
|
# else |
||||
|
- dynamic_fd_size = getdtablesize();
|
||||
|
+ dynamic_fd_size = sysconf(_SC_OPEN_MAX);
|
||||
|
# endif |
||||
|
/* divide by bits-per-byte: */ |
||||
|
dynamic_fd_size = (dynamic_fd_size + 7) >> 3; |
||||
|
@@ -1365,7 +1365,7 @@
|
||||
|
# ifdef FIXED_FD_LIMIT |
||||
|
limit = FIXED_FD_LIMIT; |
||||
|
# else |
||||
|
- limit = getdtablesize();
|
||||
|
+ limit = sysconf(_SC_OPEN_MAX);
|
||||
|
# endif |
||||
|
# endif |
||||
|
# endif |
||||
|
@@ -10390,7 +10390,7 @@
|
||||
|
# ifdef USE_ULIMIT |
||||
|
i = ulimit(4, 0); |
||||
|
# else |
||||
|
- i = getdtablesize();
|
||||
|
+ i = sysconf(_SC_OPEN_MAX);
|
||||
|
# endif |
||||
|
while (i--) { |
||||
|
int cr; |
Loading…
Reference in new issue