new package: monetdb
This commit is contained in:
parent
3968e65d89
commit
aef33dcf00
11
packages/monetdb/CMakeLists.txt.patch
Normal file
11
packages/monetdb/CMakeLists.txt.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -73,7 +73,7 @@
|
||||
set(CMAKE_EXTRA_INCLUDE_FILES "winsock.h")
|
||||
endif()
|
||||
endif()
|
||||
-set(CMAKE_REQUIRED_INCLUDES "/usr/include")
|
||||
+set(CMAKE_REQUIRED_INCLUDES "@TERMUX_PREFIX@/include")
|
||||
|
||||
monetdb_configure_crypto()
|
||||
monetdb_configure_sizes()
|
14
packages/monetdb/build.sh
Normal file
14
packages/monetdb/build.sh
Normal file
@ -0,0 +1,14 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://www.monetdb.org/
|
||||
TERMUX_PKG_DESCRIPTION="A high-performance database kernel for query-intensive applications"
|
||||
TERMUX_PKG_LICENSE="MPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=11.41.13
|
||||
TERMUX_PKG_SRCURL=https://www.monetdb.org/downloads/sources/archive/MonetDB-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=7738e106ac3a39bfb37feb8efa9a050a412fb332ab58c29a8aad23c01ba42197
|
||||
TERMUX_PKG_DEPENDS="libbz2, libcurl, libiconv, liblz4, liblzma, libpcreposix, libuuid, libxml2, netcdf-c, openssl, readline, zlib"
|
||||
|
||||
termux_step_post_get_source() {
|
||||
find . -name '*.c' | xargs -n 1 sed -i \
|
||||
-e 's:"\(/tmp\):"'$TERMUX_PREFIX'\1:g'
|
||||
cp $TERMUX_PKG_BUILDER_DIR/sys_sem.c gdk/
|
||||
}
|
13
packages/monetdb/clients-mapiclient-mclient.c.patch
Normal file
13
packages/monetdb/clients-mapiclient-mclient.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/clients/mapiclient/mclient.c
|
||||
+++ b/clients/mapiclient/mclient.c
|
||||
@@ -29,6 +29,10 @@
|
||||
#endif
|
||||
#include <sys/stat.h>
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <getopt.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
13
packages/monetdb/clients-mapiclient-msqldump.c.patch
Normal file
13
packages/monetdb/clients-mapiclient-msqldump.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/clients/mapiclient/msqldump.c
|
||||
+++ b/clients/mapiclient/msqldump.c
|
||||
@@ -20,6 +20,10 @@
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <getopt.h>
|
||||
+#endif
|
||||
+
|
||||
#include "stream.h"
|
||||
#include "msqldump.h"
|
||||
#define LIBMUTILS 1
|
10
packages/monetdb/gdk-CMakeLists.txt.patch
Normal file
10
packages/monetdb/gdk-CMakeLists.txt.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/gdk/CMakeLists.txt
|
||||
+++ b/gdk/CMakeLists.txt
|
||||
@@ -79,6 +79,7 @@
|
||||
gdk_analytic_func.c
|
||||
gdk_analytic.h
|
||||
gdk_tracer.c gdk_tracer.h
|
||||
+ sys_sem.c
|
||||
PUBLIC
|
||||
${gdk_public_headers})
|
||||
|
29
packages/monetdb/gdk-gdk_interprocess.c.patch
Normal file
29
packages/monetdb/gdk-gdk_interprocess.c.patch
Normal file
@ -0,0 +1,29 @@
|
||||
--- a/gdk/gdk_interprocess.c
|
||||
+++ b/gdk/gdk_interprocess.c
|
||||
@@ -19,14 +19,26 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
+#ifndef __ANDROID__
|
||||
#include <sys/shm.h>
|
||||
+#else
|
||||
+#include <linux/shm.h>
|
||||
+#endif
|
||||
#include <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sched.h>
|
||||
+#ifndef __ANDROID__
|
||||
#include <sys/sem.h>
|
||||
+#else
|
||||
+#include <linux/sem.h>
|
||||
+#define semid_ds semid64_ds
|
||||
+int semctl(int, int, int, ...);
|
||||
+int semget(key_t, int, int);
|
||||
+int semop(int, struct sembuf *, size_t);
|
||||
+#endif
|
||||
#include <time.h>
|
||||
|
||||
static ATOMIC_TYPE interprocess_unique_id = ATOMIC_VAR_INIT(1);
|
79
packages/monetdb/sys_sem.c
Normal file
79
packages/monetdb/sys_sem.c
Normal file
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) 2016 The Android Open Source Project
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
||||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <linux/sem.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#pragma GCC visibility push(hidden)
|
||||
|
||||
int semtimedop(int id, struct sembuf* ops, size_t op_count, const struct timespec* ts) {
|
||||
#if defined(SYS_semtimedop)
|
||||
return syscall(SYS_semtimedop, id, ops, op_count, ts);
|
||||
#else
|
||||
return syscall(SYS_ipc, SEMTIMEDOP, id, op_count, 0, ops, ts);
|
||||
#endif
|
||||
}
|
||||
|
||||
union semun {
|
||||
int val;
|
||||
struct semid_ds *buf;
|
||||
unsigned short *array;
|
||||
} semu;
|
||||
|
||||
int semctl(int id, int num, int cmd, ...) {
|
||||
#if !defined(__LP64__)
|
||||
// Annoyingly, the kernel requires this for 32-bit but rejects it for 64-bit.
|
||||
cmd |= IPC_64;
|
||||
#endif
|
||||
va_list ap;
|
||||
va_start(ap, cmd);
|
||||
union semun arg = va_arg(ap, union semun);
|
||||
va_end(ap);
|
||||
#if defined(SYS_semctl)
|
||||
return syscall(SYS_semctl, id, num, cmd, arg);
|
||||
#else
|
||||
return syscall(SYS_ipc, SEMCTL, id, num, cmd, &arg, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
int semget(key_t key, int n, int flags) {
|
||||
#if defined(SYS_semget)
|
||||
return syscall(SYS_semget, key, n, flags);
|
||||
#else
|
||||
return syscall(SYS_ipc, SEMGET, key, n, flags, 0, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
int semop(int id, struct sembuf* ops, size_t op_count) {
|
||||
return semtimedop(id, ops, op_count, NULL);
|
||||
}
|
||||
|
||||
#pragma GCC visibility pop
|
13
packages/monetdb/tools-mserver-mserver5.c.patch
Normal file
13
packages/monetdb/tools-mserver-mserver5.c.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/tools/mserver/mserver5.c
|
||||
+++ b/tools/mserver/mserver5.c
|
||||
@@ -32,6 +32,10 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
+#ifdef __ANDROID__
|
||||
+#include <getopt.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef _MSC_VER
|
||||
#include <Psapi.h> /* for GetModuleFileName */
|
||||
#include <crtdbg.h> /* for _CRT_ERROR, _CRT_ASSERT */
|
Loading…
Reference in New Issue
Block a user