Merge pull request #7 from krisklau/feature/libswiftnav

rules/libswiftnav: New package
This commit is contained in:
Ricardo Martins 2014-10-24 01:56:41 +01:00
commit 5bfb823a47
2 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1,78 @@
version=\
(
'0.11'
)
url=\
(
"https://github.com/swift-nav/libswiftnav/archive/v$version.tar.gz"
)
md5=\
(
'54e4d1bf00f116147f28cb92520e7e7d'
)
maintainer=\
(
'Kristian Klausen <kristian.klausen@itk.ntnu.no>'
)
requires=\
(
'cmake/host'
)
post_unpack()
{
patches=$(ls "$pkg_dir/patches/$version/"*.patch\
"$cfg_dir_system/patches/libswiftnav/"*.patch 2>/dev/null)
if [ -n "$patches" ]; then
cat $patches | patch -p1
fi
}
configure()
{
mkdir -p ../build &&
cd ../build
echo "$cmd_target_cc"
${cfg_dir_toolchain}/usr/local/bin/cmake \
-DCROSS="$cmd_target_cc" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER="${cmd_target_cc}" \
-DCMAKE_CXX_COMPILER="${cmd_target_cxx}" \
-DCMAKE_FIND_ROOT_PATH="${cfg_dir_toolchain_sysroot}/usr" \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_INSTALL_PREFIX="$cfg_dir_toolchain_sysroot/usr" \
-DCMAKE_C_FLAGS="${cfg_target_gcc_flags} -fPIC" \
-DCMAKE_SYSTEM_NAME="Linux" \
-DCMAKE_SYSTEM_PROCESSOR="$cfg_architecture" \
"../libswiftnav-$version"
}
build()
{
cd ${pkg_build_dir}/../build &&
$cmd_make
}
host_install()
{
cd ${pkg_build_dir}/../build &&
$cmd_make install
}
target_install()
{
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libswiftnav*so; do
if [ -L "$f" ]; then
cp -vd "$f" "$cfg_dir_rootfs/lib"
else
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/lib/$(basename "$f")"
fi
done
}

View File

@ -0,0 +1,11 @@
diff -Nru libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h
--- libswiftnav-0.11/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 1970-01-01 01:00:00.000000000 +0100
+++ libswiftnav-0.11.kk/clapack-3.2.1-CMAKE/F2CLIBS/libf2c/arith_cortex-a8.h 2014-10-23 08:28:34.888000000 +0200
@@ -0,0 +1,7 @@
+/* arith.h definitions for ARM Cortex-A8
+ * Calculated by running arithchk on a Beaglebone Black. */
+#define IEEE_8087
+#define Arith_Kind_ASL 1
+#define Double_Align
+#define QNaN0 0x0
+#define QNaN1 0x7ff80000