From 3e9aaf994f199baecb703a564ec0b5b92e23153e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 29 Mar 2016 15:58:27 +0000 Subject: community/guvcview: move from main --- .../0001-fix-building-with-musl-libc.patch | 120 +++++++++++++++++++++ community/guvcview/APKBUILD | 57 ++++++++++ community/guvcview/configure-cppflags.patch | 11 ++ 3 files changed, 188 insertions(+) create mode 100644 community/guvcview/0001-fix-building-with-musl-libc.patch create mode 100644 community/guvcview/APKBUILD create mode 100644 community/guvcview/configure-cppflags.patch (limited to 'community/guvcview') diff --git a/community/guvcview/0001-fix-building-with-musl-libc.patch b/community/guvcview/0001-fix-building-with-musl-libc.patch new file mode 100644 index 0000000000..654f992b5d --- /dev/null +++ b/community/guvcview/0001-fix-building-with-musl-libc.patch @@ -0,0 +1,120 @@ +From 3112f9654e9f21ce5d3ab23a3a1e7c6dfdce45c6 Mon Sep 17 00:00:00 2001 +From: Natanael Copa +Date: Mon, 25 May 2015 11:33:46 +0000 +Subject: [PATCH] fix building with musl libc + +The __BEGIN_DECLS and __END_DECLS are internal identifiers which are not +defined in any standard. The use of those makes compile fail with musl +libc so we avoid using them +--- + gview_audio/gviewaudio.h | 9 +++++++-- + gview_encoder/gviewencoder.h | 8 ++++++-- + gview_render/gviewrender.h | 8 ++++++-- + gview_v4l2core/gviewv4l2core.h | 8 ++++++-- + 4 files changed, 25 insertions(+), 8 deletions(-) + +diff --git a/gview_audio/gviewaudio.h b/gview_audio/gviewaudio.h +index 0cc6f70..5cae68b 100644 +--- a/gview_audio/gviewaudio.h ++++ b/gview_audio/gviewaudio.h +@@ -38,7 +38,9 @@ + #include + + /*make sure we support c++*/ +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /*Audio API*/ + #define AUDIO_NONE (0) +@@ -263,6 +265,9 @@ int audio_stop(audio_context_t *audio_ctx); + */ + void audio_close(audio_context_t *audio_ctx); + +-__END_DECLS ++ ++#ifdef __cplusplus ++} ++#endif + + #endif +diff --git a/gview_encoder/gviewencoder.h b/gview_encoder/gviewencoder.h +index 2bc3586..aeff883 100644 +--- a/gview_encoder/gviewencoder.h ++++ b/gview_encoder/gviewencoder.h +@@ -38,7 +38,9 @@ + #include + + /*make sure we support c++*/ +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /*encoder modes*/ + #define ENCODER_MODE_NONE (0) +@@ -732,6 +734,8 @@ int encoder_write_audio_data(encoder_context_t *encoder_ctx); + */ + int encoder_disk_supervisor(int treshold, const char *path); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif +diff --git a/gview_render/gviewrender.h b/gview_render/gviewrender.h +index e6cedfa..73c3b2c 100644 +--- a/gview_render/gviewrender.h ++++ b/gview_render/gviewrender.h +@@ -38,7 +38,9 @@ + #include + + /*make sure we support c++*/ +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + #define RENDER_NONE (0) + #define RENDER_SDL (1) +@@ -279,6 +281,8 @@ void render_clean_fx(); + */ + void render_close(); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif +diff --git a/gview_v4l2core/gviewv4l2core.h b/gview_v4l2core/gviewv4l2core.h +index e9d5d53..35f075f 100644 +--- a/gview_v4l2core/gviewv4l2core.h ++++ b/gview_v4l2core/gviewv4l2core.h +@@ -33,7 +33,9 @@ + #include + + /*make sure we support c++*/ +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + /* + * LOGITECH Dynamic controls defs +@@ -1386,7 +1388,9 @@ int v4l2core_save_image(v4l2_frame_buff_t *frame, const char *filename, int form + */ + uint64_t v4l2core_time_get_timestamp(); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif + +-- +2.4.1 + diff --git a/community/guvcview/APKBUILD b/community/guvcview/APKBUILD new file mode 100644 index 0000000000..5ec9ece346 --- /dev/null +++ b/community/guvcview/APKBUILD @@ -0,0 +1,57 @@ +# Contributor: Natanael Copa +# Maintainer: Natanael Copa +pkgname=guvcview +pkgver=2.0.1 +pkgrel=1 +pkgdesc="Webcam viewer" +url="http://guvcview.sourceforge.net/" +arch="all" +license="GPLv3" +depends= +depends_dev= +makedepends="gtk+3.0-dev eudev-dev sdl-dev portaudio-dev ffmpeg-dev gsl-dev + v4l-utils-dev libusb-dev linux-headers" +install= +subpackages="$pkgname-doc $pkgname-lang" +source="http://downloads.sourceforge.net/project/guvcview/source/guvcview-src-$pkgver.tar.gz + 0001-fix-building-with-musl-libc.patch + configure-cppflags.patch + " + +_builddir="$srcdir"/guvcview-src-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --disable-sdl2 \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 +} + +md5sums="54e608b8a2c13d96f546197117d758f4 guvcview-src-2.0.1.tar.gz +6d30ec659cd71d34c2d30225e730cff8 0001-fix-building-with-musl-libc.patch +a9ca747ba7b29eb77753c980eeca18d1 configure-cppflags.patch" +sha256sums="dffb86c01bd2e25216d9fbc0c246342246818036d9f63e0488111d757d9b018d guvcview-src-2.0.1.tar.gz +a65de3103875251cba9cf9cac5399cbd6fb5a58e550a4f3573f72660e1cec454 0001-fix-building-with-musl-libc.patch +8c0cc2256cf4c84b9b74eef3c3fc324324999587ea9df8ebc6377d0036e5040e configure-cppflags.patch" +sha512sums="b3877f00f4caf224eac2010f62e1c3d575b94f84cd0a8da7a5f1df6c851384c7a9e356de905ce27e143dc9761137ae1cce146bb4f6c0aa6d270dd53551bce67a guvcview-src-2.0.1.tar.gz +9ab9575bc41acc79581da8d43ef52fc9cf2bf46ef7df97951202e47f5516c38b42ebb715a4e8d6010ac9875c2c9c8cb1912d39282d4a632123424ab516632c98 0001-fix-building-with-musl-libc.patch +1c97bfba867518ca99606f38a0450389ae01516ecfcd8339f907b01a981f3f2c2b34cac5b264fa2bf7827c29a93a52818f099260f787e42ce19eca150c5cf971 configure-cppflags.patch" diff --git a/community/guvcview/configure-cppflags.patch b/community/guvcview/configure-cppflags.patch new file mode 100644 index 0000000000..4931463d93 --- /dev/null +++ b/community/guvcview/configure-cppflags.patch @@ -0,0 +1,11 @@ +--- ./configure.orig ++++ ./configure +@@ -13902,7 +13902,7 @@ + fi + + +-CPPFLAGS+="${GVIEWV4L2CORE_CFLAGS}" ++CPPFLAGS="$CPPFLAGS ${GVIEWV4L2CORE_CFLAGS}" + for ac_header in avcodec.h libavcodec/avcodec.h ffmpeg/avcodec.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -- cgit v1.2.3