From patchwork Wed Jul 26 12:11:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugues Fruchet X-Patchwork-Id: 793900 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xHYrh6Kzvz9s9Y for ; Wed, 26 Jul 2017 22:12:20 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8FB6D8716A; Wed, 26 Jul 2017 12:12:18 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Th62N7cm4sg6; Wed, 26 Jul 2017 12:12:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id D597D86C8E; Wed, 26 Jul 2017 12:12:14 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3E9781C0306 for ; Wed, 26 Jul 2017 12:12:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3B03988753 for ; Wed, 26 Jul 2017 12:12:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dffvwl4MOYrJ for ; Wed, 26 Jul 2017 12:12:07 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) by whitealder.osuosl.org (Postfix) with ESMTPS id 88D6688758 for ; Wed, 26 Jul 2017 12:12:07 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v6QC5Pmt006380; Wed, 26 Jul 2017 14:12:05 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-.pphosted.com with ESMTP id 2bwb40n7kd-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 26 Jul 2017 14:12:05 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1978931; Wed, 26 Jul 2017 12:12:05 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas23.st.com [10.75.90.46]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0331B2574; Wed, 26 Jul 2017 12:12:05 +0000 (GMT) Received: from SAFEX1HUBCAS24.st.com (10.75.90.95) by SAFEX1HUBCAS23.st.com (10.75.90.46) with Microsoft SMTP Server (TLS) id 14.3.339.0; Wed, 26 Jul 2017 14:12:05 +0200 Received: from localhost (10.201.23.73) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.339.0; Wed, 26 Jul 2017 14:12:04 +0200 From: Hugues Fruchet To: Date: Wed, 26 Jul 2017 14:11:37 +0200 Message-ID: <1501071097-6301-2-git-send-email-hugues.fruchet@st.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501071097-6301-1-git-send-email-hugues.fruchet@st.com> References: <1501071097-6301-1-git-send-email-hugues.fruchet@st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.23.73] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-07-26_05:, , signatures=0 Cc: thomas.petazzoni@free-electrons.com, Hugues Fruchet , ps.report@gmx.net Subject: [Buildroot] [PATCH v2] package/libv4l: no libv4lconvert helper support if no fork() X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Build libv4lconvert helper support only when fork() is available. This fix the build issue reported here: http://autobuild.buildroot.net/results/7e8/7e8fbd99a8c091d7bbeedd16066297682bbe29fe/build-end.log Signed-off-by: Hugues Fruchet Tested-by: Peter Seiderer --- ...lconvert-helper-support-only-when-fork-is.patch | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch diff --git a/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch b/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch new file mode 100644 index 0000000..d604a53 --- /dev/null +++ b/package/libv4l/0010-Build-libv4lconvert-helper-support-only-when-fork-is.patch @@ -0,0 +1,100 @@ +From 5e191b15eed3535dccbf7a98ff2c484b0a1945e9 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Tue, 25 Jul 2017 21:04:35 +0200 +Subject: [PATCH 10/10] Build libv4lconvert helper support only when fork() is + available + +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 3 +++ + lib/libv4lconvert/Makefile.am | 7 ++++++- + lib/libv4lconvert/libv4lconvert.c | 6 ++++++ + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9031b42..58fb688 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -298,6 +298,9 @@ argp_saved_libs=$LIBS + AC_SUBST([ARGP_LIBS]) + LIBS=$argp_saved_libs + ++AC_CHECK_FUNCS([fork], AC_DEFINE([HAVE_LIBV4LCONVERT_HELPERS],[1],[whether to use libv4lconvert helpers])) ++AM_CONDITIONAL([HAVE_LIBV4LCONVERT_HELPERS], [test x$ac_cv_func_fork = xyes]) ++ + AC_CHECK_HEADER([linux/i2c-dev.h], [linux_i2c_dev=yes], [linux_i2c_dev=no]) + AM_CONDITIONAL([HAVE_LINUX_I2C_DEV], [test x$linux_i2c_dev = xyes]) + +diff --git a/lib/libv4lconvert/Makefile.am b/lib/libv4lconvert/Makefile.am +index 4f332fa..f266f3e 100644 +--- a/lib/libv4lconvert/Makefile.am ++++ b/lib/libv4lconvert/Makefile.am +@@ -1,6 +1,8 @@ + if WITH_DYN_LIBV4L + lib_LTLIBRARIES = libv4lconvert.la ++if HAVE_LIBV4LCONVERT_HELPERS + libv4lconvertpriv_PROGRAMS = ov511-decomp ov518-decomp ++endif + include_HEADERS = ../include/libv4lconvert.h + pkgconfig_DATA = libv4lconvert.pc + LIBV4LCONVERT_VERSION = -version-info 0 +@@ -16,11 +18,14 @@ libv4lconvert_la_SOURCES = \ + control/libv4lcontrol.c control/libv4lcontrol.h control/libv4lcontrol-priv.h \ + processing/libv4lprocessing.c processing/whitebalance.c processing/autogain.c \ + processing/gamma.c processing/libv4lprocessing.h processing/libv4lprocessing-priv.h \ +- helper.c helper-funcs.h libv4lconvert-priv.h libv4lsyscall-priv.h \ ++ helper-funcs.h libv4lconvert-priv.h libv4lsyscall-priv.h \ + tinyjpeg.h tinyjpeg-internal.h + if HAVE_JPEG + libv4lconvert_la_SOURCES += jpeg_memsrcdest.c jpeg_memsrcdest.h + endif ++if HAVE_LIBV4LCONVERT_HELPERS ++libv4lconvert_la_SOURCES += helper.c ++endif + libv4lconvert_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC) + libv4lconvert_la_LDFLAGS = $(LIBV4LCONVERT_VERSION) -lrt -lm $(JPEG_LIBS) $(ENFORCE_LIBV4L_STATIC) + +diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c +index da71891..145e581 100644 +--- a/lib/libv4lconvert/libv4lconvert.c ++++ b/lib/libv4lconvert/libv4lconvert.c +@@ -115,8 +115,10 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = { + { V4L2_PIX_FMT_JPEG, 0, 7, 7, 0 }, + { V4L2_PIX_FMT_PJPG, 0, 7, 7, 1 }, + { V4L2_PIX_FMT_JPGL, 0, 7, 7, 1 }, ++#ifdef HAVE_LIBV4LCONVERT_HELPERS + { V4L2_PIX_FMT_OV511, 0, 7, 7, 1 }, + { V4L2_PIX_FMT_OV518, 0, 7, 7, 1 }, ++#endif + /* uncompressed bayer */ + { V4L2_PIX_FMT_SBGGR8, 8, 8, 8, 1 }, + { V4L2_PIX_FMT_SGBRG8, 8, 8, 8, 1 }, +@@ -266,7 +268,9 @@ void v4lconvert_destroy(struct v4lconvert_data *data) + if (data->cinfo_initialized) + jpeg_destroy_decompress(&data->cinfo); + #endif // HAVE_JPEG ++#ifdef HAVE_LIBV4LCONVERT_HELPERS + v4lconvert_helper_cleanup(data); ++#endif + free(data->convert1_buf); + free(data->convert2_buf); + free(data->rotate90_buf); +@@ -811,6 +815,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, + return -1; + } + break; ++#ifdef HAVE_LIBV4LCONVERT_HELPERS + case V4L2_PIX_FMT_OV511: + if (v4lconvert_helper_decompress(data, LIBV4LCONVERT_PRIV_DIR "/ov511-decomp", + src, src_size, d, d_size, width, height, yvu)) { +@@ -827,6 +832,7 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, + return -1; + } + break; ++#endif + } + + switch (dest_pix_fmt) { +-- +1.9.1 +