From 5c8cc21e76f814159e30ccf2b1a763616f7f8c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Wed, 16 Oct 2013 14:04:15 +0000 Subject: testing/raspberrypi: new aport Raspberry Pi userland support https://github.com/raspberrypi/userland --- testing/raspberrypi/APKBUILD | 60 ++++++++++++++++++++++++++++++++++++++ testing/raspberrypi/fix-musl.patch | 49 +++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 testing/raspberrypi/APKBUILD create mode 100644 testing/raspberrypi/fix-musl.patch (limited to 'testing') diff --git a/testing/raspberrypi/APKBUILD b/testing/raspberrypi/APKBUILD new file mode 100644 index 000000000..8a5b78dd7 --- /dev/null +++ b/testing/raspberrypi/APKBUILD @@ -0,0 +1,60 @@ +# Maintainer: Timo Teräs +pkgname=raspberrypi +pkgver=0.20131012 +_commitid=0ea545c51d970d646659369a6471fb543f6aceec +pkgrel=0 +pkgdesc="Raspberry Pi support tools" +url="https://github.com/raspberrypi/userland" +arch="armhf" +license="BSD" +depends="" +makedepends="cmake" +install="" +options="!fhs" +subpackages="$pkgname-dev $pkgname-libs" +source="raspberrypi-$pkgver.tar.gz::https://github.com/raspberrypi/userland/archive/$_commitid.tar.gz + fix-musl.patch + " + +_sourcedir="$srcdir"/userland-$_commitid +_builddir="$srcdir"/build + +prepare() { + local i + cd "$_sourcedir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + mkdir -p "$_builddir" + cd "$_builddir" + cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_RPATH=/opt/vc/lib $_sourcedir || return 1 + make +} + +package() { + cd "$_builddir" + make install DESTDIR="$pkgdir" || return 1 + + # nuke the unwanted stuff + rm -rf "$pkgdir"/opt/vc/src + rm -rf "$pkgdir"/opt/vc/lib/*.a +} + +libs() { + pkgdesc="Raspberry Pi support libraries" + + mkdir -p "$subpkgdir"/opt/vc/lib + mv "$pkgdir"/opt/vc/lib/* "$subpkgdir"/opt/vc/lib +} + +md5sums="272ed8f2f834bb54928160412cdc461d raspberrypi-0.20131012.tar.gz +49a33897d575a07514b1b8d288361f63 fix-musl.patch" +sha256sums="c09816a2148cf705d1dc034ded021c8c04722e6d92c9c299466140db3a3efb5f raspberrypi-0.20131012.tar.gz +e8cbc558094d745f99a14f354720be0fdf81f2ebc48651fed32c4ae1ef1fd649 fix-musl.patch" +sha512sums="0730ef0ce9a43fb4d5553fe5745862b6dfe92fd6d8557bf41affffeb2f67c9e67c2fac020a02adc67f6067bbb06f6173a26fab7726603c19b3efdc9e9774f808 raspberrypi-0.20131012.tar.gz +8092d59985d7380b533896c6f8aad6f4838e8cf414a8052c43fa4330bc07ce6be7d2d0cc3bc280f3f63b537687cb8f51c93ef608db82fe6638505d03b317581f fix-musl.patch" diff --git a/testing/raspberrypi/fix-musl.patch b/testing/raspberrypi/fix-musl.patch new file mode 100644 index 000000000..2460d3044 --- /dev/null +++ b/testing/raspberrypi/fix-musl.patch @@ -0,0 +1,49 @@ +diff --git a/interface/vcos/pthreads/vcos_platform.h b/interface/vcos/pthreads/vcos_platform.h +index 465abd2..9356479 100755 +--- a/interface/vcos/pthreads/vcos_platform.h ++++ b/interface/vcos/pthreads/vcos_platform.h +@@ -120,9 +120,6 @@ typedef struct + + #define VCOS_ONCE_INIT PTHREAD_ONCE_INIT + +-#if defined(__arm__) && !defined(_HAVE_TIMER_T) && !defined(ANDROID) +-typedef __timer_t timer_t; +-#endif + typedef struct VCOS_TIMER_T + { + pthread_t thread; /**< id of the timer thread */ +diff --git a/interface/vcos/pthreads/vcos_pthreads.c b/interface/vcos/pthreads/vcos_pthreads.c +index 6ecc7da..9296ebe 100644 +--- a/interface/vcos/pthreads/vcos_pthreads.c ++++ b/interface/vcos/pthreads/vcos_pthreads.c +@@ -580,7 +580,7 @@ const char ** vcos_get_argv(void) + */ + uint32_t _vcos_get_ticks_per_second(void) + { +- return HZ; ++ return 100; + } + + VCOS_STATUS_T vcos_once(VCOS_ONCE_T *once_control, +diff --git a/interface/vmcs_host/linux/vcfilesys.c b/interface/vmcs_host/linux/vcfilesys.c +index ab65e3e..53c7486 100644 +--- a/interface/vmcs_host/linux/vcfilesys.c ++++ b/interface/vmcs_host/linux/vcfilesys.c +@@ -49,7 +49,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include + #include + +-#if !defined(ANDROID) && !defined( __USE_FILE_OFFSET64 ) ++#if defined(__GLIBC__) && !defined( __USE_FILE_OFFSET64 ) + #error "__USE_FILE_OFFSET64 isn't defined" + #endif + +@@ -916,7 +916,7 @@ int vc_hostfs_set_attr(const char *path, fattributes_t attr) + + if (pathbuf) + { +- __mode_t mode = 0; ++ mode_t mode = 0; + struct stat sb; + + backslash_to_slash(pathbuf); -- cgit v1.2.3