get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/90359/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 90359,
    "url": "http://patches.dpdk.org/api/patches/90359/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210401115009.1063844-3-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210401115009.1063844-3-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210401115009.1063844-3-bruce.richardson@intel.com",
    "date": "2021-04-01T11:49:57",
    "name": "[RFC,02/14] build: simplify library build file",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "4c004ed187dca6ef5b6658b853f45aa55de5791b",
    "submitter": {
        "id": 20,
        "url": "http://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 1,
        "url": "http://patches.dpdk.org/api/users/1/?format=api",
        "username": "tmonjalo",
        "first_name": "Thomas",
        "last_name": "Monjalon",
        "email": "thomas@monjalon.net"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210401115009.1063844-3-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 16057,
            "url": "http://patches.dpdk.org/api/series/16057/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=16057",
            "date": "2021-04-01T11:49:55",
            "name": "Build file update proposals",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/16057/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/90359/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/90359/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 497D9A0548;\n\tThu,  1 Apr 2021 13:50:38 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 2A00E1410CD;\n\tThu,  1 Apr 2021 13:50:25 +0200 (CEST)",
            "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 81F151410CD\n for <dev@dpdk.org>; Thu,  1 Apr 2021 13:50:23 +0200 (CEST)",
            "from fmsmga003.fm.intel.com ([10.253.24.29])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 01 Apr 2021 04:50:22 -0700",
            "from silpixa00399126.ir.intel.com ([10.237.223.116])\n by FMSMGA003.fm.intel.com with ESMTP; 01 Apr 2021 04:50:20 -0700"
        ],
        "IronPort-SDR": [
            "\n xhBrWHizch05W2XOt0UXBF5f2ZpeZVrMhu06jXCsArnqvismFnNdlSX8/1HvnmQFs3e8FpVVPW\n EGkE16HJeEZg==",
            "\n oY39BEF6rRqHGNJiXUr+ZFTnPWGfuaOXXYJo81lHUzfBmh5W3QP9ckR2+yaeSQL9MGvX/X/rs1\n fjor1jMfnUwg=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9940\"; a=\"179760774\"",
            "E=Sophos;i=\"5.81,296,1610438400\"; d=\"scan'208\";a=\"179760774\"",
            "E=Sophos;i=\"5.81,296,1610438400\"; d=\"scan'208\";a=\"446062593\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "thomas@monjalon.net, david.marchand@redhat.com, bluca@debian.org,\n Bruce Richardson <bruce.richardson@intel.com>",
        "Date": "Thu,  1 Apr 2021 12:49:57 +0100",
        "Message-Id": "<20210401115009.1063844-3-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210401115009.1063844-1-bruce.richardson@intel.com>",
        "References": "<20210401115009.1063844-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [RFC PATCH 02/14] build: simplify library build file",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Two simplifications can be made to the build file which reduce indentation\nlevels and make it easier to read:\n\n1. When meson build support was first added, the compat library existed in\nDPDK as a single header file. Since that header has been merged into EAL,\nwe no longer need to support header-only libraries, so can shorten the\ncode.\n\n2. From meson 0.49 onwards we have the \"continue\" keyword available to\nbreak out of one loop iteration and begin the next. This allows us to\nremove blocks in the build configuration file which were conditional on the\n\"build\" variable being true. Instead we can use \"continue\" to abort\nprocessing at the point where the \"build\" value becomes false.\n\nSince this patch changes the indentation level of large parts of the\nmeson.build file, we use the opportunity to adjust the whitespace used to\nthe meson-standard 4-spec indentation level.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n lib/meson.build | 291 +++++++++++++++++++++++-------------------------\n 1 file changed, 141 insertions(+), 150 deletions(-)",
    "diff": "diff --git a/lib/meson.build b/lib/meson.build\nindex 7712aa4977..70a9ef0a0e 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -54,159 +54,150 @@ default_cflags += ['-DALLOW_EXPERIMENTAL_API']\n default_cflags += ['-DALLOW_INTERNAL_API']\n \n if cc.has_argument('-Wno-format-truncation')\n-\tdefault_cflags += '-Wno-format-truncation'\n+    default_cflags += '-Wno-format-truncation'\n endif\n \n enabled_libs = [] # used to print summary at the end\n \n foreach l:libraries\n-\tbuild = true\n-\treason = '<unknown reason>' # set if build == false to explain why\n-\tname = l\n-\tuse_function_versioning = false\n-\tsources = []\n-\theaders = []\n-\tindirect_headers = [] # public headers not directly included by apps\n-\tincludes = []\n-\tcflags = default_cflags\n-\tobjs = [] # other object files to link against, used e.g. for\n-\t          # instruction-set optimized versions of code\n-\n-\t# use \"deps\" for internal DPDK dependencies, and \"ext_deps\" for\n-\t# external package/library requirements\n-\text_deps = []\n-\tdeps = []\n-\t# eal is standard dependency once built\n-\tif dpdk_conf.has('RTE_LIB_EAL')\n-\t\tdeps += ['eal']\n-\tendif\n-\n-\tdir_name = 'librte_' + l\n-\tsubdir(dir_name)\n-\n-\tif build\n-\t\tshared_deps = ext_deps\n-\t\tstatic_deps = ext_deps\n-\t\tforeach d:deps\n-\t\t\tif not is_variable('shared_rte_' + d)\n-\t\t\t\terror('Missing internal dependency \"@0@\" for @1@ [@2@]'\n-\t\t\t\t\t\t.format(d, name, 'lib/' + dir_name))\n-\t\t\tendif\n-\t\t\tshared_deps += [get_variable('shared_rte_' + d)]\n-\t\t\tstatic_deps += [get_variable('static_rte_' + d)]\n-\t\tendforeach\n-\tendif\n-\n-\tif not build\n-\t\tdpdk_libs_disabled += name\n-\t\tset_variable(name.underscorify() + '_disable_reason', reason)\n-\telse\n-\t\tenabled_libs += name\n-\t\tdpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)\n-\t\tinstall_headers(headers)\n-\t\tinstall_headers(indirect_headers)\n-\t\tdpdk_chkinc_headers += headers\n-\n-\t\tlibname = 'rte_' + name\n-\t\tincludes += include_directories(dir_name)\n-\n-\t\tif sources.length() == 0\n-\t\t\t# if no C files, just set a dependency on header path\n-\t\t\tshared_dep = declare_dependency(include_directories: includes)\n-\t\t\tstatic_dep = shared_dep\n-\t\telse\n-\t\t\tif is_windows and use_function_versioning\n-\t\t\t\tmessage('@0@: Function versioning is not supported by Windows.'\n-\t\t\t\t.format(name))\n-\t\t\tendif\n-\n-\t\t\tif use_function_versioning\n-\t\t\t\tcflags += '-DRTE_USE_FUNCTION_VERSIONING'\n-\t\t\tendif\n-\n-\t\t\t# first build static lib\n-\t\t\tstatic_lib = static_library(libname,\n-\t\t\t\t\tsources,\n-\t\t\t\t\tobjects: objs,\n-\t\t\t\t\tc_args: cflags,\n-\t\t\t\t\tdependencies: static_deps,\n-\t\t\t\t\tinclude_directories: includes,\n-\t\t\t\t\tinstall: true)\n-\t\t\tstatic_dep = declare_dependency(\n-\t\t\t\t\tinclude_directories: includes,\n-\t\t\t\t\tdependencies: static_deps)\n-\n-\t\t\tif not use_function_versioning or is_windows\n-\t\t\t\t# use pre-build objects to build shared lib\n-\t\t\t\tsources = []\n-\t\t\t\tobjs += static_lib.extract_all_objects(recursive: false)\n-\t\t\telse\n-\t\t\t\t# for compat we need to rebuild with\n-\t\t\t\t# RTE_BUILD_SHARED_LIB defined\n-\t\t\t\tcflags += '-DRTE_BUILD_SHARED_LIB'\n-\t\t\tendif\n-\t\t\tversion_map = '@0@/@1@/version.map'.format(\n-\t\t\t\t\tmeson.current_source_dir(), dir_name)\n-\t\t\timplib = dir_name + '.dll.a'\n-\n-\t\t\tdef_file = custom_target(libname + '_def',\n-\t\t\t\tcommand: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],\n-\t\t\t\tinput: version_map,\n-\t\t\t\toutput: '@0@_exports.def'.format(libname))\n-\n-\t\t\tmingw_map = custom_target(libname + '_mingw',\n-\t\t\t\tcommand: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],\n-\t\t\t\tinput: version_map,\n-\t\t\t\toutput: '@0@_mingw.map'.format(libname))\n-\n-\t\t\tif is_ms_linker\n-\t\t\t\tlk_args = ['-Wl,/def:' + def_file.full_path()]\n-\t\t\t\tif meson.version().version_compare('<0.54.0')\n-\t\t\t\t\tlk_args += ['-Wl,/implib:lib\\\\' + implib]\n-\t\t\t\tendif\n-\t\t\telse\n-\t\t\t\tif is_windows\n-\t\t\t\t\tlk_args = ['-Wl,--version-script=' + mingw_map.full_path()]\n-\t\t\t\telse\n-\t\t\t\t\tlk_args = ['-Wl,--version-script=' + version_map]\n-\t\t\t\tendif\n-\t\t\tendif\n-\n-\t\t\tlk_deps = [version_map, def_file, mingw_map]\n-\t\t\tif not is_windows\n-\t\t\t\t# on unix systems check the output of the\n-\t\t\t\t# check-symbols.sh script, using it as a\n-\t\t\t\t# dependency of the .so build\n-\t\t\t\tlk_deps += custom_target(name + '.sym_chk',\n-\t\t\t\t\tcommand: [check_symbols,\n-\t\t\t\t\t\tversion_map, '@INPUT@'],\n-\t\t\t\t\tcapture: true,\n-\t\t\t\t\tinput: static_lib,\n-\t\t\t\t\toutput: name + '.sym_chk')\n-\t\t\tendif\n-\n-\t\t\tshared_lib = shared_library(libname,\n-\t\t\t\t\tsources,\n-\t\t\t\t\tobjects: objs,\n-\t\t\t\t\tc_args: cflags,\n-\t\t\t\t\tdependencies: shared_deps,\n-\t\t\t\t\tinclude_directories: includes,\n-\t\t\t\t\tlink_args: lk_args,\n-\t\t\t\t\tlink_depends: lk_deps,\n-\t\t\t\t\tversion: abi_version,\n-\t\t\t\t\tsoversion: so_version,\n-\t\t\t\t\tinstall: true)\n-\t\t\tshared_dep = declare_dependency(link_with: shared_lib,\n-\t\t\t\t\tinclude_directories: includes,\n-\t\t\t\t\tdependencies: shared_deps)\n-\n-\t\t\tdpdk_libraries = [shared_lib] + dpdk_libraries\n-\t\t\tdpdk_static_libraries = [static_lib] + dpdk_static_libraries\n-\t\tendif # sources.length() > 0\n-\n-\t\tset_variable('shared_rte_' + name, shared_dep)\n-\t\tset_variable('static_rte_' + name, static_dep)\n-\t\tmessage('lib/@0@: Defining dependency \"@1@\"'.format(\n-\t\t\t\tdir_name, name))\n-\tendif # if build\n+    build = true\n+    reason = '<unknown reason>' # set if build == false to explain why\n+    name = l\n+    use_function_versioning = false\n+    sources = []\n+    headers = []\n+    indirect_headers = [] # public headers not directly included by apps\n+    includes = []\n+    cflags = default_cflags\n+    objs = [] # other object files to link against, used e.g. for\n+              # instruction-set optimized versions of code\n+\n+    # use \"deps\" for internal DPDK dependencies, and \"ext_deps\" for\n+    # external package/library requirements\n+    ext_deps = []\n+    deps = []\n+    # eal is standard dependency once built\n+    if dpdk_conf.has('RTE_LIB_EAL')\n+        deps += ['eal']\n+    endif\n+\n+    dir_name = 'librte_' + l\n+    subdir(dir_name)\n+\n+    if not build\n+        dpdk_libs_disabled += name\n+        set_variable(name.underscorify() + '_disable_reason', reason)\n+        continue\n+    endif\n+\n+    shared_deps = ext_deps\n+    static_deps = ext_deps\n+    foreach d:deps\n+        if not is_variable('shared_rte_' + d)\n+            error('Missing internal dependency \"@0@\" for @1@ [@2@]'\n+                    .format(d, name, 'lib/' + dir_name))\n+        endif\n+        shared_deps += [get_variable('shared_rte_' + d)]\n+        static_deps += [get_variable('static_rte_' + d)]\n+    endforeach\n+\n+    enabled_libs += name\n+    dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)\n+    install_headers(headers)\n+    install_headers(indirect_headers)\n+    dpdk_chkinc_headers += headers\n+\n+    libname = 'rte_' + name\n+    includes += include_directories(dir_name)\n+\n+    if is_windows and use_function_versioning\n+        message('@0@: Function versioning is not supported by Windows.'.format(name))\n+    endif\n+\n+    if use_function_versioning\n+        cflags += '-DRTE_USE_FUNCTION_VERSIONING'\n+    endif\n+\n+    # first build static lib\n+    static_lib = static_library(libname,\n+            sources,\n+            objects: objs,\n+            c_args: cflags,\n+            dependencies: static_deps,\n+            include_directories: includes,\n+            install: true)\n+    static_dep = declare_dependency(\n+            include_directories: includes,\n+            dependencies: static_deps)\n+\n+    if not use_function_versioning or is_windows\n+        # use pre-build objects to build shared lib\n+        sources = []\n+        objs += static_lib.extract_all_objects(recursive: false)\n+    else\n+        # for compat we need to rebuild with\n+        # RTE_BUILD_SHARED_LIB defined\n+        cflags += '-DRTE_BUILD_SHARED_LIB'\n+    endif\n+    version_map = '@0@/@1@/version.map'.format(\n+            meson.current_source_dir(), dir_name)\n+    implib = dir_name + '.dll.a'\n+\n+    def_file = custom_target(libname + '_def',\n+            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],\n+            input: version_map,\n+            output: '@0@_exports.def'.format(libname))\n+\n+    mingw_map = custom_target(libname + '_mingw',\n+            command: [map_to_win_cmd, '@INPUT@', '@OUTPUT@'],\n+            input: version_map,\n+            output: '@0@_mingw.map'.format(libname))\n+\n+    if is_ms_linker\n+        lk_args = ['-Wl,/def:' + def_file.full_path()]\n+        if meson.version().version_compare('<0.54.0')\n+            lk_args += ['-Wl,/implib:lib\\\\' + implib]\n+        endif\n+    else\n+        if is_windows\n+            lk_args = ['-Wl,--version-script=' + mingw_map.full_path()]\n+        else\n+            lk_args = ['-Wl,--version-script=' + version_map]\n+        endif\n+    endif\n+\n+    lk_deps = [version_map, def_file, mingw_map]\n+    if not is_windows\n+        # on unix systems check the output of the\n+        # check-symbols.sh script, using it as a\n+        # dependency of the .so build\n+        lk_deps += custom_target(name + '.sym_chk',\n+                command: [check_symbols,\n+                    version_map, '@INPUT@'],\n+                capture: true,\n+                input: static_lib,\n+                output: name + '.sym_chk')\n+    endif\n+\n+    shared_lib = shared_library(libname,\n+            sources,\n+            objects: objs,\n+            c_args: cflags,\n+            dependencies: shared_deps,\n+            include_directories: includes,\n+            link_args: lk_args,\n+            link_depends: lk_deps,\n+            version: abi_version,\n+            soversion: so_version,\n+            install: true)\n+    shared_dep = declare_dependency(link_with: shared_lib,\n+            include_directories: includes,\n+            dependencies: shared_deps)\n+\n+    dpdk_libraries = [shared_lib] + dpdk_libraries\n+    dpdk_static_libraries = [static_lib] + dpdk_static_libraries\n+\n+    set_variable('shared_rte_' + name, shared_dep)\n+    set_variable('static_rte_' + name, static_dep)\n+    message('lib/@0@: Defining dependency \"@1@\"'.format(dir_name, name))\n endforeach\n",
    "prefixes": [
        "RFC",
        "02/14"
    ]
}