Skip to content

Instantly share code, notes, and snippets.

@christianrondeau
Created August 1, 2017 00:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christianrondeau/ce00b6a91abf7ac9da4fa33d5b1fecf3 to your computer and use it in GitHub Desktop.
Save christianrondeau/ce00b6a91abf7ac9da4fa33d5b1fecf3 to your computer and use it in GitHub Desktop.
A fish shell build file that works on Termux
#!/data/data/com.termux/files/usr/bin/bash
# Directly inspired (read: ripped off) from:
# * https://github.com/termux/termux-packages/blob/master/build-package.sh
# * https://github.com/termux/termux-packages/tree/master/packages/fish
# Install dependencies first:
# packages install ncurses ncurses-dev libandroid-support ncurses-utils man bc
AVOID_GNULIB=""
AVOID_GNULIB+=" ac_cv_func_calloc_0_nonnull=yes"
AVOID_GNULIB+=" ac_cv_func_chown_works=yes"
AVOID_GNULIB+=" ac_cv_func_getgroups_works=yes"
AVOID_GNULIB+=" ac_cv_func_malloc_0_nonnull=yes"
AVOID_GNULIB+=" ac_cv_func_realloc_0_nonnull=yes"
AVOID_GNULIB+=" am_cv_func_working_getline=yes"
AVOID_GNULIB+=" gl_cv_func_dup2_works=yes"
AVOID_GNULIB+=" gl_cv_func_fcntl_f_dupfd_cloexec=yes"
AVOID_GNULIB+=" gl_cv_func_fcntl_f_dupfd_works=yes"
AVOID_GNULIB+=" gl_cv_func_fnmatch_posix=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_abort_bug=no"
AVOID_GNULIB+=" gl_cv_func_getcwd_null=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_path_max=yes"
AVOID_GNULIB+=" gl_cv_func_getcwd_posix_signature=yes"
AVOID_GNULIB+=" gl_cv_func_gettimeofday_clobber=no"
AVOID_GNULIB+=" gl_cv_func_gettimeofday_posix_signature=yes"
AVOID_GNULIB+=" gl_cv_func_link_works=yes"
AVOID_GNULIB+=" gl_cv_func_lstat_dereferences_slashed_symlink=yes"
AVOID_GNULIB+=" gl_cv_func_malloc_0_nonnull=yes"
AVOID_GNULIB+=" gl_cv_func_memchr_works=yes"
AVOID_GNULIB+=" gl_cv_func_mkdir_trailing_dot_works=yes"
AVOID_GNULIB+=" gl_cv_func_mkdir_trailing_slash_works=yes"
AVOID_GNULIB+=" gl_cv_func_mkfifo_works=yes"
AVOID_GNULIB+=" gl_cv_func_realpath_works=yes"
AVOID_GNULIB+=" gl_cv_func_select_detects_ebadf=yes"
AVOID_GNULIB+=" gl_cv_func_snprintf_posix=yes"
AVOID_GNULIB+=" gl_cv_func_snprintf_retval_c99=yes"
AVOID_GNULIB+=" gl_cv_func_snprintf_truncation_c99=yes"
AVOID_GNULIB+=" gl_cv_func_stat_dir_slash=yes"
AVOID_GNULIB+=" gl_cv_func_stat_file_slash=yes"
AVOID_GNULIB+=" gl_cv_func_strerror_0_works=yes"
AVOID_GNULIB+=" gl_cv_func_symlink_works=yes"
AVOID_GNULIB+=" gl_cv_func_tzset_clobber=no"
AVOID_GNULIB+=" gl_cv_func_unlink_honors_slashes=yes"
AVOID_GNULIB+=" gl_cv_func_unlink_honors_slashes=yes"
AVOID_GNULIB+=" gl_cv_func_vsnprintf_posix=yes"
AVOID_GNULIB+=" gl_cv_func_vsnprintf_zerosize_c99=yes"
AVOID_GNULIB+=" gl_cv_func_wcwidth_works=yes"
AVOID_GNULIB+=" gl_cv_func_working_getdelim=yes"
AVOID_GNULIB+=" gl_cv_func_working_mkstemp=yes"
AVOID_GNULIB+=" gl_cv_func_working_mktime=yes"
AVOID_GNULIB+=" gl_cv_func_working_strerror=yes"
AVOID_GNULIB+=" gl_cv_header_working_fcntl_h=yes"
AVOID_GNULIB+=" gl_cv_C_locale_sans_EILSEQ=yes"
# NOTE: We do not want to quote AVOID_GNULIB as we want word expansion.
env $AVOID_GNULIB "./configure" \
--disable-dependency-tracking \
--disable-rpath --disable-rpath-hack \
ac_cv_file__proc_self_stat=yes \
--disable-nls \
--disable-static \
--enable-shared \
--libexecdir=/data/data/com.termux/files/usr/libexec \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment