-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
tur/astrometry.net/0001-gsl-an-configure-cross-compile.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/gsl-an/Makefile b/gsl-an/Makefile | ||
index 8b9ced0..cf1995f 100644 | ||
--- a/gsl-an/Makefile | ||
+++ b/gsl-an/Makefile | ||
@@ -201,7 +201,7 @@ $(GSL_LIB): config.h $(GSL_OBJS) | ||
$(RANLIB) $@ | ||
|
||
config.h: configure config.h.in | ||
- ./configure --enable-shared=no --prefix=`pwd`/stage | ||
+ ./configure --disable-rpath --disable-rpath-hack --enable-shared=no --host=x86_64-linux-android --prefix=`pwd`/stage | ||
touch $@ | ||
|
||
config.h.in: ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/solver/Makefile b/solver/Makefile | ||
index f225256..d5dfbcd 100644 | ||
--- a/solver/Makefile | ||
+++ b/solver/Makefile | ||
@@ -315,7 +315,7 @@ unpermute-stars: unpermute-stars-main.o $(SLIB) | ||
ALL_OBJ += unpermute-stars-main.o | ||
|
||
astrometry-engine: engine-main.o $(SLIB) | ||
- $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) | ||
+ $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -landroid-glob | ||
|
||
solve-field: solve-field.o augment-xylist.o image2xy-files.o $(SLIB) $(CFITS_SLIB) | ||
$(CC) -o $@ $(CFLAGS) $(LDFLAGS) $^ $(CFITS_LIB) $(LDLIBS) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/util/ioutils.c b/util/ioutils.c | ||
index 3a9bd48..91b8832 100644 | ||
--- a/util/ioutils.c | ||
+++ b/util/ioutils.c | ||
@@ -638,7 +638,11 @@ char* shell_escape(const char* str) { | ||
} | ||
|
||
static char* get_temp_dir() { | ||
+#ifdef __TERMUX__ | ||
+ char* dir = getenv("TMPDIR"); | ||
+#else | ||
char* dir = getenv("TMP"); | ||
+#endif | ||
if (!dir) { | ||
dir = "/tmp"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
diff --git a/util/Makefile b/util/Makefile | ||
index c35a8da..0338b8f 100644 | ||
--- a/util/Makefile | ||
+++ b/util/Makefile | ||
@@ -267,11 +267,7 @@ $(INCLUDE_DIR)/os-features-config.h: os-features-test.c | ||
@echo " NETPBM_INC is $(NETPBM_INC_ORIG)" | ||
@echo " NETPBM_LIB is $(NETPBM_LIB_ORIG)" | ||
@echo "Testing netpbm..." >> os-features.log | ||
- (($(CC) -o os-features-test-netpbm \ | ||
- $(CPPFLAGS) $(CFLAGS) $(NETPBM_INC_ORIG) $^ $(LDFLAGS) $(NETPBM_LIB_ORIG) >> os-features.log && \ | ||
- ./os-features-test-netpbm >> os-features.log && \ | ||
- echo "#define HAVE_NETPBM 1") \ | ||
- || echo "#define HAVE_NETPBM 0") >> [email protected] | ||
+ echo "#define HAVE_NETPBM 1" >> [email protected] | ||
@echo "--------------- End of expected error messages -----------------" | ||
@echo | ||
mv [email protected] $@ | ||
@@ -297,12 +293,4 @@ makefile.os-features: os-features-test.c | ||
- (($(CC) -o os-features-test-netpbm-make \ | ||
- $(CPPFLAGS) $(CFLAGS) $(NETPBM_INC_ORIG) $^ $(LDFLAGS) $(NETPBM_LIB_ORIG) >> os-features-makefile.log && \ | ||
- ./os-features-test-netpbm-make >> os-features-makefile.log && \ | ||
- echo "HAVE_NETPBM := yes") \ | ||
- || (echo "# Astrometry.net didn't find netpbm; not setting HAVE_NETPBM."; \ | ||
- echo "# See os-features-makefile.log for details."; \ | ||
- echo "# To re-run this test, do 'make reconfig; make makefile.os-features' (in the 'util' directory)"; \ | ||
- echo "# Or to do it yourself, just uncomment this line:"; \ | ||
- echo "# HAVE_NETPBM := yes")) \ | ||
+ echo "HAVE_NETPBM := yes" \ | ||
; \ | ||
echo) > [email protected] | ||
@echo "--------------- End of expected error messages -----------------" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
TERMUX_PKG_HOMEPAGE=https://astrometry.net/ | ||
TERMUX_PKG_DESCRIPTION="automatic recognition of astronomical images" | ||
TERMUX_PKG_LICENSE="custom" | ||
TERMUX_PKG_LICENSE_FILE="LICENSE" | ||
TERMUX_PKG_MAINTAINER="@termux-user-repository" | ||
TERMUX_PKG_VERSION="0.94" | ||
TERMUX_PKG_SRCURL=https://github.com/dstndstn/astrometry.net/releases/download/${TERMUX_PKG_VERSION}/astrometry.net-${TERMUX_PKG_VERSION}.tar.gz | ||
TERMUX_PKG_SHA256=38c0d04171ecae42033ce5c9cd0757d8c5fc1418f2004d85e858f29aee383c5f | ||
TERMUX_PKG_DEPENDS="cfitsio, curl, file, libandroid-glob, libbz2, libcairo, libjpeg-turbo, libpng, netpbm, python, python-numpy, python-fitsio, swig, wcslib, zlib" | ||
TERMUX_PKG_SUGGESTS="astrometry.net-data-basic" | ||
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, setuptools, numpy" | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_AUTO_UPDATE=true | ||
TERMUX_PKG_BLACKLISTED_ARCHES="arm" # FIXME: arm cross-compile C compiler fails for unknown reason | ||
|
||
termux_step_make () { | ||
make TERMUX_HOST_PLATFORM="$TERMUX_HOST_PLATFORM" | ||
make py CAIRO_INC=-I"$TERMUX_PREFIX"/include/cairo | ||
make extra CAIRO_INC=-I"$TERMUX_PREFIX"/include/cairo | ||
} | ||
|
||
termux_step_make_install () { | ||
make install INSTALL_DIR="$TERMUX_PREFIX" CAIRO_INC=-I"$TERMUX_PREFIX"/include/cairo | ||
} |