Browse Source

SWI-Prolog - update to 8.1.0

emacs-27
erlanger 6 years ago
committed by Leonid Plyushch
parent
commit
12b0c678eb
  1. 40
      disabled-packages/swi-prolog/build.sh
  2. 152
      disabled-packages/swi-prolog/qsortr.patch
  3. 55
      disabled-packages/swi-prolog/src-configure.patch
  4. 11
      packages/ossp-uuid/build.sh
  5. 207
      packages/ossp-uuid/ossp.patch
  6. 1588
      packages/ossp-uuid/uuid-aarch64.patch
  7. 35
      packages/ossp-uuid/z-no-docs-no-strip.patch
  8. 85
      packages/swi-prolog/build.sh

40
disabled-packages/swi-prolog/build.sh

@ -1,40 +0,0 @@
TERMUX_PKG_HOMEPAGE=http://www.swi-prolog.org/
TERMUX_PKG_DESCRIPTION="Comprehensive free Prolog environment"
TERMUX_PKG_VERSION=7.3.6
TERMUX_PKG_SRCURL=http://www.swi-prolog.org/download/devel/src/swipl-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_HOSTBUILD=true
TERMUX_PKG_DEPENDS="readline, libgmp"
termux_step_host_build() {
cp -Rf $TERMUX_PKG_SRCDIR/* .
# apt install libgmp-dev:i386 libncurses5-dev:i386
./configure --host=i386-linux --disable-readline #--disable-gmp
if [ $TERMUX_ARCH_BITS = 32 ]; then
# "Make sure that the native swipl has the same word-length (32/64 bits)
# and use the native swipl for creating the boot file"
# https://groups.google.com/forum/#!topic/swi-prolog/8lBcjb9cxuk
find . -name Makefile | xargs perl -p -i -e 's/CFLAGS=/CFLAGS=-m32 /'
find . -name Makefile | xargs perl -p -i -e 's/LDFLAGS=/LDFLAGS=-m32 /'
fi
make
}
termux_step_post_configure() {
cp $TERMUX_PKG_HOSTBUILD_DIR/src/defatom src/
touch -d "next hour" $TERMUX_PKG_BUILDDIR/src/defatom
#cp $TERMUX_PKG_HOSTBUILD_DIR/{defatom,swipl} $TERMUX_PKG_BUILDDIR/src/
#bdir=/home/fornwall/termux/swi-prolog/src/src
#PLARCH=arm-linux
perl -p -i -e "s|bdir=|bdir=$TERMUX_PKG_HOSTBUILD_DIR/src/ # |" */swipl.sh
perl -p -i -e "s|PLARCH=|PLARCH=i386-linux # |" */swipl.sh
perl -p -i -e "s|${TERMUX_ARCH}-linux|i386-linux|" */swipl.sh
}
termux_step_post_make_install() {
mv $TERMUX_PREFIX/lib/swipl-$TERMUX_PKG_VERSION/lib/${TERMUX_ARCH}-linux/libswipl.so* $TERMUX_PREFIX/lib/
}

152
disabled-packages/swi-prolog/qsortr.patch

@ -1,152 +0,0 @@
diff -u -r ../swipl-7.3.6/src/pl-dict.c ./src/pl-dict.c
--- ../swipl-7.3.6/src/pl-dict.c 2015-08-25 05:55:13.000000000 -0400
+++ ./src/pl-dict.c 2015-09-16 19:10:55.212457701 -0400
@@ -113,10 +113,148 @@
#if (defined _GNU_SOURCE || defined __GNU__ || defined __linux__)
+#ifdef __ANDROID__
+#include <stdlib.h>
+
+typedef int cmp_t(void *, const void *, const void *);
+static inline char *med3(char *, char *, char *, cmp_t *, void *);
+static inline void swapfunc(char *, char *, int, int);
+
+#define min(a, b) (a) < (b) ? a : b
+
+/*
+ * Qsort routine from Bentley & McIlroy's "Engineering a Sort Function".
+ */
+#define swapcode(TYPE, parmi, parmj, n) { \
+ long i = (n) / sizeof (TYPE); \
+ TYPE *pi = (TYPE *) (parmi); \
+ TYPE *pj = (TYPE *) (parmj); \
+ do { \
+ TYPE t = *pi; \
+ *pi++ = *pj; \
+ *pj++ = t; \
+ } while (--i > 0); \
+}
+
+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
+ es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
+
+ static inline void
+swapfunc(char *a, char *b, int n, int swaptype)
+{
+ if(swaptype <= 1)
+ swapcode(long, a, b, n)
+ else
+ swapcode(char, a, b, n)
+}
+
+#define swap(a, b) \
+ if (swaptype == 0) { \
+ long t = *(long *)(a); \
+ *(long *)(a) = *(long *)(b); \
+ *(long *)(b) = t; \
+ } else \
+swapfunc(a, b, es, swaptype)
+
+#define vecswap(a, b, n) if ((n) > 0) swapfunc(a, b, n, swaptype)
+
+#define CMP(t, x, y) (cmp((t), (x), (y)))
+
+ static inline char *
+med3(char *a, char *b, char *c, cmp_t *cmp, void *thunk)
+{
+ return CMP(thunk, a, b) < 0 ?
+ (CMP(thunk, b, c) < 0 ? b : (CMP(thunk, a, c) < 0 ? c : a ))
+ :(CMP(thunk, b, c) > 0 ? b : (CMP(thunk, a, c) < 0 ? a : c ));
+}
+
+void qsort_r(void *a, size_t n, size_t es, void *thunk, cmp_t *cmp)
+{
+ char *pa, *pb, *pc, *pd, *pl, *pm, *pn;
+ size_t d, r;
+ int cmp_result;
+ int swaptype, swap_cnt;
+
+loop: SWAPINIT(a, es);
+ swap_cnt = 0;
+ if (n < 7) {
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
+ for (pl = pm;
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
+ pl -= es)
+ swap(pl, pl - es);
+ return;
+ }
+ pm = (char *)a + (n / 2) * es;
+ if (n > 7) {
+ pl = a;
+ pn = (char *)a + (n - 1) * es;
+ if (n > 40) {
+ d = (n / 8) * es;
+ pl = med3(pl, pl + d, pl + 2 * d, cmp, thunk);
+ pm = med3(pm - d, pm, pm + d, cmp, thunk);
+ pn = med3(pn - 2 * d, pn - d, pn, cmp, thunk);
+ }
+ pm = med3(pl, pm, pn, cmp, thunk);
+ }
+ swap(a, pm);
+ pa = pb = (char *)a + es;
+
+ pc = pd = (char *)a + (n - 1) * es;
+ for (;;) {
+ while (pb <= pc && (cmp_result = CMP(thunk, pb, a)) <= 0) {
+ if (cmp_result == 0) {
+ swap_cnt = 1;
+ swap(pa, pb);
+ pa += es;
+ }
+ pb += es;
+ }
+ while (pb <= pc && (cmp_result = CMP(thunk, pc, a)) >= 0) {
+ if (cmp_result == 0) {
+ swap_cnt = 1;
+ swap(pc, pd);
+ pd -= es;
+ }
+ pc -= es;
+ }
+ if (pb > pc)
+ break;
+ swap(pb, pc);
+ swap_cnt = 1;
+ pb += es;
+ pc -= es;
+ }
+ if (swap_cnt == 0) { /* Switch to insertion sort */
+ for (pm = (char *)a + es; pm < (char *)a + n * es; pm += es)
+ for (pl = pm;
+ pl > (char *)a && CMP(thunk, pl - es, pl) > 0;
+ pl -= es)
+ swap(pl, pl - es);
+ return;
+ }
+
+ pn = (char *)a + n * es;
+ r = min(pa - (char *)a, pb - pa);
+ vecswap(a, pb - r, r);
+ r = min(pd - pc, pn - pd - es);
+ vecswap(pb, pn - r, r);
+ if ((r = pb - pa) > es)
+ qsort_r(a, r / es, es, thunk, cmp);
+ if ((r = pd - pc) > es) {
+ /* Iterate rather than recurse to save stack space */
+ a = pn - r;
+ n = r / es;
+ goto loop;
+ }
+}
+
+# else
typedef int(* __compar_d_fn_t)(const void *, const void *, void *);
extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
__compar_d_fn_t __compar, void *__arg)
__nonnull ((1, 4));
+#endif
#endif

55
disabled-packages/swi-prolog/src-configure.patch

@ -1,55 +0,0 @@
diff -u -r ../swipl-7.3.6/src/configure ./src/configure
--- ../swipl-7.3.6/src/configure 2015-08-25 05:55:30.000000000 -0400
+++ ./src/configure 2015-09-16 17:52:41.545729451 -0400
@@ -9372,51 +9372,7 @@
done
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread support for cpu clocks" >&5
-$as_echo_n "checking for pthread support for cpu clocks... " >&6; }
-if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-#include <stdio.h>
-#include <pthread.h>
-#include <time.h>
-#include <stdlib.h>
-#define ts2d(ts) \
- ((double)(ts).tv_sec + (double)(ts).tv_nsec/(double)1000000000.0)
-main()
-{
- clockid_t clock_id;
- struct timespec ts = {1,1};
- if ( pthread_getcpuclockid(pthread_self(), &clock_id) != 0 )
- { perror("pthread_getcpuclockid");
- exit(1);
- }
- sleep(1);
- if ( clock_gettime(clock_id, &ts) != 0 )
- { perror("clock_gettime");
- exit(1);
- }
- fprintf(stderr, "Used %f sec\n", ts2d(ts));
- exit (ts.tv_sec == 0 ? 0 : 1);
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
ac_pthread_cpuclocks="yes"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
if test "x$ac_pthread_cpuclocks" = "xyes"; then

11
packages/ossp-uuid/build.sh

@ -0,0 +1,11 @@
TERMUX_PKG_HOMEPAGE=http://www.ossp.org/pkg/lib/uuid/
TERMUX_PKG_DESCRIPTION="ISO-C:1999 uuid generator supporting DCE 1.1, ISO/IEC 11578:1996 and RFC 4122."
TERMUX_PKG_VERSION=1.6.2
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=http://www.mirrorservice.org/sites/ftp.ossp.org/pkg/lib/uuid/uuid-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=11a615225baa5f8bb686824423f50e4427acd3f70d394765bdff32801f0fd5b0
TERMUX_PKG_BUILD_IN_SRC=yes
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--includedir=$TERMUX_PREFIX/include/ossp-uuid"
termux_step_pre_configure() {
export ac_cv_va_copy=C99
}

207
packages/ossp-uuid/ossp.patch

@ -0,0 +1,207 @@
diff -up uuid-1.6.1/uuid-config.in.BAD uuid-1.6.1/uuid-config.in
--- uuid-1.6.1/uuid-config.in.BAD 2008-03-06 11:56:13.000000000 -0500
+++ uuid-1.6.1/uuid-config.in 2008-03-06 11:56:25.000000000 -0500
@@ -121,7 +121,7 @@ do
output_extra="$output_extra $uuid_ldflags"
;;
--libs)
- output="$output -luuid"
+ output="$output -lossp-uuid"
output_extra="$output_extra $uuid_libs"
;;
* )
diff -up uuid-1.6.1/Makefile.in.BAD uuid-1.6.1/Makefile.in
--- uuid-1.6.1/Makefile.in.BAD 2008-03-06 11:10:13.000000000 -0500
+++ uuid-1.6.1/Makefile.in 2008-03-06 11:11:39.000000000 -0500
@@ -62,13 +62,13 @@ PERL = @PERL@
PHP = @PHP@
PG_CONFIG = @PG_CONFIG@
-LIB_NAME = libuuid.la
+LIB_NAME = libossp-uuid.la
LIB_OBJS = uuid.lo uuid_md5.lo uuid_sha1.lo uuid_prng.lo uuid_mac.lo uuid_time.lo uuid_ui64.lo uuid_ui128.lo uuid_str.lo
-DCE_NAME = libuuid_dce.la
+DCE_NAME = libossp-uuid_dce.la
DCE_OBJS = uuid_dce.lo $(LIB_OBJS)
-CXX_NAME = libuuid++.la
+CXX_NAME = libossp-uuid++.la
CXX_OBJS = uuid++.lo $(LIB_OBJS)
PRG_NAME = uuid
@@ -79,10 +79,10 @@ MAN_NAME = uuid.3 uuid++.3 uuid.1
PERL_NAME = $(S)/perl/blib/lib/OSSP/uuid.pm
PERL_OBJS = $(S)/perl/uuid.pm
-PHP_NAME = $(S)/php/modules/uuid.so
+PHP_NAME = $(S)/php/modules/ossp-uuid.so
PHP_OBJS = $(S)/php/uuid.c
-PGSQL_NAME = $(S)/pgsql/libuuid.so
+PGSQL_NAME = $(S)/pgsql/libossp-uuid.so
PGSQL_OBJS = $(S)/pgsql/uuid.c
TARGETS = $(LIB_NAME) @DCE_NAME@ @CXX_NAME@ $(PRG_NAME) @PERL_NAME@ @PHP_NAME@ @PGSQL_NAME@
@@ -231,7 +231,7 @@ install:
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
$(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/
$(SHTOOL) install -c -m 644 $(S)/uuid-config.1 $(DESTDIR)$(mandir)/man1/
- $(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/
+ $(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/ossp-uuid.pc
$(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/
-@if [ ".$(WITH_DCE)" = .yes ]; then \
echo "$(SHTOOL) install -c -m 644 $(S)/uuid_dce.h $(DESTDIR)$(includedir)/"; \
@@ -241,7 +241,7 @@ install:
echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/"; \
$(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/; \
fi
- $(SHTOOL) install -c -m 644 $(S)/uuid.3 $(DESTDIR)$(mandir)/man3/
+ $(SHTOOL) install -c -m 644 $(S)/uuid.3 $(DESTDIR)$(mandir)/man3/ossp-uuid.3
-@if [ ".$(WITH_CXX)" = .yes ]; then \
echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/"; \
$(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/; \
@@ -276,7 +276,7 @@ uninstall:
-@if [ ".$(WITH_CXX)" = .yes ]; then \
$(LIBTOOL) --mode=uninstall $(RM) $(DESTDIR)$(libdir)/$(CXX_NAME); \
fi
- -$(RM) $(DESTDIR)$(mandir)/man3/uuid.3
+ -$(RM) $(DESTDIR)$(mandir)/man3/ossp-uuid.3
-@if [ ".$(WITH_CXX)" = .yes ]; then \
echo "$(RM) $(DESTDIR)$(mandir)/man3/uuid++.3"; \
$(RM) $(DESTDIR)$(mandir)/man3/uuid++.3; \
@@ -290,7 +290,7 @@ uninstall:
echo "$(RM) $(DESTDIR)$(includedir)/uuid++.hh"; \
$(RM) $(DESTDIR)$(includedir)/uuid++.hh; \
fi
- -$(RM) $(DESTDIR)$(libdir)/pkgconfig/uuid.pc
+ -$(RM) $(DESTDIR)$(libdir)/pkgconfig/ossp-uuid.pc
-$(RM) $(DESTDIR)$(mandir)/man1/uuid-config.1
-$(RM) $(DESTDIR)$(bindir)/uuid-config
-$(RMDIR) $(DESTDIR)$(mandir)/man1 >/dev/null 2>&1 || $(TRUE)
diff -up uuid-1.6.1/pgsql/Makefile.BAD uuid-1.6.1/pgsql/Makefile
--- uuid-1.6.1/pgsql/Makefile.BAD 2008-03-06 11:53:26.000000000 -0500
+++ uuid-1.6.1/pgsql/Makefile 2008-03-06 11:54:14.000000000 -0500
@@ -18,13 +18,13 @@ POSTGRES := $(shell $(PG_CONFIG
top_builddir := $(dir $(PGXS))../..
include $(top_builddir)/src/Makefile.global
-NAME = uuid
+NAME = ossp-uuid
OBJS = uuid.o
SO_MAJOR_VERSION = 1
SO_MINOR_VERSION = 0
override CPPFLAGS := -I.. $(CPPFLAGS)
-SHLIB_LINK := -L../.libs -luuid
+SHLIB_LINK := -L../.libs -lossp-uuid
SHLIB_LINK += $(shell test $(shell uname -s) = FreeBSD && echo "-Wl,-Bsymbolic")
SHLIB_LINK += $(shell test $(shell uname -s) = Darwin && echo "-bundle_loader $(POSTGRES)")
rpath :=
@@ -35,16 +35,16 @@ enable_shared = yes
include $(top_builddir)/src/Makefile.shlib
uuid.sql: uuid.sql.in
- sed -e 's;MODULE_PATHNAME;$(DESTDIR)$(pkglibdir)/uuid$(DLSUFFIX);g' <uuid.sql.in >uuid.sql
+ sed -e 's;MODULE_PATHNAME;$(DESTDIR)$(pkglibdir)/ossp-uuid$(DLSUFFIX);g' <uuid.sql.in >uuid.sql
install: all
$(mkinstalldirs) $(DESTDIR)$(pkglibdir)
$(mkinstalldirs) $(DESTDIR)$(datadir)
- $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/uuid$(DLSUFFIX)
+ $(INSTALL_SHLIB) $(shlib) $(DESTDIR)$(pkglibdir)/ossp-uuid$(DLSUFFIX)
$(INSTALL_DATA) uuid.sql $(DESTDIR)$(datadir)/uuid.sql
uninstall:
- -rm -f $(DESTDIR)$(pkglibdir)/uuid$(DLSUFFIX)
+ -rm -f $(DESTDIR)$(pkglibdir)/ossp-uuid$(DLSUFFIX)
-rm -f $(DESTDIR)$(datadir)/uuid.sql
clean distclean: clean-lib
diff -up uuid-1.6.1/uuid.pc.in.BAD uuid-1.6.1/uuid.pc.in
--- uuid-1.6.1/uuid.pc.in.BAD 2008-03-06 11:57:29.000000000 -0500
+++ uuid-1.6.1/uuid.pc.in 2008-03-06 11:57:36.000000000 -0500
@@ -37,6 +37,6 @@ Description: Universally Unique Identifi
Version: @UUID_VERSION_RAW@
URL: http://www.ossp.org/pkg/lib/uuid/
Cflags: -I${includedir}
-Libs: -L${libdir} -luuid
+Libs: -L${libdir} -lossp-uuid
Libs.private: @LIBS@
diff -up uuid-1.6.1/perl/Makefile.PL.BAD uuid-1.6.1/perl/Makefile.PL
--- uuid-1.6.1/perl/Makefile.PL.BAD 2008-03-06 11:12:05.000000000 -0500
+++ uuid-1.6.1/perl/Makefile.PL 2008-03-06 11:49:25.000000000 -0500
@@ -33,9 +33,9 @@ use Config;
use ExtUtils::MakeMaker;
# determine source directory
-my ($srcdir) = map { my $d = $_; $d =~ s/\/libuuid\.la$//; $d }
- grep { -f $_ } ("../libuuid.la", glob("../*/libuuid.la"))
- or die "no source directory found (where libuuid.la is located)";
+my ($srcdir) = map { my $d = $_; $d =~ s/\/libossp-uuid\.la$//; $d }
+ grep { -f $_ } ("../libossp-uuid.la", glob("../*/libossp-uuid.la"))
+ or die "no source directory found (where libossp-uuid.la is located)";
# determine extra build options
my $compat = 0;
@@ -47,7 +47,7 @@ WriteMakefile(
VERSION_FROM => 'uuid.pm',
ABSTRACT_FROM => 'uuid.pod',
PREREQ_PM => {},
- LIBS => [ "-L$srcdir/.libs -L$srcdir -luuid" ],
+ LIBS => [ "-L$srcdir/.libs -L$srcdir -lossp-uuid" ],
DEFINE => '',
INC => "-I. -I$srcdir",
PM => { 'uuid.pm' => '$(INST_LIBDIR)/uuid.pm',
diff -up uuid-1.6.1/Makefile.PL.BAD uuid-1.6.1/Makefile.PL
--- uuid-1.6.1/Makefile.PL.BAD 2008-03-06 11:09:49.000000000 -0500
+++ uuid-1.6.1/Makefile.PL 2008-03-06 11:10:01.000000000 -0500
@@ -44,7 +44,7 @@ ARGS = $ARGS
all pure_all:
\@if [ ! -d build ]; then mkdir build; fi
\@if [ ! -f build/Makefile ]; then (cd build && ../configure --disable-shared); fi
- \@if [ ! -f build/libuuid.la ]; then (cd build && \$(MAKE) \$(MFLAGS) libuuid.la); fi
+ \@if [ ! -f build/libossp-uuid.la ]; then (cd build && \$(MAKE) \$(MFLAGS) libossp-uuid.la); fi
\@if [ ! -f perl/Makefile ]; then (cd perl && \$(PERL) Makefile.PL \$(ARGS)); fi
\@cd perl && \$(MAKE) \$(MFLAGS) \$\@
diff -up uuid-1.6.1/php/config.m4.BAD uuid-1.6.1/php/config.m4
--- uuid-1.6.1/php/config.m4.BAD 2008-03-06 11:54:55.000000000 -0500
+++ uuid-1.6.1/php/config.m4 2008-03-06 11:55:07.000000000 -0500
@@ -34,7 +34,7 @@ if test "$PHP_UUID" != "no"; then
PHP_NEW_EXTENSION(uuid, uuid.c, $ext_shared)
AC_DEFINE(HAVE_UUID, 1, [Have OSSP uuid library])
PHP_ADD_LIBPATH([..], )
- PHP_ADD_LIBRARY([uuid],, UUID_SHARED_LIBADD)
+ PHP_ADD_LIBRARY([ossp-uuid],, UUID_SHARED_LIBADD)
PHP_ADD_INCLUDE([..])
PHP_SUBST(UUID_SHARED_LIBADD)
diff -up uuid-1.6.1/php/Makefile.local.BAD uuid-1.6.1/php/Makefile.local
--- uuid-1.6.1/php/Makefile.local.BAD 2008-03-06 11:54:39.000000000 -0500
+++ uuid-1.6.1/php/Makefile.local 2008-03-06 11:54:49.000000000 -0500
@@ -48,7 +48,7 @@ install: build
@version=`$(PHP)-config --version | sed -e 's;^\([0-9]\).*$$;\1;'`; extdir="$(EXTDIR)"; \
echo "installing PHP$$version API into $$extdir"; \
./build/shtool mkdir -f -p -m 755 $(DESTDIR)$$extdir; \
- ./build/shtool install -c -m 755 modules/uuid.so $(DESTDIR)$$extdir/uuid.so; \
+ ./build/shtool install -c -m 755 modules/uuid.so $(DESTDIR)$$extdir/ossp-uuid.so; \
./build/shtool install -c -m 644 uuid.php$$version $(DESTDIR)$$extdir/uuid.php
clean:
diff -up uuid-1.6.1/php/uuid.ts.BAD uuid-1.6.1/php/uuid.ts
--- uuid-1.6.1/php/uuid.ts.BAD 2008-03-06 11:55:38.000000000 -0500
+++ uuid-1.6.1/php/uuid.ts 2008-03-06 11:56:03.000000000 -0500
@@ -34,9 +34,9 @@
$php_version = $argv[1];
-print "++ loading DSO uuid.so (low-level API)\n";
+print "++ loading DSO ossp-uuid.so (low-level API)\n";
if (!extension_loaded('uuid')) {
- dl('modules/uuid.so');
+ dl('modules/ossp-uuid.so');
}
print "++ loading PHP uuid.php${php_version} (high-level API)\n";

1588
packages/ossp-uuid/uuid-aarch64.patch

File diff suppressed because it is too large

35
packages/ossp-uuid/z-no-docs-no-strip.patch

@ -0,0 +1,35 @@
--- src/Makefile.in.old 2018-11-24 18:13:53.765023695 +0000
+++ src/Makefile.in 2018-11-24 18:15:02.875571529 +0000
@@ -227,10 +227,7 @@
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(bindir)
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(includedir)
$(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(libdir)/pkgconfig
- $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man3
- $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(mandir)/man1
$(SHTOOL) install -c -m 755 uuid-config $(DESTDIR)$(bindir)/
- $(SHTOOL) install -c -m 644 $(S)/uuid-config.1 $(DESTDIR)$(mandir)/man1/
$(SHTOOL) install -c -m 644 $(S)/uuid.pc $(DESTDIR)$(libdir)/pkgconfig/ossp-uuid.pc
$(SHTOOL) install -c -m 644 uuid.h $(DESTDIR)$(includedir)/
-@if [ ".$(WITH_DCE)" = .yes ]; then \
@@ -241,11 +238,6 @@
echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/"; \
$(SHTOOL) install -c -m 644 $(S)/uuid++.hh $(DESTDIR)$(includedir)/; \
fi
- $(SHTOOL) install -c -m 644 $(S)/uuid.3 $(DESTDIR)$(mandir)/man3/ossp-uuid.3
- -@if [ ".$(WITH_CXX)" = .yes ]; then \
- echo "$(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/"; \
- $(SHTOOL) install -c -m 644 $(S)/uuid++.3 $(DESTDIR)$(mandir)/man3/; \
- fi
@$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(LIB_NAME) $(DESTDIR)$(libdir)/
-@if [ ".$(WITH_DCE)" = .yes ]; then \
$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(DCE_NAME) $(DESTDIR)$(libdir)/; \
@@ -253,8 +245,7 @@
-@if [ ".$(WITH_CXX)" = .yes ]; then \
$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 644 $(CXX_NAME) $(DESTDIR)$(libdir)/; \
fi
- @$(LIBTOOL) --mode=install $(SHTOOL) install -c -s -m 755 uuid $(DESTDIR)$(bindir)/
- $(SHTOOL) install -c -m 644 $(S)/uuid.1 $(DESTDIR)$(mandir)/man1/
+ @$(LIBTOOL) --mode=install $(SHTOOL) install -c -m 755 uuid $(DESTDIR)$(bindir)/
-@if [ ".$(WITH_PERL)" = .yes ]; then \
(cd $(S)/perl && $(MAKE) $(MFLAGS) install DESTDIR=$(DESTDIR)); \
fi

85
packages/swi-prolog/build.sh

@ -0,0 +1,85 @@
########################################
# Set variables #
########################################
_TMP_DIR=${TERMUX_PREFIX}/../../cache
TERMUX_PKG_HOMEPAGE=https://swi-prolog.org/
TERMUX_PKG_DESCRIPTION="Most popular and complete prolog implementation"
TERMUX_PKG_VERSION=8.1.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SHA256="865a7eb4a0324b0b5b1ae667a2e2630333d4d889b9427a8653a0c265270a1581"
TERMUX_PKG_SRCURL=http://www.swi-prolog.org/download/devel/src/swipl-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_DEPENDS="readline, libgmp, libcrypt, pcre, libarchive, libyaml, libjpeg-turbo, ncurses, ncurses-ui-libs, ossp-uuid"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-DINSTALL_DOCUMENTATION=OFF
-DUSE_GMP=ON
-DSWIPL_NATIVE_FRIEND=${TERMUX_PKG_HOSTBUILD_DIR}
-DPOSIX_SHELL=${TERMUX_PREFIX}/bin/sh
-DSWIPL_TMP_DIR=${_TMP_DIR}
-DSWIPL_INSTALL_IN_LIB=ON
-DSWIPL_PACKAGES_BDB=OFF
-DSWIPL_PACKAGES_ODBC=OFF
-DSWIPL_PACKAGES_QT=OFF
-DSWIPL_PACKAGES_X=OFF
-DINSTALL_TESTS=ON
-DBUILD_TESTING=ON
-DSYSTEM_CACERT_FILENAME=${TERMUX_PREFIX}/etc/tls/cert.pem"
TERMUX_PKG_FORCE_CMAKE=true
TERMUX_PKG_HOSTBUILD=true
########################################
# Build in Host #
# (in addition to crosscompiling) #
########################################
# We do this to produce:
# a native host build to produce
# boot<nn>.prc, INDEX.pl, ssl cetificate tests,
# SWIPL_NATIVE_FRIEND tells SWI-Prolog to use
# this build for the artifacts needed to build the
# Android version
termux_step_host_build () {
termux_setup_ninja
termux_setup_cmake
if [ $TERMUX_ARCH_BITS = 32 ]; then
export LDFLAGS=-m32
export CFLAGS=-m32
export CXXFLAGS=-m32
CMAKE_EXTRA_DEFS="-DCMAKE_LIBRARY_PATH=/usr/lib/i386-linux-gnu"
else
CMAKE_EXTRA_DEFS=""
fi
cmake "$TERMUX_PKG_SRCDIR" \
-G "Ninja" \
$CMAKE_EXTRA_DEFS \
-DINSTALL_DOCUMENTATION=OFF \
-DSWIPL_PACKAGES=ON \
-DUSE_GMP=OFF \
-DBUILD_TESTING=ON \
-DSWIPL_SHARED_LIB=OFF
ninja
unset LDFLAGS
unset CFLAGS
unset CXXFLAGS
}
########################################
# Put final libraries and #
# binaries in the appropiate place #
########################################
#Executed after make install
termux_step_post_make_install () {
mkdir -p ${_TMP_DIR}
# Remove host build because future builds may be
# of a different word size (e.g. 32bit or 64bit)
rm -rf "$TERMUX_PKG_HOSTBUILD_DIR"
}
Loading…
Cancel
Save