Fixes for building on a mac
This commit is contained in:
parent
7073199b83
commit
ed021630df
@ -103,7 +103,7 @@ export PATH=$PATH:$TERMUX_STANDALONE_TOOLCHAIN/bin
|
||||
|
||||
# Make $TERMUX_TAR and $TERMUX_TOUCH point at gnu versions:
|
||||
export TERMUX_TAR="tar"
|
||||
test `uname` = "Darwin" && TERMUX_TAR=gnutar
|
||||
test `uname` = "Darwin" && TERMUX_TAR=gtar
|
||||
export TERMUX_TOUCH="touch"
|
||||
test `uname` = "Darwin" && TERMUX_TOUCH=gtouch
|
||||
|
||||
|
@ -8,7 +8,8 @@ TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
# We replace env in the old coreutils package:
|
||||
TERMUX_PKG_CONFLICTS="coreutils (<< 8.25-4)"
|
||||
|
||||
# NOTE: sed on mac does not work for building busybox, install gsed and symlink sed => gsed
|
||||
# NOTE: sed on mac does not work for building busybox, install gnu-sed with
|
||||
# homebrew using the --with-default-names option.
|
||||
|
||||
CFLAGS+=" -llog -DTERMUX_EXPOSE_MEMPCPY=1" # Android system liblog.so for syslog
|
||||
|
||||
|
@ -2,3 +2,4 @@ TERMUX_PKG_HOMEPAGE=http://www.lcdf.org/gifsicle/
|
||||
TERMUX_PKG_DESCRIPTION="Tool for creating, editing, and getting information about GIF images and animations"
|
||||
TERMUX_PKG_VERSION=1.88
|
||||
TERMUX_PKG_SRCURL=http://www.lcdf.org/gifsicle/gifsicle-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gifview"
|
||||
|
@ -1,9 +1,7 @@
|
||||
Link the luajit executable to the shared libraries.
|
||||
|
||||
diff -u -r ../LuaJIT-2.0.3/src/Makefile ./src/Makefile
|
||||
--- ../LuaJIT-2.0.3/src/Makefile 2014-03-12 13:10:00.000000000 +0100
|
||||
+++ ./src/Makefile 2014-07-09 02:39:15.344355861 +0200
|
||||
@@ -72,14 +72,14 @@
|
||||
diff -u -r ../LuaJIT-2.1.0-beta2/src/Makefile ./src/Makefile
|
||||
--- ../LuaJIT-2.1.0-beta2/src/Makefile 2016-03-03 12:40:00.000000000 +0100
|
||||
+++ ./src/Makefile 2016-06-11 00:59:21.000000000 +0200
|
||||
@@ -71,14 +71,14 @@
|
||||
# as dynamic mode.
|
||||
#
|
||||
# Mixed mode creates a static + dynamic library and a statically linked luajit.
|
||||
@ -20,3 +18,14 @@ diff -u -r ../LuaJIT-2.0.3/src/Makefile ./src/Makefile
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
@@ -166,10 +166,6 @@
|
||||
HOST_SYS= Windows
|
||||
HOST_MSYS= cygwin
|
||||
endif
|
||||
- # Use Clang for OSX host.
|
||||
- ifeq (Darwin,$(HOST_SYS))
|
||||
- DEFAULT_CC= clang
|
||||
- endif
|
||||
endif
|
||||
|
||||
##############################################################################
|
||||
|
@ -38,7 +38,7 @@ termux_step_post_make_install () {
|
||||
cd $TERMUX_PREFIX/share/terminfo
|
||||
for l in *; do
|
||||
if [ ${#l} -eq 2 ]; then
|
||||
char=`echo 0x$l | awk '{printf "%c\n", $1}'`
|
||||
char=`echo 0x$l | /usr/bin/awk '{printf "%c\n", $1}'`
|
||||
rm -Rf $char
|
||||
mv $l $char
|
||||
fi
|
||||
|
25
scripts/setup-mac.sh
Executable file
25
scripts/setup-mac.sh
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
set -e -u
|
||||
|
||||
command -v brew >/dev/null 2>&1 || {
|
||||
echo >&2 "Install homebrew first: http://brew.sh"
|
||||
exit 1
|
||||
}
|
||||
|
||||
PACKAGES=""
|
||||
PACKAGES="$PACKAGES bison"
|
||||
PACKAGES="$PACKAGES cmake"
|
||||
PACKAGES="$PACKAGES coreutils"
|
||||
PACKAGES="$PACKAGES gawk"
|
||||
PACKAGES="$PACKAGES gnu-sed --with-default-names" # For busybox build.
|
||||
PACKAGES="$PACKAGES gnu-tar"
|
||||
PACKAGES="$PACKAGES lzip"
|
||||
PACKAGES="$PACKAGES pkgconfig"
|
||||
PACKAGES="$PACKAGES python3"
|
||||
brew install $PACKAGES
|
||||
|
||||
# bison is keg-only, but we need updated 'bison' in path:
|
||||
brew link bison --force
|
||||
|
||||
sudo mkdir -p /data/data/com.termux/files/usr
|
||||
sudo chown -R `whoami` /data
|
Loading…
Reference in New Issue
Block a user