Skip to contentSkip to conversation

swig: merge .inc into .bb

PATCH In review Alexander Kanavin 2 participants 3 messages Apr 22, 2024

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 swig: merge .inc into .bb

From: Alexander Kanavin <[email protected]>

---
 meta/recipes-devtools/swig/swig.inc      | 67 -----------------------
 meta/recipes-devtools/swig/swig_4.2.1.bb | 69 +++++++++++++++++++++++-
 2 files changed, 67 insertions(+), 69 deletions(-)
 delete mode 100644 meta/recipes-devtools/swig/swig.inc
meta/recipes-devtools/swig/swig.inc deleted +0 -67
deleted file mode 100644
index 7a6c4d7359c..00000000000
@@ -1,67 +0,0 @@
-SUMMARY = "SWIG - Simplified Wrapper and Interface Generator"
-DESCRIPTION = "SWIG is a compiler that makes it easy to integrate C and C++ \
-code with other languages including Perl, Tcl, Ruby, Python, Java, Guile, \
-Mzscheme, Chicken, OCaml, Pike, and C#."
-HOMEPAGE = "http://swig.sourceforge.net/"
-LICENSE = "BSD-3-Clause & GPL-3.0-only"
-LIC_FILES_CHKSUM = "file://LICENSE;md5=e7807a6282784a7dde4c846626b08fc6 \
-                    file://LICENSE-GPL;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://LICENSE-UNIVERSITIES;md5=8ce9dcc8f7c994de4a408b205c72ba08"
-
-SECTION = "devel"
-
-DEPENDS = "libpcre2 bison-native"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BPN}-${PV}.tar.gz"
-UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/swig/files/swig/"
-UPSTREAM_CHECK_REGEX = "swig-(?P<pver>\d+(\.\d+)+)"
-
-inherit autotools python3native pkgconfig
-
-EXTRA_OECONF = " \
-    --with-python3=${PYTHON} \
-    --without-allegrocl \
-    --without-android \
-    --without-boost \
-    --without-chicken \
-    --without-clisp \
-    --without-csharp \
-    --without-d \
-    --without-gcj \
-    --without-go \
-    --without-guile \
-    --without-java \
-    --without-lua \
-    --without-mzscheme \
-    --without-ocaml \
-    --without-octave \
-    --without-perl5 \
-    --without-pike \
-    --without-php \
-    --without-r \
-    --without-ruby \
-    --without-tcl \
-"
-
-EXTRA_AUTORECONF += "-I Tools/config"
-
-BBCLASSEXTEND = "native nativesdk"
-
-# necessary together with bison dependency until a new upstream version after
-# 3.0.12 includes 0001-Fix-generated-code-for-constant-expressions-containi.patch
-do_configure:append() {
-    mkdir -p ${B}/Source/CParse
-}
-
-do_install:append:class-nativesdk() {
-    cd ${D}${bindir}
-    ln -s swig swig2.0
-}
-
-def swiglib_relpath(d):
-    swiglib = d.getVar('datadir') + "/" + d.getVar('BPN') + "/" + d.getVar('PV')
-    return os.path.relpath(swiglib, d.getVar('bindir'))
-
-do_install:append:class-native() {
-    create_wrapper ${D}${bindir}/swig SWIG_LIB='`dirname $''realpath`'/${@swiglib_relpath(d)}
-}
meta/recipes-devtools/swig/swig_4.2.1.bb +67 -2

74 lines not on this page · raw message

Signature · 1 line
2.39.2
#1 lore raw

PATCH v2 2/2 swig: convert from autotools to cmake

From: Alexander Kanavin <[email protected]>

Drop patches:
0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch (superseded long time ago by native wrapper)

0001-configure-use-pkg-config-for-pcre-detection.patch (autotools-specific)

Drop all autoconf options and native python dependency as cmake configuration doesn't contain those.

---
 ...e-for-swig-swiglib-on-non-Win32-plat.patch | 65 -------------------
 ...re-use-pkg-config-for-pcre-detection.patch | 63 ------------------
 meta/recipes-devtools/swig/swig_4.2.1.bb      | 45 +++----------
 3 files changed, 9 insertions(+), 164 deletions(-)
 delete mode 100644 meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch
 delete mode 100644 meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch
meta/recipes-devtools/swig/swig/0001-Use-proc-self-exe-for-swig-swiglib-on-non-Win32-plat.patch deleted +0 -65
deleted file mode 100644
index 5e83e92725e..00000000000
@@ -1,65 +0,0 @@
-From b88a98348b3841f0b702e314631883d46f9f362d Mon Sep 17 00:00:00 2001
-From: "NODA, Kai" <[email protected]>
-Date: Sun, 22 Apr 2012 17:01:02 +0900
-Subject: [PATCH] Use /proc/self/exe for "swig -swiglib" on non-Win32
- platforms.
-
-If it wasn't found, then fall back to a fixed string just as before.
-
-Upstream-Status: Submitted
-http://sourceforge.net/mailarchive/message.php?msg_id=29179733
----
- Source/Modules/main.cxx | 24 ++++++++++++++++++++++--
- 1 file changed, 22 insertions(+), 2 deletions(-)
-
-diff --git a/Source/Modules/main.cxx b/Source/Modules/main.cxx
-index 76b4f9d..de0a512 100644
---- a/Source/Modules/main.cxx
-+++ b/Source/Modules/main.cxx
-@@ -25,6 +25,11 @@
- #include <ctype.h>
- #include <errno.h>
- #include <limits.h>		// for INT_MAX
-+#ifndef _WIN32
-+#include <cstddef>
-+#include <unistd.h>		// for readlink
-+#include <sys/stat.h>		// for stat
-+#endif
- 
- // Global variables
- 
-@@ -895,9 +900,9 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
- 
-   // Check for SWIG_LIB environment variable
-   if ((c = getenv("SWIG_LIB")) == (char *) 0) {
-+    char *p;
- #if defined(_WIN32)
-     char buf[MAX_PATH];
--    char *p;
-     if (!(GetModuleFileName(0, buf, MAX_PATH) == 0 || (p = strrchr(buf, '\\')) == 0)) {
-       *(p + 1) = '\0';
-       SwigLib = NewStringf("%sLib", buf); // Native windows installation path
-@@ -907,7 +912,22 @@ int SWIG_main(int argc, char *argv[], const TargetLanguageModule *tlm) {
-     if (Len(SWIG_LIB_WIN_UNIX) > 0)
-       SwigLibWinUnix = NewString(SWIG_LIB_WIN_UNIX); // Unix installation path using a drive letter (for msys/mingw)
- #else
--    SwigLib = NewString(SWIG_LIB);
-+    char buf[PATH_MAX];
-+    if (0 < ::readlink("/proc/self/exe", buf, sizeof(buf)) &&
-+        (p = ::strstr(buf, "/bin/swig"))) {
-+        int major, minor, patch;
-+        const int ret = ::sscanf(VERSION, "%d.%d.%d", &major, &minor, &patch);
-+        if (3 == ret) {
-+            const ::ptrdiff_t dir_part_len = p - buf;
-+            ::snprintf(p, PATH_MAX - dir_part_len, "/share/swig/%d.%d.%d", major, minor, patch);
-+            struct ::stat stat_res;
-+            if (0 == ::stat(buf, &stat_res) && S_ISDIR(stat_res.st_mode)) {
-+                SwigLib = NewString(buf);
-+            }
-+        }
-+    }
-+    if (NULL == SwigLib)
-+        SwigLib = NewString(SWIG_LIB);
- #endif
-   } else {
-     SwigLib = NewString(c);
meta/recipes-devtools/swig/swig/0001-configure-use-pkg-config-for-pcre-detection.patch deleted +0 -63

63 lines not on this page · raw message

meta/recipes-devtools/swig/swig_4.2.1.bb +9 -36

63 lines not on this page · raw message

Signature · 1 line
2.39.2
#2 lore raw

Patchtest results for [PATCH v2 1/2] swig: merge .inc into .bb

In reply to Alexander Kanavin

Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:

---
Testing patch /home/patchtest/share/mboxes/v2-1-2-swig-merge-.inc-into-.bb.patch

FAIL: test lic files chksum modified not mentioned: LIC_FILES_CHKSUM changed without "License-Update:" tag and description in commit message (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)

PASS: pretest src uri left files (test_metadata.TestMetadata.pretest_src_uri_left_files)
PASS: test CVE check ignore (test_metadata.TestMetadata.test_cve_check_ignore)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test max line length (test_metadata.TestMetadata.test_max_line_length)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test src uri left files (test_metadata.TestMetadata.test_src_uri_left_files)

SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: test CVE tag format: No new CVE patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new CVE patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new CVE patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
SKIP: test target mailing list: Series merged, no reason to check other mailing lists (test_mbox.TestMbox.test_target_mailing_list)

---

Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!