diff options
author | Alexandre Iooss | 2016-08-16 14:28:31 +0200 |
---|---|---|
committer | Alexandre Iooss | 2016-08-16 14:28:31 +0200 |
commit | 7bd88d1e2bb1b3e35b25bdb81c6b5da4b98ac059 (patch) | |
tree | 828b2a17ad71e08f763ccabdf563b80e7fb624d0 | |
download | aur-7bd88d1e2bb1b3e35b25bdb81c6b5da4b98ac059.tar.gz |
First commit, need manual patch
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Config-linux-config.h | 200 | ||||
-rw-r--r-- | LICENSE | 28 | ||||
-rw-r--r-- | PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch | 30 | ||||
-rw-r--r-- | PKGBUILD | 72 | ||||
-rw-r--r-- | libarmavlink-Makefile | 28 |
7 files changed, 380 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..5e4492386787 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = libarmavlink-git + pkgdesc = ARSDK3 MAVLink + pkgver = r65.c462be4 + pkgrel = 1 + url = http://developer.parrot.com/ + arch = x86_64 + license = custom + makedepends = git + makedepends = python2-pymavlink-git + source = libarmavlink::git+https://github.com/Parrot-Developers/libARMavlink + source = libarmavlink-Makefile + source = Config-linux-config.h + source = LICENSE + sha256sums = SKIP + sha256sums = 8f95de4f9051e78f62c39d805ea49f94770a3f42b54266386f5a70d2eea8ebb8 + sha256sums = 5956b54ef47ad26df51991a4aa7002abdcb524a51b455d040f55b4d11a4f44a7 + sha256sums = 1771e95329e9cb2bed04e023e330af3d558d0f13c0c1c5de0581f2880f149deb + +pkgname = libarmavlink-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..a7a40719cf52 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +libarmavlink/ +*.pkg.tar.xz diff --git a/Config-linux-config.h b/Config-linux-config.h new file mode 100644 index 000000000000..dc8a5ded8656 --- /dev/null +++ b/Config-linux-config.h @@ -0,0 +1,200 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Debug Mode */ +/* #undef DEBUG */ + +/* Define to 1 if you have the declaration of `PRIi16', and to 0 if you don't. + */ +#define HAVE_DECL_PRII16 1 + +/* Define to 1 if you have the declaration of `PRIi32', and to 0 if you don't. + */ +#define HAVE_DECL_PRII32 1 + +/* Define to 1 if you have the declaration of `PRIi64', and to 0 if you don't. + */ +#define HAVE_DECL_PRII64 1 + +/* Define to 1 if you have the declaration of `PRIi8', and to 0 if you don't. + */ +#define HAVE_DECL_PRII8 1 + +/* Define to 1 if you have the declaration of `PRIu16', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU16 1 + +/* Define to 1 if you have the declaration of `PRIu32', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU32 1 + +/* Define to 1 if you have the declaration of `PRIu64', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU64 1 + +/* Define to 1 if you have the declaration of `PRIu8', and to 0 if you don't. + */ +#define HAVE_DECL_PRIU8 1 + +/* Define to 1 if you have the <android/log.h> header file. */ +/* #undef HAVE_ANDROID_LOG_H */ + +/* Define to 1 if you have the `clock_gettime' function. */ +#define HAVE_CLOCK_GETTIME 1 + +/* Define to 1 if you have the <CoreBluetooth/CoreBluetooth.h> header file. */ +/* #undef HAVE_COREBLUETOOTH_COREBLUETOOTH_H */ + +/* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and to 0 if you + don't. */ +#ifdef __linux__ +# define HAVE_DECL_MSG_NOSIGNAL 1 +#else +# define HAVE_DECL_MSG_NOSIGNAL 0 +#endif + +/* Define to 1 if you have the declaration of `SO_NOSIGPIPE', and to 0 if you + don't. */ +#ifdef __linux__ +# define HAVE_DECL_SO_NOSIGPIPE 0 +#else +# define HAVE_DECL_SO_NOSIGPIPE 1 +#endif + +/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if + you don't. */ +#ifdef __linux__ +# define HAVE_DECL_CLOCK_MONOTONIC 1 +#else +# define HAVE_DECL_CLOCK_MONOTONIC 0 +#endif + +/* Define to 1 if you have the declaration of `CLOCK_REALTIME', and to 0 if + you don't. */ +#ifdef __linux__ +# define HAVE_DECL_CLOCK_REALTIME 1 +#else +# define HAVE_DECL_CLOCK_REALTIME 0 +#endif + +/* Define to 1 if you have the declaration of `log2', and to 0 if you don't. + */ +#define HAVE_DECL_LOG2 1 + +/* Define to 1 if you have the declaration of `SYS_gettid', and to 0 if you + don't. */ +#define HAVE_DECL_SYS_GETTID 1 + +/* Define to 1 if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define to 1 if you have the <ftw.h> header file. */ +#define HAVE_FTW_H 1 + +/* Define to 1 if you have the `gettimeofday' function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define to 1 if you have the <inttypes.h> header file. */ +#define HAVE_INTTYPES_H 1 + +/* Whether the libm on the host has the log2 function */ +#define HAVE_LOG2 1 + +/* Define to 1 if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define to 1 if you have the <pthread.h> header file. */ +#define HAVE_PTHREAD_H 1 + +/* Define to 1 if you have the <semaphore.h> header file. */ +#define HAVE_SEMAPHORE_H 1 + +/* Define to 1 if you have the `sem_destroy' function. */ +#define HAVE_SEM_DESTROY 1 + +/* Define to 1 if you have the `sem_getvalue' function. */ +#define HAVE_SEM_GETVALUE 1 + +/* Define to 1 if you have the `sem_init' function. */ +#define HAVE_SEM_INIT 1 + +/* Define to 1 if you have the `sem_post' function. */ +#define HAVE_SEM_POST 1 + +/* Define to 1 if you have the `sem_timedwait' function. */ +#ifdef __linux__ +# define HAVE_SEM_TIMEDWAIT 1 +#endif + +/* Define to 1 if you have the `sem_trywait' function. */ +#define HAVE_SEM_TRYWAIT 1 + +/* Define to 1 if you have the `sem_wait' function. */ +#define HAVE_SEM_WAIT 1 + +/* Define to 1 if you have the <stdarg.h> header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the <stdio.h> header file. */ +#define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <stdlib.h> header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the <strings.h> header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the <string.h> header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the <sys/uio.h> header file. */ +#define HAVE_SYS_UIO_H 1 + +/* Define to 1 if you have the `time' function. */ +#define HAVE_TIME 1 + +/* Define to 1 if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define to 1 if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define to 1 if you have the <sys/statfs.h> header file. */ +#ifdef __linux__ +# define HAVE_SYS_STATFS_H 1 +#endif + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* No-debug Mode */ +#define NDEBUG /**/ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define to 1 if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define to 1 if you have the <UIKit/UIKit.h> header file. */ +/* #undef HAVE_UIKIT_UIKIT_H */ +/* Define to `unsigned int' if <sys/types.h> does not define. */ +/* #undef size_t */ diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000000..2b9256f4825e --- /dev/null +++ b/LICENSE @@ -0,0 +1,28 @@ +Copyright (C) 2014 Parrot SA + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. +* Neither the name of Parrot nor the names + of its contributors may be used to endorse or promote products + derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch b/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch new file mode 100644 index 000000000000..5531416fd0d8 --- /dev/null +++ b/PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch @@ -0,0 +1,30 @@ +From 41ba6842262d7a0150b0e942007e92194b21bccd Mon Sep 17 00:00:00 2001 +From: Jean-Baptiste Dubois <jean-baptiste.dubois@parrot.com> +Edited by: Alexandre Iooss <alexandre.iooss@gmail.com> +Date: Wed, 22 Apr 2015 18:44:10 +0200 +Subject: [PATCH 03/10] [DEV] if <include> xml files does not exist in same + directory try with mavlink default dir + +Change-Id: I6bb26be945e9b890e07bc7c4d71a6e9b08ff06e7 +--- + pymavlink/generator/mavgen.py | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pymavlink/generator/mavgen.py b/pymavlink/generator/mavgen.py +index 2996350..a5dfd9c 100755 +--- a/pymavlink/generator/mavgen.py ++++ b/pymavlink/generator/mavgen.py +@@ -61,6 +61,10 @@ def mavgen(opts, args) : + for x in xml[:]: + for i in x.include: + fname = os.path.join(os.path.dirname(x.filename), i) ++ ## if xml file does not exist try to with mavlink "dialects" directory ++ if not os.path.exists(fname): ++ fname = os.path.join(os.path.dirname(__file__), "..", ++ "dialects", "v10", i) + + ## Validate XML file with XSD file if possible. + if opts.validate: +-- +2.9.3 + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0997d92432cd --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,72 @@ +# Maintainer: Alexandre Iooss <alexandre.iooss@gmail.com> + +## READ THIS !!! +# Because the parrot mavlink message definition include a "common" message defenition, +# you need to apply PARROT-DEV-if-include-xml-files-does-not-exist-in-same-dire.patch +# (in this pkg directory) to "python2-pymavlink-git". +# This problem should be fixed soon: I'm trying to send the patch upstream. + +pkgname=libarmavlink-git +pkgver=r65.c462be4 +pkgrel=1 +pkgdesc="ARSDK3 MAVLink" +arch=(x86_64) +url="http://developer.parrot.com/" +license=('custom') +groups=() +depends=() +optdepends=() +makedepends=(git python2-pymavlink-git) +provides=() +conflicts=() +replaces=() +backup=() +options=() +install= +source=('libarmavlink::git+https://github.com/Parrot-Developers/libARMavlink' + 'libarmavlink-Makefile' + 'Config-linux-config.h' + 'LICENSE') +sha256sums=('SKIP' + '8f95de4f9051e78f62c39d805ea49f94770a3f42b54266386f5a70d2eea8ebb8' + '5956b54ef47ad26df51991a4aa7002abdcb524a51b455d040f55b4d11a4f44a7' + '1771e95329e9cb2bed04e023e330af3d558d0f13c0c1c5de0581f2880f149deb') + +pkgver() { + cd "$srcdir/libarmavlink" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +prepare() { + cp "$srcdir/libarmavlink-Makefile" "$srcdir/libarmavlink/Makefile" + cp "$srcdir/Config-linux-config.h" "$srcdir/libarmavlink/Includes/config.h" +} + +build() { + cd "$srcdir/libarmavlink" + mavgen.py --lang C -o generated/mavlink/ message_definitions/parrot.xml + make +} + +package() { + # Install headers + mkdir -p "$pkgdir/usr/include/libARMavlink" + cp "$srcdir/libarmavlink/Includes/libARMavlink/libARMavlink.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_Error.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_FileGenerator.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_FileParser.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_ListUtils.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_Manager.h" "$pkgdir/usr/include/libARMavlink/" + cp "$srcdir/libarmavlink/Includes/libARMavlink/ARMAVLINK_MissionItemUtils.h" "$pkgdir/usr/include/libARMavlink/" + + # Install generated mavlink headers + cp -r "$srcdir/libarmavlink/generated/mavlink" "$pkgdir/usr/include/mavlink/" + + # Install lib + mkdir -p "$pkgdir/usr/lib" + cp "$srcdir/libarmavlink/libarmavlink.so" "$pkgdir/usr/lib/" + + # Install license + mkdir -p "$pkgdir/usr/share/licenses/$pkgname" + cp "$srcdir/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} diff --git a/libarmavlink-Makefile b/libarmavlink-Makefile new file mode 100644 index 000000000000..c0d514104599 --- /dev/null +++ b/libarmavlink-Makefile @@ -0,0 +1,28 @@ +CC = gcc +CFLAGS = -fPIC -Wall -Wextra -O2 -g -IIncludes -Igenerated -DHAVE_CONFIG_H +LDFLAGS = -shared +RM = rm -f +TARGET_LIB = libarmavlink.so + +SRCS = Sources/ARMAVLINK_FileGenerator.c \ + Sources/ARMAVLINK_FileParser.c \ + Sources/ARMAVLINK_ListUtils.c \ + Sources/ARMAVLINK_Manager.c \ + Sources/ARMAVLINK_MissionItemUtils.c \ + gen/Sources/ARMAVLINK_Error.c +OBJS = $(SRCS:.c=.o) + +.PHONY: all +all: ${TARGET_LIB} + +$(TARGET_LIB): $(OBJS) + $(CC) ${LDFLAGS} -o $@ $^ + +$(SRCS:.c=.d):%.d:%.c + $(CC) $(CFLAGS) -MM $< >$@ + +include $(SRCS:.c=.d) + +.PHONY: clean +clean: + -${RM} ${TARGET_LIB} ${OBJS} $(SRCS:.c=.d) |