aboutsummaryrefslogtreecommitdiff
path: root/lang/gnatdroid-sysroot-x86
diff options
context:
space:
mode:
authorJohn Marino <marino@FreeBSD.org>2015-11-30 00:15:39 +0000
committerJohn Marino <marino@FreeBSD.org>2015-11-30 00:15:39 +0000
commit82cfb486dcace15703c07118ce15de0df97de7c6 (patch)
tree3f79e9eacef428835dfcecd5e6e8756fb8bb41df /lang/gnatdroid-sysroot-x86
parentbf321e107350cbe076eacf731e15d3b14031f8c3 (diff)
downloadports-82cfb486dcace15703c07118ce15de0df97de7c6.tar.gz
ports-82cfb486dcace15703c07118ce15de0df97de7c6.zip
Add gnatdroid-x86 (3 new ports), X-compiler to Android-x86
Similar to lang/gnatdroid-armv7, lang/gnatdroid-x86 is a cross-compiler targetting Android. The former targets ARMv7 processors while the latter targets Android on x86 (32-bit). The latter also runs on Virtualbox as a bonus. The new ports are implemented as slaves to the ARMv7 versions. The GNAT ACATS were run, and it passed every test except CXG2024, "accuracy of multiplication and division of mixed decimal and binary fixed point numbers". subtest 13: expected -51.00 got 50.0 subtest 14: expected 51.0 got 50.0 This is probably a rounding error unique to 32-bit x86. Overall this version passed better than gnatdroid-armv7 because unwind is supported, enabling check check support. Also added: lang/gnatdroid-sysroot-x86 (KitKat and Lollipop API) lang/gnatdroid-binutils-x86 Despite the desciption, C++, Fortran and Objective-C should also work well (in addition to advertised C and Ada frontends). === The gnatdroid-x86 port builds a C/Ada cross-compiler based on GCC 4.9 that targets the Android operating system (up to version 5.0, API level 21) running on x86 or x86_64 architecture (version 7). This produces binaries that run natively on x86-based Android devices.
Notes
Notes: svn path=/head/; revision=402635
Diffstat (limited to 'lang/gnatdroid-sysroot-x86')
-rw-r--r--lang/gnatdroid-sysroot-x86/Makefile49
-rw-r--r--lang/gnatdroid-sysroot-x86/distinfo4
-rw-r--r--lang/gnatdroid-sysroot-x86/files/extra-21-stat.h10
-rw-r--r--lang/gnatdroid-sysroot-x86/files/extra-stat.h12
-rw-r--r--lang/gnatdroid-sysroot-x86/pkg-descr6
5 files changed, 81 insertions, 0 deletions
diff --git a/lang/gnatdroid-sysroot-x86/Makefile b/lang/gnatdroid-sysroot-x86/Makefile
new file mode 100644
index 000000000000..7635658bfe78
--- /dev/null
+++ b/lang/gnatdroid-sysroot-x86/Makefile
@@ -0,0 +1,49 @@
+# Created by: John Marino <marino@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= sysroot
+PORTVERSION= 21
+CATEGORIES= lang
+MASTER_SITES= http://downloads.dragonlace.net/src/
+PKGNAMEPREFIX= gnatdroid-
+PKGNAMESUFFIX= -x86
+DISTNAME= android-${API}-x86
+
+MAINTAINER= marino@FreeBSD.org
+COMMENT= Android sysroots for C/Ada Android cross-compiler (x86)
+
+USES= tar:bzip2
+NO_BUILD= yes
+NO_MTREE= yes
+
+PREFIX= ${LOCALBASE}/android-x86
+STAT_PATCH= ${FILESDIR}/extra-stat.h
+EXTRA_PATCHES= ${STAT_PATCH}
+
+OPTIONS_SINGLE= SG1
+OPTIONS_SINGLE_SG1= KITKAT LOLLIPOP
+OPTIONS_DEFAULT= KITKAT
+
+KITKAT_DESC= Android 4.4 - API level 19 - Kitkat
+LOLLIPOP_DESC= Android 5.0 - API level 21 - Lollipop
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MKITKAT}
+API= 19
+.elif ${PORT_OPTIONS:MLOLLIPOP}
+API= 21
+STAT_PATCH= ${FILESDIR}/extra-21-stat.h
+.else
+IGNORE= the API option is improperly selected
+.endif
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}
+ (cd ${WRKSRC} && ${COPYTREE_SHARE} usr ${STAGEDIR}${PREFIX})
+
+post-install:
+ @(cd ${STAGEDIR}${PREFIX}; ${FIND} usr \( -type f -or -type l \) | \
+ ${SORT} >> ${TMPPLIST})
+
+.include <bsd.port.mk>
diff --git a/lang/gnatdroid-sysroot-x86/distinfo b/lang/gnatdroid-sysroot-x86/distinfo
new file mode 100644
index 000000000000..080de4d4162e
--- /dev/null
+++ b/lang/gnatdroid-sysroot-x86/distinfo
@@ -0,0 +1,4 @@
+SHA256 (android-19-x86.tar.bz2) = 35c5e6fdebe54373d2103e500034d620fbda8a7b79148fc6a5e507a25ff17f24
+SIZE (android-19-x86.tar.bz2) = 5554684
+SHA256 (android-21-x86.tar.bz2) = 48c306569d4d27ba595c930bfe3ac69208868b2a1d2598b57e8f8ded293a7478
+SIZE (android-21-x86.tar.bz2) = 7261178
diff --git a/lang/gnatdroid-sysroot-x86/files/extra-21-stat.h b/lang/gnatdroid-sysroot-x86/files/extra-21-stat.h
new file mode 100644
index 000000000000..eb9e17a669ba
--- /dev/null
+++ b/lang/gnatdroid-sysroot-x86/files/extra-21-stat.h
@@ -0,0 +1,10 @@
+--- usr/include/linux/stat.h.orig 2014-10-15 02:53:49 UTC
++++ usr/include/linux/stat.h
+@@ -57,5 +57,7 @@
+ #define S_IWOTH 00002
+ /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+ #define S_IXOTH 00001
++#define S_IREAD S_IRUSR
++#define S_IWRITE S_IWUSR
+ #endif
+ #endif
diff --git a/lang/gnatdroid-sysroot-x86/files/extra-stat.h b/lang/gnatdroid-sysroot-x86/files/extra-stat.h
new file mode 100644
index 000000000000..b64e0da88117
--- /dev/null
+++ b/lang/gnatdroid-sysroot-x86/files/extra-stat.h
@@ -0,0 +1,12 @@
+--- usr/include/linux/stat.h.orig 2011-07-17 20:54:19.000000000 +0200
++++ usr/include/linux/stat.h 2011-07-17 20:55:15.000000000 +0200
+@@ -39,6 +39,9 @@
+ #define S_IWUSR 00200
+ #define S_IXUSR 00100
+
++#define S_IREAD S_IRUSR
++#define S_IWRITE S_IWUSR
++
+ #define S_IRWXG 00070
+ #define S_IRGRP 00040
+ #define S_IWGRP 00020
diff --git a/lang/gnatdroid-sysroot-x86/pkg-descr b/lang/gnatdroid-sysroot-x86/pkg-descr
new file mode 100644
index 000000000000..78bbb0dbf5bf
--- /dev/null
+++ b/lang/gnatdroid-sysroot-x86/pkg-descr
@@ -0,0 +1,6 @@
+This package is used by lang/gnatdroid to install the system root of
+Android 2.2 to 5.0 (API Level 8 to API Level 21) of the x86 architecture.
+The x86 cross-tools are built using these files, which in turn is required
+for the GNAT FreeBSD->Android(x86) cross-compiler that is gnatdroid.
+
+WWW: http://www.dragonlace.net