move some packages from unstable repo
Everything moved has been manually compiled and submitted to the main apt repo at packages.termux.org. %ci:no-build
This commit is contained in:
parent
4abfeb58da
commit
625f2aab3c
43
packages/atomvm/android-support.patch
Normal file
43
packages/atomvm/android-support.patch
Normal file
@ -0,0 +1,43 @@
|
||||
diff -uNr atomvm/src/CMakeLists.txt atomvm.mod/src/CMakeLists.txt
|
||||
--- atomvm/src/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
|
||||
+++ atomvm.mod/src/CMakeLists.txt 2019-07-02 20:56:59.790369109 +0300
|
||||
@@ -10,13 +10,14 @@
|
||||
|
||||
if((${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") OR
|
||||
(${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR
|
||||
+ (${CMAKE_SYSTEM_NAME} STREQUAL "Android") OR
|
||||
(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD"))
|
||||
add_subdirectory(platforms/generic_unix)
|
||||
else()
|
||||
message(FATAL_ERROR "Unsupported platform: ${CMAKE_SYSTEM_NAME}")
|
||||
endif()
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
+if((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "Android"))
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
||||
diff -uNr atomvm/src/libAtomVM/CMakeLists.txt atomvm.mod/src/libAtomVM/CMakeLists.txt
|
||||
--- atomvm/src/libAtomVM/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
|
||||
+++ atomvm.mod/src/libAtomVM/CMakeLists.txt 2019-07-02 20:57:46.597379691 +0300
|
||||
@@ -63,7 +63,7 @@
|
||||
term.c
|
||||
valueshashtable.c
|
||||
)
|
||||
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "Android" OR ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
|
||||
find_package(ZLIB)
|
||||
if (ZLIB_FOUND)
|
||||
add_definitions(-DWITH_ZLIB)
|
||||
diff -uNr atomvm/tests/CMakeLists.txt atomvm.mod/tests/CMakeLists.txt
|
||||
--- atomvm/tests/CMakeLists.txt 2019-06-13 13:50:54.000000000 +0300
|
||||
+++ atomvm.mod/tests/CMakeLists.txt 2019-07-02 20:55:37.143095702 +0300
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR} ../src/libAtomVM/)
|
||||
|
||||
-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
||||
+if((${CMAKE_SYSTEM_NAME} STREQUAL "Linux") OR (${CMAKE_SYSTEM_NAME} STREQUAL "Android"))
|
||||
include(CheckFunctionExists)
|
||||
include(CheckLibraryExists)
|
||||
check_library_exists(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
|
29
packages/atomvm/build.sh
Normal file
29
packages/atomvm/build.sh
Normal file
@ -0,0 +1,29 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/bettio/AtomVM
|
||||
TERMUX_PKG_DESCRIPTION="The minimal Erlang VM implementation"
|
||||
TERMUX_PKG_LICENSE="LGPL-2.1"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
_COMMIT=82624fbf68ad8a0c8815456adbd33de98e4901ea
|
||||
TERMUX_PKG_VERSION=0.git${_COMMIT:0:8}
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_SRCURL=https://github.com/bettio/AtomVM/archive/${_COMMIT}.tar.gz
|
||||
TERMUX_PKG_SHA256=b141812be3fe157766464b8fcedc13f40b36bc9346b3e039ac736c5d30359729
|
||||
TERMUX_PKG_DEPENDS="zlib"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_host_build() {
|
||||
termux_setup_cmake
|
||||
cmake "$TERMUX_PKG_SRCDIR"
|
||||
make -j $TERMUX_MAKE_PROCESSES
|
||||
}
|
||||
|
||||
termux_step_post_configure() {
|
||||
# We need the "PackBEAM" compiled for host.
|
||||
export PATH=$PATH:$TERMUX_PKG_HOSTBUILD_DIR/tools/packbeam
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 "$TERMUX_PKG_BUILDDIR"/src/AtomVM \
|
||||
"$TERMUX_PREFIX"/bin/AtomVM
|
||||
install -Dm700 "$TERMUX_PKG_BUILDDIR"/tools/packbeam/PackBEAM \
|
||||
"$TERMUX_PREFIX"/bin/PackBEAM
|
||||
}
|
51
packages/atomvm/sys-packbeam.patch
Normal file
51
packages/atomvm/sys-packbeam.patch
Normal file
@ -0,0 +1,51 @@
|
||||
diff -uNr atomvm/CMakeModules/BuildElixir.cmake atomvm.mod/CMakeModules/BuildElixir.cmake
|
||||
--- atomvm/CMakeModules/BuildElixir.cmake 2019-06-13 13:50:54.000000000 +0300
|
||||
+++ atomvm.mod/CMakeModules/BuildElixir.cmake 2019-07-02 18:26:59.146026706 +0300
|
||||
@@ -24,7 +24,7 @@
|
||||
add_custom_target(
|
||||
${avm_name} ALL
|
||||
DEPENDS ${avm_name}_beams PackBEAM
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM -a ${avm_name}.avm ${BEAMS}
|
||||
+ COMMAND PackBEAM -a ${avm_name}.avm ${BEAMS}
|
||||
COMMENT "Packing archive ${avm_name}.avm"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
add_custom_target(
|
||||
${avm_name} ALL
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${avm_name}.avm Elixir.${main}.beam ${ARCHIVES}
|
||||
+ COMMAND PackBEAM ${avm_name}.avm Elixir.${main}.beam ${ARCHIVES}
|
||||
COMMENT "Packing runnable ${avm_name}.avm"
|
||||
VERBATIM
|
||||
)
|
||||
diff -uNr atomvm/CMakeModules/BuildErlang.cmake atomvm.mod/CMakeModules/BuildErlang.cmake
|
||||
--- atomvm/CMakeModules/BuildErlang.cmake 2019-06-13 13:50:54.000000000 +0300
|
||||
+++ atomvm.mod/CMakeModules/BuildErlang.cmake 2019-07-02 18:26:27.599082112 +0300
|
||||
@@ -25,7 +25,7 @@
|
||||
${avm_name} ALL
|
||||
DEPENDS ${avm_name}_beams PackBEAM
|
||||
#DEPENDS ${BEAMS}
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM -a ${avm_name}.avm ${BEAMS}
|
||||
+ COMMAND PackBEAM -a ${avm_name}.avm ${BEAMS}
|
||||
COMMENT "Packing archive ${avm_name}.avm"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
add_custom_target(
|
||||
${avm_name} ALL
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${avm_name}.avm ${main}.beam ${ARCHIVES}
|
||||
+ COMMAND PackBEAM ${avm_name}.avm ${main}.beam ${ARCHIVES}
|
||||
COMMENT "Packing runnable ${avm_name}.avm"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -77,7 +77,7 @@
|
||||
add_custom_target(
|
||||
${test_avm_name} ALL
|
||||
COMMAND erlc -I ${CMAKE_SOURCE_DIR}/libs/include ${CMAKE_CURRENT_SOURCE_DIR}/tests.erl
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/tools/packbeam/PackBEAM ${CMAKE_CURRENT_BINARY_DIR}/${test_avm_name}.avm ${CMAKE_CURRENT_BINARY_DIR}/tests.beam ${ARCHIVES}
|
||||
+ COMMAND PackBEAM ${CMAKE_CURRENT_BINARY_DIR}/${test_avm_name}.avm ${CMAKE_CURRENT_BINARY_DIR}/tests.beam ${ARCHIVES}
|
||||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/tests.erl
|
||||
COMMENT "Packing runnable ${test_avm_name}.avm"
|
||||
VERBATIM
|
143
packages/bftpd/bftpd.conf.patch
Normal file
143
packages/bftpd/bftpd.conf.patch
Normal file
@ -0,0 +1,143 @@
|
||||
diff -uNr bftpd/bftpd.conf bftpd.mod/bftpd.conf
|
||||
--- bftpd/bftpd.conf 2019-07-28 20:07:32.000000000 +0300
|
||||
+++ bftpd.mod/bftpd.conf 2020-07-24 17:49:21.832372999 +0300
|
||||
@@ -9,7 +9,7 @@
|
||||
DENY_LOGIN="no"
|
||||
|
||||
#The port number where the daemon should listen (only for daemon mode)
|
||||
- PORT="21"
|
||||
+ PORT="8021"
|
||||
|
||||
#You can force bftpd to use a specific port range in passive mode.
|
||||
#Passive mode means that the client will open data connections
|
||||
@@ -34,26 +34,6 @@
|
||||
#The password for the administration commands, encrypted (man mkpasswd).
|
||||
ADMIN_PASS="x"
|
||||
|
||||
- #With this option, you can put your entire FTP environment into a chroot
|
||||
- #jail. Apart from security, this offers you the possibility of having
|
||||
- #virtual users that don't exist in the system.
|
||||
- #Additionally, you can make some kind of 'file pool' by creating a directory
|
||||
- #with files which you can symlink from the users' homes (this means setting
|
||||
- #DO_CHROOT=no in order for the users to be able to access that dir.
|
||||
- #Note that you need the following files in your initial chroot directory:
|
||||
- #/etc/passwd, /etc/shadow, /etc/group
|
||||
- #On GNU systems, you will also need the NSS libraries in /lib.
|
||||
- #INITIAL_CHROOT="/ftp"
|
||||
-
|
||||
- #The bftpdutmp file enables you to record user logins and logouts in
|
||||
- #bftpd, which is useful for the administration interface (which is not
|
||||
- #finished yet). You also need the file to be able to restrict the number
|
||||
- #of users simultaneously logged on, and so on.
|
||||
- #Note that the directory in which the file resides must already exist.
|
||||
- #Set the option to "" if you do not want that. This is discouraged for normal
|
||||
- #use, but can be helpful if you want to create a boot floppy or something.
|
||||
- PATH_BFTPDUTMP="/var/run/bftpd/bftpdutmp"
|
||||
-
|
||||
#This option controls the buffer size while transferring files.
|
||||
#If you are on a very fast network (fast meaning 100 Mbit/s or more),
|
||||
#you should set this to 64000 or something like that.
|
||||
@@ -66,7 +46,6 @@
|
||||
# can slow transfer speeds.
|
||||
XFER_BUFSIZE="2048"
|
||||
|
||||
-
|
||||
# This variable controls whether the transfer buffer (see above option)
|
||||
# should change size as more (or less) clients connect to the server.
|
||||
# Setting this option to "yes" will put more work on your CPU, but
|
||||
@@ -75,8 +54,6 @@
|
||||
# your bandwidth to spike.
|
||||
CHANGE_BUFSIZE="no"
|
||||
|
||||
-
|
||||
-
|
||||
# This option allows you to add a delay (in microseconds) to
|
||||
# the time between when one piece of data was sent
|
||||
# and when the next will be sent. This is to aid in
|
||||
@@ -130,7 +107,7 @@
|
||||
# be saved.
|
||||
# Each day gets its own log file, to make it easier to rotate logs.
|
||||
# Please note, this directory must be created manually.
|
||||
- # BANDWIDTH="/var/log/bftpd"
|
||||
+ # BANDWIDTH="@TERMUX_PREFIX@/var/log/bftpd"
|
||||
|
||||
#ROOTDIR specifies the root directory of the client. It defaults to %h
|
||||
#(user's home directory). %u is replaced by the user name.
|
||||
@@ -141,7 +118,7 @@
|
||||
|
||||
#Name of the log file. Say "syslog" to log into syslog.
|
||||
#Say "" for no logging.
|
||||
- LOGFILE="/var/log/bftpd.log"
|
||||
+ LOGFILE="@TERMUX_PREFIX@/var/log/bftpd.log"
|
||||
|
||||
#Use %v for version, %h for the server FQDN and %i for the server IP address.
|
||||
# Note: If you use the "%h" option and you do an inital CHROOT, then
|
||||
@@ -152,7 +129,8 @@
|
||||
#The server automatically chdirs to the directory given here after login.
|
||||
AUTO_CHDIR="/"
|
||||
|
||||
- #Authentication type, values: PAM, PASSWD
|
||||
+ #Authentication type, values: PASSWD
|
||||
+ # PAM is not supported in Termux.
|
||||
AUTH="PASSWD"
|
||||
|
||||
# The FILE_AUTH varible over-rides the AUTH value. If the FILE_AUTH
|
||||
@@ -175,7 +153,7 @@
|
||||
# where normal user accounts cannot be created.
|
||||
# Under no circumstances should anyone except root be
|
||||
# able to read the FILE_AUTH password file.
|
||||
- #FILE_AUTH="/etc/ftpdpassword"
|
||||
+ #FILE_AUTH="@TERMUX_PREFIX@/etc/ftpdpassword"
|
||||
|
||||
|
||||
#Enable this if you want the client's IP address to be resolved to a host
|
||||
@@ -185,7 +163,7 @@
|
||||
RESOLVE_CLIENT_IP="no"
|
||||
|
||||
#Path to the message of the day, seen by all users before login.
|
||||
- MOTD_GLOBAL="/etc/ftpmotd"
|
||||
+ MOTD_GLOBAL="@TERMUX_PREFIX@/etc/ftpmotd"
|
||||
|
||||
#Path to the message of the day, seen after login, relative to the root
|
||||
#path of the user (see ROOTDIR).
|
||||
@@ -201,9 +179,6 @@
|
||||
#want to have a security hole!
|
||||
DO_CHROOT="yes"
|
||||
|
||||
- #Enable this to log each login to wtmp.
|
||||
- LOG_WTMP="yes"
|
||||
-
|
||||
#If you want bftpd to bind itself to one specific network interface, enter
|
||||
#its IP address here. Else enter 'any'. This option only works in standalone
|
||||
#mode.
|
||||
@@ -221,11 +196,7 @@
|
||||
#Path to the ftpusers file. It can contain user names that are denied.
|
||||
#If it does not exist, every user can log in. If you don't want this,
|
||||
#just put a nonexistent filename here.
|
||||
- PATH_FTPUSERS="/etc/ftpusers"
|
||||
-
|
||||
- #Enable this if you want to deny any user who has a shell which is not in
|
||||
- #/etc/shells.
|
||||
- AUTH_ETCSHELLS="no"
|
||||
+ PATH_FTPUSERS="@TERMUX_PREFIX@/etc/ftpusers"
|
||||
|
||||
#With the option ALLOWCOMMAND_XXXX, you can disable the command XXXX.
|
||||
#For example, if you don't want any user to delete files, you can do
|
||||
@@ -286,7 +257,7 @@
|
||||
# NOTE: Be careful when using this option and the DO_CHROOT option.
|
||||
# The location of the root directory can change when using DO_CHROOT.
|
||||
# The current working directory (cwd) is passed to the script you run.
|
||||
- # PRE_WRITE_SCRIPT="/bin/true"
|
||||
+ # PRE_WRITE_SCRIPT="@TERMUX_PREFIX@/bin/true"
|
||||
|
||||
# This option is enabled when the server should run
|
||||
# a script after writing to the file system. This should
|
||||
@@ -295,7 +266,7 @@
|
||||
# NOTE: Be careful when using this option and the DO_CHROOT option.
|
||||
# The location of the root directory can change when using DO_CHROOT.
|
||||
# The current working directory (cwd) is passed to the script you run.
|
||||
- # POST_WRITE_SCRIPT="/bin/false"
|
||||
+ # POST_WRITE_SCRIPT="@TERMUX_PREFIX@/bin/false"
|
||||
|
||||
# The GNU C library makes some assumptions about the local time zone
|
||||
# when run in a chroot environment. The Bftpd server tries to work
|
17
packages/bftpd/build.sh
Normal file
17
packages/bftpd/build.sh
Normal file
@ -0,0 +1,17 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://bftpd.sourceforge.net/
|
||||
TERMUX_PKG_DESCRIPTION="Small, easy-to-configure FTP server"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=5.7
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://kumisystems.dl.sourceforge.net/project/bftpd/bftpd/bftpd-${TERMUX_PKG_VERSION}/bftpd-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=a543ce62a8092a7b5065146875cc9878534b09dc4a853f2c2b56e2de397a6f4b
|
||||
TERMUX_PKG_DEPENDS="libcrypt"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
TERMUX_PKG_CONFFILES="etc/bftpd.conf"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="var/log/bftpd.log"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
CFLAGS+=" -fcommon"
|
||||
}
|
37
packages/bftpd/fix-makefile.patch
Normal file
37
packages/bftpd/fix-makefile.patch
Normal file
@ -0,0 +1,37 @@
|
||||
diff -uNr bftpd/Makefile.in bftpd.mod/Makefile.in
|
||||
--- bftpd/Makefile.in 2020-01-10 02:14:00.000000000 +0200
|
||||
+++ bftpd.mod/Makefile.in 2020-01-19 17:40:15.359393866 +0200
|
||||
@@ -2,7 +2,7 @@
|
||||
CC?=@CC@
|
||||
INSTALL=@INSTALL@
|
||||
prefix=@prefix@
|
||||
-CFLAGS=@CFLAGS@ @DEFS@ -Wall -I. -DVERSION=\"$(VERSION)\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPREFIX=\"$(prefix)\" @DEBUG@
|
||||
+CFLAGS=@CFLAGS@ @CPPFLAGS@ @DEFS@ -Wall -I. -DVERSION=\"$(VERSION)\" -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPREFIX=\"$(prefix)\" @DEBUG@
|
||||
LIBS=@LIBS@
|
||||
mandir=@mandir@
|
||||
sbindir=@sbindir@
|
||||
@@ -15,7 +15,7 @@
|
||||
SRCS=bftpdutmp.c commands.c commands_admin.c cwd.c dirlist.c list.c login.c logging.c main.c mystring.c options.c md5.c
|
||||
|
||||
OBJS2LINK=$(OBJS) $(PAX)
|
||||
-LDFLAGS=
|
||||
+LDFLAGS=@LDFLAGS@
|
||||
|
||||
all: bftpd
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
|
||||
install: all
|
||||
mkdir -p $(DESTDIR)/$(prefix)/sbin
|
||||
- $(INSTALL) -g 0 -m 700 -o 0 bftpd $(DESTDIR)/$(prefix)/sbin
|
||||
+ $(INSTALL) -m 700 bftpd $(DESTDIR)/$(prefix)/sbin
|
||||
mkdir -p $(DESTDIR)/$(mandir)/man8
|
||||
- $(INSTALL) -g 0 -m 644 -o 0 bftpd.8 $(DESTDIR)/$(mandir)/man8
|
||||
+ $(INSTALL) -m 644 bftpd.8 $(DESTDIR)/$(mandir)/man8
|
||||
mkdir -p $(DESTDIR)/$(prefix)/etc
|
||||
[ -f $(DESTDIR)/$(prefix)/etc/bftpd.conf ] || \
|
||||
- $(INSTALL) -g 0 -m 600 -o 0 bftpd.conf $(DESTDIR)/$(prefix)/etc
|
||||
+ $(INSTALL) -m 600 bftpd.conf $(DESTDIR)/$(prefix)/etc
|
||||
mkdir -p $(DESTDIR)/$(prefix)/var/log
|
||||
touch $(DESTDIR)/$(prefix)/var/log/bftpd.log
|
||||
chmod 644 $(DESTDIR)/$(prefix)/var/log/bftpd.log
|
64
packages/bftpd/fix-struct-name-conflict.patch
Normal file
64
packages/bftpd/fix-struct-name-conflict.patch
Normal file
@ -0,0 +1,64 @@
|
||||
diff -uNr bftpd/options.c bftpd.mod/options.c
|
||||
--- bftpd/options.c 2017-09-30 03:18:31.000000000 +0300
|
||||
+++ bftpd.mod/options.c 2020-01-19 17:33:04.566591884 +0200
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
struct global config_global;
|
||||
struct group_of_users *config_groups;
|
||||
-struct user *config_users;
|
||||
+struct bftpd_user *config_users;
|
||||
|
||||
/*
|
||||
Returns NULL on error. May return
|
||||
@@ -183,7 +183,7 @@
|
||||
FILE *configfile;
|
||||
char *str;
|
||||
struct group_of_users *grp = NULL;
|
||||
- struct user *usr = NULL;
|
||||
+ struct bftpd_user *usr = NULL;
|
||||
config_global.options = NULL;
|
||||
config_global.directories = NULL;
|
||||
if (!configpath)
|
||||
@@ -209,9 +209,9 @@
|
||||
create_options(configfile, &(config_global.options), &(config_global.directories));
|
||||
} else if (strstr(str, "user ") == str) {
|
||||
if (usr) {
|
||||
- usr = usr->next = calloc(1, sizeof(struct user));
|
||||
+ usr = usr->next = calloc(1, sizeof(struct bftpd_user));
|
||||
} else {
|
||||
- config_users = usr = calloc(1, sizeof(struct user));
|
||||
+ config_users = usr = calloc(1, sizeof(struct bftpd_user));
|
||||
}
|
||||
/* avoid memory errors */
|
||||
if (! usr)
|
||||
@@ -349,7 +349,7 @@
|
||||
char *getoption_user(char *name)
|
||||
{
|
||||
char *result;
|
||||
- struct user *usr;
|
||||
+ struct bftpd_user *usr;
|
||||
if ((usr = config_users)) {
|
||||
do {
|
||||
if (!strcmp(user, usr->name)) {
|
||||
diff -uNr bftpd/options.h bftpd.mod/options.h
|
||||
--- bftpd/options.h 2012-11-08 20:33:35.000000000 +0200
|
||||
+++ bftpd.mod/options.h 2020-01-19 17:32:28.686276802 +0200
|
||||
@@ -48,15 +48,15 @@
|
||||
struct directory *directories;
|
||||
struct group_of_users *next;
|
||||
};
|
||||
-struct user {
|
||||
+struct bftpd_user {
|
||||
char *name;
|
||||
struct bftpd_option *options;
|
||||
struct directory *directories;
|
||||
- struct user *next;
|
||||
+ struct bftpd_user *next;
|
||||
};
|
||||
|
||||
extern struct group_of_users *config_groups;
|
||||
-extern struct user *config_users;
|
||||
+extern struct bftpd_user *config_users;
|
||||
|
||||
void expand_groups();
|
||||
void config_init();
|
12
packages/biber/ExtUtils-LibBuilder.diff
Normal file
12
packages/biber/ExtUtils-LibBuilder.diff
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../ExtUtils-LibBuilder-0.08.orig/t/01-simple.t ./t/01-simple.t
|
||||
--- ../ExtUtils-LibBuilder-0.08.orig/t/01-simple.t 2020-03-19 18:35:24.423661248 +0100
|
||||
+++ ./t/01-simple.t 2020-03-19 18:37:50.234669799 +0100
|
||||
@@ -59,7 +59,7 @@
|
||||
} elsif ($^O =~ /darwin/i) {
|
||||
$ENV{DYLD_LIBRARY_PATH} = ".";
|
||||
}
|
||||
-elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix)/i) {
|
||||
+elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|android)/i) {
|
||||
$ENV{LD_LIBRARY_PATH} = ".";
|
||||
if ($^O =~ /irix/) {
|
||||
# trying my luck
|
12
packages/biber/Text-BibTeX.diff
Normal file
12
packages/biber/Text-BibTeX.diff
Normal file
@ -0,0 +1,12 @@
|
||||
diff -u -r ../Text-BibTeX-0.88.orig/inc/MyBuilder.pm ./inc/MyBuilder.pm
|
||||
--- ../Text-BibTeX-0.88.orig/inc/MyBuilder.pm 2020-03-19 21:34:48.034256281 +0100
|
||||
+++ ./inc/MyBuilder.pm 2020-03-19 21:35:23.929258386 +0100
|
||||
@@ -378,7 +378,7 @@
|
||||
if ($^O =~ /darwin/i) {
|
||||
$ENV{DYLD_LIBRARY_PATH} = catdir($self->blib, "usrlib");
|
||||
}
|
||||
- elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|gnu)/i) {
|
||||
+ elsif ($^O =~ /(?:linux|bsd|sun|sol|dragonfly|hpux|irix|gnu|android)/i) {
|
||||
$ENV{LD_LIBRARY_PATH} = catdir($self->blib, "usrlib");
|
||||
}
|
||||
elsif ($^O =~ /aix/i) {
|
39
packages/biber/build.sh
Normal file
39
packages/biber/build.sh
Normal file
@ -0,0 +1,39 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://biblatex-biber.sourceforge.net
|
||||
TERMUX_PKG_DESCRIPTION="A Unicode-capable BibTeX replacement for biblatex users"
|
||||
TERMUX_PKG_LICENSE="Artistic-License-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=2.16
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_DEPENDS="perl, libxslt, libxml2 (>> 2.9.10-3), openssl-tool, make, clang, pkg-config"
|
||||
|
||||
EXTUTILS_LIBBUILDER_VERSION=0.08
|
||||
TEXT_BIBTEX_VERSION=0.88
|
||||
|
||||
termux_step_make_install() {
|
||||
mkdir -p $TERMUX_PREFIX/opt/biber
|
||||
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
|
||||
-e "s|@TEXT_BIBTEX_VERSION@|${TEXT_BIBTEX_VERSION}|g" \
|
||||
-e "s|@EXTUTILS_LIBBUILDER_VERSION@|${EXTUTILS_LIBBUILDER_VERSION}|g" \
|
||||
-e "s|@BIBER_VERSION@|${TERMUX_PKG_VERSION}|g" \
|
||||
"$TERMUX_PKG_BUILDER_DIR"/installer.sh \
|
||||
> $TERMUX_PREFIX/bin/termux-install-biber
|
||||
chmod 700 $TERMUX_PREFIX/bin/termux-install-biber
|
||||
install -m600 "$TERMUX_PKG_BUILDER_DIR"/ExtUtils-LibBuilder.diff $TERMUX_PREFIX/opt/biber/
|
||||
install -m600 "$TERMUX_PKG_BUILDER_DIR"/Text-BibTeX.diff $TERMUX_PREFIX/opt/biber/
|
||||
# Uninstalling all dependencies on uninstall would be annoying, so
|
||||
# lets leave that for the user to deal with..
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "echo ''"
|
||||
echo "echo '[*] You can now run the biber installer by running'"
|
||||
echo "echo ''"
|
||||
echo "echo ' termux-install-biber'"
|
||||
echo "echo ''"
|
||||
echo "echo ' The installation will take a while.'"
|
||||
} > ./postinst
|
||||
}
|
70
packages/biber/installer.sh
Normal file
70
packages/biber/installer.sh
Normal file
@ -0,0 +1,70 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
set -e
|
||||
# unset variables that the user might have set to force installation to $PREFIX
|
||||
unset PERL_LOCAL_LIB_ROOT
|
||||
unset PERL5LIB
|
||||
unset PERL_MM_OPT
|
||||
unset PERL_MB_OPT
|
||||
|
||||
export PREFIX=@TERMUX_PREFIX@
|
||||
export TMPDIR=@TERMUX_PREFIX@/tmp
|
||||
export EXTUTILS_LIBBUILDER_VERSION=@EXTUTILS_LIBBUILDER_VERSION@
|
||||
export TEXT_BIBTEX_VERSION=@TEXT_BIBTEX_VERSION@
|
||||
export BIBER_VERSION=@BIBER_VERSION@
|
||||
|
||||
# Lock terminal to prevent sending text input and special key
|
||||
# combinations that may break installation process.
|
||||
stty -echo -icanon time 0 min 0 intr undef quit undef susp undef
|
||||
|
||||
# Use trap to unlock terminal at exit.
|
||||
trap 'while read -r; do true; done; stty sane;' EXIT
|
||||
|
||||
echo "[*] Installing cpanm..."
|
||||
|
||||
cpan install App::cpanminus
|
||||
export PATH="$PATH:$HOME/perl5/bin"
|
||||
|
||||
echo "[*] Downloading and patching troublesome dependencies..."
|
||||
|
||||
cd $TMPDIR
|
||||
if [ ! -f ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz ]; then
|
||||
curl --fail --retry 3 --location --output "$TMPDIR/ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz" \
|
||||
"https://cpan.metacpan.org/authors/id/A/AM/AMBS/ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz"
|
||||
else
|
||||
rm -rf ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}
|
||||
fi
|
||||
tar -xf ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}.tar.gz
|
||||
cd ExtUtils-LibBuilder-${EXTUTILS_LIBBUILDER_VERSION}
|
||||
patch -Np1 -i $PREFIX/opt/biber/ExtUtils-LibBuilder.diff
|
||||
cpanm .
|
||||
|
||||
cd ..
|
||||
|
||||
if [ ! -f Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz ]; then
|
||||
curl --fail --retry 3 --location --output "$TMPDIR/Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz" \
|
||||
"https://cpan.metacpan.org/authors/id/A/AM/AMBS/Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz"
|
||||
else
|
||||
rm -rf Text-BibTeX-${TEXT_BIBTEX_VERSION}
|
||||
fi
|
||||
tar -xf Text-BibTeX-${TEXT_BIBTEX_VERSION}.tar.gz && cd Text-BibTeX-${TEXT_BIBTEX_VERSION}
|
||||
patch -Np1 -i $PREFIX/opt/biber/Text-BibTeX.diff
|
||||
cpanm .
|
||||
|
||||
cd ..
|
||||
|
||||
echo "[*] Installing biber and its dependencies (may take long time)..."
|
||||
|
||||
if [ ! -f biber-${BIBER_VERSION}.tar.gz ]; then
|
||||
curl --fail --retry 3 --location --output "biber-${BIBER_VERSION}.tar.gz" \
|
||||
"https://github.com/plk/biber/archive/v${BIBER_VERSION}.tar.gz"
|
||||
else
|
||||
rm -rf biber-${BIBER_VERSION}
|
||||
fi
|
||||
tar -xf biber-${BIBER_VERSION}.tar.gz && cd biber-${BIBER_VERSION}
|
||||
cpanm --notest .
|
||||
|
||||
cd ..
|
||||
|
||||
echo "[*] biber installation finished."
|
||||
|
||||
exit 0
|
80
packages/electrum/android.patch
Normal file
80
packages/electrum/android.patch
Normal file
@ -0,0 +1,80 @@
|
||||
diff -u -r ../Electrum-4.0.2/electrum/electrum ./electrum/electrum
|
||||
--- ../Electrum-4.0.2/electrum/electrum 2000-11-11 12:11:11.000000000 +0100
|
||||
+++ ./electrum/electrum 2020-09-07 21:17:21.808618513 +0200
|
||||
@@ -43,7 +43,7 @@
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
is_bundle = getattr(sys, 'frozen', False)
|
||||
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
|
||||
-is_android = 'ANDROID_DATA' in os.environ
|
||||
+is_android = False
|
||||
|
||||
if is_local: # running from source
|
||||
# developers should probably see all deprecation warnings.
|
||||
diff -u -r ./electrum/logging.py ../Electrum-4.0.2/electrum/logging.py
|
||||
--- ./electrum/logging.py 2020-09-07 19:57:16.486326385 +0200
|
||||
+++ ../Electrum-4.0.2/electrum/logging.py 2000-11-11 12:11:11.000000000 +0100
|
||||
@@ -233,7 +233,7 @@
|
||||
_configure_verbosity(verbosity=verbosity, verbosity_shortcuts=verbosity_shortcuts)
|
||||
|
||||
log_to_file = config.get('log_to_file', False)
|
||||
- is_android = 'ANDROID_DATA' in os.environ
|
||||
+ is_android = False
|
||||
if is_android:
|
||||
from jnius import autoclass
|
||||
build_config = autoclass("org.electrum.electrum.BuildConfig")
|
||||
@@ -258,7 +258,7 @@
|
||||
|
||||
|
||||
def describe_os_version() -> str:
|
||||
- if 'ANDROID_DATA' in os.environ:
|
||||
+ if False:
|
||||
from kivy import utils
|
||||
if utils.platform != "android":
|
||||
return utils.platform
|
||||
diff -u -r ../Electrum-4.0.2/electrum/util.py ./electrum/util.py
|
||||
--- ../Electrum-4.0.2/electrum/util.py 2000-11-11 12:11:11.000000000 +0100
|
||||
+++ ./electrum/util.py 2020-09-07 21:23:38.651085966 +0200
|
||||
@@ -339,10 +339,6 @@
|
||||
self.running = False
|
||||
|
||||
def on_stop(self):
|
||||
- if 'ANDROID_DATA' in os.environ:
|
||||
- import jnius
|
||||
- jnius.detach()
|
||||
- self.logger.info("jnius detach")
|
||||
self.logger.info("stopped")
|
||||
|
||||
|
||||
@@ -406,10 +402,7 @@
|
||||
return PythonActivity.mActivity.getFilesDir().getPath() + '/data'
|
||||
|
||||
def get_backup_dir(config):
|
||||
- if 'ANDROID_DATA' in os.environ:
|
||||
- return android_backup_dir() if config.get('android_backups') else None
|
||||
- else:
|
||||
- return config.get('backup_dir')
|
||||
+ return config.get('backup_dir')
|
||||
|
||||
def ensure_sparse_file(filename):
|
||||
# On modern Linux, no need to do anything.
|
||||
@@ -532,7 +525,7 @@
|
||||
if "ELECTRUMDIR" in os.environ:
|
||||
return os.environ["ELECTRUMDIR"]
|
||||
elif 'ANDROID_DATA' in os.environ:
|
||||
- return android_data_dir()
|
||||
+ return os.path.join(os.environ["HOME"], ".electrum")
|
||||
elif os.name == 'posix':
|
||||
return os.path.join(os.environ["HOME"], ".electrum")
|
||||
elif "APPDATA" in os.environ:
|
||||
diff -u -r ../Electrum-4.0.2/run_electrum ./run_electrum
|
||||
--- ./run_electrum 2020-09-07 19:55:33.069993775 +0200
|
||||
+++ ../Electrum-4.0.2/run_electrum 2000-11-11 12:11:11.000000000 +0100
|
||||
@@ -43,7 +43,7 @@
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
is_bundle = getattr(sys, 'frozen', False)
|
||||
is_local = not is_bundle and os.path.exists(os.path.join(script_dir, "electrum.desktop"))
|
||||
-is_android = 'ANDROID_DATA' in os.environ
|
||||
+is_android = False
|
||||
|
||||
if is_local: # running from source
|
||||
# developers should probably see all deprecation warnings.
|
76
packages/electrum/build.sh
Normal file
76
packages/electrum/build.sh
Normal file
@ -0,0 +1,76 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://electrum.org
|
||||
TERMUX_PKG_DESCRIPTION="Electrum is a lightweight Bitcoin wallet."
|
||||
TERMUX_PKG_LICENSE="MIT"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=4.0.5
|
||||
TERMUX_PKG_REVISION=4
|
||||
TERMUX_PKG_SRCURL=https://download.electrum.org/$TERMUX_PKG_VERSION/Electrum-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=6790407e21366186d928c8e653e3ab38476ca86e4797aa4db94dcca2384db41a
|
||||
TERMUX_PKG_DEPENDS="python, libsecp256k1"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
# asciinema previously contained some files that python packages have in common
|
||||
TERMUX_PKG_CONFLICTS="asciinema (<< 1.4.0-1)"
|
||||
|
||||
_PYTHON_VERSION=3.10
|
||||
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="
|
||||
bin/easy_install
|
||||
bin/qr
|
||||
bin/chardetect
|
||||
bin/qdarkstyle
|
||||
bin/easy_install-${_PYTHON_VERSION}
|
||||
lib/python${_PYTHON_VERSION}/site-packages/easy-install.pth
|
||||
lib/python${_PYTHON_VERSION}/site-packages/site.py
|
||||
lib/python${_PYTHON_VERSION}/site-packages/setuptools.pth
|
||||
lib/python${_PYTHON_VERSION}/site-packages/electrum/gui/qt
|
||||
lib/python${_PYTHON_VERSION}/site-packages/helpdev-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/attrs-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/PySocks-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/dnspython-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/ecdsa-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/jsonrpclib_pelix-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/pbkdf2-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/protobuf-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/pyaes-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/qrcode-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/aiohttp_socks-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/aiorpcX-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/async_timeout-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/certifi-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/yarl-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/QDarkStyle-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/QtPy-*-py${_PYTHON_VERSION}.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/aiohttp-*-py${_PYTHON_VERSION}-*.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/multidict-*-py${_PYTHON_VERSION}-*.egg
|
||||
lib/python${_PYTHON_VERSION}/site-packages/protobuf-*-py${_PYTHON_VERSION}-*.egg
|
||||
"
|
||||
|
||||
termux_step_make () {
|
||||
return
|
||||
}
|
||||
|
||||
termux_step_make_install () {
|
||||
# Force reinstall:
|
||||
rm -rf $TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/electrum
|
||||
rm -rf $TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/Electrum-${TERMUX_PKG_VERSION}-py${_PYTHON_VERSION}.egg*
|
||||
export PYTHONPATH=$TERMUX_PREFIX/lib/python${_PYTHON_VERSION}/site-packages/
|
||||
YARL_NO_EXTENSIONS=1 MULTIDICT_NO_EXTENSIONS=1 \
|
||||
CFLAGS=-I$TERMUX_PREFIX/include/python${_PYTHON_VERSION} \
|
||||
python${_PYTHON_VERSION} setup.py install --prefix=$TERMUX_PREFIX
|
||||
}
|
||||
|
||||
termux_step_post_massage () {
|
||||
find . -path '*/__pycache__*' -delete
|
||||
# Other python packages also provides this file. Should be removed from all python packages
|
||||
for file in ./lib/python${_PYTHON_VERSION}/site-packages/easy-install.pth ./lib/python${_PYTHON_VERSION}/site-packages/site.py; do
|
||||
if [ -f $file ]; then
|
||||
rm $file
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
termux_step_create_debscripts () {
|
||||
echo "#!$TERMUX_PREFIX/bin/sh" > postinst
|
||||
echo "pip3 install 'ecdsa>=0.14' 'qrcode' 'protobuf>=3.12' 'dnspython<2.0' 'qdarkstyle<2.9' 'aiorpcx>=0.18,<0.19' 'aiohttp>=3.3.0,<4.0.0' 'aiohttp_socks>=0.3' 'certifi' 'bitstring' 'attrs>=19.2.0' 'pycryptodomex'" >> postinst
|
||||
}
|
22
packages/electrum/only-text-gui.patch
Normal file
22
packages/electrum/only-text-gui.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff -u -r ../Electrum-4.0.2/electrum/daemon.py ./electrum/daemon.py
|
||||
--- ../Electrum-4.0.2/electrum/daemon.py 2019-07-11 15:08:35.000000000 +0200
|
||||
+++ ./electrum/daemon.py 2020-05-03 13:46:52.373992401 +0200
|
||||
@@ -342,7 +342,7 @@
|
||||
|
||||
def init_gui(self, config, plugins):
|
||||
threading.current_thread().setName('GUI')
|
||||
- gui_name = config.get('gui', 'qt')
|
||||
+ gui_name = config.get('gui', 'text')
|
||||
if gui_name in ['lite', 'classic']:
|
||||
gui_name = 'qt'
|
||||
gui = __import__('electrum.gui.' + gui_name, fromlist=['electrum'])
|
||||
--- ./setup.py.orig 2000-11-11 12:11:11.000000000 +0100
|
||||
+++ ./setup.py 2020-09-07 20:42:26.406766373 +0200
|
||||
@@ -73,7 +73,6 @@
|
||||
packages=[
|
||||
'electrum',
|
||||
'electrum.gui',
|
||||
- 'electrum.gui.qt',
|
||||
'electrum.plugins',
|
||||
] + [('electrum.plugins.'+pkg) for pkg in find_packages('electrum/plugins')],
|
||||
package_dir={
|
11
packages/enscript/afm.c.patch
Normal file
11
packages/enscript/afm.c.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- enscript-1.6.6/afmlib/afm.c 2018-08-26 17:09:29.103000011 +0530
|
||||
+++ afm.c 2018-08-26 17:11:32.170000006 +0530
|
||||
@@ -27,7 +27,7 @@
|
||||
* Static variables
|
||||
*/
|
||||
|
||||
-static char *default_path = "/usr/local/lib/ps:/usr/lib/ps";
|
||||
+static char *default_path = "@TERMUX_PREFIX@/usr/lib/ps";
|
||||
|
||||
static char *error_names[] =
|
||||
{
|
15
packages/enscript/build.sh
Normal file
15
packages/enscript/build.sh
Normal file
@ -0,0 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/enscript/
|
||||
TERMUX_PKG_DESCRIPTION="Enscript converts ASCII text files to PostScript, HTML, RTF, ANSI and overstrikes"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.6.6
|
||||
TERMUX_PKG_REVISION=11
|
||||
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/enscript/enscript-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=6d56bada6934d055b34b6c90399aa85975e66457ac5bf513427ae7fc77f5c0bb
|
||||
TERMUX_PKG_DEPENDS="cups, perl"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --sysconfdir=$TERMUX_PREFIX/etc/enscript"
|
||||
|
||||
termux_step_post_make_install() {
|
||||
cd "$TERMUX_PREFIX"/bin && patch -i "$TERMUX_PKG_BUILDER_DIR"/diffpp.patch.txt
|
||||
cd "$TERMUX_PREFIX"/etc/enscript && patch -i "$TERMUX_PKG_BUILDER_DIR"/enscript.cfg.patch.txt
|
||||
}
|
11
packages/enscript/diffpp.patch.txt
Normal file
11
packages/enscript/diffpp.patch.txt
Normal file
@ -0,0 +1,11 @@
|
||||
--- enscript-1.6.6/scripts/diffpp 2018-08-26 16:51:49.594000009 +0530
|
||||
+++ diffpp 2018-08-27 18:05:56.762000111 +0530
|
||||
@@ -69,7 +69,7 @@
|
||||
open(FP, $file) || die "$program: couldn't open file `$file' for input: $!\n";
|
||||
@orig_file = <FP>;
|
||||
close(FP);
|
||||
-$[ = 1;
|
||||
+{ no warnings; $[ = 1; }
|
||||
$orig_line_num = 1;
|
||||
$orig_num_lines = @orig_file;
|
||||
|
11
packages/enscript/enscript.cfg.patch.txt
Normal file
11
packages/enscript/enscript.cfg.patch.txt
Normal file
@ -0,0 +1,11 @@
|
||||
--- enscript-1.6.6/lib/enscript.cfg 2018-08-27 22:11:45.300000097 +0530
|
||||
+++ enscript.cfg 2018-08-27 22:13:27.280000103 +0530
|
||||
@@ -76,7 +76,7 @@
|
||||
# HighlightBars: 2
|
||||
|
||||
# Library path. Let's use built-in default.
|
||||
-# LibraryPath:
|
||||
+LibraryPath: @TERMUX_PREFIX@/share/enscript
|
||||
|
||||
# How wrapped lines are marked in printout. Possible values are: `none',
|
||||
# `plus', `box' and `arrow'. As a default, we do not mark them.
|
13
packages/enscript/lock.h.patch
Normal file
13
packages/enscript/lock.h.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- enscript-1.6.6/intl/lock.h 2018-08-26 16:33:29.944000060 +0530
|
||||
+++ lock.h 2018-08-26 16:51:23.894000008 +0530
|
||||
@@ -126,8 +126,8 @@
|
||||
# endif
|
||||
|
||||
# if !PTHREAD_IN_USE_DETECTION_HARD
|
||||
-# pragma weak pthread_cancel
|
||||
-# define pthread_in_use() (pthread_cancel != NULL)
|
||||
+# pragma weak pthread_kill
|
||||
+# define pthread_in_use() (pthread_kill != NULL)
|
||||
# endif
|
||||
|
||||
# else
|
13
packages/fetchmail/build.sh
Normal file
13
packages/fetchmail/build.sh
Normal file
@ -0,0 +1,13 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.fetchmail.info/
|
||||
TERMUX_PKG_DESCRIPTION="A remote-mail retrieval utility"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=6.4.22
|
||||
TERMUX_PKG_SRCURL=https://sourceforge.net/projects/fetchmail/files/branch_${TERMUX_PKG_VERSION:0:3}/fetchmail-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=cc6818bd59435602169fa292d6d163d56b21c7f53112829470a3aceabe612c84
|
||||
TERMUX_PKG_DEPENDS="libcrypt, openssl"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ssl=$TERMUX_PREFIX"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
export LIBS="-llog"
|
||||
}
|
45
packages/fetchmail/fix-passwordlen-redefinition.patch
Normal file
45
packages/fetchmail/fix-passwordlen-redefinition.patch
Normal file
@ -0,0 +1,45 @@
|
||||
diff -uNr fetchmail-6.4.1/fetchmail.h fetchmail-6.4.1.mod/fetchmail.h
|
||||
--- fetchmail-6.4.1/fetchmail.h 2019-09-28 11:52:03.000000000 +0300
|
||||
+++ fetchmail-6.4.1.mod/fetchmail.h 2019-10-31 15:03:00.008488320 +0200
|
||||
@@ -114,7 +114,7 @@
|
||||
#define MSGBUFSIZE 8192
|
||||
|
||||
#define NAMELEN 64 /* max username length */
|
||||
-#define PASSWORDLEN 256 /* max password length */
|
||||
+#define FETCHMAIL_PASSWORDLEN 256 /* max password length */
|
||||
#define DIGESTLEN 33 /* length of MD5 digest */
|
||||
|
||||
/* exit code values */
|
||||
@@ -463,7 +463,7 @@
|
||||
extern flag configdump; /* dump control blocks as Python dictionary */
|
||||
extern const char *fetchmailhost; /* either "localhost" or an FQDN */
|
||||
extern int suppress_tags; /* suppress tags in tagged protocols? */
|
||||
-extern char shroud[PASSWORDLEN*2+3]; /* string to shroud in debug output */
|
||||
+extern char shroud[FETCHMAIL_PASSWORDLEN*2+3]; /* string to shroud in debug output */
|
||||
#ifdef SDPS_ENABLE
|
||||
extern char *sdps_envfrom;
|
||||
extern char *sdps_envto;
|
||||
diff -uNr fetchmail-6.4.1/getpass.c fetchmail-6.4.1.mod/getpass.c
|
||||
--- fetchmail-6.4.1/getpass.c 2019-08-24 11:49:43.000000000 +0300
|
||||
+++ fetchmail-6.4.1.mod/getpass.c 2019-10-31 15:03:10.211855090 +0200
|
||||
@@ -24,7 +24,7 @@
|
||||
#include "fetchmail.h"
|
||||
#include "i18n.h"
|
||||
|
||||
-#define INPUT_BUF_SIZE PASSWORDLEN
|
||||
+#define INPUT_BUF_SIZE FETCHMAIL_PASSWORDLEN
|
||||
|
||||
#if defined(HAVE_TERMIOS_H) && defined(HAVE_TCSETATTR)
|
||||
# include <termios.h>
|
||||
diff -uNr fetchmail-6.4.1/transact.c fetchmail-6.4.1.mod/transact.c
|
||||
--- fetchmail-6.4.1/transact.c 2019-08-28 01:30:05.000000000 +0300
|
||||
+++ fetchmail-6.4.1.mod/transact.c 2019-10-31 15:03:15.288538378 +0200
|
||||
@@ -56,7 +56,7 @@
|
||||
/** Macro to generate the tag and store it in #tag. */
|
||||
#define GENSYM (sprintf(tag, "A%04u", ++tagnum % TAGMOD), tag)
|
||||
static const struct method *protocol; /**< description of the protocol used for the current poll */
|
||||
-char shroud[PASSWORDLEN*2+3]; /**< string to shroud in debug output */
|
||||
+char shroud[FETCHMAIL_PASSWORDLEN*2+3]; /**< string to shroud in debug output */
|
||||
|
||||
/* session variables initialized in do_session() */
|
||||
int mytimeout; /**< value of nonreponse timeout */
|
33
packages/fetchmail/use-python2.patch
Normal file
33
packages/fetchmail/use-python2.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff -uNr fetchmail-6.3.26/Makefile.am fetchmail-6.3.26.mod/Makefile.am
|
||||
--- fetchmail-6.3.26/Makefile.am 2013-04-23 23:00:45.000000000 +0300
|
||||
+++ fetchmail-6.3.26.mod/Makefile.am 2019-07-01 23:34:02.456251878 +0300
|
||||
@@ -190,7 +190,7 @@
|
||||
Doxyfile
|
||||
|
||||
fetchmailconf:
|
||||
- ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
|
||||
+ ( echo '#! /bin/sh' && echo 'exec python2 @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
|
||||
|
||||
FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
|
||||
AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
|
||||
diff -uNr fetchmail-6.3.26/Makefile.in fetchmail-6.3.26.mod/Makefile.in
|
||||
--- fetchmail-6.3.26/Makefile.in 2013-04-24 00:36:56.000000000 +0300
|
||||
+++ fetchmail-6.3.26.mod/Makefile.in 2019-07-01 23:33:45.826122087 +0300
|
||||
@@ -1754,7 +1754,7 @@
|
||||
$(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
|
||||
|
||||
fetchmailconf:
|
||||
- ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
|
||||
+ ( echo '#! /bin/sh' && echo 'exec python2 @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
|
||||
|
||||
FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
|
||||
AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
|
||||
diff -uNr fetchmail-6.3.26/fetchmailconf.py fetchmail-6.3.26.mod/fetchmailconf.py
|
||||
--- fetchmail-6.3.26/fetchmailconf.py 2013-04-23 23:00:45.000000000 +0300
|
||||
+++ fetchmail-6.3.26.mod/fetchmailconf.py 2019-07-01 23:21:00.873525116 +0300
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python2
|
||||
#
|
||||
# A GUI configurator for generating fetchmail configuration files.
|
||||
# by Eric S. Raymond, <esr@snark.thyrsus.com>,
|
12
packages/gitflow-avh/build.sh
Normal file
12
packages/gitflow-avh/build.sh
Normal file
@ -0,0 +1,12 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/petervanderdoes/gitflow/
|
||||
TERMUX_PKG_DESCRIPTION="Extend git with Vincent Driessen's branching model. The AVH Edition adds more functionality."
|
||||
TERMUX_PKG_LICENSE="LGPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.12.3
|
||||
TERMUX_PKG_REVISION=9
|
||||
TERMUX_PKG_SRCURL=https://github.com/petervanderdoes/gitflow/archive/$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=54e9fd81aa1aa8215c865503dc6377da205653c784d6c97baad3dafd20728e06
|
||||
TERMUX_PKG_DEPENDS="dash, git"
|
||||
TERMUX_PKG_EXTRA_MAKE_ARGS="prefix=$TERMUX_PREFIX"
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
22
packages/intltool/build.sh
Normal file
22
packages/intltool/build.sh
Normal file
@ -0,0 +1,22 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://launchpad.net/intltool
|
||||
TERMUX_PKG_DESCRIPTION="The internationalization tool collection"
|
||||
TERMUX_PKG_MAINTAINER="@suhan-paradkar"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_VERSION=0.51.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://launchpad.net/intltool/trunk/$TERMUX_PKG_VERSION/+download/intltool-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=67c74d94196b153b774ab9f89b2fa6c6ba79352407037c8c14d5aeb334e959cd
|
||||
TERMUX_PKG_DEPENDS="perl"
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
cat <<- POSTINST_EOF > ./postinst
|
||||
#!$TERMUX_PREFIX/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Sideloading Perl XML::Parser..."
|
||||
cpan install XML::Parser
|
||||
|
||||
exit 0
|
||||
POSTINST_EOF
|
||||
}
|
20
packages/jigdo/build.sh
Normal file
20
packages/jigdo/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://atterer.org/jigdo/
|
||||
TERMUX_PKG_DESCRIPTION="Distribute large images by sending and receiving the files that make them up"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=0.8.0
|
||||
TERMUX_PKG_REVISION=5
|
||||
TERMUX_PKG_SRCURL=https://www.einval.com/~steve/software/jigdo/download/jigdo-$TERMUX_PKG_VERSION.tar.xz
|
||||
TERMUX_PKG_SHA256=f253f72b5719716a7f039877a97ebaf4ba96e877510fca0fb42010d0793db6a4
|
||||
TERMUX_PKG_DEPENDS="libbz2, libc++, libdb, wget, zlib"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
--mandir=$TERMUX_PREFIX/share/man
|
||||
--without-gui
|
||||
"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
# Should prevent random failures on installation step.
|
||||
export TERMUX_MAKE_PROCESSES=1
|
||||
}
|
10
packages/libburn/build.sh
Normal file
10
packages/libburn/build.sh
Normal file
@ -0,0 +1,10 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://dev.lovelyhq.com/libburnia
|
||||
TERMUX_PKG_DESCRIPTION="Library for reading, mastering and writing optical discs"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.5.4
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=http://files.libburnia-project.org/releases/libburn-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=525059d10759c5cb8148eebc863bb510e311c663603da7bd2d21c46b7cf63b54
|
||||
TERMUX_PKG_BREAKS="libburn-dev"
|
||||
TERMUX_PKG_REPLACES="libburn-dev"
|
12
packages/libburn/configure.patch
Normal file
12
packages/libburn/configure.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr libburn-1.5.0/configure libburn-1.5.0.mod/configure
|
||||
--- libburn-1.5.0/configure 2018-09-15 14:55:33.000000000 +0300
|
||||
+++ libburn-1.5.0.mod/configure 2019-07-03 22:55:41.489672172 +0300
|
||||
@@ -12269,7 +12269,7 @@
|
||||
done
|
||||
|
||||
|
||||
-THREAD_LIBS=-lpthread
|
||||
+THREAD_LIBS=
|
||||
|
||||
|
||||
|
15
packages/libisoburn/build.sh
Normal file
15
packages/libisoburn/build.sh
Normal file
@ -0,0 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://dev.lovelyhq.com/libburnia
|
||||
TERMUX_PKG_DESCRIPTION="Frontend for libraries libburn and libisofs"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.5.4
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=http://files.libburnia-project.org/releases/libisoburn-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=2d89846d43880f17fa591c53b3bea42ffb803628e4e630c680fc2c9184f79132
|
||||
TERMUX_PKG_DEPENDS="libburn, libisofs, readline"
|
||||
TERMUX_PKG_CONFLICTS="xorriso"
|
||||
TERMUX_PKG_BREAKS="libisoburn-dev"
|
||||
TERMUX_PKG_REPLACES="libisoburn-dev"
|
||||
|
||||
# We don't have tk.
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="bin/xorriso-tcltk"
|
12
packages/libisoburn/configure.patch
Normal file
12
packages/libisoburn/configure.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr libisoburn-1.5.0/configure libisoburn-1.5.0.mod/configure
|
||||
--- libisoburn-1.5.0/configure 2018-09-15 17:16:51.000000000 +0300
|
||||
+++ libisoburn-1.5.0.mod/configure 2019-07-03 23:32:25.076457035 +0300
|
||||
@@ -12630,7 +12630,7 @@
|
||||
|
||||
fi
|
||||
|
||||
-THREAD_LIBS=-lpthread
|
||||
+THREAD_LIBS=
|
||||
|
||||
|
||||
|
12
packages/libisofs/build.sh
Normal file
12
packages/libisofs/build.sh
Normal file
@ -0,0 +1,12 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://dev.lovelyhq.com/libburnia
|
||||
TERMUX_PKG_DESCRIPTION="Library to pack up hard disk files and directories into a ISO 9660 disk image"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.5.4
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=http://files.libburnia-project.org/releases/libisofs-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=aaa0ed80a7501979316f505b0b017f29cba0ea5463b751143bad2c360215a88e
|
||||
TERMUX_PKG_DEPENDS="libiconv, zlib"
|
||||
TERMUX_PKG_BREAKS="libisofs-dev"
|
||||
TERMUX_PKG_REPLACES="libisofs-dev"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
12
packages/libisofs/configure.patch
Normal file
12
packages/libisofs/configure.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -uNr libisofs-1.5.0/configure libisofs-1.5.0.mod/configure
|
||||
--- libisofs-1.5.0/configure 2018-09-16 11:40:44.000000000 +0300
|
||||
+++ libisofs-1.5.0.mod/configure 2019-07-03 23:00:54.218751674 +0300
|
||||
@@ -12593,7 +12593,7 @@
|
||||
fi
|
||||
|
||||
|
||||
-THREAD_LIBS=-lpthread
|
||||
+THREAD_LIBS=
|
||||
|
||||
|
||||
|
20
packages/libopenfec/build.sh
Normal file
20
packages/libopenfec/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://openfec.org
|
||||
TERMUX_PKG_DESCRIPTION="Application-Level Forward Erasure Correction implementation library"
|
||||
TERMUX_PKG_LICENSE="CeCILL-C"
|
||||
TERMUX_PKG_LICENSE_FILE="LICENCE_CeCILL-C_V1-en.txt"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.4.2.4
|
||||
TERMUX_PKG_REVISION=10
|
||||
TERMUX_PKG_SRCURL=https://github.com/roc-project/openfec/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=691e3ec41b948e93dd34c690139624e2e20ed390e6a5f000f238491574343a16
|
||||
TERMUX_PKG_BREAKS="libopenfec-dev"
|
||||
TERMUX_PKG_REPLACES="libopenfec-dev"
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm600 "$TERMUX_PKG_SRCDIR/bin/Release/libopenfec.so" "$TERMUX_PREFIX/lib/libopenfec.so"
|
||||
|
||||
cd $TERMUX_PKG_SRCDIR/src
|
||||
local include; for include in $(find . -type f -iname \*.h | sed 's@^\./@@'); do
|
||||
install -Dm600 "$include" "$TERMUX_PREFIX"/include/openfec/"$include"
|
||||
done
|
||||
}
|
20
packages/libtd/build.sh
Normal file
20
packages/libtd/build.sh
Normal file
@ -0,0 +1,20 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://core.telegram.org/tdlib/
|
||||
TERMUX_PKG_DESCRIPTION="Library for building Telegram clients"
|
||||
TERMUX_PKG_LICENSE="BSL-1.0"
|
||||
TERMUX_PKG_VERSION=1.7.0
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=https://github.com/tdlib/td/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=3daaf419f1738b7e0ac0e8a08f07e01a1faaf51175a59c0b113c15e30c69e173
|
||||
TERMUX_PKG_DEPENDS="readline, openssl (>= 1.1.1), zlib"
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_host_build() {
|
||||
termux_setup_cmake
|
||||
cmake "-DCMAKE_BUILD_TYPE=Release" "$TERMUX_PKG_SRCDIR"
|
||||
cmake --build . --target prepare_cross_compiling
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
# Fix rebuilds without ./clean.sh.
|
||||
rm -rf $TERMUX_PKG_HOSTBUILD_DIR
|
||||
}
|
62
packages/nmh/build.sh
Normal file
62
packages/nmh/build.sh
Normal file
@ -0,0 +1,62 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://www.nongnu.org/nmh/
|
||||
TERMUX_PKG_DESCRIPTION="Powerful electronic mail handling system"
|
||||
TERMUX_PKG_LICENSE="BSD"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1.7.1
|
||||
TERMUX_PKG_REVISION=7
|
||||
TERMUX_PKG_SRCURL=http://download.savannah.nongnu.org/releases/nmh/nmh-$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=f1fb94bbf7d95fcd43277c7cfda55633a047187f57afc6c1bb9321852bd07c11
|
||||
TERMUX_PKG_DEPENDS="gdbm, libdb, libiconv, libsasl, openssl"
|
||||
TERMUX_PKG_BUILD_DEPENDS="ncurses"
|
||||
|
||||
# We don't have complete sendmail utility.
|
||||
# Using here a one from busybox, even if it may not work.
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
|
||||
ac_cv_path_sendmailpath=$TERMUX_PREFIX/bin/applets/sendmail
|
||||
--with-cyrus-sasl
|
||||
--with-tls"
|
||||
|
||||
TERMUX_PKG_CONFFILES="
|
||||
etc/nmh/MailAliases
|
||||
etc/nmh/components
|
||||
etc/nmh/digestcomps
|
||||
etc/nmh/distcomps
|
||||
etc/nmh/forwcomps
|
||||
etc/nmh/mhl.body
|
||||
etc/nmh/mhl.digest
|
||||
etc/nmh/mhl.format
|
||||
etc/nmh/mhl.forward
|
||||
etc/nmh/mhl.headers
|
||||
etc/nmh/mhl.reply
|
||||
etc/nmh/mhn.defaults
|
||||
etc/nmh/mts.conf
|
||||
etc/nmh/rcvdistcomps
|
||||
etc/nmh/rcvdistcomps.outbox
|
||||
etc/nmh/replcomps
|
||||
etc/nmh/replgroupcomps
|
||||
etc/nmh/scan.MMDDYY
|
||||
etc/nmh/scan.YYYYMMDD
|
||||
etc/nmh/scan.default
|
||||
etc/nmh/scan.mailx
|
||||
etc/nmh/scan.nomime
|
||||
etc/nmh/scan.size
|
||||
etc/nmh/scan.time
|
||||
etc/nmh/scan.timely
|
||||
etc/nmh/scan.unseen"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
TERMUX_MAKE_PROCESSES=1
|
||||
autoreconf -fi
|
||||
}
|
||||
|
||||
termux_step_post_make_install() {
|
||||
# We disabled hardlinks with a patch. Replace them with
|
||||
# symlinks here.
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/flist "$TERMUX_PREFIX"/bin/flists
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/folder "$TERMUX_PREFIX"/bin/folders
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/new "$TERMUX_PREFIX"/bin/fnext
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/new "$TERMUX_PREFIX"/bin/fprev
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/new "$TERMUX_PREFIX"/bin/unseen
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/show "$TERMUX_PREFIX"/bin/prev
|
||||
ln -sfr "$TERMUX_PREFIX"/bin/show "$TERMUX_PREFIX"/bin/next
|
||||
}
|
24
packages/nmh/no-hardlinks.patch
Normal file
24
packages/nmh/no-hardlinks.patch
Normal file
@ -0,0 +1,24 @@
|
||||
diff -uNr nmh-1.7.1/Makefile.am nmh-1.7.1.mod/Makefile.am
|
||||
--- nmh-1.7.1/Makefile.am 2018-03-06 21:05:55.000000000 +0200
|
||||
+++ nmh-1.7.1.mod/Makefile.am 2019-07-01 14:28:31.650669954 +0300
|
||||
@@ -901,13 +901,13 @@
|
||||
@rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
|
||||
@rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
|
||||
@rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
|
||||
- $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
|
||||
+# $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
|
||||
if test x$(SETGID_MAIL) != x; then \
|
||||
chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT) && \
|
||||
chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \
|
30
packages/racket/build.sh
Normal file
30
packages/racket/build.sh
Normal file
@ -0,0 +1,30 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://racket-lang.org
|
||||
TERMUX_PKG_DESCRIPTION="Full-spectrum programming language going beyond Lisp and Scheme"
|
||||
TERMUX_PKG_LICENSE="GPL-3.0, LGPL-3.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=7.4
|
||||
TERMUX_PKG_REVISION=6
|
||||
TERMUX_PKG_SRCURL=https://www.cs.utah.edu/plt/installers/${TERMUX_PKG_VERSION}/racket-minimal-${TERMUX_PKG_VERSION}-src-builtpkgs.tgz
|
||||
TERMUX_PKG_SHA256=c819608cee733c98241e329274f3567956baaaa7283e061e45342f533bd9a51b
|
||||
TERMUX_PKG_DEPENDS="libffi, libiconv"
|
||||
TERMUX_PKG_NO_DEVELSPLIT=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
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"
|
||||
LDFLAGS+=" -liconv -llog"
|
||||
export TERMUX_PKG_SRCDIR="$TERMUX_PKG_SRCDIR/src"
|
||||
}
|
12
packages/racket/collects-racket-system.rkt.patch
Normal file
12
packages/racket/collects-racket-system.rkt.patch
Normal file
@ -0,0 +1,12 @@
|
||||
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")])
|
10
packages/racket/newgc.c.patch
Normal file
10
packages/racket/newgc.c.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- ../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"
|
18
packages/racket/rktio_dll.c.patch
Normal file
18
packages/racket/rktio_dll.c.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- ../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
|
32
packages/racket/sconfig.h.patch
Normal file
32
packages/racket/sconfig.h.patch
Normal file
@ -0,0 +1,32 @@
|
||||
--- ../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
|
13
packages/telegram-cli/Makefile.in.patch
Normal file
13
packages/telegram-cli/Makefile.in.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index 8342462..ae845f6 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -6,7 +6,7 @@ CPPFLAGS=@CPPFLAGS@ @OPENSSL_INCLUDES@
|
||||
DEFS=@DEFS@
|
||||
COMPILE_FLAGS=${CFLAGS} ${CPFLAGS} ${CPPFLAGS} ${DEFS} -Wall -Werror -Wextra -Wno-missing-field-initializers -Wno-deprecated-declarations -fno-strict-aliasing -fno-omit-frame-pointer -ggdb -Wno-unused-parameter -fPIC
|
||||
EXTRA_LIBS=@LIBS@ @EXTRA_LIBS@ @OPENSSL_LIBS@
|
||||
-LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS} -ldl -lpthread -lutil
|
||||
+LOCAL_LDFLAGS=-rdynamic -ggdb -levent ${EXTRA_LIBS} -ldl
|
||||
LINK_FLAGS=${LDFLAGS} ${LOCAL_LDFLAGS}
|
||||
|
||||
DEP=dep
|
45
packages/telegram-cli/build.sh
Normal file
45
packages/telegram-cli/build.sh
Normal file
@ -0,0 +1,45 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/vysheng/tg
|
||||
TERMUX_PKG_DESCRIPTION="Telegram messenger CLI"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=1:1.4.1
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_DEPENDS="libconfig, libevent, libjansson, openssl, readline, zlib"
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-liblua"
|
||||
TERMUX_PKG_BUILD_IN_SRC=true
|
||||
TERMUX_PKG_SKIP_SRC_EXTRACT=true
|
||||
TERMUX_PKG_HOSTBUILD=true
|
||||
|
||||
termux_step_get_source() {
|
||||
mkdir -p "$TERMUX_PKG_SRCDIR"
|
||||
cd "$TERMUX_PKG_SRCDIR"
|
||||
git clone https://github.com/vysheng/tg
|
||||
cd tg
|
||||
git checkout 6547c0b21b977b327b3c5e8142963f4bc246187a
|
||||
git submodule update --init --recursive
|
||||
mv * ../
|
||||
}
|
||||
|
||||
termux_step_host_build() {
|
||||
cp -rf $TERMUX_PKG_SRCDIR/* ./
|
||||
./configure --disable-liblua
|
||||
make bin/generate
|
||||
make bin/tl-parser
|
||||
}
|
||||
|
||||
termux_step_pre_configure() {
|
||||
# avoid duplicated symbol errors
|
||||
CFLAGS+=" -fcommon"
|
||||
}
|
||||
|
||||
termux_step_post_configure() {
|
||||
cp -a $TERMUX_PKG_HOSTBUILD_DIR/bin ./
|
||||
touch -d "next hour" bin/generate bin/tl-parser
|
||||
sed -i -e 's@-I/usr/local/include@@g' -e 's@-I/usr/include@@g' Makefile
|
||||
}
|
||||
|
||||
termux_step_make_install() {
|
||||
install -Dm700 -t "$TERMUX_PREFIX"/bin/ bin/telegram-cli
|
||||
install -Dm600 tg-server.pub "$TERMUX_PREFIX"/etc/telegram-cli/server.pub
|
||||
install -Dm600 -t "$TERMUX_PREFIX"/share/man/man8/ debian/telegram-cli.8
|
||||
}
|
60
packages/telegram-cli/main.c.patch
Normal file
60
packages/telegram-cli/main.c.patch
Normal file
@ -0,0 +1,60 @@
|
||||
diff --git a/main.c b/main.c
|
||||
index 4776f07..f159ee5 100644
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -45,7 +45,7 @@
|
||||
#include <time.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <signal.h>
|
||||
@@ -173,6 +173,8 @@ char *get_home_directory (void) {
|
||||
if (!str_empty (home_directory)) { return home_directory = tstrdup (home_directory); }
|
||||
home_directory = getenv("HOME");
|
||||
if (!str_empty (home_directory)) { return home_directory = tstrdup (home_directory); }
|
||||
+
|
||||
+#ifndef __ANDROID__
|
||||
struct passwd *current_passwd;
|
||||
uid_t user_id;
|
||||
setpwent ();
|
||||
@@ -185,6 +187,9 @@ char *get_home_directory (void) {
|
||||
}
|
||||
endpwent ();
|
||||
if (str_empty (home_directory)) { home_directory = tstrdup ("."); }
|
||||
+#else
|
||||
+ home_directory = tstrdup ("@TERMUX_HOME@");
|
||||
+#endif
|
||||
return home_directory;
|
||||
}
|
||||
|
||||
@@ -552,6 +557,9 @@ int accept_any_tcp;
|
||||
char *bot_hash;
|
||||
|
||||
int change_user_group () {
|
||||
+#ifdef __ANDROID__
|
||||
+ return 0;
|
||||
+#endif
|
||||
char *username = set_user_name;
|
||||
char *groupname = set_group_name;
|
||||
struct passwd *pw;
|
||||
@@ -798,7 +806,7 @@ void args_parse (int argc, char **argv) {
|
||||
}
|
||||
}
|
||||
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
void print_backtrace (void) {
|
||||
void *buffer[255];
|
||||
const int calls = backtrace (buffer, sizeof (buffer) / sizeof (void *));
|
||||
@@ -993,7 +1001,7 @@ int main (int argc, char **argv) {
|
||||
#ifdef __FreeBSD__
|
||||
tgl_set_rsa_key (TLS, "/usr/local/etc/" PROG_NAME "/server.pub");
|
||||
#else
|
||||
- tgl_set_rsa_key (TLS, "/etc/" PROG_NAME "/server.pub");
|
||||
+ tgl_set_rsa_key (TLS, "@TERMUX_PREFIX@/etc/" PROG_NAME "/server.pub");
|
||||
#endif
|
||||
tgl_set_rsa_key (TLS, "tg-server.pub");
|
||||
|
34
packages/telegram-cli/openssl-1.1.x.patch
Normal file
34
packages/telegram-cli/openssl-1.1.x.patch
Normal file
@ -0,0 +1,34 @@
|
||||
diff --git a/crypto/rsa_pem_openssl.c b/crypto/rsa_pem_openssl.c
|
||||
index db653f2..0d9d04c 100644
|
||||
--- a/tgl/crypto/rsa_pem_openssl.c
|
||||
+++ b/tgl/crypto/rsa_pem_openssl.c
|
||||
@@ -38,16 +38,22 @@ TGLC_WRAPPER_ASSOC(bn,BIGNUM)
|
||||
|
||||
TGLC_rsa *TGLC_rsa_new (unsigned long e, int n_bytes, const unsigned char *n) {
|
||||
RSA *ret = RSA_new ();
|
||||
- ret->e = unwrap_bn (TGLC_bn_new ());
|
||||
- TGLC_bn_set_word (wrap_bn (ret->e), e);
|
||||
- ret->n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL));
|
||||
+ BIGNUM *ret_e = unwrap_bn (TGLC_bn_new ());
|
||||
+ BIGNUM *ret_n = unwrap_bn (TGLC_bn_bin2bn (n, n_bytes, NULL));
|
||||
+ RSA_set0_key (ret, ret_n, ret_e, NULL);
|
||||
+ TGLC_bn_set_word (wrap_bn (ret_e), e);
|
||||
return wrap_rsa (ret);
|
||||
}
|
||||
|
||||
-#define RSA_GETTER(M) \
|
||||
- TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \
|
||||
- return wrap_bn (unwrap_rsa (key)->M); \
|
||||
- } \
|
||||
+#define RSA_GETTER(M) \
|
||||
+TGLC_bn *TGLC_rsa_ ## M (TGLC_rsa *key) { \
|
||||
+ BIGNUM *rsa_n, *rsa_e, *rsa_d; \
|
||||
+ RSA_get0_key(unwrap_rsa (key), \
|
||||
+ (const BIGNUM **) &rsa_n, \
|
||||
+ (const BIGNUM **) &rsa_e, \
|
||||
+ (const BIGNUM **) &rsa_d); \
|
||||
+ return wrap_bn (rsa_ ## M); \
|
||||
+}
|
||||
|
||||
RSA_GETTER(n);
|
||||
RSA_GETTER(e);
|
22
packages/telegram-cli/tgl-generate.c.patch
Normal file
22
packages/telegram-cli/tgl-generate.c.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/generate.c b/generate.c
|
||||
index 83d1664..cc96875 100644
|
||||
--- a/tgl/generate.c
|
||||
+++ b/tgl/generate.c
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "config.h"
|
||||
#include <stdio.h>
|
||||
#include <signal.h>
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
@@ -2954,7 +2954,7 @@ void hexdump (int *in_ptr, int *in_end) {
|
||||
printf ("\n");
|
||||
}*/
|
||||
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
void print_backtrace (void) {
|
||||
void *buffer[255];
|
||||
const int calls = backtrace (buffer, sizeof (buffer) / sizeof (void *));
|
22
packages/telegram-cli/tgl-tl-parser-tlc.c.patch
Normal file
22
packages/telegram-cli/tgl-tl-parser-tlc.c.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/tlc.c b/tlc.c
|
||||
index cd0300f..5683793 100644
|
||||
--- a/tgl/tl-parser/tlc.c
|
||||
+++ b/tgl/tl-parser/tlc.c
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <signal.h>
|
||||
#include "config.h"
|
||||
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <stdarg.h>
|
||||
@@ -77,7 +77,7 @@ void hexdump (int *in_ptr, int *in_end) {
|
||||
printf ("\n");
|
||||
}
|
||||
|
||||
-#ifdef HAVE_EXECINFO_H
|
||||
+#if defined(HAVE_EXECINFO_H) && !defined(__ANDROID__)
|
||||
void print_backtrace (void) {
|
||||
void *buffer[255];
|
||||
const int calls = backtrace (buffer, sizeof (buffer) / sizeof (void *));
|
29
packages/texlive-installer/TLUtils.pm.diff
Normal file
29
packages/texlive-installer/TLUtils.pm.diff
Normal file
@ -0,0 +1,29 @@
|
||||
--- ./tlpkg/TeXLive/TLUtils.pm.orig 2020-05-24 18:18:53.449497897 +0200
|
||||
+++ ./tlpkg/TeXLive/TLUtils.pm 2020-05-24 18:20:12.493497841 +0200
|
||||
@@ -1678,7 +1678,7 @@
|
||||
}
|
||||
my $cmd = $keyval{'cmd'};
|
||||
|
||||
- my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
|
||||
+ my $texdir = `kpsewhich -var-value=TEXMFROOT`;
|
||||
chomp($texdir);
|
||||
my $texdir_bsl = conv_to_w32_path($texdir);
|
||||
$cmd =~ s!^("?)TEXDIR/!$1$texdir/!g;
|
||||
@@ -1753,7 +1753,7 @@
|
||||
if (win32() && defined($keyval{'filew32'})) {
|
||||
$file = $keyval{'filew32'};
|
||||
}
|
||||
- my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
|
||||
+ my $texdir = `kpsewhich -var-value=TEXMFROOT`;
|
||||
chomp($texdir);
|
||||
my @syscmd;
|
||||
if ($file =~ m/\.pl$/i) {
|
||||
@@ -1828,7 +1828,7 @@
|
||||
|
||||
&log("postaction $how shortcut for " . $tlpobj->name . "\n");
|
||||
if ($how eq "install") {
|
||||
- my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
|
||||
+ my $texdir = `kpsewhich -var-value=TEXMFROOT`;
|
||||
chomp($texdir);
|
||||
my $texdir_bsl = conv_to_w32_path($texdir);
|
||||
$icon =~ s!^TEXDIR/!$texdir/!;
|
60
packages/texlive-installer/build.sh
Normal file
60
packages/texlive-installer/build.sh
Normal file
@ -0,0 +1,60 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.tug.org/texlive/
|
||||
TERMUX_PKG_DESCRIPTION="Wrapper around texlive's install-tl script"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Henrik Grimler @Grimler91"
|
||||
TERMUX_PKG_VERSION=20210325
|
||||
TERMUX_PKG_REVISION=3
|
||||
TERMUX_PKG_SRCURL=ftp://ftp.tug.org/texlive/historic/${TERMUX_PKG_VERSION:0:4}/install-tl-unx.tar.gz
|
||||
TERMUX_PKG_SHA256=74eac0855e1e40c8db4f28b24ef354bd7263c1f76031bdc02b52156b572b7a1d
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_DEPENDS="perl, texlive-bin (>= 20200406-4), gnupg, curl, lz4, xz-utils"
|
||||
TERMUX_PKG_REPLACES="texlive"
|
||||
TERMUX_PKG_BREAKS="texlive"
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="opt/texlive/install-tl/texmf-dist"
|
||||
|
||||
termux_step_make_install() {
|
||||
mkdir -p $TERMUX_PREFIX/opt/texlive
|
||||
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
|
||||
-e "s|@INSTALLER_VERSION@|${TERMUX_PKG_VERSION}|g" \
|
||||
"$TERMUX_PKG_BUILDER_DIR"/installer.sh \
|
||||
> $TERMUX_PREFIX/bin/termux-install-tl
|
||||
chmod 700 $TERMUX_PREFIX/bin/termux-install-tl
|
||||
|
||||
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
|
||||
"$TERMUX_PKG_BUILDER_DIR"/termux-patch-texlive.sh \
|
||||
> $TERMUX_PREFIX/bin/termux-patch-texlive
|
||||
chmod 700 $TERMUX_PREFIX/bin/termux-patch-texlive
|
||||
|
||||
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" \
|
||||
-e "s|@YEAR@|${TERMUX_PKG_VERSION:0:4}|g" \
|
||||
"$TERMUX_PKG_BUILDER_DIR"/termux.profile \
|
||||
> $TERMUX_PREFIX/opt/texlive/termux.profile
|
||||
chmod 600 $TERMUX_PREFIX/opt/texlive/termux.profile
|
||||
|
||||
for DIFF in "$TERMUX_PKG_BUILDER_DIR"/*.diff; do
|
||||
sed -e "s|@TERMUX_PREFIX@|${TERMUX_PREFIX}|g" $DIFF \
|
||||
> $TERMUX_PREFIX/opt/texlive/$(basename $DIFF)
|
||||
chmod 600 $TERMUX_PREFIX/opt/texlive/$(basename $DIFF)
|
||||
done
|
||||
|
||||
if [ -d "$TERMUX_PREFIX/opt/texlive/install-tl" ]; then
|
||||
rm -r "$TERMUX_PREFIX/opt/texlive/install-tl"
|
||||
fi
|
||||
cp -r $TERMUX_PKG_SRCDIR/ $TERMUX_PREFIX/opt/texlive/install-tl
|
||||
|
||||
mkdir -p $TERMUX_PREFIX/etc/profile.d/
|
||||
echo "export PATH=\$PATH:$TERMUX_PREFIX/bin/texlive" \
|
||||
> $TERMUX_PREFIX/etc/profile.d/texlive.sh
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "echo ''"
|
||||
echo "echo '[*] You can now run the texlive installer by running'"
|
||||
echo "echo ''"
|
||||
echo "echo ' termux-install-tl'"
|
||||
echo "echo ''"
|
||||
echo "echo ' It forwards extra arguments to the install-tl script.'"
|
||||
} > ./postinst
|
||||
}
|
11
packages/texlive-installer/cjk-gs-integrate.pl.diff
Normal file
11
packages/texlive-installer/cjk-gs-integrate.pl.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../cjk-gs-integrate.pl.orig 2020-05-01 17:26:10.709915553 +0200
|
||||
+++ ./texmf-dist/scripts/cjk-gs-integrate/cjk-gs-integrate.pl 2020-05-01 17:28:25.023071451 +0200
|
||||
@@ -1937,7 +1937,7 @@
|
||||
my $foundres = '';
|
||||
if (win32()) {
|
||||
# determine tlgs or native gs
|
||||
- chomp(my $foo = `kpsewhich -var-value=SELFAUTOPARENT`);
|
||||
+ chomp(my $foo = `kpsewhich -var-value=TEXMFROOT`);
|
||||
if ( -d "$foo/tlpkg/tlgs" ) {
|
||||
# should be texlive with tlgs
|
||||
print_debug("Assuming tlgs win32 ...\n");
|
72
packages/texlive-installer/crossrefware.diff
Normal file
72
packages/texlive-installer/crossrefware.diff
Normal file
@ -0,0 +1,72 @@
|
||||
diff -u -r ../crossrefware.orig/bbl2bib.pl ./texmf-dist/scripts/crossrefware/bbl2bib.pl
|
||||
--- ../crossrefware.orig/bbl2bib.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/bbl2bib.pl 2020-05-01 17:28:25.033071437 +0200
|
||||
@@ -98,7 +98,7 @@
|
||||
use strict;
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
||||
diff -u -r ../crossrefware.orig/bibdoiadd.pl ./texmf-dist/scripts/crossrefware/bibdoiadd.pl
|
||||
--- ../crossrefware.orig/bibdoiadd.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/bibdoiadd.pl 2020-05-01 17:28:25.043071424 +0200
|
||||
@@ -97,7 +97,7 @@
|
||||
use strict;
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
||||
diff -u -r ../crossrefware.orig/bibmradd.pl ./texmf-dist/scripts/crossrefware/bibmradd.pl
|
||||
--- ../crossrefware.orig/bibmradd.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/bibmradd.pl 2020-05-01 17:28:25.036404766 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
use strict;
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
||||
diff -u -r ../crossrefware.orig/biburl2doi.pl ./texmf-dist/scripts/crossrefware/biburl2doi.pl
|
||||
--- ../crossrefware.orig/biburl2doi.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/biburl2doi.pl 2020-05-01 17:28:25.039738095 +0200
|
||||
@@ -51,7 +51,7 @@
|
||||
use strict;
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
||||
diff -u -r ../crossrefware.orig/bibzbladd.pl ./texmf-dist/scripts/crossrefware/bibzbladd.pl
|
||||
--- ../crossrefware.orig/bibzbladd.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/bibzbladd.pl 2020-05-01 17:28:25.043071424 +0200
|
||||
@@ -64,7 +64,7 @@
|
||||
use strict;
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
||||
diff -u -r ../crossrefware.orig/ltx2crossrefxml.pl ./texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl
|
||||
--- ../crossrefware.orig/ltx2crossrefxml.pl 2020-05-01 17:25:50.416609028 +0200
|
||||
+++ ./texmf-dist/scripts/crossrefware/ltx2crossrefxml.pl 2020-05-01 17:28:25.036404766 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/bibtexperllibs";
|
||||
}
|
41
packages/texlive-installer/install-tl.patch
Normal file
41
packages/texlive-installer/install-tl.patch
Normal file
@ -0,0 +1,41 @@
|
||||
--- ../install-tl.orig 2020-04-30 07:08:00.824228666 +0200
|
||||
+++ ./install-tl 2020-04-30 07:09:41.060703296 +0200
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
# debugging communication with external gui: use shared logfile
|
||||
|
||||
-our $dblfile = "/tmp/dblog";
|
||||
+our $dblfile = "@TERMUX_PREFIX@/tmp/dblog";
|
||||
$dblfile = $ENV{'TEMP'} . "\\dblog.txt" if ($^O =~ /^MSWin/i);
|
||||
$dblfile = $ENV{'TMPDIR'} . "/dblog" if ($^O eq 'darwin'
|
||||
&& exists $ENV{'TMPDIR'});
|
||||
@@ -861,8 +861,6 @@
|
||||
if ($opt_custom_bin) {
|
||||
if (-d $opt_custom_bin && (-r "$opt_custom_bin/kpsewhich"
|
||||
|| -r "$opt_custom_bin/kpsewhich.exe")) {
|
||||
- info("Platform overridden, binaries taken from $opt_custom_bin\n"
|
||||
- . "and will be installed into .../bin/custom.\n");
|
||||
} else {
|
||||
tldie("$0: -custom-bin argument must be a directory "
|
||||
. "with TeX Live binaries, not like: $opt_custom_bin\n");
|
||||
@@ -980,11 +978,6 @@
|
||||
do_install_packages();
|
||||
if ($opt_custom_bin) {
|
||||
$vars{'this_platform'} = "custom";
|
||||
- my $TEXDIR="$vars{'TEXDIR'}";
|
||||
- mkdirhier("$TEXDIR/bin/custom");
|
||||
- for my $f (<$opt_custom_bin/*>) {
|
||||
- copy($f, "$TEXDIR/bin/custom");
|
||||
- }
|
||||
}
|
||||
}
|
||||
# now we save every scheme that is fully covered by the stuff we have
|
||||
@@ -1612,7 +1605,7 @@
|
||||
set_var_from_alternatives( \$tex_prefix,
|
||||
($opt_in_place ? abs_path($::installerdir) : undef),
|
||||
$tlprefixenv,
|
||||
- (win32() ? getenv('SystemDrive') . '/texlive' : '/usr/local/texlive'));
|
||||
+ (win32() ? getenv('SystemDrive') . '/texlive' : '@TERMUX_PREFIX@/local/texlive'));
|
||||
set_var_from_alternatives( \$vars{'TEXDIR'},
|
||||
$vars{'TEXDIR'},
|
||||
($vars{'instopt_portable'} || $opt_in_place)
|
68
packages/texlive-installer/installer.sh
Normal file
68
packages/texlive-installer/installer.sh
Normal file
@ -0,0 +1,68 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
set -e
|
||||
export PREFIX=@TERMUX_PREFIX@
|
||||
export TMPDIR=@TERMUX_PREFIX@/tmp
|
||||
|
||||
echo ""
|
||||
echo "You will now be shown texlive's install-tl text gui."
|
||||
echo "You can customize settings, but you have to use the"
|
||||
echo "default TEXDIR and custom binaries for texlive to be"
|
||||
echo "able to find and run the binaries."
|
||||
echo ""
|
||||
echo "Press 'c' to continue"
|
||||
|
||||
read -n 1 -s -r ANSWER
|
||||
case $ANSWER in
|
||||
c|C)
|
||||
;;
|
||||
*)
|
||||
echo '[!] Aborting...'
|
||||
exit 1
|
||||
esac
|
||||
|
||||
echo ""
|
||||
echo "[*] Loading..."
|
||||
|
||||
# Update path to make sure the binaries are found
|
||||
source $PREFIX/etc/profile.d/texlive.sh
|
||||
|
||||
$PREFIX/opt/texlive/install-tl/install-tl \
|
||||
-custom-bin $PREFIX/bin/texlive \
|
||||
-init-from-profile $PREFIX/opt/texlive/termux.profile \
|
||||
"$@"
|
||||
|
||||
echo "[*] Installation done."
|
||||
echo ""
|
||||
echo " Some scripts need to be fixed before they will work in termux."
|
||||
echo " The script termux-patch-texlive will now be run to try to fix"
|
||||
echo " known problems. If your texlive breaks in the future after running"
|
||||
echo " tlmgr update --all"
|
||||
echo " then you might be able to fix it by running this script."
|
||||
echo ""
|
||||
echo "Press 'c' to continue"
|
||||
|
||||
read -n 1 -s -r ANSWER
|
||||
case $ANSWER in
|
||||
c|C)
|
||||
;;
|
||||
*)
|
||||
echo '[!] Aborting...'
|
||||
exit 1
|
||||
esac
|
||||
|
||||
$PREFIX/bin/termux-patch-texlive
|
||||
|
||||
echo "[*] Generating format pdflatex with fmtutil"
|
||||
fmtutil-sys --quiet --byfmt pdflatex
|
||||
|
||||
echo "[*] Running updmap"
|
||||
updmap-sys --quiet
|
||||
|
||||
echo "[*] Setting up symlinks"
|
||||
texlinks
|
||||
|
||||
echo "[*] All done. Restart the shell or source"
|
||||
echo " $PREFIX/etc/profile.d/texlive.sh"
|
||||
echo " to add the texlive programs to \$PATH."
|
||||
|
||||
exit 0
|
20
packages/texlive-installer/pdfjam.diff
Normal file
20
packages/texlive-installer/pdfjam.diff
Normal file
@ -0,0 +1,20 @@
|
||||
--- ../pdfjam.orig 2020-04-04 09:23:16.198017919 +0200
|
||||
+++ ./texmf-dist/scripts/pdfjam/pdfjam 2020-04-04 09:24:36.684519772 +0200
|
||||
@@ -21,7 +21,7 @@
|
||||
## The path searched for site-wide configuration files can be set ##
|
||||
## by editing the following variable: ##
|
||||
## ##
|
||||
- configpath='/etc:/usr/share/etc:/usr/local/share:/usr/local/etc' ##
|
||||
+ configpath='@TERMUX_PREFIX@/etc:@TERMUX_PREFIX@/share/etc:/usr/local/share:/usr/local/etc' ##
|
||||
## ##
|
||||
## Nothing else in this file should need to be changed. ##
|
||||
## ##
|
||||
@@ -361,7 +361,7 @@
|
||||
##
|
||||
## Next a permitted location for temporary files on your system:
|
||||
##
|
||||
-tempfileDir='/var/tmp' ## /var/tmp is standard on most unix systems
|
||||
+tempfileDir='@TERMUX_PREFIX@/tmp' ## /var/tmp is standard on most unix systems
|
||||
##
|
||||
##
|
||||
## Default for the output file location:
|
11
packages/texlive-installer/pedigree.pl.diff
Normal file
11
packages/texlive-installer/pedigree.pl.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../pedigree.pl.orig 2020-05-01 17:26:30.863222262 +0200
|
||||
+++ ./texmf-dist/scripts/pedigree-perl/pedigree.pl 2020-05-01 17:28:24.936404899 +0200
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
BEGIN {
|
||||
# find files relative to our installed location within TeX Live
|
||||
- chomp(my $TLMaster = `kpsewhich -var-value=SELFAUTOPARENT`); # TL root
|
||||
+ chomp(my $TLMaster = `kpsewhich -var-value=TEXMFROOT`); # TL root
|
||||
if (length($TLMaster)) {
|
||||
unshift @INC, "$TLMaster/texmf-dist/scripts/pedigree-perl";
|
||||
$TLCONF = "$TLMaster/texmf-config/pedigree/pedigree.cfg";
|
231
packages/texlive-installer/pythontex.diff
Normal file
231
packages/texlive-installer/pythontex.diff
Normal file
@ -0,0 +1,231 @@
|
||||
--- ./texmf-dist/scripts/pythontex/pythontex3.py.orig 2021-06-29 21:49:58.517383332 +0200
|
||||
+++ ./texmf-dist/scripts/pythontex/pythontex3.py 2021-06-29 21:58:43.769382956 +0200
|
||||
@@ -57,13 +57,19 @@
|
||||
from collections import defaultdict, OrderedDict, namedtuple
|
||||
from re import match, sub, search
|
||||
import subprocess
|
||||
-import multiprocessing
|
||||
from pygments.styles import get_all_styles
|
||||
from pythontex_engines import *
|
||||
import textwrap
|
||||
import platform
|
||||
import itertools
|
||||
|
||||
+try:
|
||||
+ import multiprocessing.synchronize # noqa: F401
|
||||
+ from multiprocessing import Pool
|
||||
+except ImportError:
|
||||
+ multiprocessing = False
|
||||
+
|
||||
+
|
||||
if sys.version_info[0] == 2:
|
||||
try:
|
||||
import cPickle as pickle
|
||||
@@ -192,8 +198,9 @@
|
||||
temp_data['hashdependencies'] = False
|
||||
if args.jobs is None:
|
||||
try:
|
||||
- jobs = multiprocessing.cpu_count()
|
||||
+ jobs = os.cpu_count()
|
||||
except NotImplementedError:
|
||||
+ # Is this exception needed with os.cpu_count?
|
||||
jobs = 1
|
||||
temp_data['jobs'] = jobs
|
||||
else:
|
||||
@@ -1145,6 +1152,13 @@
|
||||
|
||||
|
||||
|
||||
+def eval_task(fun_name, arg_list):
|
||||
+ '''
|
||||
+ Some platforms, like android, does not support multiprocessing. For such
|
||||
+ platforms we fall back to this function when running tasks.
|
||||
+ '''
|
||||
+ arg_tuple = tuple(arg_list)
|
||||
+ return eval(fun_name)(*arg_tuple)
|
||||
|
||||
def do_multiprocessing(data, temp_data, old_data, engine_dict):
|
||||
jobname = data['jobname']
|
||||
@@ -1269,7 +1283,14 @@
|
||||
# concurrent processes to a user-specified value for jobs. If the user
|
||||
# has not specified a value, then it will be None, and
|
||||
# multiprocessing.Pool() will use cpu_count().
|
||||
- pool = multiprocessing.Pool(jobs)
|
||||
+ if multiprocessing:
|
||||
+ pool = Pool(jobs)
|
||||
+ # Add task to list of tasks to run asynchronously, from function
|
||||
+ # name and list of args.
|
||||
+ # globals()[fun] converts string with function name into function handle
|
||||
+ async_or_eval = lambda fun, args: pool.apply_async(globals()[fun], args)
|
||||
+ else:
|
||||
+ async_or_eval = eval_task
|
||||
tasks = []
|
||||
|
||||
# If verbose, print a list of processes
|
||||
@@ -1284,39 +1305,39 @@
|
||||
family = key.split('#')[0]
|
||||
# Uncomment the following for debugging, and comment out what follows
|
||||
'''run_code(encoding, outputdir,
|
||||
- workingdir,
|
||||
- cc_dict_begin[family],
|
||||
- code_dict[key],
|
||||
- cc_dict_end[family],
|
||||
- engine_dict[family].language,
|
||||
- engine_dict[family].commands,
|
||||
- engine_dict[family].created,
|
||||
- engine_dict[family].extension,
|
||||
- makestderr, stderrfilename,
|
||||
- code_index_dict[key],
|
||||
- engine_dict[family].errors,
|
||||
- engine_dict[family].warnings,
|
||||
- engine_dict[family].linenumbers,
|
||||
- engine_dict[family].lookbehind,
|
||||
- keeptemps, hashdependencies,
|
||||
- pygments_settings]))'''
|
||||
- tasks.append(pool.apply_async(run_code, [encoding, outputdir,
|
||||
- workingdir,
|
||||
- cc_dict_begin[family],
|
||||
- code_dict[key],
|
||||
- cc_dict_end[family],
|
||||
- engine_dict[family].language,
|
||||
- engine_dict[family].commands,
|
||||
- engine_dict[family].created,
|
||||
- engine_dict[family].extension,
|
||||
- makestderr, stderrfilename,
|
||||
- code_index_dict[key],
|
||||
- engine_dict[family].errors,
|
||||
- engine_dict[family].warnings,
|
||||
- engine_dict[family].linenumbers,
|
||||
- engine_dict[family].lookbehind,
|
||||
- keeptemps, hashdependencies,
|
||||
- pygments_settings]))
|
||||
+ workingdir,
|
||||
+ cc_dict_begin[family],
|
||||
+ code_dict[key],
|
||||
+ cc_dict_end[family],
|
||||
+ engine_dict[family].language,
|
||||
+ engine_dict[family].commands,
|
||||
+ engine_dict[family].created,
|
||||
+ engine_dict[family].extension,
|
||||
+ makestderr, stderrfilename,
|
||||
+ code_index_dict[key],
|
||||
+ engine_dict[family].errors,
|
||||
+ engine_dict[family].warnings,
|
||||
+ engine_dict[family].linenumbers,
|
||||
+ engine_dict[family].lookbehind,
|
||||
+ keeptemps, hashdependencies,
|
||||
+ pygments_settings)'''
|
||||
+ tasks.append(async_or_eval('run_code', [encoding, outputdir,
|
||||
+ workingdir,
|
||||
+ cc_dict_begin[family],
|
||||
+ code_dict[key],
|
||||
+ cc_dict_end[family],
|
||||
+ engine_dict[family].language,
|
||||
+ engine_dict[family].commands,
|
||||
+ engine_dict[family].created,
|
||||
+ engine_dict[family].extension,
|
||||
+ makestderr, stderrfilename,
|
||||
+ code_index_dict[key],
|
||||
+ engine_dict[family].errors,
|
||||
+ engine_dict[family].warnings,
|
||||
+ engine_dict[family].linenumbers,
|
||||
+ engine_dict[family].lookbehind,
|
||||
+ keeptemps, hashdependencies,
|
||||
+ pygments_settings]))
|
||||
if verbose:
|
||||
print(' - Code process ' + key.replace('#', ':'))
|
||||
|
||||
@@ -1324,35 +1345,23 @@
|
||||
for key in cons_dict:
|
||||
family = key.split('#')[0]
|
||||
if engine_dict[family].language.startswith('python'):
|
||||
- if family in pygments_settings:
|
||||
- # Uncomment the following for debugging
|
||||
- '''python_console(jobname, encoding, outputdir, workingdir,
|
||||
- fvextfile, pygments_settings[family],
|
||||
- cc_dict_begin[family], cons_dict[key],
|
||||
- cc_dict_end[family], engine_dict[family].startup,
|
||||
- engine_dict[family].banner,
|
||||
- engine_dict[family].filename)'''
|
||||
- tasks.append(pool.apply_async(python_console, [jobname, encoding,
|
||||
- outputdir, workingdir,
|
||||
- fvextfile,
|
||||
- pygments_settings[family],
|
||||
- cc_dict_begin[family],
|
||||
- cons_dict[key],
|
||||
- cc_dict_end[family],
|
||||
- engine_dict[family].startup,
|
||||
- engine_dict[family].banner,
|
||||
- engine_dict[family].filename]))
|
||||
- else:
|
||||
- tasks.append(pool.apply_async(python_console, [jobname, encoding,
|
||||
- outputdir, workingdir,
|
||||
- fvextfile,
|
||||
- None,
|
||||
- cc_dict_begin[family],
|
||||
- cons_dict[key],
|
||||
- cc_dict_end[family],
|
||||
- engine_dict[family].startup,
|
||||
- engine_dict[family].banner,
|
||||
- engine_dict[family].filename]))
|
||||
+ # Uncomment the following for debugging
|
||||
+ '''python_console(jobname, encoding, outputdir, workingdir,
|
||||
+ fvextfile, pygments_settings[family],
|
||||
+ cc_dict_begin[family], cons_dict[key],
|
||||
+ cc_dict_end[family], engine_dict[family].startup,
|
||||
+ engine_dict[family].banner,
|
||||
+ engine_dict[family].filename)'''
|
||||
+ tasks.append(async_or_eval('python_console', [jobname, encoding,
|
||||
+ outputdir, workingdir,
|
||||
+ fvextfile,
|
||||
+ pygments_settings[family] if family in pygments_settings else None,
|
||||
+ cc_dict_begin[family],
|
||||
+ cons_dict[key],
|
||||
+ cc_dict_end[family],
|
||||
+ engine_dict[family].startup,
|
||||
+ engine_dict[family].banner,
|
||||
+ engine_dict[family].filename]))
|
||||
else:
|
||||
print('* PythonTeX error')
|
||||
print(' Currently, non-Python consoles are not supported')
|
||||
@@ -1365,18 +1374,19 @@
|
||||
# Uncomment the following for debugging
|
||||
# do_pygments(encoding, outputdir, fvextfile, pygments_list,
|
||||
# pygments_settings, typeset_cache, hashdependencies)
|
||||
- tasks.append(pool.apply_async(do_pygments, [encoding, outputdir,
|
||||
- fvextfile,
|
||||
- pygments_list,
|
||||
- pygments_settings,
|
||||
- typeset_cache,
|
||||
- hashdependencies]))
|
||||
+ tasks.append(async_or_eval('do_pygments', [encoding, outputdir,
|
||||
+ fvextfile,
|
||||
+ pygments_list,
|
||||
+ pygments_settings,
|
||||
+ typeset_cache,
|
||||
+ hashdependencies]))
|
||||
if verbose:
|
||||
print(' - Pygments process')
|
||||
|
||||
# Execute the processes
|
||||
- pool.close()
|
||||
- pool.join()
|
||||
+ if multiprocessing:
|
||||
+ pool.close()
|
||||
+ pool.join()
|
||||
|
||||
# Get the outputs of processes
|
||||
# Get the files and macros created. Get the number of errors and warnings
|
||||
@@ -1387,7 +1397,11 @@
|
||||
new_files = False
|
||||
messages = []
|
||||
for task in tasks:
|
||||
- result = task.get()
|
||||
+ if multiprocessing:
|
||||
+ result = task.get()
|
||||
+ else:
|
||||
+ result = task
|
||||
+
|
||||
if result['process'] == 'code':
|
||||
key = result['key']
|
||||
files[key].extend(result['files'])
|
24
packages/texlive-installer/termux-patch-texlive.sh
Normal file
24
packages/texlive-installer/termux-patch-texlive.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
PREFIX=@TERMUX_PREFIX@
|
||||
TL_ROOT=$PREFIX/share/texlive
|
||||
|
||||
cd $TL_ROOT
|
||||
for patch in $PREFIX/opt/texlive/*.diff; do
|
||||
printf "Checking if \$PREFIX/opt/texlive/$(basename $patch) can be applied.. "
|
||||
# --forward so that patch does not apply reversed patches
|
||||
# --reject-file /dev/null so we do not get .rej files
|
||||
# --strip 0 to not strip folders from file path
|
||||
# --batch to not ask user for input
|
||||
# Redirect output to /dev/null to not show warnings/errors for failed patches
|
||||
if ! patch --forward \
|
||||
--reject-file /dev/null \
|
||||
--strip 0 \
|
||||
--batch > /dev/null < $patch; then
|
||||
echo "Nope"
|
||||
else
|
||||
echo "Yes"
|
||||
fi
|
||||
done
|
28
packages/texlive-installer/termux.profile
Normal file
28
packages/texlive-installer/termux.profile
Normal file
@ -0,0 +1,28 @@
|
||||
# texlive.profile written on Thu Apr 23 17:42:40 2020 UTC
|
||||
# It will NOT be updated and reflects only the
|
||||
# installation profile at installation time.
|
||||
selected_scheme scheme-full
|
||||
TEXDIR @TERMUX_PREFIX@/share/texlive
|
||||
TEXMFCONFIG ~/.texlive@YEAR@/texmf-config
|
||||
TEXMFHOME ~/texmf
|
||||
TEXMFLOCAL @TERMUX_PREFIX@/share/texlive/texmf-local
|
||||
TEXMFSYSCONFIG @TERMUX_PREFIX@/share/texlive/texmf-config
|
||||
TEXMFSYSVAR @TERMUX_PREFIX@/share/texlive/texmf-var
|
||||
TEXMFVAR ~/.texlive@YEAR@/texmf-var
|
||||
instopt_adjustpath 0
|
||||
instopt_adjustrepo 1
|
||||
instopt_letter 0
|
||||
instopt_portable 0
|
||||
instopt_write18_restricted 1
|
||||
tlpdbopt_autobackup 1
|
||||
tlpdbopt_backupdir tlpkg/backups
|
||||
tlpdbopt_create_formats 1
|
||||
tlpdbopt_desktop_integration 1
|
||||
tlpdbopt_file_assocs 1
|
||||
tlpdbopt_generate_updmap 0
|
||||
tlpdbopt_install_docfiles 0
|
||||
tlpdbopt_install_srcfiles 0
|
||||
tlpdbopt_post_code 1
|
||||
tlpdbopt_sys_bin @TERMUX_PREFIX@/bin
|
||||
tlpdbopt_sys_info @TERMUX_PREFIX@/share/info
|
||||
tlpdbopt_sys_man @TERMUX_PREFIX@/share/man
|
13
packages/texlive-installer/texconfig.sh.diff
Normal file
13
packages/texlive-installer/texconfig.sh.diff
Normal file
@ -0,0 +1,13 @@
|
||||
--- ../texconfig.sh.orig 2020-04-04 09:33:30.373390496 +0200
|
||||
+++ ./texmf-dist/scripts/texlive-extra/texconfig.sh 2020-04-04 09:34:14.749963681 +0200
|
||||
@@ -53,8 +53,8 @@
|
||||
case $FMT in
|
||||
"")
|
||||
FMT=fmt
|
||||
- test ! -x /bin/fmt && test ! -f /usr/bin/fmt &&
|
||||
- { test -x /bin/adjust || test -x /usr/bin/adjust; } && FMT=adjust
|
||||
+ test ! -x /bin/fmt && test ! -f @TERMUX_PREFIX@/bin/fmt &&
|
||||
+ { test -x /bin/adjust || test -x @TERMUX_PREFIX@/bin/adjust; } && FMT=adjust
|
||||
;;
|
||||
*)
|
||||
return
|
11
packages/texlive-installer/texdef.pl.diff
Normal file
11
packages/texlive-installer/texdef.pl.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../texdef.pl.orig 2020-04-04 09:27:54.747454581 +0200
|
||||
+++ ./texmf-dist/scripts/texdef/texdef.pl 2020-04-04 09:28:20.700734760 +0200
|
||||
@@ -283,7 +283,7 @@
|
||||
$EDITOR = 'texworks "%f"';
|
||||
}
|
||||
else {
|
||||
- for my $ed (qw(/usr/bin/vim /usr/bin/emacs /usr/bin/nano)) {
|
||||
+ for my $ed (qw(@TERMUX_PREFIX@/bin/vim @TERMUX_PREFIX@/bin/emacs @TERMUX_PREFIX@/bin/nano)) {
|
||||
if (-x $ed) {
|
||||
$EDITOR = $ed;
|
||||
last;
|
39
packages/texlive-installer/texmf.cnf.diff
Normal file
39
packages/texlive-installer/texmf.cnf.diff
Normal file
@ -0,0 +1,39 @@
|
||||
--- ./texmf-dist/web2c/texmf.cnf.orig 2020-03-01 23:41:34.000000000 +0100
|
||||
+++ ./texmf-dist/web2c/texmf.cnf 2020-04-30 09:19:57.748456275 +0200
|
||||
@@ -59,7 +59,7 @@
|
||||
% SELFAUTOPARENT (its grandparent = /usr/local/texlive/YYYY), and
|
||||
% SELFAUTOGRANDPARENT (its great-grandparent = /usr/local/texlive).
|
||||
% Sorry for the off-by-one-generation names.
|
||||
-TEXMFROOT = $SELFAUTOPARENT
|
||||
+TEXMFROOT = @TERMUX_PREFIX@/share/texlive
|
||||
|
||||
% The main tree of distributed packages and programs:
|
||||
TEXMFDIST = $TEXMFROOT/texmf-dist
|
||||
@@ -382,7 +382,7 @@
|
||||
% OSFONTDIR is to provide a convenient hook for allowing TeX to find
|
||||
% fonts installed on the system (outside of TeX). An empty default
|
||||
% value would add "//" to the search paths, so we give it a dummy value.
|
||||
-OSFONTDIR = /please/set/osfontdir/in/the/environment
|
||||
+OSFONTDIR = @TERMUX_PREFIX@/share/fonts/TTF
|
||||
|
||||
% PostScript Type 1 outline fonts.
|
||||
T1FONTS = $TEXMFDOTDIR;$TEXMF/fonts/type1//;$OSFONTDIR//
|
||||
@@ -431,7 +431,7 @@
|
||||
PDFTEXCONFIG = $TEXMFDOTDIR;$TEXMF/pdftex/{$progname,}//
|
||||
|
||||
% Used by DMP (ditroff-to-mpx), called by makempx -troff.
|
||||
-TRFONTS = /usr{/local,}/share/groff/{current/font,site-font}/devps
|
||||
+TRFONTS = @TERMUX_PREFIX@{/local,}/share/groff/{current/font,site-font}/devps
|
||||
MPSUPPORT = $TEXMFDOTDIR;$TEXMF/metapost/support
|
||||
|
||||
% For xdvi to find mime.types and .mailcap, if they do not exist in
|
||||
@@ -582,7 +582,8 @@
|
||||
$SELFAUTOPARENT/share/texmf/web2c,\
|
||||
$SELFAUTOPARENT/texmf-local/web2c,\
|
||||
$SELFAUTOPARENT/texmf-dist/web2c,\
|
||||
-$SELFAUTOPARENT/texmf/web2c\
|
||||
+$SELFAUTOPARENT/texmf/web2c,\
|
||||
+@TERMUX_PREFIX@/share/texlive/texmf/web2c\
|
||||
}
|
||||
%
|
||||
% For reference, here is the old brace-using definition:
|
11
packages/texlive-installer/tlmgr.pl.diff
Normal file
11
packages/texlive-installer/tlmgr.pl.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ./texmf-dist/scripts/texlive/tlmgr.pl.orig 2020-04-30 17:37:55.089385823 +0200
|
||||
+++ ./texmf-dist/scripts/texlive/tlmgr.pl 2020-04-30 17:38:21.193385804 +0200
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
if (-r "$bindir/$kpsewhichname") {
|
||||
# if not in bootstrapping mode => kpsewhich exists, so use it to get $Master
|
||||
- chomp($Master = `kpsewhich -var-value=SELFAUTOPARENT`);
|
||||
+ chomp($Master = `kpsewhich -var-value=TEXMFROOT`);
|
||||
}
|
||||
|
||||
# if we have no directory in which to find our modules,
|
11
packages/texlive-installer/tlpkg-TeXLive-TLUtils.pm.patch
Normal file
11
packages/texlive-installer/tlpkg-TeXLive-TLUtils.pm.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../TLUtils.pm.orig 2020-04-30 14:21:49.833109611 +0200
|
||||
+++ ./tlpkg/TeXLive/TLUtils.pm 2020-04-30 14:21:22.356486506 +0200
|
||||
@@ -1753,7 +1753,7 @@
|
||||
if (win32() && defined($keyval{'filew32'})) {
|
||||
$file = $keyval{'filew32'};
|
||||
}
|
||||
- my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`;
|
||||
+ my $texdir = "@TERMUX_PREFIX@/share/texlive";
|
||||
chomp($texdir);
|
||||
my @syscmd;
|
||||
if ($file =~ m/\.pl$/i) {
|
11
packages/texlive-installer/tlshell.tcl.diff
Normal file
11
packages/texlive-installer/tlshell.tcl.diff
Normal file
@ -0,0 +1,11 @@
|
||||
--- ../tlshell.tcl.orig 2020-05-01 17:29:18.643000616 +0200
|
||||
+++ ./texmf-dist/scripts/tlshell/tlshell.tcl 2020-05-01 17:29:38.669640826 +0200
|
||||
@@ -1546,7 +1546,7 @@
|
||||
tk_messageBox -message [__ "No backup directory defined"]
|
||||
return
|
||||
}
|
||||
- set bdir [file join [exec kpsewhich -var-value SELFAUTOPARENT] $bdir]
|
||||
+ set bdir [file join [exec kpsewhich -var-value TEXMFROOT] $bdir]
|
||||
if {! [file isdirectory $bdir]} {
|
||||
tk_messageBox -message [__ "Backup directory %s does not exist" $bdir]
|
||||
return
|
15
packages/yara/build.sh
Normal file
15
packages/yara/build.sh
Normal file
@ -0,0 +1,15 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://github.com/VirusTotal/yara
|
||||
TERMUX_PKG_DESCRIPTION="Tool aimed at helping malware researchers to identify and classify malware samples"
|
||||
TERMUX_PKG_LICENSE="BSD 3-Clause"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=4.1.0
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/VirusTotal/yara/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=8bee0e16ce56335d88e33349783dba8957d02da3339fd04df577ff1d2fa811af
|
||||
TERMUX_PKG_DEPENDS="file, openssl"
|
||||
TERMUX_PKG_BREAKS="yara-dev"
|
||||
TERMUX_PKG_REPLACES="yara-dev"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
./bootstrap.sh
|
||||
}
|
59
packages/zeronet/build.sh
Normal file
59
packages/zeronet/build.sh
Normal file
@ -0,0 +1,59 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://zeronet.io/
|
||||
TERMUX_PKG_DESCRIPTION="Decentralized websites using Bitcoin crypto and BitTorrent network"
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="Leonid Pliushch <leonid.pliushch@gmail.com>"
|
||||
TERMUX_PKG_VERSION=0.7.1
|
||||
TERMUX_PKG_REVISION=8
|
||||
TERMUX_PKG_SRCURL=https://github.com/HelloZeroNet/ZeroNet/archive/v$TERMUX_PKG_VERSION.tar.gz
|
||||
TERMUX_PKG_SHA256=78a27e1687d8e3699a854b77b516c95b30a8ba667f7ebbef0aabf7ec6ec7272d
|
||||
TERMUX_PKG_PLATFORM_INDEPENDENT=true
|
||||
TERMUX_PKG_CONFFILES="etc/zeronet.conf"
|
||||
TERMUX_PKG_DEPENDS="bash, clang, make, openssl-tool, pkg-config, python"
|
||||
TERMUX_PKG_RECOMMENDS="tor"
|
||||
|
||||
termux_step_make_install() {
|
||||
# ZeroNet sources.
|
||||
mkdir -p "$TERMUX_PREFIX"/opt
|
||||
rm -rf "$TERMUX_PREFIX"/opt/zeronet
|
||||
cp -a "$TERMUX_PKG_SRCDIR" "$TERMUX_PREFIX"/opt/zeronet
|
||||
|
||||
# Installer.
|
||||
install -Dm700 "$TERMUX_PKG_BUILDER_DIR"/installer.sh \
|
||||
"$TERMUX_PREFIX"/opt/zeronet/installer.sh
|
||||
sed -i "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
|
||||
"$TERMUX_PREFIX"/opt/zeronet/installer.sh
|
||||
|
||||
# Wrapper.
|
||||
install -Dm700 "$TERMUX_PKG_BUILDER_DIR"/zeronet.sh \
|
||||
"$TERMUX_PREFIX"/bin/zeronet
|
||||
sed -i "s%\@TERMUX_PREFIX\@%${TERMUX_PREFIX}%g" \
|
||||
"$TERMUX_PREFIX"/bin/zeronet
|
||||
|
||||
# Configuration file.
|
||||
install -Dm600 "$TERMUX_PKG_BUILDER_DIR"/zeronet.conf \
|
||||
"$TERMUX_PREFIX"/etc/zeronet.conf
|
||||
}
|
||||
|
||||
termux_step_post_massage() {
|
||||
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/lib/zeronet
|
||||
mkdir -p "$TERMUX_PKG_MASSAGEDIR/$TERMUX_PREFIX"/var/log/zeronet
|
||||
}
|
||||
|
||||
termux_step_create_debscripts() {
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "bash $TERMUX_PREFIX/opt/zeronet/installer.sh"
|
||||
} > ./postinst
|
||||
chmod 755 ./postinst
|
||||
|
||||
{
|
||||
echo "#!$TERMUX_PREFIX/bin/sh"
|
||||
echo "[ \$1 != remove ] && exit 0"
|
||||
echo "echo \"Removing ZeroNet files...\""
|
||||
echo "rm -rf $TERMUX_PREFIX/opt/zeronet"
|
||||
echo "rm -rf $TERMUX_PREFIX/var/lib/zeronet"
|
||||
echo "rm -rf $TERMUX_PREFIX/var/log/zeronet"
|
||||
echo "exit 0"
|
||||
} > ./postrm
|
||||
chmod 755 ./postrm
|
||||
}
|
43
packages/zeronet/installer.sh
Normal file
43
packages/zeronet/installer.sh
Normal file
@ -0,0 +1,43 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
set -e
|
||||
|
||||
# Lock terminal to prevent sending text input and special key
|
||||
# combinations that may break installation process.
|
||||
stty -echo -icanon time 0 min 0 intr undef quit undef susp undef
|
||||
|
||||
# Use trap to unlock terminal at exit.
|
||||
trap 'while read -r; do true; done; stty sane;' EXIT
|
||||
|
||||
# Prevent running apt as root.
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
echo "Installing packages as root ?"
|
||||
echo "Perhaps isn't a good idea... aborting installation :)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# coincurve expects ldconfig to be available.
|
||||
mkdir -p "${TMPDIR:-@TERMUX_PREFIX@/tmp}"/.ldconfig
|
||||
echo -e "#!@TERMUX_PREFIX@/bin/bash\nexec true" > "${TMPDIR:-@TERMUX_PREFIX@/tmp}"/.ldconfig/ldconfig
|
||||
chmod 700 "${TMPDIR:-@TERMUX_PREFIX@/tmp}"/.ldconfig/ldconfig
|
||||
export PATH="$PATH:${TMPDIR:-@TERMUX_PREFIX@/tmp}/.ldconfig"
|
||||
|
||||
for module in gevent msgpack base58 merkletools rsa PySocks pyasn1 \
|
||||
websocket_client gevent-websocket bencode.py coincurve python-bitcoinlib \
|
||||
maxminddb; do
|
||||
|
||||
echo "Installing Python module: $module..."
|
||||
if ! pip install "$module"; then
|
||||
# Retrying one more time. Useful e.g. when downloading failed.
|
||||
echo "Retrying installation of $module..."
|
||||
if ! pip install "$module"; then
|
||||
# Exit if second attempt failed.
|
||||
echo "Failed to install $module."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Cleanup.
|
||||
rm -rf "${TMPDIR:-@TERMUX_PREFIX@/tmp}"/.ldconfig
|
||||
|
||||
exit 0
|
6
packages/zeronet/zeronet.conf
Normal file
6
packages/zeronet/zeronet.conf
Normal file
@ -0,0 +1,6 @@
|
||||
[global]
|
||||
# ui_ip = *
|
||||
# ui_password = anypassword
|
||||
|
||||
tor_controller = 127.0.0.1:9051
|
||||
tor_proxy = 127.0.0.1:9050
|
5
packages/zeronet/zeronet.sh
Normal file
5
packages/zeronet/zeronet.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!@TERMUX_PREFIX@/bin/bash
|
||||
exec @TERMUX_PREFIX@/opt/zeronet/zeronet.py \
|
||||
--config_file @TERMUX_PREFIX@/etc/zeronet.conf \
|
||||
--data_dir @TERMUX_PREFIX@/var/lib/zeronet \
|
||||
--log_dir @TERMUX_PREFIX@/var/log/zeronet "$@"
|
Loading…
x
Reference in New Issue
Block a user