Merge branch 'master' into app_995
This commit is contained in:
commit
8d57afa4b0
BIN
.github/static/powered-by-bintray.png
vendored
Normal file
BIN
.github/static/powered-by-bintray.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
@ -1,32 +1,34 @@
|
||||
image: termux/package-builder:latest
|
||||
|
||||
variables:
|
||||
ANDROID_HOME: "/home/builder/lib/android-sdk"
|
||||
NDK: "/home/builder/lib/android-ndk"
|
||||
|
||||
stages:
|
||||
- build
|
||||
- deploy
|
||||
|
||||
before_script:
|
||||
- cp -a /home/builder/.android $HOME/.android
|
||||
- chown -R $(id -u):$(id -g) $HOME/.android
|
||||
|
||||
## Common configuration for all build jobs.
|
||||
## Variables BINTRAY_* should be unset to
|
||||
## prevent leaking of sensitive information.
|
||||
.job_template: &build_job
|
||||
stage: build
|
||||
except:
|
||||
- schedules
|
||||
script:
|
||||
- bash ./scripts/ci/gitlab.sh $TERMUX_ARCH
|
||||
- unset BINTRAY_USERNAME
|
||||
- unset BINTRAY_API_KEY
|
||||
- unset BINTRAY_GPG_SUBJECT
|
||||
- unset BINTRAY_GPG_PASSPHRASE
|
||||
- |
|
||||
for package in $(./scripts/build/ci/determine_git_changes.sh); do
|
||||
./build-package.sh -q -i -a "$TERMUX_ARCH" "$package" || exit 1
|
||||
done
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- script_failure
|
||||
- runner_system_failure
|
||||
- unknown_failure
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
- deb-packages
|
||||
- debs
|
||||
|
||||
## Building packages for AArch64.
|
||||
build-aarch64:
|
||||
@ -51,3 +53,40 @@ build-x86_64:
|
||||
<<: *build_job
|
||||
variables:
|
||||
TERMUX_ARCH: x86_64
|
||||
|
||||
## Submit build packages to repository.
|
||||
upload-packages:
|
||||
stage: deploy
|
||||
only:
|
||||
- master@termux-mirror/termux-packages
|
||||
except:
|
||||
- schedules
|
||||
script:
|
||||
- MODIFIED_PACKAGES=$(./scripts/build/ci/determine_git_changes.sh)
|
||||
- |
|
||||
if [ -n "$MODIFIED_PACKAGES" ]; then
|
||||
./scripts/package_uploader.sh $MODIFIED_PACKAGES
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- runner_system_failure
|
||||
- unknown_failure
|
||||
|
||||
## Remove old versions from the APT repository.
|
||||
repository-cleanup:
|
||||
stage: deploy
|
||||
only:
|
||||
- schedules
|
||||
script:
|
||||
- |
|
||||
if [ -n "$SCHEDULED_REPOSITORY_CLEANUP" ]; then
|
||||
./scripts/package_uploader.sh --cleanup $(cd ./packages; echo *)
|
||||
fi
|
||||
retry:
|
||||
max: 2
|
||||
when:
|
||||
- runner_system_failure
|
||||
- unknown_failure
|
||||
|
35
.travis.yml
35
.travis.yml
@ -1,12 +1,29 @@
|
||||
language: ruby
|
||||
sudo: required
|
||||
cache: bundler
|
||||
language: generic
|
||||
|
||||
## Force usage of "Ubuntu Xenial" as on older versions
|
||||
## program "realpath" is not working for some reason.
|
||||
os: linux
|
||||
dist: xenial
|
||||
services: docker
|
||||
before_script: mkdir debs && chmod 777 debs
|
||||
sudo: required
|
||||
|
||||
## Split per-architecture builds into separate jobs.
|
||||
env:
|
||||
matrix:
|
||||
- ARGS="-i -a aarch64"
|
||||
- ARGS="-i -a arm"
|
||||
- ARGS="-i -a i686"
|
||||
- ARGS="-i -a x86_64"
|
||||
script: bundle exec rake build["${ARGS}"]
|
||||
- TERMUX_ARCH=aarch64
|
||||
- TERMUX_ARCH=arm
|
||||
- TERMUX_ARCH=i686
|
||||
- TERMUX_ARCH=x86_64
|
||||
|
||||
## Build modified packages.
|
||||
## Variables BINTRAY_* should be unset to
|
||||
## prevent leaking of sensitive information.
|
||||
script:
|
||||
- unset BINTRAY_USERNAME
|
||||
- unset BINTRAY_API_KEY
|
||||
- unset BINTRAY_GPG_SUBJECT
|
||||
- unset BINTRAY_GPG_PASSPHRASE
|
||||
- |
|
||||
for package in $(./scripts/build/ci/determine_git_changes.sh); do
|
||||
./scripts/run-docker.sh ./build-package.sh -q -a "$TERMUX_ARCH" "$package" || exit 1
|
||||
done
|
||||
|
@ -1,7 +1,11 @@
|
||||
# Sponsors and Backers
|
||||
|
||||
- [Become a sponsor or backer at Patreon](https://www.patreon.com/termux)
|
||||
|
||||
- [Donate to Termux using PayPal or Bitcoin](https://termux.com/donate.html)
|
||||
|
||||
# Backers
|
||||
|
||||
- Henrik Grimler
|
||||
|
||||
- Tim Greaves
|
||||
|
@ -1,10 +1,10 @@
|
||||
License for package patches
|
||||
===========================
|
||||
# License for package patches
|
||||
|
||||
The scripts and patches to build each package is licensed under the same license as
|
||||
the actual package (so the patches and scripts to build bash are licensed under
|
||||
the same license as bash, while the patches and scripts to build python are licensed
|
||||
under the same license as python).
|
||||
|
||||
License for the build infrastructure
|
||||
====================================
|
||||
# License for the build infrastructure
|
||||
|
||||
For build infrastructure outside the `packages/` folder the license is [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0).
|
||||
|
148
README.md
148
README.md
@ -1,146 +1,48 @@
|
||||
Termux packages
|
||||
===============
|
||||
# Termux packages
|
||||
|
||||
[![Powered by JFrog Bintray](./.github/static/powered-by-bintray.png)](https://bintray.com)
|
||||
|
||||
[![pipeline status](https://gitlab.com/termux-mirror/termux-packages/badges/master/pipeline.svg)](https://gitlab.com/termux-mirror/termux-packages/commits/master)
|
||||
[![Join the chat at https://gitter.im/termux/termux](https://badges.gitter.im/termux/termux.svg)](https://gitter.im/termux/termux)
|
||||
|
||||
This project contains scripts and patches to build packages for the [Termux](https://termux.com/) Android application. Note that packages are cross compiled and that on-device builds are not currently supported.
|
||||
This project contains scripts and patches to build packages for the [Termux](https://termux.com/) Android application. Note that packages are cross-compiled and on-device builds are not currently supported.
|
||||
|
||||
Setting up a build environment using Docker
|
||||
===========================================
|
||||
For most people the best way to obtain an environment for building packages is by using Docker. This should work everywhere Docker is supported (replace `/` with `\` if using Windows) and ensures an up to date build environment that is tested by other package builders.
|
||||
More information can be found in the [docs](docs/) directory.
|
||||
|
||||
Run the following script to setup a container (from an image created by [scripts/Dockerfile](scripts/Dockerfile)) suitable for building packages:
|
||||
## Directory Structure
|
||||
|
||||
./scripts/run-docker.sh
|
||||
- [disabled-packages](disabled-packages/): Packages that cannot be built or have serious issues.
|
||||
|
||||
This source folder is mounted as the `/root/termux-packages` data volume, so changes are kept
|
||||
in sync between the host and the container when trying things out before committing, and built
|
||||
deb files will be available on the host in the `debs/` directory just as when building on the host.
|
||||
- [docs](docs/): Documentation on how to build, formatting etc.
|
||||
|
||||
The docker container used for building packages is a Ubuntu installation with necessary packages
|
||||
pre-installed. The default user is a non-root user to avoid problems with package builds modifying the system
|
||||
by mistake, but `sudo` can be used to install additional Ubuntu packages to be used during development.
|
||||
- [ndk-patches](ndk-patches/): Patches for Android NDK headers.
|
||||
|
||||
Build commands can be given to be executed in the docker container directly:
|
||||
- [packages](packages/): All currently available packages.
|
||||
|
||||
./scripts/run-docker.sh ./build-package.sh libandroid-support
|
||||
- [scripts](scripts/): Utility scripts for building.
|
||||
|
||||
will launch the docker container, execute the `./build-package.sh libandroid-support`
|
||||
command inside it and afterwards return you to the host prompt, with the newly built
|
||||
deb in `debs/` to try out.
|
||||
## Issues
|
||||
|
||||
Note that building packages can take up a lot of space (especially if `build-all.sh` is used to build all packages) and you may need to [increase the base device size](http://www.projectatomic.io/blog/2016/03/daemon_option_basedevicesize/) if running with a storage driver using a small base size of 10 GB.
|
||||
The two most common types of issues are package requests and bug reports. There are already templates available.
|
||||
|
||||
Build environment without Docker
|
||||
================================
|
||||
If you can't run Docker you can use a Ubuntu 18.10 installation (either by installing a virtual maching guest or on direct hardware) by using the below scripts:
|
||||
You can open an issue for any package or build problems. For example, if you observing crashes or other kind of malfunction, you are certainly welcome to file an issue.
|
||||
|
||||
- Run `scripts/setup-ubuntu.sh` to install required packages and setup the `/data/` folder.
|
||||
Also, if you want to request a particular package, you may suggest it in an issue. However, be prepared that package may not be available shortly. Bugfixes and improvements take precedence over new packages.
|
||||
|
||||
- Run `scripts/setup-android-sdk.sh` to install the Android SDK and NDK at `$HOME/lib/android-{sdk,ndk}`.
|
||||
## Pull Requests
|
||||
|
||||
There is also a [Vagrantfile](scripts/Vagrantfile) available as a shortcut for setting up an Ubuntu installation with the above steps applied.
|
||||
We welcome any pull requests. Nevertheless, a log file should be provided in order to show that it is at least working.
|
||||
|
||||
Building a package
|
||||
==================
|
||||
The basic build operation is to run `./build-package.sh $PKG`, which:
|
||||
Normally, all pull requests will be tested by [Travis CI](https://travis-ci.org/termux/termux-packages). However, in case if you are banned or for whatever reason do no use Travis CI, you should provide a log file by yourself.
|
||||
|
||||
1. Sets up a patched stand-alone Android NDK toolchain if necessary.
|
||||
All tests for master branch are done by Gitlab CI.
|
||||
|
||||
2. Reads `packages/$PKG/build.sh` to find out where to find the source code of the package and how to build it.
|
||||
## Contacts
|
||||
|
||||
3. Extracts the source in `$HOME/.termux-build/$PKG/src`.
|
||||
- General Mailing List: https://groups.io/g/termux
|
||||
|
||||
4. Applies all patches in packages/$PKG/\*.patch.
|
||||
- Developer Mailing List: https://groups.io/g/termux-dev
|
||||
|
||||
5. Builds the package under `$HOME/.termux-build/$PKG/` (either in the build/ directory there or in the
|
||||
src/ directory if the package is specified to build in the src dir) and installs it to `$PREFIX`.
|
||||
- Developer Chat: https://gitter.im/termux/dev or #termux/development on IRC/freenode.
|
||||
|
||||
6. Extracts modified files in `$PREFIX` into `$HOME/.termux-build/$PKG/massage` and massages the
|
||||
files there for distribution (removes some files, splits it up in sub-packages, modifies elf files).
|
||||
|
||||
7. Creates a deb package file for distribution in `debs/`.
|
||||
|
||||
Reading [build-package.sh](build-package.sh) is the best way to understand what is going on.
|
||||
|
||||
Additional utilities
|
||||
====================
|
||||
* build-all.sh: used for building all packages in the correct order (using buildorder.py).
|
||||
|
||||
* clean.sh: used for doing a clean rebuild of all packages.
|
||||
|
||||
* scripts/check-pie.sh: Used for verifying that all binaries are using PIE, which is required for Android 5+.
|
||||
|
||||
* scripts/check-versions.sh: used for checking for package updates.
|
||||
|
||||
* scripts/list-packages.sh: used for listing all packages with a one-line summary.
|
||||
|
||||
|
||||
Resources
|
||||
=========
|
||||
* [Android changes for NDK developers](https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md)
|
||||
|
||||
* [Linux From Scratch](http://www.linuxfromscratch.org/lfs/view/stable/)
|
||||
|
||||
* [Beyond Linux From Scratch](http://www.linuxfromscratch.org/blfs/view/stable/)
|
||||
|
||||
* [OpenWrt](https://openwrt.org/) as an embedded Linx distribution contains [patches and build scripts](https://dev.openwrt.org/browser/packages)
|
||||
|
||||
* [Kivy recipes](https://github.com/kivy/python-for-android/tree/master/pythonforandroid/recipes) contains recipes for building packages for Android.
|
||||
|
||||
|
||||
Common porting problems
|
||||
=======================
|
||||
* The Android bionic libc does not have iconv and gettext/libintl functionality built in. A `libandroid-support` package contains these and may be used by all packages.
|
||||
|
||||
* "error: z: no archive symbol table (run ranlib)" usually means that the build machines libz is used instead of the one for cross compilation, due to the builder library -L path being setup incorrectly
|
||||
|
||||
* rindex(3) does not exist, but strrchr(3) is preferred anyway.
|
||||
|
||||
* <sys/termios.h> does not exist, but <termios.h> is the standard location.
|
||||
|
||||
* <sys/fcntl.h> does not exist, but <fcntl.h> is the standard location.
|
||||
|
||||
* <sys/timeb.h> does not exist (removed in POSIX 2008), but ftime(3) can be replaced with gettimeofday(2).
|
||||
|
||||
* <glob.h> does not exist, but is available through the `libandroid-glob` package.
|
||||
|
||||
* SYSV shared memory is not supported by the kernel. A `libandroid-shmem` package, which emulates SYSV shared memory on top of the [ashmem](http://elinux.org/Android_Kernel_Features#ashmem) shared memory system, is available. Use it with `LDFLAGS+=" -landroid-shmem`.
|
||||
|
||||
* SYSV semaphores is not supported by the kernel. Use unnamed POSIX semaphores instead (named semaphores are unimplemented).
|
||||
|
||||
dlopen() and RTLD_* flags
|
||||
=================================
|
||||
<dlfcn.h> declares
|
||||
|
||||
RTLD_NOW=0; RTLD_LAZY=1; RTLD_LOCAL=0; RTLD_GLOBAL=2; RTLD_NOLOAD=4; // 32-bit
|
||||
RTLD_NOW=2; RTLD_LAZY=1; RTLD_LOCAL=0; RTLD_GLOBAL=0x00100; RTLD_NOLOAD=4; // 64-bit
|
||||
|
||||
These differs from glibc ones in that
|
||||
|
||||
1. They differ in value from glibc ones, so cannot be hardcoded in files (DLFCN.py in python does this)
|
||||
2. They are missing some values (`RTLD_BINDING_MASK`, ...)
|
||||
|
||||
Android Dynamic Linker
|
||||
======================
|
||||
The Android dynamic linker is located at `/system/bin/linker` (32-bit) or `/system/bin/linker64` (64-bit). Here are source links to different versions of the linker:
|
||||
|
||||
- [Android 5.0 linker](https://android.googlesource.com/platform/bionic/+/lollipop-mr1-release/linker/linker.cpp)
|
||||
- [Android 6.0 linker](https://android.googlesource.com/platform/bionic/+/marshmallow-mr1-release/linker/linker.cpp)
|
||||
- [Android 7.0 linker](https://android.googlesource.com/platform/bionic/+/nougat-mr1-release/linker/linker.cpp)
|
||||
|
||||
Some notes about the linker:
|
||||
|
||||
- The linker warns about unused [dynamic section entries](https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html) with a `WARNING: linker: $BINARY: unused DT entry: type ${VALUE_OF_d_tag}` message.
|
||||
|
||||
- The supported types of dynamic section entries has increased over time.
|
||||
|
||||
- The Termux build system uses [termux-elf-cleaner](https://github.com/termux/termux-elf-cleaner) to strip away unused ELF entries causing the above mentioned linker warnings.
|
||||
|
||||
- Symbol versioning is supported only as of Android 6.0, so is stripped away.
|
||||
|
||||
- `DT_RPATH`, the list of directories where the linker should look for shared libraries, is not supported, so is stripped away.
|
||||
|
||||
- `DT_RUNPATH`, the same as above but looked at after `LD_LIBRARY_PATH`, is supported only from Android 7.0, so is stripped away.
|
||||
|
||||
- Symbol visibility when opening shared libraries using `dlopen()` works differently. On a normal linker, when an executable linking against a shared library libA dlopen():s another shared library libB, the symbols of libA are exposed to libB without libB needing to link against libA explicitly. This does not work with the Android linker, which can break plug-in systems where the main executable dlopen():s a plug-in which doesn't explicitly link against some shared libraries already linked to by the executable. See [the relevant NDK issue](https://github.com/android-ndk/ndk/issues/201) for more information.
|
||||
If you are interested in our weekly development sessions, please check the https://wiki.termux.com/wiki/Dev:Development_Sessions. Also, you may want to check the https://wiki.termux.com/wiki/Development.
|
||||
|
43
Rakefile
43
Rakefile
@ -1,43 +0,0 @@
|
||||
require 'rugged'
|
||||
require 'pty'
|
||||
|
||||
task default: %w[build]
|
||||
|
||||
task :build, [:options] do |t, args|
|
||||
repo = Rugged::Repository.new('.')
|
||||
commit = repo.head.target
|
||||
parent = commit.parents.first
|
||||
pkgs = commit.diff(parent).deltas.map { |d| d.new_file[:path] }
|
||||
# Split paths into arrays
|
||||
pkgs.map! { |p| Pathname.new(p).each_filename.to_a }
|
||||
# looking for [disabled-]packages/(package_name)/...
|
||||
pkgs.select! { |p| p.length > 2 and p[0] =~ /(?<disabled->)packages/ }
|
||||
# Get package_name
|
||||
pkgs.map! { |p| p[1] }
|
||||
# Remove duplicate packages
|
||||
pkgs.uniq!
|
||||
pkgs.each do |pkg|
|
||||
puts "Building #{pkg}"
|
||||
begin
|
||||
# Start blocking build loop
|
||||
PTY.spawn("./scripts/run-docker.sh ./build-package.sh #{args[:options]} #{pkg}") do |stdout, stdin, pid|
|
||||
begin
|
||||
stdout.sync
|
||||
stdout.each { |line| print line }
|
||||
rescue Errno::EIO => e
|
||||
puts e
|
||||
ensure
|
||||
::Process.wait pid
|
||||
end
|
||||
end
|
||||
rescue PTY::ChildExited => e
|
||||
puts e
|
||||
puts "Process exited"
|
||||
end
|
||||
# Exit if PTY return a non-zero code
|
||||
if $?.exitstatus != 0
|
||||
STDERR.puts("Error building #{pkg}")
|
||||
exit($?.exitstatus)
|
||||
end
|
||||
end
|
||||
end
|
29
build-all.sh
29
build-all.sh
@ -11,7 +11,7 @@ test -f $HOME/.termuxrc && . $HOME/.termuxrc
|
||||
: ${TERMUX_INSTALL_DEPS:="-s"}
|
||||
# Set TERMUX_INSTALL_DEPS to -s unless set to -i
|
||||
|
||||
_show_usage () {
|
||||
_show_usage() {
|
||||
echo "Usage: ./build-all.sh [-a ARCH] [-d] [-i] [-o DIR]"
|
||||
echo "Build all packages."
|
||||
echo " -a The architecture to build for: aarch64(default), arm, i686, x86_64 or all."
|
||||
@ -38,7 +38,7 @@ if [[ ! "$TERMUX_ARCH" =~ ^(all|aarch64|arm|i686|x86_64)$ ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
BUILDSCRIPT=`dirname $0`/build-package.sh
|
||||
BUILDSCRIPT=$(dirname $0)/build-package.sh
|
||||
BUILDALL_DIR=$TERMUX_TOPDIR/_buildall-$TERMUX_ARCH
|
||||
BUILDORDER_FILE=$BUILDALL_DIR/buildorder.txt
|
||||
BUILDSTATUS_FILE=$BUILDALL_DIR/buildstatus.txt
|
||||
@ -53,30 +53,29 @@ if [ -e $BUILDSTATUS_FILE ]; then
|
||||
echo "Continuing build-all from: $BUILDSTATUS_FILE"
|
||||
fi
|
||||
|
||||
exec > >(tee -a $BUILDALL_DIR/ALL.out)
|
||||
exec > >(tee -a $BUILDALL_DIR/ALL.out)
|
||||
exec 2> >(tee -a $BUILDALL_DIR/ALL.err >&2)
|
||||
trap "echo ERROR: See $BUILDALL_DIR/\${package}.err" ERR
|
||||
trap "echo ERROR: See $BUILDALL_DIR/\${PKG}.err" ERR
|
||||
|
||||
for package_path in `cat $BUILDORDER_FILE`; do
|
||||
package=`basename $package_path`
|
||||
while read PKG PKG_DIR; do
|
||||
# Check build status (grepping is a bit crude, but it works)
|
||||
if [ -e $BUILDSTATUS_FILE ] && grep "^$package\$" $BUILDSTATUS_FILE >/dev/null; then
|
||||
echo "Skipping $package"
|
||||
if [ -e $BUILDSTATUS_FILE ] && grep "^$PKG\$" $BUILDSTATUS_FILE >/dev/null; then
|
||||
echo "Skipping $PKG"
|
||||
continue
|
||||
fi
|
||||
|
||||
echo -n "Building $package... "
|
||||
BUILD_START=`date "+%s"`
|
||||
echo -n "Building $PKG... "
|
||||
BUILD_START=$(date "+%s")
|
||||
bash -x $BUILDSCRIPT -a $TERMUX_ARCH $TERMUX_DEBUG \
|
||||
${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS $package \
|
||||
> $BUILDALL_DIR/${package}.out 2> $BUILDALL_DIR/${package}.err
|
||||
BUILD_END=`date "+%s"`
|
||||
${TERMUX_DEBDIR+-o $TERMUX_DEBDIR} $TERMUX_INSTALL_DEPS $PKG_DIR \
|
||||
> $BUILDALL_DIR/${PKG}.out 2> $BUILDALL_DIR/${PKG}.err
|
||||
BUILD_END=$(date "+%s")
|
||||
BUILD_SECONDS=$(( $BUILD_END - $BUILD_START ))
|
||||
echo "done in $BUILD_SECONDS"
|
||||
|
||||
# Update build status
|
||||
echo "$package" >> $BUILDSTATUS_FILE
|
||||
done
|
||||
echo "$PKG" >> $BUILDSTATUS_FILE
|
||||
done<${BUILDORDER_FILE}
|
||||
|
||||
# Update build status
|
||||
rm -f $BUILDSTATUS_FILE
|
||||
|
1539
build-package.sh
1539
build-package.sh
File diff suppressed because it is too large
Load Diff
@ -6,14 +6,14 @@ TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
|
||||
termux_step_make_install() {
|
||||
mkdir -p $TERMUX_PREFIX/share/ant/lib
|
||||
mkdir -p $TERMUX_PREFIX/share/ant/lib
|
||||
|
||||
for jar in ant ant-launcher; do
|
||||
$TERMUX_DX \
|
||||
--dex \
|
||||
--output=$TERMUX_PREFIX/share/ant/lib/${jar}.jar \
|
||||
lib/${jar}.jar
|
||||
done
|
||||
for jar in ant ant-launcher; do
|
||||
$TERMUX_DX \
|
||||
--dex \
|
||||
--output=$TERMUX_PREFIX/share/ant/lib/${jar}.jar \
|
||||
lib/${jar}.jar
|
||||
done
|
||||
|
||||
install $TERMUX_PKG_BUILDER_DIR/ant $TERMUX_PREFIX/bin/ant
|
||||
perl -p -i -e "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" $TERMUX_PREFIX/bin/ant
|
||||
|
@ -5,7 +5,7 @@ TERMUX_PKG_VERSION=1.6~alpha3
|
||||
TERMUX_PKG_SHA256=2acd561ff04fc3efa4c590139ca60cfdbc93787ea80334f7448ecf466faab119
|
||||
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DPERL_EXECUTABLE=`which perl`
|
||||
-DPERL_EXECUTABLE=$(which perl)
|
||||
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
|
||||
-DCOMMON_ARCH=$TERMUX_ARCH
|
||||
-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
|
||||
|
@ -1,13 +0,0 @@
|
||||
# Disabled due to source download failing.
|
||||
|
||||
# using a snapshot tarball because blogc-0.13.0 is not ready for release yet
|
||||
# (documentation updates pending), but it is already useful and stable enough
|
||||
|
||||
TERMUX_PKG_HOMEPAGE=https://blogc.rgm.io/
|
||||
TERMUX_PKG_DESCRIPTION="A blog compiler"
|
||||
TERMUX_PKG_VERSION=0.12.0.123.acf1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_MAINTAINER="Rafael Martins @rafaelmartins"
|
||||
TERMUX_PKG_SRCURL="https://travis-distfiles.rgm.io/blogc/blogc-0.12.0.123-acf1/blogc-0.12.0.123-acf1.tar.xz"
|
||||
TERMUX_PKG_SHA256=c1885fd8d0068cb24fda899a236591af9daf492aec3601690e7d9a7badf97616
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-git-receiver --enable-make --enable-runserver --disable-tests --disable-valgrind"
|
@ -1,4 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/mholt/caddy
|
||||
TERMUX_PKG_DESCRIPTION="Fast, cross-platform HTTP/2 web server with automatic HTTPS"
|
||||
TERMUX_PKG_VERSION=0.8.0
|
||||
TERMUX_PKG_SRCURL=https://github.com/mholt/caddy/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
@ -27,7 +27,7 @@ lib_cv___va_copy=yes
|
||||
termux_step_pre_configure() {
|
||||
LDFLAGS="$LDFLAGS -llog"
|
||||
|
||||
for i in `find $TERMUX_PKG_SRCDIR/src/director -type f`; do sed 's|\bstruct user\b|struct usertest|g' -i $i; done
|
||||
for i in $(find $TERMUX_PKG_SRCDIR/src/director -type f); do sed 's|\bstruct user\b|struct usertest|g' -i $i; done
|
||||
|
||||
if [ "$TERMUX_ARCH" == "aarch64" ]; then
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+="lib_cv_va_val_copy=yes"
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Status: Termux currently uses openssl. Transitioning to libressl
|
||||
# is tempting, but on hold for now to see how widespread
|
||||
# the adoption of libressl in Linux distributions is.
|
||||
# is tempting, but on hold for now to see how widespread
|
||||
# the adoption of libressl in Linux distributions is.
|
||||
TERMUX_PKG_HOMEPAGE=http://www.libressl.org/
|
||||
TERMUX_PKG_DESCRIPTION="Library implementing the TLS protocol as well as general purpose cryptography functions"
|
||||
TERMUX_PKG_DEPENDS="ca-certificates"
|
||||
|
@ -66,7 +66,7 @@ termux_step_post_extract_package() {
|
||||
|
||||
# setup cups source dir
|
||||
file=$TERMUX_PKG_CACHEDIR/cups-$_cups_ver-source.tar.gz
|
||||
url="https://github.com/apple/cups/releases/download/v$_cups_ver/`basename $file`"
|
||||
url="https://github.com/apple/cups/releases/download/v$_cups_ver/$(basename $file)"
|
||||
termux_download $url $file ${sha256sums[8]}
|
||||
tar xf $file -C $TERMUX_PKG_SRCDIR
|
||||
}
|
||||
@ -139,7 +139,7 @@ termux_step_post_make_install() {
|
||||
|
||||
# create shell wrappers for binaries
|
||||
for binary in $TERMUX_PREFIX/$_jvm_dir/bin/*; do
|
||||
binary=`basename $binary`
|
||||
binary=$(basename $binary)
|
||||
rm -f $TERMUX_PREFIX/bin/$binary
|
||||
echo "export JAVA_HOME=\$PREFIX/$_jvm_dir" > $TERMUX_PREFIX/bin/$binary
|
||||
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$JAVA_HOME/lib:\$JAVA_HOME/lib/jli" >> $TERMUX_PREFIX/bin/$binary
|
||||
|
@ -1,22 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://racket-lang.org
|
||||
TERMUX_PKG_DESCRIPTION="Full-spectrum programming language going beyond Lisp and Scheme"
|
||||
TERMUX_PKG_VERSION=6.12
|
||||
TERMUX_PKG_SRCURL=https://mirror.racket-lang.org/installers/${TERMUX_PKG_VERSION}/racket-minimal-${TERMUX_PKG_VERSION}-src-builtpkgs.tgz
|
||||
|
||||
TERMUX_PKG_SHA256=295a422d60af2a3186a18783d033c167eeed07b936c79f404d25123a0209d683
|
||||
TERMUX_PKG_NO_DEVELSPLIT=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
TERMUX_PKG_DEPENDS="libffi, libandroid-support"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-racket=$TERMUX_PKG_HOSTBUILD_DIR/racket/racketcgc --enable-libs --disable-shared --disable-gracket --enable-libffi"
|
||||
|
||||
termux_step_host_build() {
|
||||
$TERMUX_PKG_SRCDIR/src/configure ${TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS}
|
||||
make -j $TERMUX_MAKE_PROCESSES
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CPPFLAGS+=" -I$TERMUX_PKG_SRCDIR/src/racket/include -I$TERMUX_PKG_BUILDDIR/racket"
|
||||
# Due to use of syslog.
|
||||
LDFLAGS+=" -llog"
|
||||
export TERMUX_PKG_SRCDIR=$TERMUX_PKG_SRCDIR/src
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
diff -u -r ../racket-6.6/collects/racket/system.rkt ./collects/racket/system.rkt
|
||||
--- ../racket-6.6/collects/racket/system.rkt 2016-04-15 16:33:56.000000000 -0400
|
||||
+++ ./collects/racket/system.rkt 2016-11-22 16:45:09.576844179 -0500
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
(define (shell-path/args who argstr)
|
||||
(case (system-type)
|
||||
- [(unix macosx) (append '("/bin/sh" "-c") (list argstr))]
|
||||
+ [(unix macosx) (append '("@TERMUX_PREFIX@/bin/sh" "-c") (list argstr))]
|
||||
[(windows) (let ([cmd
|
||||
(let ([d (find-system-path 'sys-dir)])
|
||||
(let ([cmd (build-path d "cmd.exe")])
|
@ -1,10 +0,0 @@
|
||||
--- ../cache/racket-6.11/src/racket/gc2/newgc.c 2017-07-07 19:13:22.000000000 +0000
|
||||
+++ ./src/racket/gc2/newgc.c 2018-01-05 05:55:28.900376813 +0000
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
+#include <strings.h>
|
||||
#include "platforms.h"
|
||||
#include "../src/schpriv.h"
|
||||
#include "gc2.h"
|
@ -1,18 +0,0 @@
|
||||
--- ../cache/racket-6.12/src/rktio/rktio_dll.c 2017-10-12 18:23:27.000000000 +0000
|
||||
+++ ./src/rktio/rktio_dll.c 2018-03-18 01:22:17.345952252 +0000
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "rktio.h"
|
||||
#include "rktio_private.h"
|
||||
+#include "scheme.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
@@ -63,7 +64,7 @@
|
||||
return dll;
|
||||
|
||||
#ifdef RKTIO_SYSTEM_UNIX
|
||||
-# if defined(__ANDROID__)
|
||||
+# if defined(__ANDROID__) && !defined(__x86_64__) && !defined(__aarch64__)
|
||||
if (!name) handle = RTLD_DEFAULT; else
|
||||
# elif defined(__CYGWIN32__)
|
||||
if (!name) { handle = RTLD_DEFAULT; null_ok = 1; } else
|
@ -1,32 +0,0 @@
|
||||
--- ../cache/racket-6.12/src/racket/sconfig.h 2017-10-12 18:23:27.000000000 +0000
|
||||
+++ ./src/racket/sconfig.h 2018-02-07 01:18:13.911569478 +0000
|
||||
@@ -124,10 +124,12 @@
|
||||
# endif
|
||||
# if defined(__x86_64__)
|
||||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "x86_64-"SPLS_LINUX
|
||||
# define REGISTER_POOR_MACHINE
|
||||
# define ASM_DBLPREC_CONTROL_87
|
||||
+#ifndef __ANDROID__
|
||||
# define MZ_TRY_EXTFLONUMS
|
||||
# endif
|
||||
+# endif
|
||||
# ifndef SCHEME_PLATFORM_LIBRARY_SUBPATH
|
||||
# define SCHEME_PLATFORM_LIBRARY_SUBPATH "unknown-"SPLS_LINUX
|
||||
# endif
|
||||
@@ -147,12 +149,16 @@
|
||||
#if defined(__i386__)
|
||||
# define MZ_USE_JIT_I386
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
+#ifndef __ANDROID__
|
||||
# define MZ_USE_DWARF_LIBUNWIND
|
||||
#endif
|
||||
+#endif
|
||||
#if defined(__x86_64__)
|
||||
# define MZ_USE_JIT_X86_64
|
||||
# define MZ_JIT_USE_MPROTECT
|
||||
+#ifndef __ANDROID__
|
||||
# define MZ_USE_DWARF_LIBUNWIND
|
||||
+#endif
|
||||
#endif
|
||||
#if defined(__powerpc__) && !defined(__powerpc64__)
|
||||
# define MZ_USE_JIT_PPC
|
@ -1,40 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.swi-prolog.org/
|
||||
TERMUX_PKG_DESCRIPTION="Comprehensive free Prolog environment"
|
||||
TERMUX_PKG_VERSION=7.3.6
|
||||
TERMUX_PKG_SRCURL=http://www.swi-prolog.org/download/devel/src/swipl-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
TERMUX_PKG_DEPENDS="readline, libgmp"
|
||||
|
||||
termux_step_host_build() {
|
||||
cp -Rf $TERMUX_PKG_SRCDIR/* .
|
||||
|
||||
# apt install libgmp-dev:i386 libncurses5-dev:i386
|
||||
./configure --host=i386-linux --disable-readline #--disable-gmp
|
||||
|
||||
if [ $TERMUX_ARCH_BITS = 32 ]; then
|
||||
# "Make sure that the native swipl has the same word-length (32/64 bits)
|
||||
# and use the native swipl for creating the boot file"
|
||||
# https://groups.google.com/forum/#!topic/swi-prolog/8lBcjb9cxuk
|
||||
find . -name Makefile | xargs perl -p -i -e 's/CFLAGS=/CFLAGS=-m32 /'
|
||||
find . -name Makefile | xargs perl -p -i -e 's/LDFLAGS=/LDFLAGS=-m32 /'
|
||||
fi
|
||||
make
|
||||
}
|
||||
|
||||
|
||||
termux_step_post_configure() {
|
||||
cp $TERMUX_PKG_HOSTBUILD_DIR/src/defatom src/
|
||||
touch -d "next hour" $TERMUX_PKG_BUILDDIR/src/defatom
|
||||
#cp $TERMUX_PKG_HOSTBUILD_DIR/{defatom,swipl} $TERMUX_PKG_BUILDDIR/src/
|
||||
|
||||
#bdir=/home/fornwall/termux/swi-prolog/src/src
|
||||
#PLARCH=arm-linux
|
||||
perl -p -i -e "s|bdir=|bdir=$TERMUX_PKG_HOSTBUILD_DIR/src/ # |" */swipl.sh
|
||||
perl -p -i -e "s|PLARCH=|PLARCH=i386-linux # |" */swipl.sh
|
||||
perl -p -i -e "s|${TERMUX_ARCH}-linux|i386-linux|" */swipl.sh
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
mv $TERMUX_PREFIX/lib/swipl-$TERMUX_PKG_VERSION/lib/${TERMUX_ARCH}-linux/libswipl.so* $TERMUX_PREFIX/lib/
|
||||
}
|
@ -1,152 +0,0 @@
|
||||
diff -u -r ../swipl-7.3.6/src/pl-dict.c ./src/pl-dict.c
|
||||
--- ../swipl-7.3.6/src/pl-dict.c 2015-08-25 05:55:13.000000000 -0400
|
||||
+++ ./src/pl-dict.c 2015-09-16 19:10:55.212457701 -0400
|
||||
@@ -113,10 +113,148 @@
|
||||
|
||||
#if (defined _GNU_SOURCE || defined __GNU__ || defined __linux__)
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <stdlib.h>
|
||||
+
|
||||
+typedef int cmp_t(void *, const void *, const void *);
|
||||
+static inline char *med3(char *, char *, char *, cmp_t *, void *);
|
||||
+static inline void swapfunc(char *, char *, int, int);
|
||||
+
|
||||
+#define min(a, b) (a) < (b) ? a : b
|
||||
+
|
||||
+/*
|
||||
+ * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
|
||||
+ */
|
||||
+#define swapcode(TYPE, parmi, parmj, n) { \
|
||||
+ long i = (n) / sizeof (TYPE); \
|
||||
+ TYPE *pi = (TYPE *) (parmi); \
|
||||
+ TYPE *pj = (TYPE *) (parmj); \
|
||||
+ do { \
|
||||
+ TYPE t = *pi; \
|
||||
+ *pi++ = *pj; \
|
||||
+ *pj++ = t; \
|
||||
+ } while (--i > 0); \
|
||||
+}
|
||||
+
|
||||
+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
|
||||
+ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
|
||||
+
|
||||
+ static inline void
|
||||
+swapfunc(char *a, char *b, int n, int swaptype)
|
||||
+{
|
||||
+ if(swaptype <= 1)
|
||||
+ swapcode(long, a, b, n)
|
||||
+ else
|
||||
+ swapcode(char, a, b, n)
|
||||
+}
|
||||
+
|
||||
+#define swap(a, b) \
|
||||
+ if (swaptype == 0) { \
|
||||
+ long t = *(long *)(a); \
|
||||
+ *(long *)(a) = *(long *)(b); \
|
||||
+ *(long *)(b) = t; \
|
||||
+ } else \
|
||||
+swapfunc(a, b, es, swaptype)
|
||||
+
|
||||
+#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
|
||||
+
|
||||
+#define CMP(t, x, y) (cmp((t), (x), (y)))
|
||||
+
|
||||
+ static inline char *
|
||||
+med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk)
|
||||
+{
|
||||
+ return CMP(thunk, a, b) < 0 ?
|
||||
+ (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
|
||||
+ :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
|
||||
+}
|
||||
+
|
||||
+void qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
|
||||
+{
|
||||
+ char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
|
||||
+ size_t d, r;
|
||||
+ int cmp_result;
|
||||
+ int swaptype, swap_cnt;
|
||||
+
|
||||
+loop: SWAPINIT(a, es);
|
||||
+ swap_cnt = 0;
|
||||
+ if (n < 7) {
|
||||
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
|
||||
+ for (pl = pm;
|
||||
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
|
||||
+ pl -= es)
|
||||
+ swap(pl, pl - es);
|
||||
+ return;
|
||||
+ }
|
||||
+ pm = (char *)a + (n / 2) * es;
|
||||
+ if (n > 7) {
|
||||
+ pl = a;
|
||||
+ pn = (char *)a + (n - 1) * es;
|
||||
+ if (n > 40) {
|
||||
+ d = (n / 8) * es;
|
||||
+ pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
|
||||
+ pm = med3(pm - d, pm, pm + d, cmp, thunk);
|
||||
+ pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
|
||||
+ }
|
||||
+ pm = med3(pl, pm, pn, cmp, thunk);
|
||||
+ }
|
||||
+ swap(a, pm);
|
||||
+ pa = pb = (char *)a + es;
|
||||
+
|
||||
+ pc = pd = (char *)a + (n - 1) * es;
|
||||
+ for (;;) {
|
||||
+ while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
|
||||
+ if (cmp_result == 0) {
|
||||
+ swap_cnt = 1;
|
||||
+ swap(pa, pb);
|
||||
+ pa += es;
|
||||
+ }
|
||||
+ pb += es;
|
||||
+ }
|
||||
+ while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
|
||||
+ if (cmp_result == 0) {
|
||||
+ swap_cnt = 1;
|
||||
+ swap(pc, pd);
|
||||
+ pd -= es;
|
||||
+ }
|
||||
+ pc -= es;
|
||||
+ }
|
||||
+ if (pb > pc)
|
||||
+ break;
|
||||
+ swap(pb, pc);
|
||||
+ swap_cnt = 1;
|
||||
+ pb += es;
|
||||
+ pc -= es;
|
||||
+ }
|
||||
+ if (swap_cnt == 0) { /* Switch to insertion sort */
|
||||
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
|
||||
+ for (pl = pm;
|
||||
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
|
||||
+ pl -= es)
|
||||
+ swap(pl, pl - es);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ pn = (char *)a + n * es;
|
||||
+ r = min(pa - (char *)a, pb - pa);
|
||||
+ vecswap(a, pb - r, r);
|
||||
+ r = min(pd - pc, pn - pd - es);
|
||||
+ vecswap(pb, pn - r, r);
|
||||
+ if ((r = pb - pa) > es)
|
||||
+ qsort_r(a, r / es, es, thunk, cmp);
|
||||
+ if ((r = pd - pc) > es) {
|
||||
+ /* Iterate rather than recurse to save stack space */
|
||||
+ a = pn - r;
|
||||
+ n = r / es;
|
||||
+ goto loop;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+# else
|
||||
typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
|
||||
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
|
||||
__compar_d_fn_t __compar, void *__arg)
|
||||
__nonnull ((1, 4));
|
||||
+#endif
|
||||
|
||||
#endif
|
||||
|
@ -1,55 +0,0 @@
|
||||
diff -u -r ../swipl-7.3.6/src/configure ./src/configure
|
||||
--- ../swipl-7.3.6/src/configure 2015-08-25 05:55:30.000000000 -0400
|
||||
+++ ./src/configure 2015-09-16 17:52:41.545729451 -0400
|
||||
@@ -9372,51 +9372,7 @@
|
||||
done
|
||||
|
||||
|
||||
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread support for cpu clocks" >&5
|
||||
-$as_echo_n "checking for pthread support for cpu clocks... " >&6; }
|
||||
-if test "$cross_compiling" = yes; then :
|
||||
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
|
||||
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
|
||||
-as_fn_error $? "cannot run test program while cross compiling
|
||||
-See \`config.log' for more details" "$LINENO" 5; }
|
||||
-else
|
||||
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
-/* end confdefs.h. */
|
||||
-
|
||||
-#include <stdio.h>
|
||||
-#include <pthread.h>
|
||||
-#include <time.h>
|
||||
-#include <stdlib.h>
|
||||
-#define ts2d(ts) \
|
||||
- ((double)(ts).tv_sec + (double)(ts).tv_nsec/(double)1000000000.0)
|
||||
-main()
|
||||
-{
|
||||
- clockid_t clock_id;
|
||||
- struct timespec ts = {1,1};
|
||||
- if ( pthread_getcpuclockid(pthread_self(), &clock_id) != 0 )
|
||||
- { perror("pthread_getcpuclockid");
|
||||
- exit(1);
|
||||
- }
|
||||
- sleep(1);
|
||||
- if ( clock_gettime(clock_id, &ts) != 0 )
|
||||
- { perror("clock_gettime");
|
||||
- exit(1);
|
||||
- }
|
||||
- fprintf(stderr, "Used %f sec\n", ts2d(ts));
|
||||
- exit (ts.tv_sec == 0 ? 0 : 1);
|
||||
-}
|
||||
-_ACEOF
|
||||
-if ac_fn_c_try_run "$LINENO"; then :
|
||||
ac_pthread_cpuclocks="yes"
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
-$as_echo "yes" >&6; }
|
||||
-else
|
||||
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
-$as_echo "no" >&6; }
|
||||
-fi
|
||||
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
|
||||
- conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
-fi
|
||||
|
||||
|
||||
if test "x$ac_pthread_cpuclocks" = "xyes"; then
|
@ -4,7 +4,7 @@ TERMUX_PKG_DESCRIPTION="Dungeon crawling game, fork of NetHack"
|
||||
TERMUX_PKG_VERSION=5.1.0
|
||||
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/unnethack/unnethack/${TERMUX_PKG_VERSION}/unnethack-${TERMUX_PKG_VERSION}-20131208.tar.gz
|
||||
# --with-owner=$USER to avoid unnethack trying to use a "games" user, --with-groups to avoid "bin" group
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-owner=$USER --with-group=`groups | cut -d ' ' -f 1`"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-owner=$USER --with-group=$(groups | cut -d ' ' -f 1)"
|
||||
TERMUX_PKG_DEPENDS="gsl, ncurses"
|
||||
|
||||
# unnethack builds util/{makedefs,lev_comp,dgn_comp} binaries which are later used during the build.
|
||||
|
169
docs/BUILD.md
Normal file
169
docs/BUILD.md
Normal file
@ -0,0 +1,169 @@
|
||||
# Build Documentation
|
||||
|
||||
This document is intended to describe how to build a package.
|
||||
|
||||
## Flow of a Build
|
||||
|
||||
### Basics
|
||||
|
||||
Package build flow is controlled by script [build-package.sh](../build-package.sh) and is split into the following stages:
|
||||
|
||||
1. Read `packages/$PKG/build.sh` to obtain package metadata (e.g. version, description, dependencies), URLs for source code and steps to build package.
|
||||
|
||||
2. Extract the archives with source code into `$HOME/.termux-build/$PKG/src`. This step is not performed when `TERMUX_PKG_SKIP_SRC_EXTRACT` is set.
|
||||
|
||||
3. Build package for the host. This step is performed only when `TERMUX_PKG_HOSTBUILD` is set.
|
||||
|
||||
4. Set up a standalone Android NDK toolchain and patch NDK sysroot from patches located in [ndk-patches](../ndk-patches) directory. This step performed only one time per each architecture.
|
||||
|
||||
5. Search for patches in `packages/$TERMUX_PKG_NAME/*.patch` and apply them.
|
||||
|
||||
6. Build the package under directory `$HOME/.termux-build/$PKG/build`. If `TERMUX_PKG_BUILD_IN_SRC` is set, then build will be done in directory `$HOME/.termux-build/$PKG/src`.
|
||||
|
||||
7. Install built stuff into `$TERMUX_PREFIX`.
|
||||
|
||||
8. Find modified files in `$TERMUX_PREFIX` and extract them into `$HOME/.termux-build/$PKG/massage`.
|
||||
|
||||
9. Perform "massage" on files in `$HOME/.termux-build/$PKG/massage`. For example, split files between subpackages.
|
||||
|
||||
10. Create a debian archive file that is ready for distribution.
|
||||
|
||||
### Details Table
|
||||
|
||||
| Order | Function Name | Overridable | Description |
|
||||
| -----:|:-------------:| -----------:|:----------- |
|
||||
| 0.1 | `termux_error_exit` | no | Stop script and output error. |
|
||||
| 0.2 | `termux_download` | no | Utility function to download any file. |
|
||||
| 0.3 | `termux_setup_golang` | no | Setup Go Build environment. |
|
||||
| 0.4 | `termux_setup_rust` | no | Setup Cargo Build. |
|
||||
| 0.5 | `termux_setup_ninja` | no | Setup Ninja make system. |
|
||||
| 0.6 | `termux_setup_meson` | no | Setup Meson configure system. |
|
||||
| 0.7 | `termux_setup_cmake` | no | Setup CMake configure system. |
|
||||
| 1 | `termux_step_handle_arguments` | no | Handle command line arguments. |
|
||||
| 2 | `termux_step_setup_variables` | no | Setup essential variables like directory locations and flags. |
|
||||
| 3 | `termux_step_handle_buildarch` | no | Determines architecture to build for. |
|
||||
| 4 | `termux_step_get_repo_files` | no | Install dependencies if `-i` option supplied. |
|
||||
| 4.1 | `termux_download_deb` | no | Download packages for installation |
|
||||
| 5 | `termux_step_start_build` | no | Setup directories and files required. Read `build.sh` for variables. |
|
||||
| 6 | `termux_step_extract_package` | yes | Download source package. |
|
||||
| 7 | `termux_step_post_extract_package` | yes | Hook to run commands before host builds. |
|
||||
| 8 | `termux_step_handle_host_build` | yes | Determine whether a host build is required. |
|
||||
| 8.1 | `termux_step_host_build` | yes | Conduct a host build. |
|
||||
| 9 | `termux_step_setup_toolchain` | no | Setup C Toolchain from Android NDK. |
|
||||
| 10 | `termux_step_patch_package` | no | Patch all `*.patch` files as specified in the package directory. |
|
||||
| 11 | `termux_step_replace_guess_scripts` | no | Replace `config.sub` and `config.guess` scripts. |
|
||||
| 12 | `termux_step_pre_configure` | yes | Hook to run commands before configures. |
|
||||
| 13 | `termux_step_configure` | yes | Determine the configure method. |
|
||||
| 13.1 | `termux_step_configure_autotools` | no | Run `configure` by GNU Autotools. |
|
||||
| 13.2 | `termux_step_configure_cmake` | no | Run `cmake`. |
|
||||
| 13.3 | `termux_step_configure_meson` | no | Run `meson`. |
|
||||
| 14 | `termux_step_post_configure` | yes | Hook to run commands before make. |
|
||||
| 15 | `termux_step_make` | yes | Make the package. |
|
||||
| 16 | `termux_step_make_install` | yes | Install the package. |
|
||||
| 17 | `termux_step_post_make_install` | yes | Hook before extraction. |
|
||||
| 18 | `termux_step_extract_into_massagedir` | no with `make_install` | Extracts installed files. |
|
||||
| 19 | `termux_step_massage` | no | Remove unusable files. |
|
||||
| 19.1 | `termux_create_subpackages` | no | Creates all subpackages. |
|
||||
| 20 | `termux_step_post_massage` | yes | Final hook before packaging. |
|
||||
| 21 | `termux_step_create_datatar` | no | Archive package files. |
|
||||
| 22 | `termux_step_create_debfile` | no | Create package. |
|
||||
| 22.1 | `termux_step_create_debscripts` | yes | Create additional Debian package files. |
|
||||
| 23 | `termux_step_compare_debfiles` | no | Compare packages if `-i` option is specified. |
|
||||
| 24 | `termux_step_finish_build` | no | Notification of finish. |
|
||||
|
||||
Order specifies function sequence. 0 order specifies utility functions.
|
||||
|
||||
Suborder specifies a function triggered by the main function. Functions with different suborders are not executed simultaneously.
|
||||
|
||||
For more detailed descriptiom on each step, you can read [build-package.sh](../build-package.sh)
|
||||
|
||||
## Normal Build Process
|
||||
|
||||
Remarks: Software Developers should provide build instructions either in README or INSTALL files. Otherwise good luck trying how to build :joy:.
|
||||
|
||||
Follow the instructions until you get a working build. If a build succeeds after any step, skip the remaining steps.
|
||||
|
||||
1. Create a `build.sh` file using the [sample package template](sample/build.sh).
|
||||
|
||||
2. Create a `subpackage.sh` for each subpackage using the [sample package template](sample/subpackage.sh).
|
||||
|
||||
3. Run `./build-package.sh $PKG` to see what errors are found.
|
||||
|
||||
4. If any steps complain about an error line, first copy the file to another directory.
|
||||
|
||||
5. Edit the original file.
|
||||
|
||||
6. When tests succeed for the file, create a patch by `diff -u <original> <new> > packages/<pkg>/<filename>.patch`
|
||||
|
||||
7. Repeat steps 4-6 for each error file.
|
||||
|
||||
8. If extra configuration or make arguments are needed, specify in `build.sh` as shown in sample package.
|
||||
|
||||
9. (optional but appreciated) Test the package by yourself.
|
||||
|
||||
## Common Porting Problems
|
||||
|
||||
- Most programs expect that target is [FHS](https://uk.wikipedia.org/wiki/Filesystem_Hierarchy_Standard) compliant. They have hardcoded paths like `/etc`, `/bin`, `/usr/share`, `/tmp` which are not available in Termux at standard locations but only in `$TERMUX_PREFIX`.
|
||||
|
||||
- The Android bionic libc does not have iconv and gettext/libintl functionality built in. A `libandroid-support` package contains these and may be used by all packages.
|
||||
|
||||
- "error: z: no archive symbol table (run ranlib)" usually means that the build machine's libz is used instead of the one for cross-compilation due to the builder library -L path being setup incorrectly.
|
||||
|
||||
- rindex(3) does not exist, but strrchr(3) is preferred anyway.
|
||||
|
||||
- <sys/termios.h> does not exist, but <termios.h> is the standard location.
|
||||
|
||||
- <sys/fcntl.h> does not exist, but <fcntl.h> is the standard location.
|
||||
|
||||
- <sys/timeb.h> does not exist (removed in POSIX 2008), but ftime(3) can be replaced with gettimeofday(2).
|
||||
|
||||
- <glob.h> does not exist, but is available through the `libandroid-glob` package.
|
||||
|
||||
- SYSV shared memory is not supported by the kernel. A `libandroid-shmem` package, which emulates SYSV shared memory on top of the [ashmem](http://elinux.org/Android_Kernel_Features#ashmem) shared memory system, is available. Use it with `LDFLAGS+=" -landroid-shmem`.
|
||||
|
||||
- SYSV semaphores is not supported by the kernel. Use unnamed POSIX semaphores instead (named semaphores are unimplemented).
|
||||
|
||||
- Starting from Android 8, a [Seccomp](https://android-developers.googleblog.com/2017/07/seccomp-filter-in-android-o.html) was enabled for applications. Seccomp forbids usage of some system calls which results in crash with `Bad system call` errors.
|
||||
|
||||
- Starting from Android 8, programs cannot use `tcsetattr()` with `TCSAFLUSH` parameter due to SELinux. Use `TCSANOW` instead.
|
||||
|
||||
- Starting from Android 9, [Seccomp](https://android-developers.googleblog.com/2017/07/seccomp-filter-in-android-o.html) began to block `setuid()`-related system calls. Since Termux is primarily for single-user non-root usage, setuid/setgid functionality is discouraged anyway.
|
||||
|
||||
### dlopen() and RTLD_* flags
|
||||
|
||||
<dlfcn.h> declares
|
||||
```C
|
||||
RTLD_NOW=0; RTLD_LAZY=1; RTLD_LOCAL=0; RTLD_GLOBAL=2; RTLD_NOLOAD=4; // 32-bit
|
||||
RTLD_NOW=2; RTLD_LAZY=1; RTLD_LOCAL=0; RTLD_GLOBAL=0x00100; RTLD_NOLOAD=4; // 64-bit
|
||||
```
|
||||
These differs from glibc ones in that
|
||||
|
||||
1. They differ in value from glibc ones, so cannot be hardcoded in files (DLFCN.py in python does this)
|
||||
|
||||
2. They are missing some values (`RTLD_BINDING_MASK`, ...)
|
||||
|
||||
### Android Dynamic Linker
|
||||
|
||||
The Android dynamic linker is located at `/system/bin/linker` (32-bit) or `/system/bin/linker64` (64-bit). Here are source links to different versions of the linker:
|
||||
|
||||
- [Android 5.0 linker](https://android.googlesource.com/platform/bionic/+/lollipop-mr1-release/linker/linker.cpp)
|
||||
|
||||
- [Android 6.0 linker](https://android.googlesource.com/platform/bionic/+/marshmallow-mr1-release/linker/linker.cpp)
|
||||
|
||||
- [Android 7.0 linker](https://android.googlesource.com/platform/bionic/+/nougat-mr1-release/linker/linker.cpp)
|
||||
|
||||
Some notes about the linker:
|
||||
|
||||
- The linker warns about unused [dynamic section entries](https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-42444.html) with a `WARNING: linker: $BINARY: unused DT entry: type ${VALUE_OF_d_tag}` message.
|
||||
|
||||
- The supported types of dynamic section entries have increased over time.
|
||||
|
||||
- The Termux build system uses [termux-elf-cleaner](https://github.com/termux/termux-elf-cleaner) to strip away unused ELF entries causing the above mentioned linker warnings.
|
||||
|
||||
- Symbol versioning is supported only as of Android 6.0, so is stripped away.
|
||||
|
||||
- `DT_RPATH`, the list of directories where the linker should look for shared libraries is not supported, so is stripped away.
|
||||
|
||||
- `DT_RUNPATH`, the same as above but looked at after `LD_LIBRARY_PATH`, is supported only from Android 7.0, so is stripped away.
|
||||
|
||||
- Symbol visibility when opening shared libraries using `dlopen()` works differently. On a normal linker, when an executable linking against a shared library libA dlopen():s another shared library libB, the symbols of libA are exposed to libB without libB needing to link against libA explicitly. This does not work with the Android linker, which can break plug-in systems where the main executable dlopen():s a plug-in which doesn't explicitly link against some shared libraries already linked to by the executable. See [the relevant NDK issue](https://github.com/android-ndk/ndk/issues/201) for more information.
|
39
docs/DOCKER.md
Normal file
39
docs/DOCKER.md
Normal file
@ -0,0 +1,39 @@
|
||||
# Build Environment Documentation
|
||||
|
||||
This document is inteneded to describe how to set up a build environment.
|
||||
|
||||
Builds are run on Ubuntu installations.
|
||||
|
||||
## Docker
|
||||
|
||||
For most people the best way to obtain an environment for building packages is by using Docker. This should work everywhere Docker is supported (replace `/` with `\` if using Windows) and ensures an up to date build environment that is tested by other package builders.
|
||||
|
||||
Run the following script to setup a container (from an image created by [scripts/Dockerfile](../scripts/Dockerfile)) suitable for building packages:
|
||||
```Shell
|
||||
./scripts/run-docker.sh
|
||||
```
|
||||
This source folder is mounted as the `/root/termux-packages` data volume, so changes are kept in sync between the host and the container when trying things out before committing, and built deb files will be available on the host in the `debs/` directory just as when building on the host.
|
||||
|
||||
The docker container used for building packages is a Ubuntu installation with necessary packages pre-installed. The default user is a non-root user to avoid problems with package builds modifying the system by mistake, but `sudo` can be used to install additional Ubuntu packages to be used during development.
|
||||
|
||||
Build commands can be given to be executed in the docker container directly:
|
||||
```Shell
|
||||
./scripts/run-docker.sh ./build-package.sh libandroid-support
|
||||
```
|
||||
will launch the docker container, execute the `./build-package.sh libandroid-support` command inside it and afterwards return you to the host prompt, with the newly built deb in `debs/` to try out.
|
||||
|
||||
For Windows users, there is also a PowerShell script available to start the docker. Run with (be aware of backslashes and normal slashes):
|
||||
```PowerShell
|
||||
.\scripts\run-docker.ps1 ./build-package.sh libandroid-support
|
||||
```
|
||||
Note that building packages can take up a lot of space (especially if `build-all.sh` is used to build all packages) and you may need to [increase the base device size](http://www.projectatomic.io/blog/2016/03/daemon_option_basedevicesize/) if running with a storage driver using a small base size of 10 GB.
|
||||
|
||||
## Ubuntu PC
|
||||
|
||||
If you can't run Docker you can use a Ubuntu 18.10 installation (either by installing a virtual maching guest or on direct hardware) by using the below scripts:
|
||||
|
||||
- Run `scripts/setup-ubuntu.sh` to install required packages and setup the `/data/` folder.
|
||||
|
||||
- Run `scripts/setup-android-sdk.sh` to install the Android SDK and NDK at `$HOME/lib/android-{sdk,ndk}`.
|
||||
|
||||
There is also a [Vagrantfile](../scripts/Vagrantfile) available as a shortcut for setting up an Ubuntu installation with the above steps applied.
|
57
docs/FORMAT.md
Normal file
57
docs/FORMAT.md
Normal file
@ -0,0 +1,57 @@
|
||||
# Formatting Guidelines
|
||||
|
||||
All files should adhere to these formatting guidelines.
|
||||
|
||||
## Shell Script Formatting
|
||||
|
||||
- All `build.sh` files should be set to `644` permission.
|
||||
|
||||
- All scripts should use tabs rather than spaces.
|
||||
|
||||
- All parantheses of shell functions should not be preceded with a space.
|
||||
|
||||
- Avoid trailing spaces and tabs.
|
||||
|
||||
- Avoid usage of non utf-8 encoding.
|
||||
|
||||
- Comments should be compact. Do not tab them if not necessary.
|
||||
|
||||
## Shell Script Coding Practices
|
||||
|
||||
- Do not define global scope variables if not necessary.
|
||||
|
||||
- Do not export variables if not necessary.
|
||||
|
||||
- Custom variables in build.sh scripts should be defined inside functions. If you need a "global scope" variable at build time, just define it in `termux_step_pre_configure()`. If you still need to define variable outside of function, make sure that it does not use command or process substitution.
|
||||
|
||||
- Dollar parentheses `$()` rather than backticks ``` `` ``` should be employed in command substitution.
|
||||
|
||||
- Usage of `sudo` or `su` in build scripts is disallowed.
|
||||
|
||||
- Utility `install` is preferred over `cp` as the file installation program.
|
||||
|
||||
- Do not hardcode version numbers. Instead, use the `$TERMUX_PKG_VERSION` and `$TERMUX_PKG_REVISION` variables.
|
||||
|
||||
- Do not hardcode Termux prefix directory. Instead, use the `$TERMUX_PREFIX` variable.
|
||||
|
||||
- Do not hardcode Termux home directory. Instead, use the `$TERMUX_ANDROID_HOME` variable.
|
||||
|
||||
## Markdown Formatting
|
||||
|
||||
- All `filenames` should be under code formatting, unless they are links.
|
||||
|
||||
- All titles should be indented with hashes rather than equal signs.
|
||||
|
||||
- All unnumbered lists should be indented with hyphens.
|
||||
|
||||
- All Markdown should be edited on alternate line.
|
||||
|
||||
- All Markdown should use tabs rather than spaces.
|
||||
|
||||
- All `.md` should be set to `644` permission.
|
||||
|
||||
- All special characters should be escaped.
|
||||
|
||||
- All names of `.md` should be capitalised.
|
||||
|
||||
- All code blocks should be enclosed in backticks, with language specified.
|
11
docs/RESOURCES.md
Normal file
11
docs/RESOURCES.md
Normal file
@ -0,0 +1,11 @@
|
||||
# External Resources Links
|
||||
|
||||
- [Android changes for NDK developers](https://android.googlesource.com/platform/bionic/+/master/android-changes-for-ndk-developers.md)
|
||||
|
||||
- [Linux From Scratch](http://www.linuxfromscratch.org/lfs/view/stable/)
|
||||
|
||||
- [Beyond Linux From Scratch](http://www.linuxfromscratch.org/blfs/view/stable/)
|
||||
|
||||
- [OpenWrt](https://openwrt.org/) as an embedded Linx distribution contains [patches and build scripts](https://dev.openwrt.org/browser/packages)
|
||||
|
||||
- [Kivy recipes](https://github.com/kivy/python-for-android/tree/master/pythonforandroid/recipes) contains recipes for building packages for Android.
|
15
docs/UTILITIES.md
Normal file
15
docs/UTILITIES.md
Normal file
@ -0,0 +1,15 @@
|
||||
# Additional Utilities List
|
||||
|
||||
The following utility scripts are available:
|
||||
|
||||
- [build-all.sh](../build-all.sh): used for building all packages in the correct order (using buildorder.py).
|
||||
|
||||
- [clean.sh](../clean.sh): used for cleaning build environment.
|
||||
|
||||
- [scripts/check-pie.sh](../scripts/check-pie.sh): used for verifying that all binaries are using PIE, which is required for Android 5+.
|
||||
|
||||
- [scripts/check-versions.sh](../scripts/check-versions.sh): used for checking for package updates.
|
||||
|
||||
- [scripts/list-packages.sh](../scripts/list-packages.sh): used for listing all packages with a one-line summary.
|
||||
|
||||
- [scripts/ci/gitlab.sh](../scripts/ci/gitlab.sh): used by Gitlab Continuous Integration to identify changed packages and build them.
|
53
docs/sample/build.sh
Normal file
53
docs/sample/build.sh
Normal file
@ -0,0 +1,53 @@
|
||||
# Sample build.sh for all packages.
|
||||
# All comments here to be removed before submitting pull requests.
|
||||
# Unless otherwise specified, variables are optional.
|
||||
# Default values of all variables are found in build-package.sh
|
||||
|
||||
# IMPORTANT: build.sh script should not execute commands that
|
||||
# require superuser (su/sudo) privileges or modify files outside
|
||||
# of build directories.
|
||||
|
||||
# Core information about package.
|
||||
TERMUX_PKG_HOMEPAGE= # REQUIRED. The homepage of a package.
|
||||
TERMUX_PKG_DESCRIPTION= # REQUIRED. A brief description of the package. Should not be long and/or multiline.
|
||||
TERMUX_PKG_LICENSE= # REQUIRED. The license of the package.
|
||||
TERMUX_PKG_MAINTAINER= # Usually kept as Fredrik Fornwall.
|
||||
TERMUX_PKG_API_LEVEL= # Minimal required Android API Level to run this package.
|
||||
TERMUX_PKG_VERSION= # Version of package by original developer.
|
||||
TERMUX_PKG_REVISION= # Bump after a fix within Termux.
|
||||
TERMUX_PKG_SRCURL= # The URL of source archive.
|
||||
TERMUX_PKG_SHA256= # REQUIRED if URL is specified. Prevents unauthorised changes during download.
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT= # Set if no need to extract downloaded sources.
|
||||
TERMUX_PKG_DEPENDS= # Runtime dependencies.
|
||||
TERMUX_PKG_DEVPACKAGE_DEPENDS= # Header files dependencies.
|
||||
TERMUX_PKG_BUILD_DEPENDS= # Build-time dependencies.
|
||||
|
||||
# Package relationships.
|
||||
TERMUX_PKG_BREAKS= # Packages that the package will break.
|
||||
TERMUX_PKG_CONFLICTS= # Conflicted packages. All users with conflicted packages installed will not be able to install this package.
|
||||
TERMUX_PKG_REPLACES= # Packages that are not required anymore with this package.
|
||||
TERMUX_PKG_PROVIDES= # Specifies virtual packages. Used primarily by secondary Termux repositories.
|
||||
TERMUX_PKG_RECOMMENDS= # Packages that are recommended to be installed in addition.
|
||||
TERMUX_PKG_SUGGESTS= # Packages that may be installed in addition.
|
||||
TERMUX_PKG_ESSENTIAL= # Marks package as essential. User will not be able to freely uninstall it so potential system breakage will be prevented.
|
||||
|
||||
# Build configuration.
|
||||
TERMUX_PKG_BUILD_IN_SRC= # Whether builds are done in source.
|
||||
TERMUX_PKG_NO_DEVELSPLIT= # Prevent splitting into dev package.
|
||||
TERMUX_PKG_HAS_DEBUG= # Whether debug builds are possible.
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT= # Whether package is cross-platform (e.g. shell, java or python).
|
||||
TERMUX_PKG_BLACKLISTED_ARCHES= # CPU architectures where the package could not be built.
|
||||
TERMUX_PKG_HOSTBUILD= # Whether host builds are done (default:no).
|
||||
TERMUX_PKG_FORCE_CMAKE= # Force using CMake even if configure or other GNU Automake files are present.
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS= # Extra arguments passed to configuration utility.
|
||||
TERMUX_PKG_EXTRA_HOSTBUILD_CONFIGURE_ARGS= # Extra arguments passed to configuration utility during the host build.
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS= # Extra arguments for make.
|
||||
TERMUX_PKG_MAKE_INSTALL_TARGET= # Installation target equivalent to make install.
|
||||
|
||||
# Post-install steps configuration.
|
||||
TERMUX_PKG_INCLUDE_IN_DEVPACKAGE= # Files that are included in development package in addition to headers.
|
||||
TERMUX_PKG_KEEP_STATIC_LIBRARIES= # Whether static libraries are kept.
|
||||
TERMUX_PKG_KEEP_INFOPAGES= # Whether share/info files are kept.
|
||||
TERMUX_PKG_KEEP_SHARE_DOC= # Whether share/doc files are kept.
|
||||
TERMUX_PKG_RM_AFTER_INSTALL= # Remove specified files after 'make install' or equivalent.
|
||||
TERMUX_PKG_CONFFILES= # Package configuration files. These files will not be overwritten on package update if modified by user.
|
12
docs/sample/subpackage.sh
Normal file
12
docs/sample/subpackage.sh
Normal file
@ -0,0 +1,12 @@
|
||||
# Sample subpackage.sh
|
||||
# All comments here to be removed before submitting pull requests.
|
||||
# Unless otherwise specified, variables are optional.
|
||||
# Default values of all variables are found in build-package.sh
|
||||
|
||||
TERMUX_SUBPKG_DESCRIPTION= # REQUIRED. Subpackage description.
|
||||
TERMUX_SUBPKG_DEPENDS= # Subpackage dependencies.
|
||||
TERMUX_SUBPKG_CONFLICTS= # Conflicted subpackages.
|
||||
TERMUX_SUBPKG_REPLACES= # Replaced packages.
|
||||
TERMUX_SUBPKG_PLATFORM_INDEPENDENT= # Whether subpackage is cross-platform.
|
||||
TERMUX_SUBPKG_INCLUDE= # REQUIRED. Files to be included in subpackage.
|
||||
TERMUX_SUBPKG_CONFFILES= # Subpackage configuration files.
|
@ -1,14 +0,0 @@
|
||||
--- /home/builder/cstddef.orig 2017-07-15 01:17:10.637496279 +0000
|
||||
+++ ./cstddef 2017-07-15 10:28:28.526713523 +0000
|
||||
@@ -40,7 +40,11 @@
|
||||
#endif
|
||||
|
||||
// Don't include our own <stddef.h>; we don't want to declare ::nullptr_t.
|
||||
+#ifdef __clang__
|
||||
#include_next <stddef.h>
|
||||
+#else
|
||||
+#include "../../../lib/gcc/@TERMUX_HOST_PLATFORM@/4.9.x/include/stddef.h"
|
||||
+#endif
|
||||
#include <__nullptr>
|
||||
|
||||
_LIBCPP_BEGIN_NAMESPACE_STD
|
@ -74,8 +74,6 @@ static int getifaddrs(struct ifaddrs **ifap);
|
||||
static void freeifaddrs(struct ifaddrs *ifa);
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@ -605,3 +603,5 @@ static void freeifaddrs(struct ifaddrs *ifa)
|
||||
free(l_cur);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/linux/fcntl.h ./usr/include/linux/fcntl.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/linux/fcntl.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/linux/fcntl.h 2017-11-15 11:49:10.709710452 +0100
|
||||
@@ -40,6 +40,12 @@
|
||||
diff -uNr sysroot.orig/usr/include/linux/fcntl.h sysroot/usr/include/linux/fcntl.h
|
||||
--- sysroot.orig/usr/include/linux/fcntl.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/linux/fcntl.h 2019-03-20 13:22:32.823142545 +0000
|
||||
@@ -50,6 +50,12 @@
|
||||
#define DN_ATTRIB 0x00000020
|
||||
#define DN_MULTISHOT 0x80000000
|
||||
#define AT_FDCWD - 100
|
||||
|
@ -1,19 +0,0 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h ./usr/include/pty.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/pty.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/pty.h 2017-11-15 11:52:53.115077179 +0100
|
||||
@@ -36,12 +36,9 @@
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
-
|
||||
-#if __ANDROID_API__ >= 23
|
||||
-int openpty(int* __master_fd, int* __slave_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr) __INTRODUCED_IN(23);
|
||||
-int forkpty(int* __master_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr) __INTRODUCED_IN(23);
|
||||
-#endif /* __ANDROID_API__ >= 23 */
|
||||
-
|
||||
+/* In Termux these are implemented in the libutil package to support android-21. */
|
||||
+int openpty(int* __master_fd, int* __slave_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr);
|
||||
+int forkpty(int* __master_fd, char* __slave_name, const struct termios* __termios_ptr, const struct winsize* __winsize_ptr);
|
||||
|
||||
__END_DECLS
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/include/pwd.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h 2017-06-20 17:41:56.000000000 +0200
|
||||
+++ ./usr/include/pwd.h 2017-06-26 11:45:26.036064547 +0200
|
||||
@@ -89,7 +91,6 @@
|
||||
diff -uNr sysroot.orig/usr/include/pwd.h sysroot/usr/include/pwd.h
|
||||
--- sysroot.orig/usr/include/pwd.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/pwd.h 2019-03-20 13:26:24.283060011 +0000
|
||||
@@ -89,13 +89,58 @@
|
||||
struct passwd* getpwent(void) __INTRODUCED_IN(26);
|
||||
|
||||
void setpwent(void) __INTRODUCED_IN(26);
|
||||
@ -9,11 +9,9 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/includ
|
||||
#endif /* __ANDROID_API__ >= 26 */
|
||||
|
||||
|
||||
@@ -97,6 +98,52 @@
|
||||
|
||||
int getpwnam_r(const char* __name, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
|
||||
int getpwuid_r(uid_t __uid, struct passwd* __pwd, char* __buf, size_t __n, struct passwd** __result) __INTRODUCED_IN(12);
|
||||
+
|
||||
|
||||
+int access(const char* __path, int __mode);
|
||||
+
|
||||
+static void android_setup_pwd(struct passwd* pw) {
|
||||
@ -59,6 +57,7 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/pwd.h ./usr/includ
|
||||
+#define getpwuid android_polyfill_getpwuid
|
||||
+#define getpwuid_r android_polyfill_getpwuid_r
|
||||
+static void endpwent(void) { /* Do nothing. */ }
|
||||
|
||||
+
|
||||
__END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/include/stdio.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/stdio.h 2017-11-15 11:57:58.567432093 +0100
|
||||
@@ -44,6 +44,9 @@
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/stdio.h 2017-11-15 11:57:58.567432093 +0100
|
||||
@@ -44,11 +44,12 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
@ -10,9 +10,14 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/incl
|
||||
+
|
||||
#include <bits/seek_constants.h>
|
||||
|
||||
#if __ANDROID_API__ < __ANDROID_API_N__
|
||||
@@ -167,7 +170,7 @@
|
||||
__warnattr_strict("vsprintf is often misused; please use vsnprintf");
|
||||
-#if __ANDROID_API__ < __ANDROID_API_N__
|
||||
#include <bits/struct_file.h>
|
||||
-#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -165,7 +166,7 @@
|
||||
__printflike(2, 0) __warnattr_strict("vsprintf is often misused; please use vsnprintf");
|
||||
char* tmpnam(char* __s)
|
||||
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
|
||||
-#define P_tmpdir "/tmp/" /* deprecated */
|
||||
@ -20,7 +25,7 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/incl
|
||||
char* tempnam(const char* __dir, const char* __prefix)
|
||||
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
|
||||
|
||||
@@ -242,8 +245,6 @@
|
||||
@@ -241,8 +242,6 @@
|
||||
FILE* freopen64(const char* __path, const char* __mode, FILE* __fp) __INTRODUCED_IN(24);
|
||||
#endif /* __ANDROID_API__ >= 24 */
|
||||
|
||||
@ -29,7 +34,7 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/incl
|
||||
#if __ANDROID_API__ >= 24
|
||||
FILE* tmpfile64(void) __INTRODUCED_IN(24);
|
||||
#endif /* __ANDROID_API__ >= 24 */
|
||||
@@ -259,10 +260,15 @@
|
||||
@@ -256,10 +255,15 @@
|
||||
|
||||
#define L_ctermid 1024 /* size for ctermid() */
|
||||
|
||||
@ -48,7 +53,7 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdio.h ./usr/incl
|
||||
|
||||
FILE* fdopen(int __fd, const char* __mode);
|
||||
int fileno(FILE* __fp);
|
||||
@@ -310,6 +316,29 @@
|
||||
@@ -328,6 +332,29 @@
|
||||
#include <bits/fortify/stdio.h>
|
||||
#endif
|
||||
|
||||
|
@ -1,15 +1,15 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/stdlib.h ./usr/include/stdlib.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/stdlib.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/stdlib.h 2017-11-15 12:49:51.790799140 +0100
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <alloca.h>
|
||||
diff -uNr sysroot.orig/usr/include/stdlib.h sysroot/usr/include/stdlib.h
|
||||
--- sysroot.orig/usr/include/stdlib.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/stdlib.h 2019-03-20 13:23:48.870108924 +0000
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <bits/wait.h>
|
||||
#include <malloc.h>
|
||||
#include <stddef.h>
|
||||
+#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <xlocale.h>
|
||||
|
||||
@@ -205,8 +206,7 @@
|
||||
@@ -211,8 +212,7 @@
|
||||
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);
|
||||
|
||||
#if __ANDROID_API__ >= __ANDROID_API_L__
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h ./usr/include/sys/cdefs.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h 2017-07-21 11:04:10.000000000 +0200
|
||||
+++ ./usr/include/sys/cdefs.h 2017-08-07 22:50:14.093361547 +0200
|
||||
@@ -218,7 +218,11 @@
|
||||
diff -uNr sysroot.orig/usr/include/sys/cdefs.h sysroot/usr/include/sys/cdefs.h
|
||||
--- sysroot.orig/usr/include/sys/cdefs.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/sys/cdefs.h 2019-03-20 13:27:29.977876824 +0000
|
||||
@@ -206,7 +206,11 @@
|
||||
* _FILE_OFFSET_BITS 64 support.
|
||||
* See https://android.googlesource.com/platform/bionic/+/master/docs/32-bit-abi.md
|
||||
*/
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/wait.h ./usr/include/sys/wait.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/wait.h 2017-06-07 01:07:52.000000000 +0200
|
||||
+++ ./usr/include/sys/wait.h 2017-06-18 02:11:22.268075841 +0200
|
||||
@@ -57,6 +57,9 @@
|
||||
diff -uNr sysroot.orig/usr/include/sys/wait.h sysroot/usr/include/sys/wait.h
|
||||
--- sysroot.orig/usr/include/sys/wait.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/sys/wait.h 2019-03-20 13:28:06.689331544 +0000
|
||||
@@ -46,6 +46,9 @@
|
||||
// Implemented as a static inline before 18.
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/include/syslog.h ./usr/include/syslog.h
|
||||
--- /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/include/syslog.h 2012-08-21 07:23:12.000000000 +0200
|
||||
+++ ./usr/include/syslog.h 2014-01-29 17:51:55.000000000 +0100
|
||||
@@ -31,6 +31,8 @@
|
||||
diff -uNr sysroot.orig/usr/include/syslog.h sysroot/usr/include/syslog.h
|
||||
--- sysroot.orig/usr/include/syslog.h 2019-02-12 16:12:24.000000000 +0000
|
||||
+++ sysroot/usr/include/syslog.h 2019-03-20 13:19:44.315965728 +0000
|
||||
@@ -32,6 +32,8 @@
|
||||
#include <stdio.h>
|
||||
#include <sys/cdefs.h>
|
||||
#include <stdarg.h>
|
||||
@ -10,9 +10,9 @@ diff -Nur /Users/fornwall/lib/android-ndk/platforms/android-18/arch-arm/usr/incl
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
@@ -111,6 +112,64 @@
|
||||
extern void syslog_r(int, struct syslog_data *, const char *, ...);
|
||||
extern void vsyslog_r(int, struct syslog_data *, const char *, va_list);
|
||||
@@ -92,6 +94,64 @@
|
||||
void syslog(int __priority, const char* __fmt, ...) __printflike(2, 3);
|
||||
void vsyslog(int __priority, const char* __fmt, va_list __args) __printflike(2, 0);
|
||||
|
||||
+extern /*const*/ char* __progname;
|
||||
+static __inline__ void android_polyfill_openlog(const char* a, int b, int c) {
|
||||
|
@ -1,17 +0,0 @@
|
||||
diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/utmp.h ./usr/include/utmp.h
|
||||
--- /home/fornwall/lib/android-ndk/sysroot/usr/include/utmp.h 2017-11-09 09:57:12.000000000 +0100
|
||||
+++ ./usr/include/utmp.h 2017-11-15 12:01:37.108811692 +0100
|
||||
@@ -101,11 +101,8 @@
|
||||
struct utmp* getutent(void);
|
||||
void endutent(void);
|
||||
|
||||
-
|
||||
-#if __ANDROID_API__ >= 23
|
||||
-int login_tty(int __fd) __INTRODUCED_IN(23);
|
||||
-#endif /* __ANDROID_API__ >= 23 */
|
||||
-
|
||||
+/* In Termux login_tty() is implemented in the libutil package to support android-21. */
|
||||
+int login_tty(int __fd);
|
||||
|
||||
__END_DECLS
|
||||
|
@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
_TAG_VERSION=7.1.2
|
||||
_TAG_REVISION=33
|
||||
TERMUX_PKG_VERSION=${_TAG_VERSION}.${_TAG_REVISION}
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_DEPENDS="libexpat, libpng, libzopfli"
|
||||
|
||||
@ -103,6 +103,7 @@ termux_step_make_install() {
|
||||
# /data/data/com.termux/files/usr/include/aosp/cutils/properties.h:46:5: note: previous declaration is here
|
||||
# int property_get(const char *key, char *value, const char *default_value);
|
||||
$CC ${CFLAGS/-D_FORTIFY_SOURCE=2/} \
|
||||
$LDFLAGS \
|
||||
-Dchar16_t=uint16_t \
|
||||
-std=c11 \
|
||||
-isystem $AOSP_INCLUDE_DIR \
|
||||
@ -198,6 +199,7 @@ termux_step_make_install() {
|
||||
errors_unix.cpp"
|
||||
# __USE_BSD for DEFFILEMODE to be defined by <sys/stat.h>.
|
||||
$CXX $CXXFLAGS $CPPFLAGS \
|
||||
$LDFLAGS \
|
||||
-std=c++11 \
|
||||
-include memory \
|
||||
-D__USE_BSD \
|
||||
|
@ -2,10 +2,11 @@ TERMUX_PKG_HOMEPAGE=http://www.brain-dump.org/projects/abduco/
|
||||
TERMUX_PKG_DESCRIPTION="Clean and simple terminal session manager"
|
||||
TERMUX_PKG_LICENSE="ISC"
|
||||
TERMUX_PKG_VERSION=0.6
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=http://www.brain-dump.org/projects/abduco/abduco-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=c90909e13fa95770b5afc3b59f311b3d3d2fdfae23f9569fa4f96a3e192a35f4
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_DEPENDS="libutil,dvtm"
|
||||
TERMUX_PKG_DEPENDS="dvtm"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" $CPPFLAGS"
|
||||
|
@ -1,9 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://abook.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="Abook is a text-based addressbook program designed to use with mutt mail client"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=0.6.0pre2
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_VERSION=0.6.1
|
||||
TERMUX_PKG_SHA256=f0a90df8694fb34685ecdd45d97db28b88046c15c95e7b0700596028bd8bc0f9
|
||||
TERMUX_PKG_SRCURL=http://abook.sourceforge.net/devel/abook-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=59d444504109dd96816e003b3023175981ae179af479349c34fa70bc12f6d385
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, ncurses, readline"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--mandir=$TERMUX_PREFIX/share/man"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
aclocal
|
||||
automake --add-missing
|
||||
autoreconf
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://beyondgrep.com/
|
||||
TERMUX_PKG_DESCRIPTION="Tool like grep optimized for programmers"
|
||||
TERMUX_PKG_LICENSE="Artistic-License-2.0"
|
||||
TERMUX_PKG_VERSION=2.24
|
||||
TERMUX_PKG_SHA256=8361e5a2654bc575db27bfa40470c4182d74d51098d390944d98fe7cd5b20d49
|
||||
TERMUX_PKG_VERSION=2.28
|
||||
TERMUX_PKG_SHA256=0ab3df19513a2c71aa7901f7f522a5baf72ce69e6e0e34879979f157210734f6
|
||||
TERMUX_PKG_SRCURL=https://beyondgrep.com/ack-${TERMUX_PKG_VERSION}-single-file
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=yes
|
||||
# Depend on coreutils for bin/env
|
||||
|
@ -42,9 +42,9 @@ termux_step_post_configure() {
|
||||
}
|
||||
termux_step_create_debscripts() {
|
||||
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" >> postinst
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" >> postinst
|
||||
echo "if [ ! -e $TERMUX_ANDROID_HOME/.alpine-smime/.pwd/MasterPassword.crt ] && [ ! -e $HOME/.alpine-smime/.pwd/MasterPassword.key ]; then" >> postinst
|
||||
echo "echo 'warning making a passwordless masterpasword file'" >> postinst
|
||||
echo "echo 'warning making a passwordless masterpasword file'" >> postinst
|
||||
echo "mkdir -p \$HOME/.alpine-smime/public \$HOME/.alpine-smime/.pwd \$HOME/.alpine-smime/private \$HOME/.alpine-smime/ca" >> postinst
|
||||
echo "openssl req -x509 -newkey rsa:2048 -keyout \$HOME/.alpine-smime/.pwd/MasterPassword.key -out \$HOME/.alpine-smime/.pwd/MasterPassword.crt -days 10000 -nodes -subj '/C=US/ST=dont/L=use/O=this Name/OU=for/CN=anything.com.termux'" >> postinst
|
||||
echo "touch \$HOME/.pine-passfile" >> postinst
|
||||
|
@ -1,19 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://rephial.org/
|
||||
TERMUX_PKG_DESCRIPTION="Dungeon exploration adventure game"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=4.1.3
|
||||
TERMUX_PKG_SHA256=9402c4f8da691edbd4567a948c5663e1066bee3fcb4a62fbcf86b5454918406f
|
||||
TERMUX_PKG_SRCURL=http://rephial.org/downloads/4.1/angband-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-x11 --bindir=$TERMUX_PREFIX/bin --sysconfdir=$TERMUX_PREFIX/share/angband"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="share/angband/xtra share/angband/icons"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
./autogen.sh
|
||||
perl -p -i -e 's|ncursesw5-config|ncursesw6-config|g' configure
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
rm -Rf $TERMUX_PREFIX/share/angband/{fonts,sounds}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
diff -u -r ../angband-master/src/main.c ./src/main.c
|
||||
--- ../angband-master/src/main.c 2017-06-25 04:10:53.000000000 +0000
|
||||
+++ ./src/main.c 2017-07-16 16:38:58.187988465 +0000
|
||||
@@ -35,7 +35,9 @@
|
||||
* locale junk
|
||||
*/
|
||||
#include "locale.h"
|
||||
+#ifndef __ANDROID__
|
||||
#include "langinfo.h"
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* Some machines have a "main()" function in their "main-xxx.c" file,
|
||||
@@ -466,9 +468,11 @@
|
||||
ANGBAND_SYS = mstr;
|
||||
|
||||
if (setlocale(LC_CTYPE, "")) {
|
||||
+#ifndef __ANDROID__
|
||||
/* Require UTF-8 */
|
||||
if (strcmp(nl_langinfo(CODESET), "UTF-8") != 0)
|
||||
quit("Angband requires UTF-8 support");
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Try the modules in the order specified by modules[] */
|
16
packages/apache2/build-instdso.sh.patch
Normal file
16
packages/apache2/build-instdso.sh.patch
Normal file
@ -0,0 +1,16 @@
|
||||
diff -u -r ../httpd-2.4.38/build/instdso.sh ./build/instdso.sh
|
||||
--- ../httpd-2.4.38/build/instdso.sh 2011-03-04 18:58:38.000000000 +0000
|
||||
+++ ./build/instdso.sh 2019-03-17 23:43:43.407027928 +0000
|
||||
@@ -59,6 +59,12 @@
|
||||
esac
|
||||
|
||||
CMD="$SH_LIBTOOL --mode=install $INSTALL_CMD $DSOARCHIVE $TARGETDIR/"
|
||||
+# Prefixing with bash below simplifies cross compiling setup where
|
||||
+# $SH_LIBTOOL may have wrong shebang:
|
||||
+case "$SH_LIBTOOL" in
|
||||
+ bash*) ;;
|
||||
+ *) CMD="bash $CMD" ;;
|
||||
+esac
|
||||
echo $CMD
|
||||
$CMD || exit $?
|
||||
|
@ -1,8 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://httpd.apache.org
|
||||
TERMUX_PKG_DESCRIPTION="Apache Web Server"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_VERSION=2.4.37
|
||||
TERMUX_PKG_SHA256=3498dc5c6772fac2eb7307dc7963122ffe243b5e806e0be4fb51974ff759d726
|
||||
TERMUX_PKG_VERSION=2.4.39
|
||||
TERMUX_PKG_SHA256=b4ca9d05773aa59b54d66cd8f4744b945289f084d3be17d7981d1783a5decfa2
|
||||
TERMUX_PKG_SRCURL=https://www.apache.org/dist/httpd/httpd-$TERMUX_PKG_VERSION.tar.bz2
|
||||
TERMUX_PKG_DEPENDS="apr, apr-util, pcre, openssl, libcrypt, libandroid-support, libnghttp2, libexpat, libuuid"
|
||||
TERMUX_PKG_CONFFILES="
|
||||
|
13
packages/apache2/configure.patch
Normal file
13
packages/apache2/configure.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -u -r ../httpd-2.4.38/configure ./configure
|
||||
--- ../httpd-2.4.38/configure 2019-01-17 18:46:19.000000000 +0000
|
||||
+++ ./configure 2019-03-17 23:05:48.786527661 +0000
|
||||
@@ -6401,7 +6401,7 @@
|
||||
LTFLAGS='--silent'
|
||||
fi
|
||||
my_libtool=`$apr_config --apr-libtool`
|
||||
- LIBTOOL="$my_libtool \$(LTFLAGS)"
|
||||
+ LIBTOOL="bash $my_libtool \$(LTFLAGS)"
|
||||
- libtoolversion=`$my_libtool --version`
|
||||
+ libtoolversion=`bash $my_libtool --version`
|
||||
case $libtoolversion in
|
||||
*1.[45]* | *[2-9].[0-9]*)
|
@ -23,14 +23,14 @@ termux_step_post_massage() {
|
||||
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk"
|
||||
|
||||
ln -sfr \
|
||||
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" \
|
||||
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/cache"
|
||||
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/var/cache/apk" \
|
||||
"$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX/etc/apk/cache"
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "touch $TERMUX_PREFIX/etc/apk/world"
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "touch $TERMUX_PREFIX/etc/apk/world"
|
||||
} > ./postinst
|
||||
chmod 755 postinst
|
||||
}
|
||||
|
@ -2,11 +2,14 @@ TERMUX_PKG_HOMEPAGE=https://packages.debian.org/apt
|
||||
TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_DEPENDS="libcurl, liblzma, dpkg, gpgv, libc++, termux-exec"
|
||||
TERMUX_PKG_RECOMMENDS="game-repo, science-repo"
|
||||
TERMUX_PKG_SUGGESTS="unstable-repo"
|
||||
TERMUX_PKG_VERSION=1.4.9
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SHA256=d4d65e7c84da86f3e6dcc933bba46a08db429c9d933b667c864f5c0e880bac0d
|
||||
TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
-DPERL_EXECUTABLE=`which perl`
|
||||
-DPERL_EXECUTABLE=$(which perl)
|
||||
-DCMAKE_INSTALL_FULL_LOCALSTATEDIR=$TERMUX_PREFIX
|
||||
-DCOMMON_ARCH=$TERMUX_ARCH
|
||||
-DDPKG_DATADIR=$TERMUX_PREFIX/share/dpkg
|
||||
@ -34,7 +37,7 @@ lib/libapt-inst.so
|
||||
"
|
||||
|
||||
termux_step_post_make_install() {
|
||||
printf "# The main termux repository:\ndeb https://termux.net stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
|
||||
printf "# The main termux repository:\ndeb https://dl.bintray.com/termux/termux-packages-24 stable main\n" > $TERMUX_PREFIX/etc/apt/sources.list
|
||||
cp $TERMUX_PKG_BUILDER_DIR/trusted.gpg $TERMUX_PREFIX/etc/apt/
|
||||
rm $TERMUX_PREFIX/include/apt-pkg -r
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
diff -u -r ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc ./apt-pkg/contrib/cmndline.cc
|
||||
--- ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc 2014-03-15 17:23:45.000000000 +0100
|
||||
+++ ./apt-pkg/contrib/cmndline.cc 2014-03-25 01:10:30.764711007 +0100
|
||||
@@ -27,6 +27,14 @@
|
||||
/*}}}*/
|
||||
using namespace std;
|
||||
|
||||
+#if defined(__ANDROID__)
|
||||
+static char* strchrnul(char const* s, int c)
|
||||
+{
|
||||
+ char const* result = strchr(s, c);
|
||||
+ return const_cast<char*>((result == NULL) ? (s + strlen(s)) : result);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
// CommandLine::CommandLine - Constructor /*{{{*/
|
||||
// ---------------------------------------------------------------------
|
||||
/* */
|
@ -1,18 +0,0 @@
|
||||
diff -u -r ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc ./apt-pkg/deb/debsrcrecords.cc
|
||||
--- ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc 2014-03-15 17:23:45.000000000 +0100
|
||||
+++ ./apt-pkg/deb/debsrcrecords.cc 2014-03-25 01:23:30.652689687 +0100
|
||||
@@ -26,6 +26,14 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
/*}}}*/
|
||||
+#if defined(__ANDROID__)
|
||||
+static char* strchrnul(char const* s, int c)
|
||||
+{
|
||||
+ char const* result = strchr(s, c);
|
||||
+ return const_cast<char*>((result == NULL) ? (s + strlen(s)) : result);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
|
||||
using std::max;
|
||||
using std::string;
|
@ -8,6 +8,6 @@ TERMUX_PKG_KEEP_STATIC_LIBRARIES=true
|
||||
TERMUX_PKG_NO_DEVELSPLIT=true
|
||||
|
||||
termux_step_post_make_install() {
|
||||
cp libargp.a $TERMUX_PREFIX/lib
|
||||
cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include
|
||||
cp libargp.a $TERMUX_PREFIX/lib
|
||||
cp $TERMUX_PKG_SRCDIR/argp.h $TERMUX_PREFIX/include
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://aria2.github.io
|
||||
TERMUX_PKG_DESCRIPTION="Download utility supporting HTTP/HTTPS, FTP, BitTorrent and Metalink"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=1.34.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SHA256=3a44a802631606e138a9e172a3e9f5bcbaac43ce2895c1d8e2b46f30487e77a3
|
||||
TERMUX_PKG_SRCURL=https://github.com/aria2/aria2/releases/download/release-${TERMUX_PKG_VERSION}/aria2-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_DEPENDS="c-ares, openssl, libxml2"
|
||||
|
@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://bitbucket.org/wez/atomicparsley
|
||||
TERMUX_PKG_DESCRIPTION="Read, parse and set metadata of MPEG-4 and 3gp files"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=0.9.6
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://bitbucket.org/wez/atomicparsley/get/${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=e28d46728be86219e6ce48695ea637d831ca0170ca6bdac99810996a8291ee50
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_lroundf=yes"
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff -u -r ../bash-4.2/lib/readline/complete.c ./lib/readline/complete.c
|
||||
--- ../bash-4.2/lib/readline/complete.c 2011-01-16 21:32:57.000000000 +0100
|
||||
+++ ./lib/readline/complete.c 2014-01-13 12:28:56.338866643 +0100
|
||||
@@ -2021,7 +2021,7 @@
|
||||
const char *text;
|
||||
int state;
|
||||
{
|
||||
-#if defined (__WIN32__) || defined (__OPENNT)
|
||||
+#if defined (__WIN32__) || defined (__OPENNT) || defined (__ANDROID__)
|
||||
return (char *)NULL;
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
@ -1,20 +1,21 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/bash/
|
||||
TERMUX_PKG_DESCRIPTION="A sh-compatible shell that incorporates useful features from the Korn shell (ksh) and C shell (csh)"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_DEPENDS="ncurses, readline, libandroid-support, termux-tools, command-not-found"
|
||||
_MAIN_VERSION=4.4
|
||||
_PATCH_VERSION=23
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SHA256=d86b3392c1202e8ff5a423b302e6284db7f8f435ea9f39b5b1b20fd3ac36dfcb
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_DEPENDS="ncurses, readline (>= 8.0), libandroid-support, termux-tools, command-not-found"
|
||||
_MAIN_VERSION=5.0
|
||||
_PATCH_VERSION=3
|
||||
TERMUX_PKG_SHA256=b4a80f2ac66170b2913efbfb9f2594f1f76c7b1afd11f799e22035d63077fb4d
|
||||
TERMUX_PKG_VERSION=${_MAIN_VERSION}.${_PATCH_VERSION}
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/bash/bash-${_MAIN_VERSION}.tar.gz
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_ESSENTIAL=true
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-multibyte --without-bash-malloc --with-installed-readline ac_cv_header_grp_h=no ac_cv_rl_version=7.0"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-multibyte --without-bash-malloc --with-installed-readline"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_job_control_missing=present"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_sys_siglist=yes"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_func_sigsetjmp=present"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_unusable_rtsigs=no"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" ac_cv_func_mbsnrtowcs=no"
|
||||
# Use bash_cv_dev_fd=whacky to use /proc/self/fd instead of /dev/fd.
|
||||
# After making this change process substitution such as in 'cat <(ls)' works.
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_dev_fd=whacky"
|
||||
@ -25,42 +26,26 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_dev_fd=whacky"
|
||||
# - https://github.com/termux/termux-app/issues/200
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" bash_cv_getcwd_malloc=yes"
|
||||
|
||||
TERMUX_PKG_CONFFILES="etc/bash.bashrc etc/profile"
|
||||
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="share/man/man1/bashbug.1 bin/bashbug"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
declare -A PATCH_CHECKSUMS
|
||||
PATCH_CHECKSUMS[001]=3e28d91531752df9a8cb167ad07cc542abaf944de9353fe8c6a535c9f1f17f0f
|
||||
PATCH_CHECKSUMS[002]=7020a0183e17a7233e665b979c78c184ea369cfaf3e8b4b11f5547ecb7c13c53
|
||||
PATCH_CHECKSUMS[003]=51df5a9192fdefe0ddca4bdf290932f74be03ffd0503a3d112e4199905e718b2
|
||||
PATCH_CHECKSUMS[004]=ad080a30a4ac6c1273373617f29628cc320a35c8cd06913894794293dc52c8b3
|
||||
PATCH_CHECKSUMS[005]=221e4b725b770ad0bb6924df3f8d04f89eeca4558f6e4c777dfa93e967090529
|
||||
PATCH_CHECKSUMS[006]=6a8e2e2a6180d0f1ce39dcd651622fb6d2fd05db7c459f64ae42d667f1e344b8
|
||||
PATCH_CHECKSUMS[007]=de1ccc07b7bfc9e25243ad854f3bbb5d3ebf9155b0477df16aaf00a7b0d5edaf
|
||||
PATCH_CHECKSUMS[008]=86144700465933636d7b945e89b77df95d3620034725be161ca0ca5a42e239ba
|
||||
PATCH_CHECKSUMS[009]=0b6bdd1a18a0d20e330cc3bc71e048864e4a13652e29dc0ebf3918bea729343c
|
||||
PATCH_CHECKSUMS[010]=8465c6f2c56afe559402265b39d9e94368954930f9aa7f3dfa6d36dd66868e06
|
||||
PATCH_CHECKSUMS[011]=dd56426ef7d7295e1107c0b3d06c192eb9298f4023c202ca2ba6266c613d170d
|
||||
PATCH_CHECKSUMS[012]=fac271d2bf6372c9903e3b353cb9eda044d7fe36b5aab52f21f3f21cd6a2063e
|
||||
PATCH_CHECKSUMS[013]=1b25efacbc1c4683b886d065b7a089a3601964555bcbf11f3a58989d38e853b6
|
||||
PATCH_CHECKSUMS[014]=a7f75cedb43c5845ab1c60afade22dcb5e5dc12dd98c0f5a3abcfb9f309bb17c
|
||||
PATCH_CHECKSUMS[015]=d37602ecbeb62d5a22c8167ea1e621fcdbaaa79925890a973a45c810dd01c326
|
||||
PATCH_CHECKSUMS[016]=501f91cc89fadced16c73aa8858796651473602c722bb29f86a8ba588d0ff1b1
|
||||
PATCH_CHECKSUMS[017]=773f90b98768d4662a22470ea8eec5fdd8e3439f370f94638872aaf884bcd270
|
||||
PATCH_CHECKSUMS[018]=5bc494b42f719a8b0d844b7bd9ad50ebaae560e97f67c833c9e7e9d53981a8cc
|
||||
PATCH_CHECKSUMS[019]=27170d6edfe8819835407fdc08b401d2e161b1400fe9d0c5317a51104c89c11e
|
||||
PATCH_CHECKSUMS[020]=1840e2cbf26ba822913662f74037594ed562361485390c52813b38156c99522c
|
||||
PATCH_CHECKSUMS[021]=bd8f59054a763ec1c64179ad5cb607f558708a317c2bdb22b814e3da456374c1
|
||||
PATCH_CHECKSUMS[022]=45331f0936e36ab91bfe44b936e33ed8a1b1848fa896e8a1d0f2ef74f297cb79
|
||||
PATCH_CHECKSUMS[023]=4fec236f3fbd3d0c47b893fdfa9122142a474f6ef66c20ffb6c0f4864dd591b6
|
||||
|
||||
for patch_number in `seq -f '%03g' ${_PATCH_VERSION}`; do
|
||||
PATCHFILE=$TERMUX_PKG_CACHEDIR/bash_patch_${patch_number}.patch
|
||||
PATCH_CHECKSUMS[001]=f2fe9e1f0faddf14ab9bfa88d450a75e5d028fedafad23b88716bd657c737289
|
||||
PATCH_CHECKSUMS[002]=87e87d3542e598799adb3e7e01c8165bc743e136a400ed0de015845f7ff68707
|
||||
PATCH_CHECKSUMS[003]=4eebcdc37b13793a232c5f2f498a5fcbf7da0ecb3da2059391c096db620ec85b
|
||||
|
||||
for PATCH_NUM in $(seq -f '%03g' ${_PATCH_VERSION}); do
|
||||
PATCHFILE=$TERMUX_PKG_CACHEDIR/bash_patch_${PATCH_NUM}.patch
|
||||
termux_download \
|
||||
"https://mirrors.kernel.org/gnu/bash/bash-4.4-patches/bash44-$patch_number" \
|
||||
"https://mirrors.kernel.org/gnu/bash/bash-${_MAIN_VERSION}-patches/bash${_MAIN_VERSION/./}-$PATCH_NUM" \
|
||||
$PATCHFILE \
|
||||
${PATCH_CHECKSUMS[$patch_number]}
|
||||
${PATCH_CHECKSUMS[$PATCH_NUM]}
|
||||
patch -p0 -i $PATCHFILE
|
||||
done
|
||||
unset PATCH_CHECKSUMS PATCHFILE PATCH_NUM
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
diff -uNr bash-4.4/config-top.h bash-4.4.mod/config-top.h
|
||||
--- bash-4.4/config-top.h 2016-05-19 21:34:02.000000000 +0300
|
||||
+++ bash-4.4.mod/config-top.h 2018-06-21 11:12:01.926739639 +0300
|
||||
@@ -63,14 +63,14 @@
|
||||
diff -uNr bash-5.0/config-top.h bash-5.0.mod/config-top.h
|
||||
--- bash-5.0/config-top.h 2018-10-12 22:35:23.000000000 +0300
|
||||
+++ bash-5.0.mod/config-top.h 2019-02-20 14:15:53.266802311 +0200
|
||||
@@ -63,7 +63,7 @@
|
||||
/* The default value of the PATH variable. */
|
||||
#ifndef DEFAULT_PATH_VALUE
|
||||
#define DEFAULT_PATH_VALUE \
|
||||
@ -9,7 +9,8 @@ diff -uNr bash-4.4/config-top.h bash-4.4.mod/config-top.h
|
||||
+ "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets:."
|
||||
#endif
|
||||
|
||||
/* The value for PATH when invoking `command -p'. This is only used when
|
||||
/* If you want to unconditionally set a value for PATH in every restricted
|
||||
@@ -74,7 +74,7 @@
|
||||
the Posix.2 confstr () function, or CS_PATH define are not present. */
|
||||
#ifndef STANDARD_UTILS_PATH
|
||||
#define STANDARD_UTILS_PATH \
|
||||
@ -18,7 +19,7 @@ diff -uNr bash-4.4/config-top.h bash-4.4.mod/config-top.h
|
||||
#endif
|
||||
|
||||
/* Default primary and secondary prompt strings. */
|
||||
@@ -87,7 +87,7 @@
|
||||
@@ -91,7 +91,7 @@
|
||||
#define DEFAULT_BASHRC "~/.bashrc"
|
||||
|
||||
/* System-wide .bashrc file for interactive shells. */
|
||||
|
12
packages/bash/error.c.patch
Normal file
12
packages/bash/error.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/error.c bash-5.0.mod/error.c
|
||||
--- bash-5.0/error.c 2018-10-08 22:16:07.000000000 +0300
|
||||
+++ bash-5.0.mod/error.c 2019-02-20 14:19:39.265261705 +0200
|
||||
@@ -430,7 +430,7 @@
|
||||
static FILE *tracefp = (FILE *)NULL;
|
||||
|
||||
if (tracefp == NULL)
|
||||
- tracefp = fopen("/tmp/bash-trace.log", "a+");
|
||||
+ tracefp = fopen("@TERMUX_PREFIX@/tmp/bash-trace.log", "a+");
|
||||
|
||||
if (tracefp == NULL)
|
||||
tracefp = stderr;
|
@ -1,39 +0,0 @@
|
||||
diff -u -r ../bash-4.2/lib/readline/complete.c ./lib/readline/complete.c
|
||||
--- ../bash-4.2/lib/readline/complete.c 2011-01-16 21:32:57.000000000 +0100
|
||||
+++ ./lib/readline/complete.c 2014-01-13 12:28:56.338866643 +0100
|
||||
@@ -2021,7 +2021,7 @@
|
||||
const char *text;
|
||||
int state;
|
||||
{
|
||||
-#if defined (__WIN32__) || defined (__OPENNT)
|
||||
+#if defined (__WIN32__) || defined (__OPENNT) || defined (__ANDROID__)
|
||||
return (char *)NULL;
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
||||
diff -u -r ../bash-4.2/shell.c ./shell.c
|
||||
--- ../bash-4.2/shell.c 2011-01-02 22:04:51.000000000 +0100
|
||||
+++ ./shell.c 2014-01-13 12:43:01.070846472 +0100
|
||||
@@ -1638,6 +1638,7 @@
|
||||
/* Don't fetch this more than once. */
|
||||
if (current_user.user_name == 0)
|
||||
{
|
||||
+#ifndef __ANDROID__
|
||||
entry = getpwuid (current_user.uid);
|
||||
if (entry)
|
||||
{
|
||||
@@ -1649,12 +1650,15 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+#endif
|
||||
current_user.user_name = _("I have no name!");
|
||||
current_user.user_name = savestring (current_user.user_name);
|
||||
current_user.shell = savestring ("/bin/sh");
|
||||
current_user.home_dir = savestring ("/");
|
||||
+#ifndef __ANDROID__
|
||||
}
|
||||
endpwent ();
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
|
12
packages/bash/lib-malloc-stats.c.patch
Normal file
12
packages/bash/lib-malloc-stats.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/malloc/stats.c bash-5.0.mod/lib/malloc/stats.c
|
||||
--- bash-5.0/lib/malloc/stats.c 2018-06-19 22:24:52.000000000 +0300
|
||||
+++ bash-5.0.mod/lib/malloc/stats.c 2019-02-20 14:17:52.094412438 +0200
|
||||
@@ -142,7 +142,7 @@
|
||||
_print_malloc_stats (s, fp);
|
||||
}
|
||||
|
||||
-#define TRACEROOT "/var/tmp/maltrace/stats."
|
||||
+#define TRACEROOT "@TERMUX_PREFIX@/var/tmp/maltrace/stats."
|
||||
|
||||
void
|
||||
trace_malloc_stats (s, fn)
|
12
packages/bash/lib-malloc-table.c.patch
Normal file
12
packages/bash/lib-malloc-table.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/malloc/table.c bash-5.0.mod/lib/malloc/table.c
|
||||
--- bash-5.0/lib/malloc/table.c 2016-01-15 15:47:26.000000000 +0200
|
||||
+++ bash-5.0.mod/lib/malloc/table.c 2019-02-20 14:18:05.854521552 +0200
|
||||
@@ -390,7 +390,7 @@
|
||||
_location_dump_table (stderr);
|
||||
}
|
||||
|
||||
-#define LOCROOT "/var/tmp/maltrace/locations."
|
||||
+#define LOCROOT "@TERMUX_PREFIX@/var/tmp/maltrace/locations."
|
||||
|
||||
void
|
||||
mlocation_write_table ()
|
12
packages/bash/lib-malloc-trace.c.patch
Normal file
12
packages/bash/lib-malloc-trace.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/malloc/trace.c bash-5.0.mod/lib/malloc/trace.c
|
||||
--- bash-5.0/lib/malloc/trace.c 2016-01-15 15:48:23.000000000 +0200
|
||||
+++ bash-5.0.mod/lib/malloc/trace.c 2019-02-20 14:17:59.184468664 +0200
|
||||
@@ -108,7 +108,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#define TRACEROOT "/var/tmp/maltrace/trace."
|
||||
+#define TRACEROOT "@TERMUX_PREFIX@/var/tmp/maltrace/trace."
|
||||
|
||||
void
|
||||
malloc_set_tracefn (s, fn)
|
12
packages/bash/lib-readline-complete.c.patch
Normal file
12
packages/bash/lib-readline-complete.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/readline/complete.c bash-5.0.mod/lib/readline/complete.c
|
||||
--- bash-5.0/lib/readline/complete.c 2017-07-05 02:43:20.000000000 +0300
|
||||
+++ bash-5.0.mod/lib/readline/complete.c 2019-02-20 14:15:49.683440481 +0200
|
||||
@@ -2231,7 +2231,7 @@
|
||||
char *
|
||||
rl_username_completion_function (const char *text, int state)
|
||||
{
|
||||
-#if defined (__WIN32__) || defined (__OPENNT)
|
||||
+#if defined (__WIN32__) || defined (__OPENNT) || defined (__ANDROID__)
|
||||
return (char *)NULL;
|
||||
#else /* !__WIN32__ && !__OPENNT) */
|
||||
static char *username = (char *)NULL;
|
12
packages/bash/lib-readline-rlconf.h.patch
Normal file
12
packages/bash/lib-readline-rlconf.h.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/readline/rlconf.h bash-5.0.mod/lib/readline/rlconf.h
|
||||
--- bash-5.0/lib/readline/rlconf.h 2017-02-21 17:25:30.000000000 +0200
|
||||
+++ bash-5.0.mod/lib/readline/rlconf.h 2019-02-20 14:16:17.230326111 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
#define DEFAULT_INPUTRC "~/.inputrc"
|
||||
|
||||
/* The ultimate last-ditch filename for an init file -- system-wide. */
|
||||
-#define SYS_INPUTRC "/etc/inputrc"
|
||||
+#define SYS_INPUTRC "@TERMUX_PREFIX@/etc/inputrc"
|
||||
|
||||
/* If defined, expand tabs to spaces. */
|
||||
#define DISPLAY_TABS
|
12
packages/bash/lib-readline-util.c.patch
Normal file
12
packages/bash/lib-readline-util.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr bash-5.0/lib/readline/util.c bash-5.0.mod/lib/readline/util.c
|
||||
--- bash-5.0/lib/readline/util.c 2017-06-15 23:27:17.000000000 +0300
|
||||
+++ bash-5.0.mod/lib/readline/util.c 2019-02-20 14:18:24.271334221 +0200
|
||||
@@ -506,7 +506,7 @@
|
||||
if (x == 0)
|
||||
x = ".";
|
||||
#else
|
||||
- x = "/var/tmp";
|
||||
+ x = "@TERMUX_PREFIX@/var/tmp";
|
||||
#endif
|
||||
snprintf (fnbuf, sizeof (fnbuf), "%s/rltrace.%ld", x, (long)getpid());
|
||||
unlink(fnbuf);
|
21
packages/bash/lib-sh-tmpfile.c.patch
Normal file
21
packages/bash/lib-sh-tmpfile.c.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff -uNr bash-5.0/lib/sh/tmpfile.c bash-5.0.mod/lib/sh/tmpfile.c
|
||||
--- bash-5.0/lib/sh/tmpfile.c 2016-08-11 18:05:58.000000000 +0300
|
||||
+++ bash-5.0.mod/lib/sh/tmpfile.c 2019-02-20 14:17:08.270731426 +0200
|
||||
@@ -74,15 +74,11 @@
|
||||
return sys_tmpdir;
|
||||
#endif
|
||||
|
||||
- sys_tmpdir = "/tmp";
|
||||
+ sys_tmpdir = "@TERMUX_PREFIX@/tmp";
|
||||
if (file_iswdir (sys_tmpdir))
|
||||
return sys_tmpdir;
|
||||
|
||||
- sys_tmpdir = "/var/tmp";
|
||||
- if (file_iswdir (sys_tmpdir))
|
||||
- return sys_tmpdir;
|
||||
-
|
||||
- sys_tmpdir = "/usr/tmp";
|
||||
+ sys_tmpdir = "@TERMUX_PREFIX@/var/tmp";
|
||||
if (file_iswdir (sys_tmpdir))
|
||||
return sys_tmpdir;
|
||||
|
@ -1,5 +1,6 @@
|
||||
--- ../bash-4.2/pathnames.h.in 2009-01-04 20:32:40.000000000 +0100
|
||||
+++ ./pathnames.h.in 2014-02-04 18:34:17.000000000 +0100
|
||||
diff -uNr bash-5.0/pathnames.h.in bash-5.0.mod/pathnames.h.in
|
||||
--- bash-5.0/pathnames.h.in 2009-01-04 21:32:40.000000000 +0200
|
||||
+++ bash-5.0.mod/pathnames.h.in 2019-02-20 14:15:56.880164371 +0200
|
||||
@@ -22,10 +22,10 @@
|
||||
#define _PATHNAMES_H_
|
||||
|
19
packages/bash/shell.c.patch
Normal file
19
packages/bash/shell.c.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -uNr bash-5.0/shell.c bash-5.0.mod/shell.c
|
||||
--- bash-5.0/shell.c 2018-12-06 18:28:21.000000000 +0200
|
||||
+++ bash-5.0.mod/shell.c 2019-02-20 14:19:29.808520144 +0200
|
||||
@@ -339,12 +339,12 @@
|
||||
{
|
||||
struct stat sb;
|
||||
|
||||
- if (stat ("/tmp", &sb) < 0)
|
||||
- internal_warning (_("could not find /tmp, please create!"));
|
||||
+ if (stat ("@TERMUX_PREFIX@/tmp", &sb) < 0)
|
||||
+ internal_warning (_("could not find @TERMUX_PREFIX@/tmp, please create!"));
|
||||
else
|
||||
{
|
||||
if (S_ISDIR (sb.st_mode) == 0)
|
||||
- internal_warning (_("/tmp must be a valid directory name"));
|
||||
+ internal_warning (_("@TERMUX_PREFIX@/tmp must be a valid directory name"));
|
||||
}
|
||||
}
|
||||
#endif /* __CYGWIN__ */
|
@ -1,13 +0,0 @@
|
||||
Fix breakage on android-21 due "conflicting type for '__errno'"
|
||||
|
||||
diff -u -r ../bash-4.3/y.tab.c ./y.tab.c
|
||||
--- ../bash-4.3/y.tab.c 2014-02-11 10:57:47.000000000 -0500
|
||||
+++ ./y.tab.c 2014-12-16 05:39:58.047338124 -0500
|
||||
@@ -280,7 +280,6 @@
|
||||
extern int bash_input_fd_changed;
|
||||
#endif
|
||||
|
||||
-extern int errno;
|
||||
/* **************************************************************** */
|
||||
/* */
|
||||
/* "Forward" declarations */
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://github.com/sharkdp/bat
|
||||
TERMUX_PKG_DESCRIPTION="A cat(1) clone with wings"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_VERSION=0.10.0
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=54dd396e8f20d44c6032a32339f45eab46a69b6134e74a704f8d4a27c18ddc3e
|
||||
TERMUX_PKG_SRCURL=https://github.com/sharkdp/bat/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/bc/
|
||||
TERMUX_PKG_DESCRIPTION="Arbitrary precision numeric processing language"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=1.07.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/bc/bc-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=62adfca89b0a1c0164c2cdca59ca210c1d44c3ffc46daf9931cf4942664cb02a
|
||||
TERMUX_PKG_DEPENDS="readline,flex"
|
||||
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/binutils/
|
||||
TERMUX_PKG_DESCRIPTION="Collection of binary tools, the main ones being ld, the GNU linker, and as, the GNU assembler"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=2.32
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=9b0d97b3d30df184d302bced12f976aa1e5fbf4b0be696cdebc6cca30411a46e
|
||||
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/binutils/binutils-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-gold --enable-plugins --disable-werror --with-system-zlib --enable-new-dtags"
|
||||
|
8
packages/blogc/build.sh
Normal file
8
packages/blogc/build.sh
Normal file
@ -0,0 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://blogc.rgm.io/
|
||||
TERMUX_PKG_DESCRIPTION="A blog compiler"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_MAINTAINER="Rafael Martins @rafaelmartins"
|
||||
TERMUX_PKG_VERSION=0.15.1
|
||||
TERMUX_PKG_SRCURL=https://github.com/blogc/blogc/releases/download/v$TERMUX_PKG_VERSION/blogc-$TERMUX_PKG_VERSION.tar.bz2
|
||||
TERMUX_PKG_SHA256=90b0549116fdbd88270958d3efdcccbf4ee2fb188e2d3401ae70d7c1d87ad09d
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-git-receiver --enable-make --enable-runserver --disable-tests --disable-valgrind"
|
@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://boost.org
|
||||
TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
|
||||
TERMUX_PKG_LICENSE="BSL-1.0"
|
||||
TERMUX_PKG_VERSION=1.69.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SHA256=8f32d4617390d1c2d16f26a27ab60d97807b35440d45891fa340fc2648b04406
|
||||
TERMUX_PKG_SRCURL=https://dl.bintray.com/boostorg/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
@ -44,6 +45,7 @@ termux_step_make_install() {
|
||||
--disable-icu \
|
||||
-sNO_ZSTD=1 \
|
||||
cxxflags="$CXXFLAGS" \
|
||||
linkflags="$LDFLAGS" \
|
||||
architecture="$BOOSTARCH" \
|
||||
abi="$BOOSTABI" \
|
||||
address-model="$BOOSTAM" \
|
||||
@ -66,6 +68,7 @@ termux_step_make_install() {
|
||||
--disable-icu \
|
||||
-sNO_ZSTD=1 \
|
||||
cxxflags="$CXXFLAGS" \
|
||||
linkflags="$LDFLAGS" \
|
||||
link=shared \
|
||||
threading=multi \
|
||||
boost.locale.icu=off \
|
||||
|
@ -1,17 +0,0 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://sites.google.com/site/broguegame/
|
||||
TERMUX_PKG_DESCRIPTION="Roguelike dungeon crawling game"
|
||||
TERMUX_PKG_LICENSE="AGPL-V3"
|
||||
TERMUX_PKG_VERSION=1.7.5
|
||||
TERMUX_PKG_SHA256=a74ff18139564c597d047cfb167f74ab1963dd8608b6fb2e034e7635d6170444
|
||||
TERMUX_PKG_SRCURL=https://sites.google.com/site/broguegame/brogue-${TERMUX_PKG_VERSION}-linux-amd64.tbz2
|
||||
TERMUX_PKG_DEPENDS="ncurses"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="curses"
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CC="$CC $CFLAGS $CPPFLAGS $LDFLAGS"
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
cp bin/brogue $TERMUX_PREFIX/bin
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
In Android the <sys/timeb.h> header and associated ftime(3) has been
|
||||
removed in android-21 since it is deprecated and removed from POSIX.
|
||||
|
||||
diff -u -r ../brogue-1.7.4/src/platform/curses-platform.c ./src/platform/curses-platform.c
|
||||
--- ../brogue-1.7.4/src/platform/curses-platform.c 2014-07-03 15:19:10.000000000 -0400
|
||||
+++ ./src/platform/curses-platform.c 2014-12-20 03:47:20.303572495 -0500
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include "term.h"
|
||||
-#include <sys/timeb.h>
|
||||
+#include <sys/time.h>
|
||||
#include <stdint.h>
|
||||
#include <signal.h>
|
||||
#include "platform.h"
|
||||
@@ -109,9 +109,9 @@
|
||||
#define PAUSE_BETWEEN_EVENT_POLLING 34//17
|
||||
|
||||
static uint32_t getTime() {
|
||||
- struct timeb time;
|
||||
- ftime(&time);
|
||||
- return 1000 * time.time + time.millitm;
|
||||
+ struct timeval tv;
|
||||
+ gettimeofday(&tv, NULL);
|
||||
+ return 1000 * tv.tv_sec + tv.tv_usec / 1000;
|
||||
}
|
||||
|
||||
static boolean curses_pauseForMilliseconds(short milliseconds) {
|
@ -1,12 +0,0 @@
|
||||
--- ../brogue-linux-1.7.3/brogue-1.7.3/Makefile 2013-09-11 07:38:48.000000000 +0200
|
||||
+++ ./Makefile 2014-01-28 07:57:06.000000000 +0100
|
||||
@@ -81,7 +81,7 @@
|
||||
.PHONY : clean both curses tcod tar
|
||||
|
||||
bin/brogue : ${DEPENDENCIES} ${BROGUEFILES}
|
||||
- $(CC) -O2 -march=i586 -o bin/brogue ${BROGUEFILES} ${LIBRARIES} -Wl,-rpath,.
|
||||
+ $(CC) -o bin/brogue ${BROGUEFILES} ${LIBRARIES} -Wl,-rpath,.
|
||||
|
||||
clean :
|
||||
rm -f src/brogue/*.o src/platform/*.o bin/brogue
|
||||
|
@ -1,11 +0,0 @@
|
||||
diff -u -r ../brogue-1.7.4/src/platform/platformdependent.c ./src/platform/platformdependent.c
|
||||
--- ../brogue-1.7.4/src/platform/platformdependent.c 2014-07-03 19:19:10.000000000 +0000
|
||||
+++ ./src/platform/platformdependent.c 2017-07-07 07:09:10.116242335 +0000
|
||||
@@ -21,6 +21,7 @@
|
||||
* along with Brogue. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
+#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://busybox.net/
|
||||
TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a single small executable"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_ESSENTIAL=yes
|
||||
TERMUX_PKG_VERSION=1.29.3
|
||||
TERMUX_PKG_VERSION=1.30.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=97648636e579462296478e0218e65e4bc1e9cd69089a3b1aeb810bff7621efb7
|
||||
TERMUX_PKG_SHA256=3d1d04a4dbd34048f4794815a5c48ebb9eb53c5277e09ffffc060323b95dfbdc
|
||||
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
||||
@ -33,7 +33,7 @@ termux_step_post_make_install() {
|
||||
rm -Rf $TERMUX_PREFIX/bin/applets
|
||||
mkdir -p $TERMUX_PREFIX/bin/applets
|
||||
cd $TERMUX_PREFIX/bin/applets
|
||||
for f in `cat $TERMUX_PKG_SRCDIR/busybox.links`; do ln -s ../busybox `basename $f`; done
|
||||
for f in $(cat $TERMUX_PKG_SRCDIR/busybox.links); do ln -s ../busybox $(basename $f); done
|
||||
|
||||
# The 'env' applet is special in that it go into $PREFIX/bin:
|
||||
cd $TERMUX_PREFIX/bin
|
||||
|
@ -59,6 +59,7 @@ CONFIG_PIE=y
|
||||
# CONFIG_BUILD_LIBBUSYBOX is not set
|
||||
# CONFIG_FEATURE_INDIVIDUAL is not set
|
||||
# CONFIG_FEATURE_SHARED_BUSYBOX is not set
|
||||
CONFIG_FEATURE_SHOW_SCRIPT=y
|
||||
# CONFIG_LFS is not set
|
||||
CONFIG_EXTRA_CFLAGS=""
|
||||
CONFIG_EXTRA_LDFLAGS=""
|
||||
@ -288,6 +289,7 @@ CONFIG_SHA256SUM=y
|
||||
CONFIG_SHA512SUM=y
|
||||
CONFIG_SHA3SUM=y
|
||||
CONFIG_SLEEP=y
|
||||
CONFIG_FLOAT_DURATION=y
|
||||
CONFIG_FEATURE_FANCY_SLEEP=y
|
||||
CONFIG_FEATURE_FLOAT_SLEEP=y
|
||||
CONFIG_SORT=y
|
||||
@ -420,7 +422,9 @@ CONFIG_FEATURE_ALLOW_EXEC=y
|
||||
#
|
||||
CONFIG_FIND=y
|
||||
CONFIG_FEATURE_FIND_PRINT0=y
|
||||
CONFIG_FEATURE_FIND_EXECUTABLE=y
|
||||
CONFIG_FEATURE_FIND_MTIME=y
|
||||
CONFIG_FEATURE_FIND_QUIT=y
|
||||
CONFIG_FEATURE_FIND_MMIN=y
|
||||
CONFIG_FEATURE_FIND_PERM=y
|
||||
CONFIG_FEATURE_FIND_TYPE=y
|
||||
@ -720,6 +724,7 @@ CONFIG_CHRT=y
|
||||
CONFIG_CRONTAB=y
|
||||
CONFIG_DC=y
|
||||
CONFIG_FEATURE_DC_LIBM=y
|
||||
CONFIG_FEATURE_DC_BIG=y
|
||||
# CONFIG_DEVFSD is not set
|
||||
# CONFIG_DEVFSD_MODLOAD is not set
|
||||
# CONFIG_DEVFSD_FG_NP is not set
|
||||
@ -1080,3 +1085,7 @@ CONFIG_RUN_INIT=n
|
||||
CONFIG_HEXEDIT=n
|
||||
CONFIG_SETFATTR=n
|
||||
CONFIG_NETCAT=n
|
||||
|
||||
CONFIG_BC=n
|
||||
CONFIG_FEATURE_BC_INTERACTIVE=n
|
||||
CONFIG_FEATURE_BC_LONG_OPTIONS=n
|
||||
|
14
packages/busybox/include-platform.h.patch
Normal file
14
packages/busybox/include-platform.h.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -uNr busybox-1.29.3/include/platform.h busybox-1.29.3.mod/include/platform.h
|
||||
--- busybox-1.29.3/include/platform.h 2018-07-02 14:23:06.000000000 +0300
|
||||
+++ busybox-1.29.3.mod/include/platform.h 2019-02-08 16:01:14.437858554 +0200
|
||||
@@ -579,10 +579,6 @@
|
||||
extern char *strcasestr(const char *s, const char *pattern) FAST_FUNC;
|
||||
#endif
|
||||
|
||||
-#ifndef HAVE_STRCHRNUL
|
||||
-extern char *strchrnul(const char *s, int c) FAST_FUNC;
|
||||
-#endif
|
||||
-
|
||||
#ifndef HAVE_STRSEP
|
||||
extern char *strsep(char **stringp, const char *delim) FAST_FUNC;
|
||||
#endif
|
19
packages/busybox/libbb-platform.c.patch
Normal file
19
packages/busybox/libbb-platform.c.patch
Normal file
@ -0,0 +1,19 @@
|
||||
diff -uNr busybox-1.29.3/libbb/platform.c busybox-1.29.3.mod/libbb/platform.c
|
||||
--- busybox-1.29.3/libbb/platform.c 2018-07-02 14:23:06.000000000 +0300
|
||||
+++ busybox-1.29.3.mod/libbb/platform.c 2019-02-08 16:10:54.101961593 +0200
|
||||
@@ -8,15 +8,6 @@
|
||||
*/
|
||||
#include "libbb.h"
|
||||
|
||||
-#ifndef HAVE_STRCHRNUL
|
||||
-char* FAST_FUNC strchrnul(const char *s, int c)
|
||||
-{
|
||||
- while (*s != '\0' && *s != c)
|
||||
- s++;
|
||||
- return (char*)s;
|
||||
-}
|
||||
-#endif
|
||||
-
|
||||
#ifndef HAVE_USLEEP
|
||||
int FAST_FUNC usleep(unsigned usec)
|
||||
{
|
12
packages/busybox/util-linux-setarch.c.patch
Normal file
12
packages/busybox/util-linux-setarch.c.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr busybox-1.30.1/util-linux/setarch.c busybox-1.30.1.mod/util-linux/setarch.c
|
||||
--- busybox-1.30.1/util-linux/setarch.c 2018-12-30 17:14:20.000000000 +0200
|
||||
+++ busybox-1.30.1.mod/util-linux/setarch.c 2019-03-02 14:06:38.150442254 +0200
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
argv += optind;
|
||||
if (!argv[0])
|
||||
- (--argv)[0] = (char*)"/bin/sh";
|
||||
+ (--argv)[0] = (char*)"@TERMUX_PREFIX@/bin/sh";
|
||||
|
||||
/* Try to execute the program */
|
||||
BB_EXECVP_or_die(argv);
|
@ -1,7 +1,7 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://curl.haxx.se/docs/caextract.html
|
||||
TERMUX_PKG_DESCRIPTION="Common CA certificates"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=20180124
|
||||
TERMUX_PKG_VERSION=20190124
|
||||
TERMUX_PKG_SRCURL=https://curl.haxx.se/ca/cacert.pem
|
||||
# If the checksum has changed, it may be time to update the package version:
|
||||
TERMUX_PKG_SHA256=c1fd9b235896b1094ee97bfb7e042f93530b5e300781f59b45edf84ee8c75000
|
||||
|
@ -1,8 +1,9 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://caddyserver.com/
|
||||
TERMUX_PKG_DESCRIPTION="Fast, cross-platform HTTP/2 web server"
|
||||
TERMUX_PKG_LICENSE="Apache-2.0"
|
||||
TERMUX_PKG_VERSION=0.11.3
|
||||
TERMUX_PKG_SHA256=b99973614b85f55da309cdf79e5d6c9aae8ad1bd83c425b1f1fd17b21386eab6
|
||||
TERMUX_PKG_VERSION=0.11.5
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SHA256=ab2dc210bc7089fa7d041e702663e592b480945aa99f14b348090091103b7ec5
|
||||
TERMUX_PKG_SRCURL=https://github.com/mholt/caddy/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
|
||||
termux_step_make() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://calcurse.org/
|
||||
TERMUX_PKG_DESCRIPTION="calcurse is a calendar and scheduling application for the command line"
|
||||
TERMUX_PKG_LICENSE="BSD 2-Clause"
|
||||
TERMUX_PKG_VERSION=4.3.0
|
||||
TERMUX_PKG_SHA256=31ecc3dc09e1e561502b4c94f965ed6b167c03e9418438c4a7ad5bad2c785f9a
|
||||
TERMUX_PKG_VERSION=4.4.0
|
||||
TERMUX_PKG_SHA256=edcbc9dbcdfe3aba43ac70b8d6895fb0ff4a364df89762d1ca3053a14cec826f
|
||||
TERMUX_PKG_SRCURL=https://fossies.org/linux/privat/calcurse-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_DEPENDS="libandroid-support, ncurses"
|
||||
|
||||
|
@ -1,8 +1,21 @@
|
||||
--- ../../cache/calcurse-4.1.0/src/io.c 2016-03-27 12:26:18.000000000 +0200
|
||||
+++ ./src/io.c 2016-05-09 00:00:16.402558225 +0200
|
||||
@@ -1430,4 +1430,3 @@ void io_stop_psave_thread(void)
|
||||
io_save_mutex_lock();
|
||||
diff -u -r ../calcurse-4.4.0/src/io.c ./src/io.c
|
||||
--- ../calcurse-4.4.0/src/io.c 2019-02-04 20:44:04.000000000 +0000
|
||||
+++ ./src/io.c 2019-03-01 20:49:16.393057747 +0000
|
||||
@@ -1399,7 +1399,6 @@
|
||||
EXIT_IF(delay < 0, _("Invalid delay"));
|
||||
char *mesg = _("Periodic save: data files have changed. Save cancelled.");
|
||||
|
||||
- pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL);
|
||||
for (;;) {
|
||||
sleep(delay * MININSEC);
|
||||
pthread_mutex_lock(&io_periodic_save_mutex);
|
||||
@@ -1424,8 +1423,7 @@
|
||||
|
||||
/* Lock the mutex to avoid cancelling the thread during saving. */
|
||||
pthread_mutex_lock(&io_periodic_save_mutex);
|
||||
- pthread_cancel(io_t_psave);
|
||||
- pthread_join(io_t_psave, NULL);
|
||||
+ pthread_kill(io_t_psave, 0);
|
||||
io_save_mutex_unlock();
|
||||
pthread_mutex_unlock(&io_periodic_save_mutex);
|
||||
io_t_psave = pthread_self();
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
--- ../../cache/calcurse-4.1.0/src/notify.c 2016-03-27 12:26:18.000000000 +0200
|
||||
+++ ./src/notify.c 2016-05-09 00:01:31.495324279 +0200
|
||||
@@ -193,4 +193,3 @@ void notify_stop_main_thread(void)
|
||||
if (notify_t_main) {
|
||||
- pthread_cancel(notify_t_main);
|
||||
- pthread_join(notify_t_main, NULL);
|
||||
+ pthread_kill(notify_t_main, 0);
|
||||
}
|
13
packages/calcurse/src-notify.c.patch
Normal file
13
packages/calcurse/src-notify.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -u -r ../calcurse-4.4.0/src/notify.c ./src/notify.c
|
||||
--- ../calcurse-4.4.0/src/notify.c 2019-01-18 22:38:58.000000000 +0000
|
||||
+++ ./src/notify.c 2019-03-01 20:45:55.019585998 +0000
|
||||
@@ -196,8 +196,7 @@
|
||||
if (pthread_equal(notify_t_main, pthread_self()))
|
||||
return;
|
||||
|
||||
- pthread_cancel(notify_t_main);
|
||||
- pthread_join(notify_t_main, NULL);
|
||||
+ pthread_kill(notify_t_main, 0);
|
||||
notify_t_main = pthread_self();
|
||||
}
|
||||
|
13
packages/calcurse/src-ui-calendar.c.patch
Normal file
13
packages/calcurse/src-ui-calendar.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff -u -r ../calcurse-4.4.0/src/ui-calendar.c ./src/ui-calendar.c
|
||||
--- ../calcurse-4.4.0/src/ui-calendar.c 2019-01-18 22:38:58.000000000 +0000
|
||||
+++ ./src/ui-calendar.c 2019-03-01 20:47:58.622033795 +0000
|
||||
@@ -123,8 +123,7 @@
|
||||
if (pthread_equal(ui_calendar_t_date, pthread_self()))
|
||||
return;
|
||||
|
||||
- pthread_cancel(ui_calendar_t_date);
|
||||
- pthread_join(ui_calendar_t_date, NULL);
|
||||
+ pthread_kill(ui_calendar_t_date, 0);
|
||||
ui_calendar_t_date = pthread_self();
|
||||
}
|
||||
|
@ -1,8 +0,0 @@
|
||||
--- ../../cache/calcurse-4.1.0/src/ui-calendar.c 2016-03-27 12:26:18.000000000 +0200
|
||||
+++ ./src/ui-calendar.c 2016-05-09 00:01:52.327536161 +0200
|
||||
@@ -145,4 +145,3 @@ void ui_calendar_stop_date_thread(void)
|
||||
if (ui_calendar_t_date) {
|
||||
- pthread_cancel(ui_calendar_t_date);
|
||||
- pthread_join(ui_calendar_t_date, NULL);
|
||||
+ pthread_kill(ui_calendar_t_date, 0);
|
||||
}
|
9
packages/capstone/build.sh
Normal file
9
packages/capstone/build.sh
Normal file
@ -0,0 +1,9 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.capstone-engine.org/
|
||||
TERMUX_PKG_DESCRIPTION="Lightweight multi-platform, multi-architecture disassembly framework"
|
||||
TERMUX_PKG_LICENSE="BSD"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
|
||||
TERMUX_PKG_VERSION=4.0.1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/aquynh/capstone/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=79bbea8dbe466bd7d051e037db5961fdb34f67c9fac5c3471dd105cfb1e05dc7
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="-DINSTALL_LIB_DIR=$TERMUX_PREFIX/lib"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user