{"id":1971,"url":"https://patchwork.libcamera.org/api/1.1/patches/1971/?format=json","web_url":"https://patchwork.libcamera.org/patch/1971/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20190915011257.11947-1-laurent.pinchart@ideasonboard.com>","date":"2019-09-15T01:12:57","name":"[libcamera-devel] ipa: Generate the two dummy IPA modules from the same source","commit_ref":"4ec807192d9f1ef682e2c257cf4d832c35042305","pull_url":null,"state":"accepted","archived":false,"hash":"8ed3944a63f9df10d7ce964dcd7ae1e2964845df","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/1.1/people/2/?format=json","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/1971/mbox/","series":[{"id":493,"url":"https://patchwork.libcamera.org/api/1.1/series/493/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=493","date":"2019-09-15T01:12:57","name":"[libcamera-devel] ipa: Generate the two dummy IPA modules from the same source","version":1,"mbox":"https://patchwork.libcamera.org/series/493/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/1971/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/1971/checks/","tags":{},"headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 414C460BE6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 15 Sep 2019 03:13:11 +0200 (CEST)","from pendragon.lan (bl10-204-24.dsl.telepac.pt [85.243.204.24])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 184BC23F;\n\tSun, 15 Sep 2019 03:13:09 +0200 (CEST)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1568509990;\n\tbh=8UbIA+FuHv9JjtKrjK28CS4a/2MMwgskJ8Q8WC2nY30=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=uJwbR/DsdZcknZspM7FszcEZlHK15zMOD6VhNK/3lfE7MMIZgnm3jK6O6Yz1HC7iz\n\tSV8dD75KgomaIQTG9zQf9iDeRu2hkUjJm0fmN85dGifFQc9aLjAfAxIeIJGFK3aRsL\n\trTsBcRvN+LqMhqlb5I5jI2mzEYlqom2b2ZNCnfvw=","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Date":"Sun, 15 Sep 2019 04:12:57 +0300","Message-Id":"<20190915011257.11947-1-laurent.pinchart@ideasonboard.com>","X-Mailer":"git-send-email 2.21.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","Subject":"[libcamera-devel] [PATCH] ipa: Generate the two dummy IPA modules\n\tfrom the same source","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Sun, 15 Sep 2019 01:13:11 -0000"},"content":"The ipa_dummy.cpp and ipa_dummy_isolate.cpp only differ in the license\nreported in the IPAModuleInfo structure. Drop the second file and\ngenerate the two .so from ipa_dummy.cpp, with the license defined\nthrough the command line.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n src/ipa/ipa_dummy.cpp         |  2 +-\n src/ipa/ipa_dummy_isolate.cpp | 47 -----------------------------------\n src/ipa/meson.build           | 10 ++++----\n 3 files changed, 6 insertions(+), 53 deletions(-)\n delete mode 100644 src/ipa/ipa_dummy_isolate.cpp","diff":"diff --git a/src/ipa/ipa_dummy.cpp b/src/ipa/ipa_dummy.cpp\nindex 9313aabd2db8..9d0cbdc8b1ad 100644\n--- a/src/ipa/ipa_dummy.cpp\n+++ b/src/ipa/ipa_dummy.cpp\n@@ -34,7 +34,7 @@ const struct IPAModuleInfo ipaModuleInfo = {\n \t0,\n \t\"PipelineHandlerVimc\",\n \t\"Dummy IPA for Vimc\",\n-\t\"LGPL-2.1-or-later\",\n+\tLICENSE,\n };\n \n IPAInterface *ipaCreate()\ndiff --git a/src/ipa/ipa_dummy_isolate.cpp b/src/ipa/ipa_dummy_isolate.cpp\ndeleted file mode 100644\nindex cd66626df2df..000000000000\n--- a/src/ipa/ipa_dummy_isolate.cpp\n+++ /dev/null\n@@ -1,47 +0,0 @@\n-/* SPDX-License-Identifier: LGPL-2.1-or-later */\n-/*\n- * Copyright (C) 2019, Google Inc.\n- *\n- * ipa_dummy_isolate.cpp - Dummy Image Processing Algorithm module that needs\n- * to be isolated\n- */\n-\n-#include <iostream>\n-\n-#include <ipa/ipa_interface.h>\n-#include <ipa/ipa_module_info.h>\n-\n-namespace libcamera {\n-\n-class IPADummyIsolate : public IPAInterface\n-{\n-public:\n-\tint init();\n-};\n-\n-int IPADummyIsolate::init()\n-{\n-\tstd::cout << \"initializing isolated dummy IPA!\" << std::endl;\n-\treturn 0;\n-}\n-\n-/*\n- * External IPA module interface\n- */\n-\n-extern \"C\" {\n-const struct IPAModuleInfo ipaModuleInfo = {\n-\tIPA_MODULE_API_VERSION,\n-\t0,\n-\t\"PipelineHandlerVimc\",\n-\t\"Dummy IPA for Vimc that needs to be isolated\",\n-\t\"Proprietary\",\n-};\n-\n-IPAInterface *ipaCreate()\n-{\n-\treturn new IPADummyIsolate();\n-}\n-};\n-\n-}; /* namespace libcamera */\ndiff --git a/src/ipa/meson.build b/src/ipa/meson.build\nindex 2b9863bce3ea..f09915bc1388 100644\n--- a/src/ipa/meson.build\n+++ b/src/ipa/meson.build\n@@ -1,17 +1,17 @@\n ipa_dummy_sources = [\n-    ['ipa_dummy', 'ipa_dummy.cpp'],\n-    ['ipa_dummy_isolate', 'ipa_dummy_isolate.cpp'],\n+    ['ipa_dummy',         'LGPL-2.1-or-later'],\n+    ['ipa_dummy_isolate', 'Proprietary'],\n ]\n \n ipa_install_dir = join_paths(get_option('libdir'), 'libcamera')\n \n foreach t : ipa_dummy_sources\n-    ipa = shared_module(t[0],\n-                        t[1],\n+    ipa = shared_module(t[0], 'ipa_dummy.cpp',\n                         name_prefix : '',\n                         include_directories : libcamera_includes,\n                         install : true,\n-                        install_dir : ipa_install_dir)\n+                        install_dir : ipa_install_dir,\n+                        cpp_args : '-DLICENSE=\"' + t[1] + '\"')\n endforeach\n \n config_h.set('IPA_MODULE_DIR',\n","prefixes":["libcamera-devel"]}