aboutsummaryrefslogtreecommitdiffstats
path: root/testing/simgear
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-01-05 07:23:13 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-01-05 07:23:43 +0000
commit76d8addbe590a7991b3b08d0c94b9906dbf75670 (patch)
tree85e96477b6f05b9a14f029cdfeee860590a2e37d /testing/simgear
parentdde588bf540d529c4390ba54b3568d1d89f881ad (diff)
downloadaports-76d8addbe590a7991b3b08d0c94b9906dbf75670.tar.bz2
aports-76d8addbe590a7991b3b08d0c94b9906dbf75670.tar.xz
testing/simgear: new aport
Sim library for FlightGear
Diffstat (limited to 'testing/simgear')
-rw-r--r--testing/simgear/APKBUILD48
-rw-r--r--testing/simgear/musl-fixes.patch59
2 files changed, 107 insertions, 0 deletions
diff --git a/testing/simgear/APKBUILD b/testing/simgear/APKBUILD
new file mode 100644
index 0000000000..099707a66b
--- /dev/null
+++ b/testing/simgear/APKBUILD
@@ -0,0 +1,48 @@
+# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
+pkgname=simgear
+pkgver=2016.4.4
+pkgrel=0
+pkgdesc="Sim library for FlightGear"
+url="https://github.com/FlightGear/simgear"
+arch="all"
+license="GPL"
+depends=
+depends_dev=
+makedepends="$depends_dev boost-dev cmake curl-dev mesa-dev openal-soft-dev
+ openscenegraph-dev zlib-dev"
+install=
+subpackages=
+source="$pkgname-$pkgver.tar.gz::https://github.com/FlightGear/simgear/archive/version/$pkgver.tar.gz
+ musl-fixes.patch
+ "
+
+builddir="$srcdir"/$pkgname-version-$pkgver
+
+prepare() {
+ cd "$builddir"
+ default_prepare || return 1
+ mkdir sgbuild && cd sgbuild || return 1
+ cmake .. \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -D_POSIX_C_SOURCE=200112L \
+ || return 1
+}
+
+build() {
+ cd "$builddir/sgbuild"
+ make || return 1
+}
+
+package() {
+ cd "$builddir/sgbuild"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+md5sums="a10e5b381910da3549cc81a6768a0a4b simgear-2016.4.4.tar.gz
+f82f0f46dbb53e87f2df467f82da9000 musl-fixes.patch"
+sha256sums="621c6b6acc9b93f6160ed292e88622fe65c38db70c79d9c8f71cd85a268ac780 simgear-2016.4.4.tar.gz
+d85530b21c8bec1980e9a4483b937d526daef4a3be347da2795ac98ef30bdd43 musl-fixes.patch"
+sha512sums="c30911ff3c45c9bb9882c12ba41fe345da133eb0ea4e19998c60c78e0b73c8838b2c99073834c22e1673b240febfcb416854626fe32928b2045ba64a607d1570 simgear-2016.4.4.tar.gz
+7efcf01c9328b0732ae9aa7af4edb52e14919663a8d3acbe429a0697f59a55e85a71628d9afaa3d38327d960dbf5dacc1f964e38dd6cb499b593ae2be918b140 musl-fixes.patch"
diff --git a/testing/simgear/musl-fixes.patch b/testing/simgear/musl-fixes.patch
new file mode 100644
index 0000000000..441626d052
--- /dev/null
+++ b/testing/simgear/musl-fixes.patch
@@ -0,0 +1,59 @@
+--- a/simgear/misc/strutils.cxx
++++ b/simgear/misc/strutils.cxx
+@@ -43,6 +43,11 @@
+ #include <windows.h>
+ #endif
+
++#ifdef _GNU_SOURCE
++#undef _GNU_SOURCE
++#define _POSIX_C_SOURCE 200112L
++#endif
++
+ using std::string;
+ using std::vector;
+ using std::stringstream;
+--- a/simgear/package/md5.h
++++ b/simgear/package/md5.h
+@@ -20,9 +20,9 @@
+ #endif
+
+ #if defined(_MSC_VER)
+-typedef unsigned char u_int8_t;
+-typedef unsigned int u_int32_t;
+-typedef unsigned __int64 u_int64_t;
++typedef unsigned char uint8_t;
++typedef unsigned int uint32_t;
++typedef unsigned __int64 uint64_t;
+ #endif
+
+ #define MD5_BLOCK_LENGTH 64
+@@ -30,16 +30,16 @@
+ #define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1)
+
+ typedef struct MD5Context {
+- u_int32_t state[4]; /* state */
+- u_int64_t count; /* number of bits, mod 2^64 */
+- u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
++ uint32_t state[4]; /* state */
++ uint64_t count; /* number of bits, mod 2^64 */
++ uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
+ } SG_MD5_CTX;
+
+ void SG_MD5Init(SG_MD5_CTX *);
+-void SG_MD5Update(SG_MD5_CTX *, const u_int8_t *, size_t);
++void SG_MD5Update(SG_MD5_CTX *, const uint8_t *, size_t);
+ void SG_MD5Pad(SG_MD5_CTX *);
+-void SG_MD5Final(u_int8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
+-void SG_MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]);
++void SG_MD5Final(uint8_t [MD5_DIGEST_LENGTH], SG_MD5_CTX *);
++void SG_MD5Transform(uint32_t [4], const uint8_t [MD5_BLOCK_LENGTH]);
+
+ #ifdef __cplusplus
+ } // of extern C
+@@ -49,4 +49,4 @@
+
+
+
+-
+\ No newline at end of file
++