get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 64751,
    "url": "http://patches.dpdk.org/api/patches/64751/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20200116071656.1663967-2-thomas@monjalon.net/",
    "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": "<20200116071656.1663967-2-thomas@monjalon.net>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20200116071656.1663967-2-thomas@monjalon.net",
    "date": "2020-01-16T07:16:54",
    "name": "[1/3] buildtools: rework static pkg-config script",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b4669dbbaeab32d1e092866f57b8a54f45a8f95f",
    "submitter": {
        "id": 685,
        "url": "http://patches.dpdk.org/api/people/685/?format=api",
        "name": "Thomas Monjalon",
        "email": "thomas@monjalon.net"
    },
    "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/20200116071656.1663967-2-thomas@monjalon.net/mbox/",
    "series": [
        {
            "id": 8149,
            "url": "http://patches.dpdk.org/api/series/8149/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=8149",
            "date": "2020-01-16T07:16:53",
            "name": "add static ibverbs in meson",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/8149/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/64751/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/64751/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 dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id AFDC9A04F9;\n\tThu, 16 Jan 2020 08:17:14 +0100 (CET)",
            "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 6EB1E1C0D5;\n\tThu, 16 Jan 2020 08:17:10 +0100 (CET)",
            "from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id 24A841C0AA\n for <dev@dpdk.org>; Thu, 16 Jan 2020 08:17:09 +0100 (CET)",
            "from compute1.internal (compute1.nyi.internal [10.202.2.41])\n by mailout.nyi.internal (Postfix) with ESMTP id C169F22129;\n Thu, 16 Jan 2020 02:17:08 -0500 (EST)",
            "from mailfrontend2 ([10.202.2.163])\n by compute1.internal (MEProxy); Thu, 16 Jan 2020 02:17:08 -0500",
            "from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])\n by mail.messagingengine.com (Postfix) with ESMTPA id 1209C30607B0;\n Thu, 16 Jan 2020 02:17:07 -0500 (EST)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=\n from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding; s=mesmtp; bh=XsjFYxxCJN\n b9hB5pP/BjHWkJNsoY/FdwSsRfNc9wadI=; b=mFd6Ss87h3GGw3eYby+V58N+k+\n HVNcpjIKPbnqa/RfiOT5a3A8bxLKTNvAJKFKmVgLw3JcDalN/ejT6F3z4TbIOHCI\n uIxgtCI/HSl19uJA4s9TdXL7Zl9Zwo3aDpprVS8wIfo8i39yKpmcb8yBdP1z7GAW\n N/tYkMmCSUioyhjPk=",
            "v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n messagingengine.com; h=cc:content-transfer-encoding:date:from\n :in-reply-to:message-id:mime-version:references:subject:to\n :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=\n fm1; bh=XsjFYxxCJNb9hB5pP/BjHWkJNsoY/FdwSsRfNc9wadI=; b=Qdw9Dz5M\n fAaTgTxGbykdCh3DfWlFOI+w3mDnILnSE4sc2zHYcO9bL3z4P9RIEBUmTJI4zS8o\n HihIsrNItwKcXyVw+YdURXvhwtRB7cfnMUAptlHy+G7gdp/mQg1QycQo5Lc1hX9f\n /qmpvT1FQUIwDdkvnUI5nDJgOqdskHR+tDSm87WyNCgTTmd571s/EdDUUIqy0L0L\n 66jmtog5Ym1GHOxG9dbjQQb5r1WWqM44GIgsxhsbrEzSHPUlsFgkAYG5/GRqJK8T\n tixC+8N9ECY4QoA7PAF2lJdDHu4PiFEbI2OGjqk7oHuILCY9KzfcDOsTxxZMva4P\n hNyaS0k1nTKl6A=="
        ],
        "X-ME-Sender": "<xms:9A0gXspj_YGu7rwOfQ_lPKHBKm09pCpkUBp8gCcmS0JNYPLluyMLfA>",
        "X-ME-Proxy-Cause": "\n gggruggvucftvghtrhhoucdtuddrgedugedrtdeggddutddvucetufdoteggodetrfdotf\n fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen\n uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne\n cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgr\n shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecukf\n hppeejjedrudefgedrvddtfedrudekgeenucfrrghrrghmpehmrghilhhfrhhomhepthhh\n ohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhushhtvghrufhiiigvpedt",
        "X-ME-Proxy": "<xmx:9A0gXpJuTxyRwHiBARt_FmjLLoJ9coADdEErJDysTYnqWJStI_h2cA>\n <xmx:9A0gXkbhvVS6Eg7Fq-0jEjFA_elwBAhcC2U6xiBcPb3OuuwIVY_3dQ>\n <xmx:9A0gXt5jJkzpS8Fi4ng72lu-leppM19LadxVrA3IH4I9F2zn5TtT1A>\n <xmx:9A0gXlu414TDxvCyajPuvCTKssEAekZ06GOC3vpEwoNnfVKzPosW4A>",
        "From": "Thomas Monjalon <thomas@monjalon.net>",
        "To": "dev@dpdk.org",
        "Cc": "Matan Azrad <matan@mellanox.com>, Shahaf Shuler <shahafs@mellanox.com>,\n Viacheslav Ovsiienko <viacheslavo@mellanox.com>",
        "Date": "Thu, 16 Jan 2020 08:16:54 +0100",
        "Message-Id": "<20200116071656.1663967-2-thomas@monjalon.net>",
        "X-Mailer": "git-send-email 2.24.1",
        "In-Reply-To": "<20200116071656.1663967-1-thomas@monjalon.net>",
        "References": "<20200116071656.1663967-1-thomas@monjalon.net>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH 1/3] buildtools: rework static pkg-config script",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "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": "The shell script options-ibverbs-static.sh was used with make\nin forcing static linkage of ibverbs dependency.\nIt is now renamed pkg-config-static.sh and it is made generic,\ni.e. it can work with any .pc library file.\n\nThe idea is to distinguish its own libraries and the dependencies\nby looking at the -L directory.\nOnly the found static libraries are forced to static.\n\nThe -L path is added in this new version in order to fill\nthe .pc file generated in DPDK.\n\nSigned-off-by: Thomas Monjalon <thomas@monjalon.net>\n---\n buildtools/options-ibverbs-static.sh | 14 -------------\n buildtools/pkg-config-static.sh      | 31 ++++++++++++++++++++++++++++\n drivers/net/mlx4/Makefile            |  2 +-\n drivers/net/mlx5/Makefile            |  2 +-\n mk/rte.app.mk                        |  3 ++-\n 5 files changed, 35 insertions(+), 17 deletions(-)\n delete mode 100755 buildtools/options-ibverbs-static.sh\n create mode 100755 buildtools/pkg-config-static.sh",
    "diff": "diff --git a/buildtools/options-ibverbs-static.sh b/buildtools/options-ibverbs-static.sh\ndeleted file mode 100755\nindex 0f285a343b..0000000000\n--- a/buildtools/options-ibverbs-static.sh\n+++ /dev/null\n@@ -1,14 +0,0 @@\n-#! /bin/sh\n-# SPDX-License-Identifier: BSD-3-Clause\n-#\n-# Print link options -l for static link of ibverbs.\n-#\n-# Static flavour of ibverbs and the providers libs are explicitly picked,\n-# thanks to the syntax -l:libfoo.a\n-# Other libs (pthread and nl) are unchanged, i.e. linked dynamically by default.\n-#\n-# PKG_CONFIG_PATH may be required to be set if libibverbs.pc is not installed.\n-\n-pkg-config --libs-only-l --static libibverbs |\n-\ttr '[:space:]' '\\n' |\n-\tsed -r '/^-l(pthread|nl)/! s,(^-l)(.*),\\1:lib\\2.a,'\ndiff --git a/buildtools/pkg-config-static.sh b/buildtools/pkg-config-static.sh\nnew file mode 100755\nindex 0000000000..77401c2f45\n--- /dev/null\n+++ b/buildtools/pkg-config-static.sh\n@@ -0,0 +1,31 @@\n+#! /bin/sh\n+# SPDX-License-Identifier: BSD-3-Clause\n+# Copyright 2020 Mellanox Technologies, Ltd\n+#\n+# Convert pkg-config link options for static linkage.\n+#\n+# Static flavour of provided libs are explicitly picked,\n+# thanks to the syntax -l:libfoo.a\n+# Other libs (dependencies) are unchanged, i.e. linked dynamically by default.\n+#\n+# Syntax: pkg-config-static.sh <libname>\n+#\n+# PKG_CONFIG_PATH may be required to be set if the .pc file is not installed.\n+\n+ldflags=$(pkg-config --libs --static $1 | tr '[:space:]' '\\n')\n+dir=$(echo \"$ldflags\" | sed -rn 's,^-L(.*),\\1,p' | head -n1)\n+IFS='\n+'\n+for arg in $ldflags ; do\n+\tprefix=$(echo $arg | sed -rn 's/^(-Wl,).*/\\1/p')\n+\toption=$(echo $arg | sed -rn \"s/^$prefix-(.*=|.*,|.).*/\\1/p\")\n+\t[ \"$option\" = 'l' -o \"$option\" = 'L' ] || continue\n+\tvalue=$(echo $arg | sed \"s/^$prefix-$option//\")\n+\tstaticlib=\"lib$value.a\"\n+\tprintf -- -$option\n+\tif [ -f $dir/$staticlib ] ; then\n+\t\techo :$staticlib\n+\telse\n+\t\techo $value\n+\tfi\n+done | tr '\\n' ' '\ndiff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile\nindex 329569dc10..4ef14b3a07 100644\n--- a/drivers/net/mlx4/Makefile\n+++ b/drivers/net/mlx4/Makefile\n@@ -45,7 +45,7 @@ CFLAGS += -DMLX4_GLUE_VERSION='\"$(LIB_GLUE_VERSION)\"'\n CFLAGS_mlx4_glue.o += -fPIC\n LDLIBS += -ldl\n else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n-LDLIBS += $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n+LDLIBS += $(shell $(RTE_SDK)/buildtools/pkg-config-static.sh libibverbs)\n else\n LDLIBS += -libverbs -lmlx4\n endif\ndiff --git a/drivers/net/mlx5/Makefile b/drivers/net/mlx5/Makefile\nindex c5cf4397ac..eb11123867 100644\n--- a/drivers/net/mlx5/Makefile\n+++ b/drivers/net/mlx5/Makefile\n@@ -60,7 +60,7 @@ CFLAGS += -DMLX5_GLUE_VERSION='\"$(LIB_GLUE_VERSION)\"'\n CFLAGS_mlx5_glue.o += -fPIC\n LDLIBS += -ldl\n else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n-LDLIBS += $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n+LDLIBS += $(shell $(RTE_SDK)/buildtools/pkg-config-static.sh libibverbs)\n else\n LDLIBS += -libverbs -lmlx5\n endif\ndiff --git a/mk/rte.app.mk b/mk/rte.app.mk\nindex 05ea034b99..1062fcc732 100644\n--- a/mk/rte.app.mk\n+++ b/mk/rte.app.mk\n@@ -195,7 +195,8 @@ ifeq ($(CONFIG_RTE_IBVERBS_LINK_DLOPEN),y)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += -ldl\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += -ldl\n else ifeq ($(CONFIG_RTE_IBVERBS_LINK_STATIC),y)\n-LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/options-ibverbs-static.sh)\n+LIBS_IBVERBS_STATIC = $(shell $(RTE_SDK)/buildtools/pkg-config-static.sh \\\n+\t\tlibibverbs | sed 's/-Wl,//')\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX4_PMD)       += $(LIBS_IBVERBS_STATIC)\n _LDLIBS-$(CONFIG_RTE_LIBRTE_MLX5_PMD)       += $(LIBS_IBVERBS_STATIC)\n else\n",
    "prefixes": [
        "1/3"
    ]
}