summaryrefslogtreecommitdiffstats
path: root/main/guvcview
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-05-25 11:49:10 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-05-25 11:49:10 +0000
commit59206e59a019a24ec567325f288e460580095fe8 (patch)
tree09e7ebeb7a584b4f1c7859a8aafffd50cda7cd91 /main/guvcview
parente3f17c6915db4e8cac4ddee8a0493d6d3694622e (diff)
downloadaports-59206e59a019a24ec567325f288e460580095fe8.tar.bz2
aports-59206e59a019a24ec567325f288e460580095fe8.tar.xz
main/guvcview: move from testing
Diffstat (limited to 'main/guvcview')
-rw-r--r--main/guvcview/0001-fix-building-with-musl-libc.patch120
-rw-r--r--main/guvcview/APKBUILD57
-rw-r--r--main/guvcview/configure-cppflags.patch11
3 files changed, 188 insertions, 0 deletions
diff --git a/main/guvcview/0001-fix-building-with-musl-libc.patch b/main/guvcview/0001-fix-building-with-musl-libc.patch
new file mode 100644
index 000000000..654f992b5
--- /dev/null
+++ b/main/guvcview/0001-fix-building-with-musl-libc.patch
@@ -0,0 +1,120 @@
+From 3112f9654e9f21ce5d3ab23a3a1e7c6dfdce45c6 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+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 <sys/types.h>
+
+ /*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 <sys/types.h>
+
+ /*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 <sys/types.h>
+
+ /*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 <sys/types.h>
+
+ /*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/main/guvcview/APKBUILD b/main/guvcview/APKBUILD
new file mode 100644
index 000000000..78588905c
--- /dev/null
+++ b/main/guvcview/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=guvcview
+pkgver=2.0.1
+pkgrel=0
+pkgdesc="Webcam viewer"
+url="http://guvcview.sourceforge.net/"
+arch="all"
+license="GPLv3"
+depends=
+depends_dev=
+makedepends="gtk+3.0-dev udev-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/main/guvcview/configure-cppflags.patch b/main/guvcview/configure-cppflags.patch
new file mode 100644
index 000000000..4931463d9
--- /dev/null
+++ b/main/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`