mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 10:22:56 +02:00
simgear: update to 2016.2.1
This commit is contained in:
parent
ea1dece206
commit
e812d00a26
3 changed files with 122 additions and 9 deletions
25
srcpkgs/simgear/patches/musl-strerror_r.patch
Normal file
25
srcpkgs/simgear/patches/musl-strerror_r.patch
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
--- simgear/misc/strutils.cxx 2016-05-17 10:36:36.000000000 +0200
|
||||||
|
+++ simgear/misc/strutils.cxx 2016-06-18 14:47:46.858731232 +0200
|
||||||
|
@@ -613,8 +613,12 @@
|
||||||
|
errno_t retcode;
|
||||||
|
// Always makes the string in 'buf' null-terminated
|
||||||
|
retcode = strerror_s(buf, sizeof(buf), errnum);
|
||||||
|
-#elif defined(_GNU_SOURCE)
|
||||||
|
+#elif defined(_GNU_SOURCE) && defined(__GLIBC__)
|
||||||
|
return std::string(strerror_r(errnum, buf, sizeof(buf)));
|
||||||
|
+#elif defined(_GNU_SOURCE)
|
||||||
|
+ int retcode;
|
||||||
|
+ // musl libc is posix compliant
|
||||||
|
+ retcode = strerror_r(errnum, buf, sizeof(buf));
|
||||||
|
#elif (_POSIX_C_SOURCE >= 200112L) || defined(SG_MAC)
|
||||||
|
int retcode;
|
||||||
|
// POSIX.1-2001 and POSIX.1-2008
|
||||||
|
@@ -623,7 +627,7 @@
|
||||||
|
#error "Could not find a thread-safe alternative to strerror()."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if !defined(_GNU_SOURCE)
|
||||||
|
+#if !defined(_GNU_SOURCE) || !defined(__GLIBC__)
|
||||||
|
if (retcode) {
|
||||||
|
std::string msg = "unable to get error message for a given error number";
|
||||||
|
// C++11 would make this shorter with std::to_string()
|
94
srcpkgs/simgear/patches/musl-u_types.patch
Normal file
94
srcpkgs/simgear/patches/musl-u_types.patch
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
--- simgear/package/md5.h 2016-05-17 10:36:36.000000000 +0200
|
||||||
|
+++ simgear/package/md5.h 2016-06-18 14:38:16.524925475 +0200
|
||||||
|
@@ -19,27 +19,23 @@
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(_MSC_VER)
|
||||||
|
-typedef unsigned char u_int8_t;
|
||||||
|
-typedef unsigned int u_int32_t;
|
||||||
|
-typedef unsigned __int64 u_int64_t;
|
||||||
|
-#endif
|
||||||
|
+#include <stdint.h>
|
||||||
|
|
||||||
|
#define MD5_BLOCK_LENGTH 64
|
||||||
|
#define MD5_DIGEST_LENGTH 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
|
||||||
|
--- simgear/package/md5.c 2016-05-17 10:36:36.000000000 +0200
|
||||||
|
+++ simgear/package/md5.c 2016-06-18 14:38:25.150680387 +0200
|
||||||
|
@@ -39,7 +39,7 @@
|
||||||
|
(cp)[1] = (value) >> 8; \
|
||||||
|
(cp)[0] = (value); } while (0)
|
||||||
|
|
||||||
|
-static u_int8_t PADDING[MD5_BLOCK_LENGTH] = {
|
||||||
|
+static uint8_t PADDING[MD5_BLOCK_LENGTH] = {
|
||||||
|
0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
|
||||||
|
@@ -73,7 +73,7 @@
|
||||||
|
need = MD5_BLOCK_LENGTH - have;
|
||||||
|
|
||||||
|
/* Update bitcount */
|
||||||
|
- ctx->count += (u_int64_t)len << 3;
|
||||||
|
+ ctx->count += (uint64_t)len << 3;
|
||||||
|
|
||||||
|
if (len >= need) {
|
||||||
|
if (have != 0) {
|
||||||
|
@@ -104,7 +104,7 @@
|
||||||
|
void
|
||||||
|
SG_MD5Pad(SG_MD5_CTX *ctx)
|
||||||
|
{
|
||||||
|
- u_int8_t count[8];
|
||||||
|
+ uint8_t count[8];
|
||||||
|
size_t padlen;
|
||||||
|
|
||||||
|
/* Convert count to 8 bytes in little endian order. */
|
||||||
|
@@ -154,20 +154,20 @@
|
||||||
|
* the data and converts bytes into longwords for this routine.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
-SG_MD5Transform(u_int32_t state[4], const u_int8_t block[MD5_BLOCK_LENGTH])
|
||||||
|
+SG_MD5Transform(uint32_t state[4], const uint8_t block[MD5_BLOCK_LENGTH])
|
||||||
|
{
|
||||||
|
- u_int32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
|
||||||
|
+ uint32_t a, b, c, d, in[MD5_BLOCK_LENGTH / 4];
|
||||||
|
|
||||||
|
#if ((defined(__BYTE_ORDER__) && __BYTE_ORDER__==__ORDER_LITTLE_ENDIAN__) || \
|
||||||
|
defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) )
|
||||||
|
memcpy(in, block, sizeof(in));
|
||||||
|
#else
|
||||||
|
for (a = 0; a < MD5_BLOCK_LENGTH / 4; a++) {
|
||||||
|
- in[a] = (u_int32_t)(
|
||||||
|
- (u_int32_t)(block[a * 4 + 0]) |
|
||||||
|
- (u_int32_t)(block[a * 4 + 1]) << 8 |
|
||||||
|
- (u_int32_t)(block[a * 4 + 2]) << 16 |
|
||||||
|
- (u_int32_t)(block[a * 4 + 3]) << 24);
|
||||||
|
+ in[a] = (uint32_t)(
|
||||||
|
+ (uint32_t)(block[a * 4 + 0]) |
|
||||||
|
+ (uint32_t)(block[a * 4 + 1]) << 8 |
|
||||||
|
+ (uint32_t)(block[a * 4 + 2]) << 16 |
|
||||||
|
+ (uint32_t)(block[a * 4 + 3]) << 24);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -4,19 +4,13 @@ version=2016.2.1
|
||||||
revision=2
|
revision=2
|
||||||
# XXX: always keep in sync with flightgear version!
|
# XXX: always keep in sync with flightgear version!
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
configure_args="-DENABLE_TESTS=OFF $(vopt_if svn '-DENABLE_LIBSVN=ON' '-DENABLE_LIBSVN=OFF')"
|
configure_args="-DENABLE_TESTS=OFF"
|
||||||
hostmakedepends="cmake pkg-config"
|
hostmakedepends="cmake pkg-config"
|
||||||
makedepends="boost-devel expat-devel freetype-devel libjpeg-turbo-devel giflib-devel
|
makedepends="boost-devel freetype-devel libjpeg-turbo-devel giflib-devel
|
||||||
libopenal-devel osg-devel plib-devel $(vopt_if svn libsvn)"
|
libcurl-devel libfreeglut-devel libopenal-devel osg-devel plib-devel"
|
||||||
short_desc="Simulation engine for FlightGear - static libraries"
|
short_desc="Simulation engine for FlightGear - static libraries"
|
||||||
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
maintainer="Jürgen Buchmüller <pullmoll@t-online.de>"
|
||||||
license="GPL-2"
|
license="GPL-2"
|
||||||
homepage="http://www.flightgear.org/"
|
homepage="http://www.flightgear.org/"
|
||||||
distfiles="$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/${pkgname}-${version}.tar.bz2"
|
distfiles="$SOURCEFORGE_SITE/project/flightgear/release-${version%.*}/${pkgname}-${version}.tar.bz2"
|
||||||
checksum=601d4ef75a7f9e7012f85d6f63219f3e2ef90f98249eaa5d16cc6b1a3c737a0a
|
checksum=601d4ef75a7f9e7012f85d6f63219f3e2ef90f98249eaa5d16cc6b1a3c737a0a
|
||||||
|
|
||||||
build_options="svn"
|
|
||||||
desc_option_svn="Enable support for subversion scenery fetching"
|
|
||||||
if [ -z "$CROSS_BUILD" ]; then
|
|
||||||
build_options_default="svn"
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue