From patchwork Tue Aug 8 21:47:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109677 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp30415qge; Tue, 8 Aug 2017 14:48:16 -0700 (PDT) X-Received: by 10.98.155.153 with SMTP id e25mr6044115pfk.109.1502228896276; Tue, 08 Aug 2017 14:48:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228896; cv=none; d=google.com; s=arc-20160816; b=rFevC8oZYQN8EwCwaJtClpkPSlk2nvphOsoQ8cEV01hT99SjK18DEJmJzSVblzKp9+ QvsPZi/86D0RRpNwRRfA8LptBmG/uRtTzl2Y/PROZj2lYetLnfldpnRH+1C1q6EfW8KW /54SKoB2pvQzq8J5nQdO3gZJY2GhYaFo6by3rcYbO/4o4bRaqo6wW+NVKYMAOa4o/W3o kFvM+MSK252fI3Aa8pIH9sv6IdJPIfdlUK+JaBUtQtN9m6e3zuwDF74RwHgOYDH+f09w XQD5FFOgyhG+kcBDkFcTE8BnTPnRa5J/AJ3KQNN0mr9AbSMRb0rd8ZJLZ3sgg5uFiRgm WFXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=FkCmKI0VA0j/oRc+/caSeTFxOwwsaDBr6ztV6aD1meU=; b=cc9A1Z3uMJXUJH+XQzaOuB1Bes8VMj9tsPon//5rMC/f0D9lf5Dlrbz6HymJorAgNj 1QBllj2TR9wiwdW321B3CO/NhallcyC2GVXkF2k+4XPoOJMbIaH2/Kw/SmmP/j5hPwAc KSCm0E/WLhBrwISbG/vAaCPuW02ufPGVMLaGCUqDdS50abznji8lfN+JHFxNX6Bt5e1p Tqe7F7FLubDBBRv3vY4PPfyZ6UwkLMl/8GjvyYVcFmcMKFb04zw3Zi7JAypj2cj45o/J CTD11o2BsVfxey3lU6HoyHP9PjhNb3t0IWEZiw/9LtJThRMG2Hvy7uB0tReC5USNfK1+ UM4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uDutryex; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id g9si1492912plk.482.2017.08.08.14.48.15; Tue, 08 Aug 2017 14:48:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=uDutryex; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 2DE9577B99; Tue, 8 Aug 2017 21:48:13 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by mail.openembedded.org (Postfix) with ESMTP id D03E677B95 for ; Tue, 8 Aug 2017 21:48:11 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id y192so4162358pgd.1 for ; Tue, 08 Aug 2017 14:48:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=JeLQYZ7qZpTNto7/FTnsb2Fc+pSxQt1NPjacZtDYQm0=; b=uDutryex99bWNhnxq1yw/8yWUasUj8EtuPscXkNIikpFyAiAig/dh101bXs/1ZB/4/ SIhOnYVTV8S+kOt1AWkmz4Ej487XDBU552GBvMeJdHTcHCoRVL2f9r4JtkNSntfdhwQp +LoiypDJ49E0aDLyA1mVNdRPAU3xNGUCX01PSnQlCOztedaop/k4OIclfTgWcBb9OONf zpFWsMPoAvfRI2mgydkbsvT4HCRYYNdWSpgJnsQkAzFQLdh8aWqraHYX18wZqZ488jC5 cj5QGKxRLCbjXXiMtpEaS3jFYmhl9wNzGBaZXblIlMQ4g8HWIlj2VDozh9Ex+B82ZDZd 868g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=JeLQYZ7qZpTNto7/FTnsb2Fc+pSxQt1NPjacZtDYQm0=; b=fuwpADnrgZDkxfi6LwIy7tbp6LY5PcUdVvselEmq5n0x2spWKq+vN7FftGYVHlLxch UpONmy/GMa9sOS3AiWSPycw8dxGEeyxwwZO3r5gcGZ4ndR819J1vTyVcerQfjmqpwVWi QCkATXkDAIsuhRyS1CyiJ5EYcy2hQ8tU0erMULAgfLzDJp0i/jUGfFKF3gC7SG0dnJER NQzptMG2P31xbbe+GllcRwBKzQ0sU3wvMoS+eEhDgBbiMAAy3HDmGSUBmBhkOtDNGqpQ LGmIQt0OuCJWf0f8P3fKmz81XKOso1d2nx1nq2s2MmDkM7RJ6g/qfaAF8CvzHO64X3JL x8UQ== X-Gm-Message-State: AHYfb5ixp/UfOgpn/Uko3BaGWdfJ78N3zhv7eIA7RDkpPe8E0J1QbF8l rp103rZJ/Icmmo9/ X-Received: by 10.84.234.9 with SMTP id m9mr6313374plk.15.1502228892596; Tue, 08 Aug 2017 14:48:12 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:11 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:52 -0700 Message-Id: <20170808214800.39621-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 Subject: [oe] [meta-oe][PATCH 1/9] php7: upgrade to 7.1.7 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org License checksum changed due to opyright year changed to 2017 Fix build with clang/hardening Signed-off-by: Khem Raj --- .../php-7.1.7/0001-Specify-tag-with-libtool.patch | 62 ++++++++++++++++++++++ .../change-AC_TRY_RUN-to-AC_TRY_LINK.patch | 0 meta-oe/recipes-devtools/php/php_7.1.0.bb | 14 ----- meta-oe/recipes-devtools/php/php_7.1.7.bb | 16 ++++++ 4 files changed, 78 insertions(+), 14 deletions(-) create mode 100644 meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch rename meta-oe/recipes-devtools/php/{php-7.1.0 => php-7.1.7}/change-AC_TRY_RUN-to-AC_TRY_LINK.patch (100%) delete mode 100644 meta-oe/recipes-devtools/php/php_7.1.0.bb create mode 100644 meta-oe/recipes-devtools/php/php_7.1.7.bb -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch b/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch new file mode 100644 index 000000000..18b4937db --- /dev/null +++ b/meta-oe/recipes-devtools/php/php-7.1.7/0001-Specify-tag-with-libtool.patch @@ -0,0 +1,62 @@ +From 5c84b039e97abd88f6a18da0e6d27383c00fea92 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 26 Jul 2017 23:06:56 -0700 +Subject: [PATCH] Specify --tag with libtool + +This helps in compiling with external toolchains +with -fPIE appended to CC e.g. via hardening flags + +Signed-off-by: Khem Raj +--- + acinclude.m4 | 8 ++++---- + configure.in | 4 ++-- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/acinclude.m4 b/acinclude.m4 +index a114a98..1cc7a26 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -806,10 +806,10 @@ dnl + dnl PHP_BUILD_PROGRAM + dnl + AC_DEFUN([PHP_BUILD_PROGRAM],[ +- php_c_pre='$(LIBTOOL) --mode=compile $(CC)' ++ php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)' + php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' + php_c_post= +- php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' ++ php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)' + php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)' + php_cxx_post= + php_lo=lo +@@ -819,10 +819,10 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[ + no) pic_setting='-prefer-non-pic';; + esac + +- shared_c_pre='$(LIBTOOL) --mode=compile $(CC)' ++ shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)' + shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting + shared_c_post= +- shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)' ++ shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)' + shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting + shared_cxx_post= + shared_lo=lo +diff --git a/configure.in b/configure.in +index 7d65b63..7221af9 100644 +--- a/configure.in ++++ b/configure.in +@@ -1431,8 +1431,8 @@ PHP_SET_LIBTOOL_VARIABLE([--silent]) + dnl libtool 1.4.3 needs this. + PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps]) + +-test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<' +-test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<' ++test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --tag=CC --mode=compile $(COMPILE) -c $<' ++test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --tag=CXX --mode=compile $(CXX_COMPILE) -c $<' + SHARED_LIBTOOL='$(LIBTOOL)' + + CC=$old_CC +-- +2.13.3 + diff --git a/meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch b/meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch similarity index 100% rename from meta-oe/recipes-devtools/php/php-7.1.0/change-AC_TRY_RUN-to-AC_TRY_LINK.patch rename to meta-oe/recipes-devtools/php/php-7.1.7/change-AC_TRY_RUN-to-AC_TRY_LINK.patch diff --git a/meta-oe/recipes-devtools/php/php_7.1.0.bb b/meta-oe/recipes-devtools/php/php_7.1.0.bb deleted file mode 100644 index 210d91fd7..000000000 --- a/meta-oe/recipes-devtools/php/php_7.1.0.bb +++ /dev/null @@ -1,14 +0,0 @@ -require php.inc - -LIC_FILES_CHKSUM = "file://LICENSE;md5=b602636d46a61c0ac0432bbf5c078fe4" - -SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch" -SRC_URI[md5sum] = "54e364b60a88db77adb96aacb10f10a4" -SRC_URI[sha256sum] = "68bcfd7deed5b3474d81dec9f74d122058327e2bed0ac25bbc9ec70995228e61" - -PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ - --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ - ,--without-mysqli --without-pdo-mysql \ - ,mysql5" - -FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default" diff --git a/meta-oe/recipes-devtools/php/php_7.1.7.bb b/meta-oe/recipes-devtools/php/php_7.1.7.bb new file mode 100644 index 000000000..ebf923781 --- /dev/null +++ b/meta-oe/recipes-devtools/php/php_7.1.7.bb @@ -0,0 +1,16 @@ +require php.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=c0af599f66d0461c5837c695fcbc5c1e" + +SRC_URI += "file://change-AC_TRY_RUN-to-AC_TRY_LINK.patch \ + file://0001-Specify-tag-with-libtool.patch \ + " +SRC_URI[md5sum] = "22e11a372f99afbbbf3f46a31e8a82ca" +SRC_URI[sha256sum] = "079b6792987f38dc485f92258c04f9e02dedd593f9d260ebe725343f812d1ff8" + +PACKAGECONFIG[mysql] = "--with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ + --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ + ,--without-mysqli --without-pdo-mysql \ + ,mysql5" + +FILES_${PN}-fpm += "${sysconfdir}/php-fpm.d/www.conf.default" From patchwork Tue Aug 8 21:47:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109678 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp30517qge; Tue, 8 Aug 2017 14:48:23 -0700 (PDT) X-Received: by 10.84.236.4 with SMTP id q4mr6346264plk.423.1502228903600; Tue, 08 Aug 2017 14:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228903; cv=none; d=google.com; s=arc-20160816; b=tXoOC9XhSDCgKsa7x2YNVyjUIjj4n/p/1HaI+RLN3l5JtyJebt4UXBAuZ9nX2yKaK8 9kcnS5M0U4+zxGHzcShMjJfo6EOzaJxcjgOijDBjaUm9lN8aHCCVCdUPLnf/0wIoJwlc DYk7WhdDSngdnt7Af4pPlaWWAIoTMrC/jV1Bx35lRqR3IrmpeSUy7rYgJyI207C1P10o Ob3elMtFrn33c4JAzUpZrIwh5G4PPRZ+HyCqrFb1FB2xwLYsoTf2qShlKhGCqiqvDVq/ xOuOZB5BcN3oSfX4TwTFGKeNAbXyTFZs/+zkLShbSxVoJSsT7NASji/Q8vOr1D31MeHO s6Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=tMMDG0jlAAqvKT7/mpiowGx3EAZP2gcs6JFJFHhGZlw=; b=VeuS2Xz3MxdtBee9+9CePzsopgGUeScISfvC746Lk13JJD+X9qaUOFHzNH8InHh9gu X/wt9R4SZcK+JbYPr6NJ9t1paMSOhKwOkiliQpdoYWVARORoNl3h9Byg2GhTNRgDzzMd 22mVSBhYkKNpJnFbK7a38sRUn1o+znoKrQ/hTi33N2xTT0qE85lp4hfCTb/2AUEzl2Gl s6OeYSRI10ZmP/P54tRR25fBdBBkQq9NQxkH5IidqqU6JVBM8SUt0VcUN4au6DM8g7O2 Dr86k6VmTludwjVtGS5WOd4lXkByShTIlI2glFrTzVcwyZRKrCSg9lzjOEUoCoQpeRtI dZjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=BEBnjiI3; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id 20si1367014pgk.635.2017.08.08.14.48.23; Tue, 08 Aug 2017 14:48:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=BEBnjiI3; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id D667E77BF0; Tue, 8 Aug 2017 21:48:19 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f170.google.com (mail-pf0-f170.google.com [209.85.192.170]) by mail.openembedded.org (Postfix) with ESMTP id 61AB077BB1 for ; Tue, 8 Aug 2017 21:48:12 +0000 (UTC) Received: by mail-pf0-f170.google.com with SMTP id t86so19541646pfe.2 for ; Tue, 08 Aug 2017 14:48:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=bxSR9WY8MvZtcw7sQO8x5uvqtIJZuSiIWxByHOMDHt4=; b=BEBnjiI32OHbBmWA6Z8DJAqTOxnIO+7vWF5I/Aqy08kxw+76ZBssdIx8ohVxbXH4NC 5CXhLuhpRt5OSel45CyyKHKmnJcp1eq+nKs8KwnhDfv+TW+zGlZuSdKHYsxJjKhrVRIj NVuTNiWUwwH9ncYlweto8J3KAN3JRML6+MEgbnzh5Buzpf8wIVcU3lQMsDM7TaT2GHx6 K85MHX1XjyIE5Glkw2XQlhqlAubofv8iPmIDS4XMzUIvmhJ985pfSKqymtyWF3I09NIe B8BLfoMU3OPER68PnSrY7/ADJkoMh1i1c7Jr+/Yhbip4Eum/CKXduJCXV6GA1zY6cGAC kPMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=bxSR9WY8MvZtcw7sQO8x5uvqtIJZuSiIWxByHOMDHt4=; b=UW8qUWM65L6MUebeqS8s+6TfdXyR+U6/pycsPBr2IjMUrGXUlBRIdqAmSTnlxhu4RM nQh25VMM7C8nfz3SZrhDjPDk/bccvpR/UtjoLf2r8NuosuewOkTmsuTvuBhW9BuesyTM Iv1dnxcpbNFtV4qbFYRf8b0PTy5BDeN7XUgT3f4DV+iDIcxLbZIYRTUZmnHIr+/2ZRMZ Aa03CPQrGGNr7w9QlEBozhcQqhY8FRPkg/lA2KDHaxj+wSlqYOoE+Z6MtKuGA5hvOYhL rbVQ/ZqoJKxcpMKKn2+zbGEi4U1xF194COtJddiiSJDn7hpvVCbEwjXjzqFkvItO1iGy 0JJg== X-Gm-Message-State: AHYfb5hA8sSeg2fcKvu+x9g8rI/m++iilSB6DyWgOWj/ff6EtzHjKh3P KanYpGXspaLF5V2+ X-Received: by 10.84.194.228 with SMTP id h91mr6394518pld.46.1502228894036; Tue, 08 Aug 2017 14:48:14 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:13 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:53 -0700 Message-Id: <20170808214800.39621-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 2/9] llvm: Remove X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Moved to OE-core, with a version upgrade Signed-off-by: Khem Raj --- meta-oe/recipes-core/llvm/llvm-common.bb | 22 --- meta-oe/recipes-core/llvm/llvm-common/llvm-config | 11 -- meta-oe/recipes-core/llvm/llvm.inc | 162 --------------------- ...r-output-from-configure-if-CFLAGS-is-set-.patch | 52 ------- .../llvm/llvm3.3/arm_fenv_uclibc.patch | 14 -- meta-oe/recipes-core/llvm/llvm3.3_3.3.bb | 22 --- 6 files changed, 283 deletions(-) delete mode 100644 meta-oe/recipes-core/llvm/llvm-common.bb delete mode 100644 meta-oe/recipes-core/llvm/llvm-common/llvm-config delete mode 100644 meta-oe/recipes-core/llvm/llvm.inc delete mode 100644 meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch delete mode 100644 meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch delete mode 100644 meta-oe/recipes-core/llvm/llvm3.3_3.3.bb -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-core/llvm/llvm-common.bb b/meta-oe/recipes-core/llvm/llvm-common.bb deleted file mode 100644 index 618cc1e9d..000000000 --- a/meta-oe/recipes-core/llvm/llvm-common.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Helper script for OE's llvm support" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ - file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420 \ -" - -SRC_URI = "file://llvm-config" - -ALLOW_EMPTY_${PN} = "1" -SYSROOT_PREPROCESS_FUNCS_append_class-target = " llvm_common_sysroot_preprocess" - -llvm_common_sysroot_preprocess() { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts}/ - install -m 0755 ${WORKDIR}/llvm-config ${SYSROOT_DESTDIR}${bindir_crossscripts}/ -} - -do_install_class-native() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/llvm-config ${D}${bindir} -} - -BBCLASSEXTEND = "native" diff --git a/meta-oe/recipes-core/llvm/llvm-common/llvm-config b/meta-oe/recipes-core/llvm/llvm-common/llvm-config deleted file mode 100644 index b0f33c8d6..000000000 --- a/meta-oe/recipes-core/llvm/llvm-common/llvm-config +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# Wrapper script for real llvm-config. Simply calls - -if [ $WANT_LLVM_RELEASE ]; then - exec `dirname $0`/${TARGET_PREFIX}llvm-config$WANT_LLVM_RELEASE ${@} -else - echo "To use llvm-common WANT_LLVM_RELEASE needs to be exported." - echo "For example if this is being called through a recipe:" - echo "export WANT_LLVM_RELEASE=\"3.3\"" - exit 1 -fi diff --git a/meta-oe/recipes-core/llvm/llvm.inc b/meta-oe/recipes-core/llvm/llvm.inc deleted file mode 100644 index f27261fa9..000000000 --- a/meta-oe/recipes-core/llvm/llvm.inc +++ /dev/null @@ -1,162 +0,0 @@ -# LLVM does not provide ABI stability between different versions. For this -# reason OE makes it possible to build and install different llvm versions -# at the same time. -# -# This is true for the normal recipes as well as the native ones. -# -# All regular installation directories are prefixed with 'llvm${LLVM_RELEASE}' -# e.g. "${STAGING_BINDIR}/llvm2.5" or "${STAGING_INCDIR}/llvm2.5" -# -# For your program or library that makes use of llvm you do should not need to -# modify anything as long as it uses the results of various llvm-config -# invocations. If you need customizations something is wrong and it needs to be -# fixed (report bug). -# -# However the *recipe* for your program/library *must* declare -# export WANT_LLVM_RELEASE = "" -# The version number is picked up by a generic wrapper script which just calls -# the variant of the specified version. - -DESCRIPTION = "The Low Level Virtual Machine" -HOMEPAGE = "http://llvm.org" - -# 3-clause BSD-like -# University of Illinois/NCSA Open Source License -LICENSE = "NCSA" -LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8" - -DEPENDS = "libffi libxml2-native llvm-common" - -inherit perlnative pythonnative autotools - -LLVM_RELEASE = "${PV}" -LLVM_DIR = "llvm${LLVM_RELEASE}" - -SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz" -S = "${WORKDIR}/llvm-${PV}.src" - -LLVM_BUILD_DIR = "${WORKDIR}/llvm-${PV}.build" -LLVM_INSTALL_DIR = "${WORKDIR}/llvm-install" - -EXTRA_OECONF += "--disable-assertions \ - --enable-debug-runtime \ - --disable-expensive-checks \ - --enable-bindings=none \ - --enable-keep-symbols \ - --enable-libffi \ - --enable-optimized \ - --enable-shared \ - --enable-targets=host-only" -EXTRA_OEMAKE += "REQUIRES_RTTI=1 VERBOSE=1" - -do_configure_prepend() { - # Remove RPATHs - sed -i 's:$(RPATH) -Wl,$(\(ToolDir\|LibDir\|ExmplDir\))::g' ${S}/Makefile.rules - - # Drop "svn" suffix from version string - sed -i 's/${PV}svn/${PV}/g' ${S}/configure - - # Fix paths in llvm-config - sed -i "s|sys::path::parent_path(CurrentPath))\.str()|sys::path::parent_path(sys::path::parent_path(CurrentPath))).str()|g" ${S}/tools/llvm-config/llvm-config.cpp - sed -ri "s#/(bin|include|lib)(/?\")#/\1/${LLVM_DIR}\2#g" ${S}/tools/llvm-config/llvm-config.cpp - - # Fix the hardcoded libdir in llvm-config - sed -i 's:/lib\>:/${baselib}:g' ${S}/tools/llvm-config/llvm-config.cpp - - # Fails to build unless using separate directory from source - mkdir -p ${LLVM_BUILD_DIR} - cd ${LLVM_BUILD_DIR} -} - -do_compile() { - cd ${LLVM_BUILD_DIR} - - # Fix libdir for multilib - sed -i 's:(PROJ_prefix)/lib:(PROJ_prefix)/${baselib}:g' Makefile.config - - oe_runmake \ - AR="${BUILD_AR}" \ - CC="${BUILD_CC}" \ - CFLAGS="${BUILD_CFLAGS}" \ - CXX="${BUILD_CXX}" \ - CXXFLAGS="${BUILD_CXXFLAGS}" \ - CPP="${BUILD_CPP}" \ - CPPFLAGS="${BUILD_CPPFLAGS}" \ - NM="${BUILD_NM}" \ - RANLIB="${BUILD_RANLIB}" \ - PATH="${STAGING_BINDIR_NATIVE}:$PATH" \ - cross-compile-build-tools - oe_runmake -} - -do_install() { - cd ${LLVM_BUILD_DIR} - oe_runmake DESTDIR=${LLVM_INSTALL_DIR} install - - mv ${LLVM_INSTALL_DIR}${bindir}/${HOST_SYS}-llvm-config-host ${LLVM_INSTALL_DIR}/llvm-config-host - - install -d ${D}${bindir}/${LLVM_DIR} - mv ${LLVM_INSTALL_DIR}${bindir}/* ${D}${bindir}/${LLVM_DIR}/ - - install -d ${D}${includedir}/${LLVM_DIR} - mv ${LLVM_INSTALL_DIR}${includedir}/* ${D}${includedir}/${LLVM_DIR}/ - - install -d ${D}${libdir}/${LLVM_DIR} - mv ${LLVM_INSTALL_DIR}${libdir}/* ${D}${libdir}/${LLVM_DIR}/ - ln -s ${LLVM_DIR}/libLLVM-${PV}.so ${D}${libdir}/libLLVM-${PV}.so - - install -d ${D}${docdir}/${LLVM_DIR} - mv ${LLVM_INSTALL_DIR}${prefix}/docs/llvm/* ${D}${docdir}/${LLVM_DIR} -} - -SYSROOT_PREPROCESS_FUNCS += "llvm_sysroot_preprocess" - -llvm_sysroot_preprocess() { - install -d ${SYSROOT_DESTDIR}${bindir_crossscripts} - mv ${LLVM_INSTALL_DIR}/llvm-config-host ${SYSROOT_DESTDIR}${bindir_crossscripts}/llvm-config${PV} -} - -PACKAGES += "${PN}-bugpointpasses ${PN}-llvmhello" -ALLOW_EMPTY_${PN} = "1" -ALLOW_EMPTY_${PN}-staticdev = "1" -FILES_${PN} = "" -FILES_${PN}-staticdev = "" -FILES_${PN}-dbg = " \ - ${bindir}/${LLVM_DIR}/.debug \ - ${libdir}/${LLVM_DIR}/.debug/BugpointPasses.so \ - ${libdir}/${LLVM_DIR}/.debug/LLVMHello.so \ - /usr/src/debug \ -" - -FILES_${PN}-dev = " \ - ${bindir}/${LLVM_DIR} \ - ${includedir}/${LLVM_DIR} \ -" -RRECOMMENDS_${PN}-dev += "${PN}-bugpointpasses ${PN}-llvmhello" - -FILES_${PN}-bugpointpasses = "\ - ${libdir}/${LLVM_DIR}/BugpointPasses.so \ -" -FILES_${PN}-llvmhello = "\ - ${libdir}/${LLVM_DIR}/LLVMHello.so \ -" - -PACKAGES_DYNAMIC = "^libllvm${LLVM_RELEASE}-.*$" -NOAUTOPACKAGEDEBUG = "1" - -INSANE_SKIP_${MLPREFIX}libllvm${LLVM_RELEASE}-llvm-${LLVM_RELEASE} += "dev-so" - -python llvm_populate_packages() { - libdir = bb.data.expand('${libdir}', d) - libllvm_libdir = bb.data.expand('${libdir}/${LLVM_DIR}', d) - split_dbg_packages = do_split_packages(d, libllvm_libdir+'/.debug', '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s-dbg', 'Split debug package for %s', allow_dirs=True) - split_packages = do_split_packages(d, libdir, '^lib(.*)\.so$', 'libllvm${LLVM_RELEASE}-%s', 'Split package for %s', allow_dirs=True, allow_links=True, recursive=True) - split_staticdev_packages = do_split_packages(d, libllvm_libdir, '^lib(.*)\.a$', 'libllvm${LLVM_RELEASE}-%s-staticdev', 'Split staticdev package for %s', allow_dirs=True) - if split_packages: - pn = d.getVar('PN') - d.appendVar('RDEPENDS_' + pn, ' '+' '.join(split_packages)) - d.appendVar('RDEPENDS_' + pn + '-dbg', ' '+' '.join(split_dbg_packages)) - d.appendVar('RDEPENDS_' + pn + '-staticdev', ' '+' '.join(split_staticdev_packages)) -} - -PACKAGESPLITFUNCS_prepend = "llvm_populate_packages " diff --git a/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch b/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch deleted file mode 100644 index 44387e898..000000000 --- a/meta-oe/recipes-core/llvm/llvm3.3/Remove-error-output-from-configure-if-CFLAGS-is-set-.patch +++ /dev/null @@ -1,52 +0,0 @@ -From d4bf7a3853dab12c11cbfc8088fd76f548a8d017 Mon Sep 17 00:00:00 2001 -From: Patrik Hagglund -Date: Tue, 24 Sep 2013 11:38:45 +0000 -Subject: [PATCH] Remove error output from configure if CFLAGS is set (r174313). - -This fixes PR16724. - -git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191289 91177308-0d34-0410-b5e6-96231b3b80d8 - -https://github.com/llvm-mirror/llvm/commit/d4bf7a3853dab12c11cbfc8088fd76f548a8d017 - -Upstream-Status: Backport - -Signed-off-by: Andre McCurdy ---- - autoconf/configure.ac | 4 ++-- - configure | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/autoconf/configure.ac b/autoconf/configure.ac -index f9c365c..45f2fe4 100644 ---- a/autoconf/configure.ac -+++ b/autoconf/configure.ac -@@ -61,8 +61,8 @@ fi - - dnl Default to empty (i.e. assigning the null string to) CFLAGS and CXXFLAGS, - dnl instead of the autoconf default (for example, '-g -O2' for CC=gcc). --${CFLAGS=} --${CXXFLAGS=} -+: ${CFLAGS=} -+: ${CXXFLAGS=} - - dnl We need to check for the compiler up here to avoid anything else - dnl starting with a different one. -diff --git a/configure b/configure -index f3a6594..9090cda 100755 ---- a/configure -+++ b/configure -@@ -1992,8 +1992,8 @@ echo "$as_me: error: Already configured in ${srcdir}" >&2;} - fi - fi - --${CFLAGS=} --${CXXFLAGS=} -+: ${CFLAGS=} -+: ${CXXFLAGS=} - - ac_ext=c - ac_cpp='$CPP $CPPFLAGS' --- -1.9.1 - diff --git a/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch b/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch deleted file mode 100644 index c3ae49464..000000000 --- a/meta-oe/recipes-core/llvm/llvm3.3/arm_fenv_uclibc.patch +++ /dev/null @@ -1,14 +0,0 @@ -Index: llvm-2.9/include/llvm/Support/FEnv.h -=================================================================== ---- llvm-2.9.orig/include/llvm/Support/FEnv.h 2010-11-29 20:44:50.000000000 +0100 -+++ llvm-2.9/include/llvm/Support/FEnv.h 2011-11-18 18:42:22.580161297 +0100 -@@ -17,6 +17,9 @@ - - #include "llvm/Config/config.h" - #include -+ -+#undef HAVE_FENV_H -+ - #ifdef HAVE_FENV_H - #include - #endif diff --git a/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb b/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb deleted file mode 100644 index 60a222185..000000000 --- a/meta-oe/recipes-core/llvm/llvm3.3_3.3.bb +++ /dev/null @@ -1,22 +0,0 @@ -require llvm.inc - -DEPENDS += "zlib" -EXTRA_OECONF += "--enable-zlib" - -SRC_URI += "file://Remove-error-output-from-configure-if-CFLAGS-is-set-.patch" - -SRC_URI_append_libc-uclibc = " file://arm_fenv_uclibc.patch " - -SRC_URI[md5sum] = "40564e1dc390f9844f1711c08b08e391" -SRC_URI[sha256sum] = "68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578" - -PACKAGECONFIG ??= "" -PACKAGECONFIG[r600] = "--enable-experimental-targets=R600,,," - -# Fails to build with thumb-1 (qemuarm) -# | {standard input}: Assembler messages: -# | {standard input}:22: Error: selected processor does not support Thumb mode `stmdb sp!,{r0,r1,r2,r3,lr}' -# | {standard input}:31: Error: lo register required -- `ldmia sp!,{r0,r1,r2,r3,lr}' -# | {standard input}:32: Error: lo register required -- `ldr pc,[sp],#4' -# | make[3]: *** [/home/jenkins/oe/world/shr-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/llvm3.3/3.3-r0/llvm-3.3.build/lib/Target/ARM/Release/ARMJITInfo.o] Error 1 -ARM_INSTRUCTION_SET = "arm" From patchwork Tue Aug 8 21:47:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109679 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp30656qge; Tue, 8 Aug 2017 14:48:33 -0700 (PDT) X-Received: by 10.101.77.6 with SMTP id i6mr5478355pgt.181.1502228913610; Tue, 08 Aug 2017 14:48:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228913; cv=none; d=google.com; s=arc-20160816; b=F6Fm2AOAxKnpjII+/uUZ/c/xOagHyjyuKkMHBE5n9oowe6yiBAZy7wRntbsqqTwB8g 9OLEdwpCMxcevVr/Z5zmqDH6DBiyR1WBaReAebUg2nMElfF03owL09d4antbCGRftcUy ZRIQPOAwDcoX95goY2Vea9d0sNCwU38xf4V/V2Fcde/+aQBEULx1wuo0dBIqlYBS4H4T 4buSLhE4WJbHoiOrig7UpDhCrnhq65QBxQaDcbF5GdVXFeEjOJ9s4FjgmJNcWcnbLBNa Ib8vIf0Sx02lNKJy8E+N7z9mqWl/bIsX7BIWEg/mF3EJroidN8x4xOlEqvnVN3RV/gNm mxjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=eYvxunj/CA35FLrnS+hnv6trjTU4/QH7x3qbc/+FN8A=; b=ufQff1sAY3ncfFjfUCpEtiNpg3dwIDnmuZxvUY2XUYnQ6GbYi4aWWscE/GNVO0Ztja BTbxFT1AS9Pr2dnyXS4HcaXLuzQUvPymYQBbwhLSN/q+aUBCyVbew3gB68nCUw0IIKCg AUTLwheZmMGpVYETtoaLqkmSWx5/mnel15Qtc3Urc4SzoKDQdPQQo7NSpqZRHASOhBjx Z/nEY5kwIzBpgqdne90uwHydTlRnY5PTDfQOI+H6erXi79nDNVzpV0qk3I2ZWs+b8YxH BWAj3abcfiguCZT3GWJylq3bEwHp/RdA9qK0tMQHa05u6Vzmkgh167rZNxIm/WN2DoyH 6rwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Xwfq9DRq; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id p12si1527915pli.209.2017.08.08.14.48.33; Tue, 08 Aug 2017 14:48:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=Xwfq9DRq; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 469AE77CEC; Tue, 8 Aug 2017 21:48:21 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by mail.openembedded.org (Postfix) with ESMTP id F0A1A77BDF for ; Tue, 8 Aug 2017 21:48:14 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id l64so4160752pge.2 for ; Tue, 08 Aug 2017 14:48:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BacPIVgoeSTWGDoXVtcBzS/VSDGsHgpnhpc0YCl84hU=; b=Xwfq9DRqLkcleqGyGujrSJAUUkBTwMq3ZpOvqq7CfC/1ncg3PdunwlImpIowtQe2N+ +rcmZe6/rvejg8fREytmIkSSG3SP4LcCHEBDywRG3LHa+8uufeNlszsin+X8gB8mOGoy +bExEVGuU/OET/A6x2yDe0dZ2wHgRlsIQV64WY0pP9C7Atmhcqx/Fllv8ZunkSdnxHs/ QKaZZfheWGHYexwCSyrQsktDBTSPDL9x9RnKqdy9yW5ZSyxE6aDhBdXZP3AHxWxc5OHl mLQOgZkJR2/rtjHpvnaGocCQUOe/h2cNb40GED1721oFT52VfQG7aXLjhIgJ4dqdfDOb gZAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BacPIVgoeSTWGDoXVtcBzS/VSDGsHgpnhpc0YCl84hU=; b=aZ5cBeTuwQPn32BMxb+vAuG3HBc4NM7zK/2cEzVEPwTqBHUgSS6hshMmC+5xSFR/MT nrRrjSgQW/e7m1uDwUR8XpbqqY/onIJgsoRbSQRPeS3DBRJfJ+fAfYa1k40OZcVXdei/ JodwwZJGFcMzfyxBHVjgLmsbDPEbCoI/1ysU/2eAJllSc/5Ye5xhtiTbAOi/Pbo2llRU cHD8WUggeS7k959GjmbWQSANcAdqZGIJ3XX2kYIfBJeRExqnsSHRjEjxrE5VlTzYSLlR jegSKPq1lE6OWCqBO1Ltf6+uo87oZI9HarHBK4A2C7ehGalsaZcb3TdxAXHy5aR2dm3R 6Wng== X-Gm-Message-State: AHYfb5hKZTS0RZlJ1EsEHNxKc8M8e4EnB/sth3mQPYQLO0lRWev3IgFR Yx0xAyTQ6FMAy4VF X-Received: by 10.84.233.141 with SMTP id l13mr6395264plk.333.1502228895686; Tue, 08 Aug 2017 14:48:15 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:14 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:54 -0700 Message-Id: <20170808214800.39621-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-networking][PATCH 3/9] squid: Add missing dependencies on openssl expat and libxml2 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org inherit classes needed for pkgconfig and perl NIS is not buildable with gold linker, disable it Signed-off-by: Khem Raj --- meta-networking/recipes-daemons/squid/squid_3.5.26.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb index a78a09135..24cd15669 100644 --- a/meta-networking/recipes-daemons/squid/squid_3.5.26.bb +++ b/meta-networking/recipes-daemons/squid/squid_3.5.26.bb @@ -32,9 +32,9 @@ SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893c LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \ " -DEPENDS = "libtool krb5 openldap db cyrus-sasl" +DEPENDS = "libtool krb5 openldap db cyrus-sasl openssl expat libxml2" -inherit autotools useradd ptest +inherit autotools pkgconfig useradd ptest perlnative USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --no-create-home --home-dir /var/run/squid --shell /bin/false --user-group squid" @@ -49,7 +49,6 @@ PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," BASIC_AUTH = "DB SASL LDAP" -BASIC_AUTH_append_libc-glibc = " NIS" DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" BASIC_AUTH += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'PAM', '', d)}" From patchwork Tue Aug 8 21:47:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109680 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp30769qge; Tue, 8 Aug 2017 14:48:42 -0700 (PDT) X-Received: by 10.84.138.36 with SMTP id 33mr2972287plo.197.1502228922379; Tue, 08 Aug 2017 14:48:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228922; cv=none; d=google.com; s=arc-20160816; b=qaEn2jGt1kxRo3PSMa14YZcg99xwKOfLFVR8tVR3BfvC7xhKpBXsKTi0YOHLFhtU61 d+MrohodsjEW5dk8RrxbLDzMAJ5LloR0uYO26NHwVAi/wLDmpgboiJJlchcRbPuTdf3b Kl6dOW4qsBbPokzuPNMbBStJlm3WOdOeskVaTwyFoQLpFZE9aBnipimMKU9WEJ7WDCCH haC4TLa8qa8JtxK/C+BKMuoY2o3mh7j6dyY3tr0C7EsTtz5AYGz0dcKt70L0JiDWhn0B bandgJZhdsa3oNyX8jDIe2jDob9n7dXPmoiAVGk6BPOB2uRiwt78gndGqVdUeLaMifdQ QUZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=aG25e7xROB6lFDJCetO21Be5+pkf+YyHdGmebsi6X/c=; b=F4DtLuwJqxVdzEH7CZYxRxZK7kng7GFHT/YUUl4+pPat2yLv7aNJfW3Ty5BnQ0bGvi Q2VfF7VFTXRU0eAoNlVEHbtjT/Sodt3UJgAIRnBpXHAgPOgY+2iTzrVXzU77kChUzMcX 2QQjZCBh4XQvVvznqGpIWUmPu6BMQDTPP+opERDB9gMKJSOv7PeAPMF5QRp5dEGgvAwM jwcVEyBhvYY3ymvgmwti+tIVxNLX4ZpuMT+wil4n4dAVPgodwsH0dQJU4b4mPZ8uNbPf xoG1Y047qgrjDQLzgO+RNfhA8PxqTIdbQAOX9qaSjUO/Nhtd/fFna/Thh/Eas5quO/fR hsCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=m8DEMaAK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id h13si1459550pfk.575.2017.08.08.14.48.42; Tue, 08 Aug 2017 14:48:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=m8DEMaAK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 61E4B77CF6; Tue, 8 Aug 2017 21:48:22 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by mail.openembedded.org (Postfix) with ESMTP id 0CD9F77BB1 for ; Tue, 8 Aug 2017 21:48:15 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id c65so4256803pfl.0 for ; Tue, 08 Aug 2017 14:48:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=aT/uSBhX9d8/o8FUe/irObOE0g+h31a2a0mIFO64F4w=; b=m8DEMaAKV90PFu5Sh6z12GY05QWR4D4TeAzQK+0zL+20GCF0iBqxB4yd/dzahxyNXI eODq15vDyttYv7kR/35GfuHux2ye7ooz9/78fFFvWVudlEWo5+G3s6jb6vAhAF8QSY2f hDIXqPPtmymrOhh25RU8wOolT4VaPY+YxvRktpbC7b/fE9f17/Gz+nF4ni4v+N6TJf7S T38A8AHb4Fb/FhEx/31/4l9pdwOEzjXxVTm6nJlUmmV4dXojICDvjtUxnwDCUt75gUXC EetXscZUw4FnwCbmBQMcOXt4GR35VjF/hZXmail/fpYrdfhrtuMKrKjVs6lYNtqLeLnX uGjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aT/uSBhX9d8/o8FUe/irObOE0g+h31a2a0mIFO64F4w=; b=hst5USDteMElc9GnRgHS1djYaO7WmkHWvkIMzIp3IK1bMbGBrvHQhlPIOlBD3xoy52 uhjfkQfITFUkBHcmbXBEJdZMgCdeCh1JOfRFgaWTLSCgQu97pLB9eZiKWdcIbwruUo04 6QyTYsH086zC2OBK9dvmtUubIwYav2F9BNh88JAFt1wePwT165wr1vKoDg+PgibghiXU 7nUtWZYIpZyUennqMoe1GK+EGM5dN4Gxc1NhZCxnqjs4aO3MChlFaqyc5LBq/Po5E4Z6 hStBpphunWEghpcRntT6otM5Taj5g2LUjgGu3NtD5X3KyTZ4jU5WakW5N7oL1Hx8A5sB 2bqA== X-Gm-Message-State: AHYfb5izNCxWMH+xrnL/UAOyuWd2/vsRcZKxQYj4nYGr/T5P1J+3Gckp Awjkm+R+Rh0GBWub X-Received: by 10.98.209.10 with SMTP id z10mr5893921pfg.93.1502228897056; Tue, 08 Aug 2017 14:48:17 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:16 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:55 -0700 Message-Id: <20170808214800.39621-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-multimedia][PATCH 4/9] kodi: Use std namespace for string objects X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...ilesystems-string-is-in-the-std-namespace.patch | 88 ++++++++++++++++++++++ .../recipes-mediacenter/kodi/kodi_17.bb | 1 + 2 files changed, 89 insertions(+) create mode 100644 meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-filesystems-string-is-in-the-std-namespace.patch -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-filesystems-string-is-in-the-std-namespace.patch b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-filesystems-string-is-in-the-std-namespace.patch new file mode 100644 index 000000000..7f8926df3 --- /dev/null +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0013-filesystems-string-is-in-the-std-namespace.patch @@ -0,0 +1,88 @@ +From 4f2448129128f12fcf3a232c6801eb687c742947 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Tue, 1 Aug 2017 20:04:33 -0700 +Subject: [PATCH] filesystems: string is in the std namespace + +Use std::string instead of string + +Signed-off-by: Khem Raj +--- + xbmc/filesystem/FTPParse.cpp | 44 ++++++++++++++++++++++---------------------- + 1 file changed, 22 insertions(+), 22 deletions(-) + +diff --git a/xbmc/filesystem/FTPParse.cpp b/xbmc/filesystem/FTPParse.cpp +index cfcc7c64ed..b0f676ae1a 100644 +--- a/xbmc/filesystem/FTPParse.cpp ++++ b/xbmc/filesystem/FTPParse.cpp +@@ -34,7 +34,7 @@ CFTPParse::CFTPParse() + m_time = 0; + } + +-string CFTPParse::getName() ++std::string CFTPParse::getName() + { + return m_name; + } +@@ -59,16 +59,16 @@ time_t CFTPParse::getTime() + return m_time; + } + +-void CFTPParse::setTime(string str) ++void CFTPParse::setTime(std::string str) + { + /* Variables used to capture patterns via the regexes */ +- string month; +- string day; +- string year; +- string hour; +- string minute; +- string second; +- string am_or_pm; ++ std::string month; ++ std::string day; ++ std::string year; ++ std::string hour; ++ std::string minute; ++ std::string second; ++ std::string am_or_pm; + + /* time struct used to set the time_t variable */ + struct tm time_struct = {}; +@@ -338,21 +338,21 @@ int CFTPParse::getDayOfWeek(int month, int date, int year) + return day_of_week; + } + +-int CFTPParse::FTPParse(string str) ++int CFTPParse::FTPParse(std::string str) + { + /* Various variable to capture patterns via the regexes */ +- string permissions; +- string link_count; +- string owner; +- string group; +- string size; +- string date; +- string name; +- string type; +- string stuff; +- string facts; +- string version; +- string file_id; ++ std::string permissions; ++ std::string link_count; ++ std::string owner; ++ std::string group; ++ std::string size; ++ std::string date; ++ std::string name; ++ std::string type; ++ std::string stuff; ++ std::string facts; ++ std::string version; ++ std::string file_id; + + /* Regex for standard Unix listing formats */ + pcrecpp::RE unix_re("^([-bcdlps])" // type +-- +2.13.3 + diff --git a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb index 5a9fa9801..790a12e78 100644 --- a/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb +++ b/meta-multimedia/recipes-mediacenter/kodi/kodi_17.bb @@ -79,6 +79,7 @@ SRC_URI = "git://github.com/xbmc/xbmc.git;branch=Krypton \ file://0011-Let-configure-pass-on-unknown-architectures-setting-.patch \ file://0012-Revert-droid-fix-builds-with-AML-disabled.patch \ file://0001-change-order-of-detecting-libegl-and-libgles2.patch \ + file://0013-filesystems-string-is-in-the-std-namespace.patch \ " SRC_URI_append_libc-musl = " \ From patchwork Tue Aug 8 21:47:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109681 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp30904qge; Tue, 8 Aug 2017 14:48:52 -0700 (PDT) X-Received: by 10.98.201.79 with SMTP id k76mr5971043pfg.276.1502228931947; Tue, 08 Aug 2017 14:48:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228931; cv=none; d=google.com; s=arc-20160816; b=lj8LwCel3L5XMgcAliOlF5eeXpEuAwRtp5A8pt2CndziBSjtHJ2g9qpYfrp42WlybB 5bWJbUvxWDBW0lrx0KnQoDdg6qBo+OorYkHMO0SiSIXl2iVWdiql9M8MFvinVRdMftU3 5S/Uij7NGHkKkHkotCrVp1hZGZtGFut42ITKbSH0iezIbcfx9QidYH8sSd3xp6k8itgW gscJVawYfjpDcj+sQbosbKBclY8oJa52rhcvJMo304S3EtVTnNJcRAxMGwRhPlGiBRIy J41YdFv37up3xXi/hjZpuYUVyt1iBjTamBBasKEQ0Tqy593bHOy7OpLs3M21zSTBnxPU Chmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=SS/eXcS5Oe2+e1Cm/L8vqe6ouBIDwUX8ApCsIE4qWxY=; b=YUB3wwNsfKv+2hiEnG7nshTf0vRSyuYmfgjZHORESnTjKIlvMpbpUqRJEjpTuxN/oi xdFJTejTWJGsJHZTiE7HoDrFyVzSk+hxQUophuCXaCsWjD3PcQvLj7yfXuiXBmFSkJH2 1xSkqyPdkEtyMG8mjNmYfW36Vr2pinOIaULYPSRBTnXojdQdIZzQcbndsCdYkk81gZYT fRWFl0uyhk91oIFRXMwed3ua0Qlwzg9acyA0B45l/7uvWmpFiU3JK3fcO4QoFXx7xdEj qy+rzH5u+kP3x2XhBPQbG7RxWXNkhHtj82cw07Nwfy5lRh6NIDkojPbhqiSfQqtN0edw mdzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=N3s19+Ak; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id d6si1503416pln.119.2017.08.08.14.48.51; Tue, 08 Aug 2017 14:48:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=N3s19+Ak; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 7B4C277D02; Tue, 8 Aug 2017 21:48:23 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f46.google.com (mail-pg0-f46.google.com [74.125.83.46]) by mail.openembedded.org (Postfix) with ESMTP id 7785877BC3 for ; Tue, 8 Aug 2017 21:48:17 +0000 (UTC) Received: by mail-pg0-f46.google.com with SMTP id v189so19857484pgd.2 for ; Tue, 08 Aug 2017 14:48:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nLXcdjKjIlBEDXZHCZQmjzUoe9w+Vs4WoI7M1rD/AeE=; b=N3s19+AkoOtM4lujjPu1HE+3W7JlYHEWJjI3M+LNt0aujWc8AA6WUkmIRFQCHMsPG+ 34Ov1gS5zac6P1RCYYjrEfan0D+WY6TUk02vscBUNWxqf5cNI642czkYE9q41svPfQKf QPSX9CGwKChGKxuxZVxDBkTSPamROFUkg3LhLqlblVMdiqE2CpW1kOzOUKjk/tRuaos4 zPdjq/9EHJhDmXUmyMlrUzsKakCReCCXo16IxhQUQgNM+yylinwlVm+yCOXlfuuTIotY dNoZKj6TupvrAGVtfpdSWsVDyGmE1i24nqGt7K48a0/H/AoItG6nPe3wpWSAVV0JOJp5 Z19Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nLXcdjKjIlBEDXZHCZQmjzUoe9w+Vs4WoI7M1rD/AeE=; b=an563PWH9Yup04kWGP+psIH3v4DvTz2MvlCboVHbUyj3NAhlLkJpoNsWF5yTKRkQJR Ibn3cT55pAO6yw6CFc1+Qvx3FTdCOKesNIg8OuKl1tgycNgxI3dEicLVwcs4z4FT5DFL xRMhubm2griHjjDsW8JMg4DfkPEl0N77+WmRDo3P2EkTsdw1KbM99z2zAi4vOGL1FagZ hmKuSNduhdNl7RagNFIE/9vaRBNRnswAZwnMdgjpy0yOJnvaTla5/CjbSfG8Dlkohvx7 boXWo46Dmr2/hZKdd+AO/+Z/l+kEkOdfo0Yc6eTxI2f0pSGEEMPnDJCaip8mtoB0QndI nF8w== X-Gm-Message-State: AHYfb5iKw3dRgBl5OZ1oCfJIkJLSEFKrCWcifBldi55rLiYzAnrIYtQ2 PDShQMAgUGAMu78a X-Received: by 10.99.42.212 with SMTP id q203mr5426399pgq.448.1502228898343; Tue, 08 Aug 2017 14:48:18 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:17 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:56 -0700 Message-Id: <20170808214800.39621-5-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 5/9] mongodb: Upgrade to 3.4.6 X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Add missing Zlib to license list Add patches to fix build issue with gcc7 and missing internal build dependency Signed-off-by: Khem Raj --- .../mongodb/0001-mongo-Add-using-std-string.patch | 72 ++++++++++++++++++++++ ...-Add-missing-dependenncy-on-local_shardin.patch | 28 +++++++++ meta-oe/recipes-support/mongodb/mongodb_git.bb | 12 ++-- 3 files changed, 107 insertions(+), 5 deletions(-) create mode 100644 meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch create mode 100644 meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch b/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch new file mode 100644 index 000000000..e517d53d1 --- /dev/null +++ b/meta-oe/recipes-support/mongodb/mongodb/0001-mongo-Add-using-std-string.patch @@ -0,0 +1,72 @@ +From 5fdec9592285f5976345fbccb3d07fae1245ab53 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Aug 2017 15:41:22 -0700 +Subject: [PATCH] mongo: Add using std::string + +This is needed with latest clang +Fixes +src/mongo/db/dbwebserver.cpp:206:23: error: use of undeclared identifier 'string'; did you mean 'String'? + static vector commands; + ^~~~~~ + String + +Signed-off-by: Khem Raj +--- + src/mongo/db/dbwebserver.cpp | 1 + + src/mongo/db/matcher/expression_leaf.cpp | 2 ++ + src/mongo/db/repl/master_slave.cpp | 1 + + src/mongo/util/net/miniwebserver.cpp | 1 + + 4 files changed, 5 insertions(+) + +diff --git a/src/mongo/db/dbwebserver.cpp b/src/mongo/db/dbwebserver.cpp +index b202e0500b..0255613524 100644 +--- a/src/mongo/db/dbwebserver.cpp ++++ b/src/mongo/db/dbwebserver.cpp +@@ -67,6 +67,7 @@ namespace mongo { + using std::map; + using std::stringstream; + using std::vector; ++using std::string; + + using namespace html; + +diff --git a/src/mongo/db/matcher/expression_leaf.cpp b/src/mongo/db/matcher/expression_leaf.cpp +index d562bff141..4d931985e2 100644 +--- a/src/mongo/db/matcher/expression_leaf.cpp ++++ b/src/mongo/db/matcher/expression_leaf.cpp +@@ -44,6 +44,8 @@ + #include "mongo/stdx/memory.h" + #include "mongo/util/mongoutils/str.h" + ++using std::string; ++ + namespace mongo { + + Status LeafMatchExpression::setPath(StringData path) { +diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp +index 05faad1259..ea25d7151b 100644 +--- a/src/mongo/db/repl/master_slave.cpp ++++ b/src/mongo/db/repl/master_slave.cpp +@@ -78,6 +78,7 @@ using std::endl; + using std::max; + using std::min; + using std::set; ++using std::string; + using std::stringstream; + using std::unique_ptr; + using std::vector; +diff --git a/src/mongo/util/net/miniwebserver.cpp b/src/mongo/util/net/miniwebserver.cpp +index 5f4165d42f..239720c349 100644 +--- a/src/mongo/util/net/miniwebserver.cpp ++++ b/src/mongo/util/net/miniwebserver.cpp +@@ -46,6 +46,7 @@ namespace mongo { + + using std::shared_ptr; + using std::stringstream; ++using std::string; + using std::vector; + + MiniWebServer::MiniWebServer(const string& name, const string& ip, int port, ServiceContext* ctx) +-- +2.13.3 + diff --git a/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch b/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch new file mode 100644 index 000000000..95f9c1c1c --- /dev/null +++ b/meta-oe/recipes-support/mongodb/mongodb/0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch @@ -0,0 +1,28 @@ +From 5759878e5d278f11a1063e8fccd1e6b7b54caadf Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 2 Aug 2017 16:25:37 -0700 +Subject: [PATCH 2/2] d_state.cpp: Add missing dependenncy on + local_sharding_info + +Fixes +| src/mongo/s/d_state.cpp:81: error: undefined reference to 'mongo::enableLocalShardingInfo(mongo::ServiceContext*, std::function, std::allocator > const&)>)' + +Signed-off-by: Khem Raj +--- + src/mongo/s/SConscript | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/mongo/s/SConscript b/src/mongo/s/SConscript +index 71720be517..51bd199127 100644 +--- a/src/mongo/s/SConscript ++++ b/src/mongo/s/SConscript +@@ -317,5 +317,6 @@ env.Library( + "$BUILD_DIR/mongo/db/s/sharding", + "$BUILD_DIR/mongo/executor/network_interface_factory", + "$BUILD_DIR/mongo/s/client/shard_local", ++ "$BUILD_DIR/mongo/s/local_sharding_info", + ], + ) +-- +2.13.3 + diff --git a/meta-oe/recipes-support/mongodb/mongodb_git.bb b/meta-oe/recipes-support/mongodb/mongodb_git.bb index f1a65550e..b38641cff 100644 --- a/meta-oe/recipes-support/mongodb/mongodb_git.bb +++ b/meta-oe/recipes-support/mongodb/mongodb_git.bb @@ -1,16 +1,18 @@ SUMMARY = "mongodb" -LICENSE = "AGPL-3.0 & Apache-2.0" +LICENSE = "AGPL-3.0 & Apache-2.0 & Zlib" LIC_FILES_CHKSUM = "file://GNU-AGPL-3.0.txt;md5=73f1eb20517c55bf9493b7dd6e480788 \ file://APACHE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" -DEPENDS = "openssl libpcre libpcap zlib" +DEPENDS = "openssl libpcre libpcap zlib python boost" inherit scons -PV = "3.3.0+git${SRCPV}" -SRCREV = "aacd231be0626a204cb40908afdf62c4b67bb0ad" -SRC_URI = "git://github.com/mongodb/mongo.git;branch=master \ +PV = "3.4.6+git${SRCPV}" +SRCREV = "c55eb86ef46ee7aede3b1e2a5d184a7df4bfb5b5" +SRC_URI = "git://github.com/mongodb/mongo.git;branch=v3.4 \ file://0001-Tell-scons-to-use-build-settings-from-environment-va.patch \ + file://0001-mongo-Add-using-std-string.patch \ + file://0002-d_state.cpp-Add-missing-dependenncy-on-local_shardin.patch \ " S = "${WORKDIR}/git" From patchwork Tue Aug 8 21:47:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109682 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp31035qge; Tue, 8 Aug 2017 14:49:02 -0700 (PDT) X-Received: by 10.99.98.5 with SMTP id w5mr5583671pgb.354.1502228942241; Tue, 08 Aug 2017 14:49:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228942; cv=none; d=google.com; s=arc-20160816; b=d1vismEzaGjCx/1zdJzo8rYz6qU4RjtsPmAax9/9/URfW24+lFMCEzh55q+ljEe7wv 6SBH98XJSOWJ+goXq63HGWA9IJbagXfM4hURaKBz0dqqkGL8sPNtvNEpuFP4WCahiVfk BBcIkheG3tCDP1h2ZbZ8dc2fdil2baeEWE/RYA6F53rM12dBs2ZQvKi92Fv1pcvq0Ri6 R1//dDC/CaZvKzuI9IY40sk1iMqId0ut79KhdSIruSOuKms8l2BsrVio48l7lOzY+DTA aEwXSHW1BdBQYJn7HaSpegI98ZpA3FTzsHUCi7g6KiLCipOzpuSdMYH8z7e+AQhRHSFM zVOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=qBwE12K0NvuVGVRRXYFOQMjKBAmEeP1z1ike+cp9zgo=; b=KLmf/tC2fBKFp8OaoH1Yvqu/2FF/Q+63GrzBGhoVKLWKe6e7JmOz3FwMF9/Zt76N3v XloPIF+vYWzQbhUojgyDiJA3dfOWjyIHlwUJPx9n/UuSEbHbXlDBqdjr4E/DaIsRcssu YdEOxbStoSKSQED3PPwiG4cn4yGGGOfd7prmdMCNI9J8eg+rWBmxEXd/b+vA+tZ0xwos PiEiFONy1jVRYVwBU1E4mUHXAt09BQ5BFjBrq6i6u2+4Aler0xmlXkU1TAjA73F3GQIW O22QgAIUAuGjiXbl98+PxA3K/1Jcirn9by/ZlYUB/a5HPZ944BIebLQMnKgpLKyrkAM+ 2cCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=FSCe1Ozu; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o12si1461705pfk.277.2017.08.08.14.49.01; Tue, 08 Aug 2017 14:49:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=FSCe1Ozu; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 9F66977D17; Tue, 8 Aug 2017 21:48:24 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pg0-f68.google.com (mail-pg0-f68.google.com [74.125.83.68]) by mail.openembedded.org (Postfix) with ESMTP id 986E977BB1 for ; Tue, 8 Aug 2017 21:48:18 +0000 (UTC) Received: by mail-pg0-f68.google.com with SMTP id y129so4154208pgy.3 for ; Tue, 08 Aug 2017 14:48:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=uiEPDrrdwE0BNK1RQe5/p0Yv55IvkzXy/BEQ2X+pt7I=; b=FSCe1OzudTQRrRtyr2lOeYTwCvoScTZ6Tza4pevl0huQLOK5aOX6I5l/5KkLh717V3 dWC4LE/jnXx2HiJqZ8s49yfyIKFmn2Dhqg5Gv5tlteeVjXtAle5pMK1YFO0kpyEQjvtl xSxuOe9jfnksxAjYVVykuVDlAFZmF3Fb6dhPM6lEqP5xSHD/ILEcOPaHky1w/uYzo0PN /3/3GvD4NUYVJsCK0ONDEZesBATtHgka+wZ0xavKEOvcNBPmVtmded9E5ni/B8N9OWBC 9w/n+qQvBB2W//IKvcpV26ilwiNsJQNBKR6P8OsPR5UWjXmGuyroVIMrQgCREJtfVqLC KQHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uiEPDrrdwE0BNK1RQe5/p0Yv55IvkzXy/BEQ2X+pt7I=; b=lxrdE4NVvSei9FFrNWHurD9lRnaNZj0+cQXotXOsYhLKWsvGtFq7Ijid+JQqX10TQE 4A1cxudKHbWQpzUueaaCxe3qd2g/Sxo7282Fpv5Wzr2eD6venk9tOZp63lvfkaRkzEnH mvft4+rfH6d2RCnCkWXfPbTaa6WcKZv4N2hJBAY/eXOqwyLSU/kA2ymjjhSeL7fVcLas BTlYa6GTmN6ej1aL64uukQuPNTQALQQZqWNTuf+biWm3UZQZNmMuSAdY7k8iRJx035x6 QzdvyUGKbSodKM8v9v0K3ZYFPXTnO1I1HK3UCzp0yuNlFuoRa6I2CMiV/1G1Hb8RIiYb KDog== X-Gm-Message-State: AHYfb5hxEeUZNAHWncTgw/c+EIz+JL6tFzxTdwH7/ocPpIzedYkIQmmR 370Rlid/FyE+d2+i X-Received: by 10.98.209.87 with SMTP id t23mr5953618pfl.86.1502228899637; Tue, 08 Aug 2017 14:48:19 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:18 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:57 -0700 Message-Id: <20170808214800.39621-6-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-python][PATCH 6/9] python3-twisted: Fix build with clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- .../0001-initsendmsg-Return-NULL-on-error.patch | 76 ++++++++++++++++++++++ .../python/python3-twisted_13.2.0.bb | 3 + 2 files changed, 79 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch b/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch new file mode 100644 index 000000000..d4cf34554 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-twisted/0001-initsendmsg-Return-NULL-on-error.patch @@ -0,0 +1,76 @@ +From 890d039f067d52a0ab77b561d40da13f0c135634 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 3 Aug 2017 11:24:43 -0700 +Subject: [PATCH] initsendmsg: Return NULL on error + +Fixes a clang error + +sendmsg.c:129:9: error: non-void function 'initsendmsg' should return a value [-Wreturn-type] + +Signed-off-by: Khem Raj +--- + twisted/python/sendmsg.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/twisted/python/sendmsg.c b/twisted/python/sendmsg.c +index 9f2fd8c..9c080e1 100644 +--- a/twisted/python/sendmsg.c ++++ b/twisted/python/sendmsg.c +@@ -126,7 +126,7 @@ PyMODINIT_FUNC initsendmsg(void) { + module = Py_InitModule3("sendmsg", sendmsg_methods, sendmsg_doc); + + if (!module) { +- return; ++ return NULL; + } + + /* +@@ -135,39 +135,39 @@ PyMODINIT_FUNC initsendmsg(void) { + */ + + if (-1 == PyModule_AddIntConstant(module, "SCM_RIGHTS", SCM_RIGHTS)) { +- return; ++ return NULL; + } + + + /* BSD, Darwin, Hurd */ + #if defined(SCM_CREDS) + if (-1 == PyModule_AddIntConstant(module, "SCM_CREDS", SCM_CREDS)) { +- return; ++ return NULL; + } + #endif + + /* Linux */ + #if defined(SCM_CREDENTIALS) + if (-1 == PyModule_AddIntConstant(module, "SCM_CREDENTIALS", SCM_CREDENTIALS)) { +- return; ++ return NULL; + } + #endif + + /* Apparently everywhere, but not standardized. */ + #if defined(SCM_TIMESTAMP) + if (-1 == PyModule_AddIntConstant(module, "SCM_TIMESTAMP", SCM_TIMESTAMP)) { +- return; ++ return NULL; + } + #endif + + module = PyImport_ImportModule("socket"); + if (!module) { +- return; ++ return NULL; + } + + sendmsg_socket_error = PyObject_GetAttrString(module, "error"); + if (!sendmsg_socket_error) { +- return; ++ return NULL; + } + } + +-- +2.13.4 + diff --git a/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb b/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb index 98016cca3..57406cd52 100644 --- a/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb +++ b/meta-python/recipes-devtools/python/python3-twisted_13.2.0.bb @@ -1,6 +1,9 @@ inherit pypi setuptools3 require python-twisted.inc +SRC_URI += "file://0001-initsendmsg-Return-NULL-on-error.patch \ + " + RDEPENDS_${PN}-core = "python3-core python3-zopeinterface python3-lang" FILES_${PN}-core_append += " \ From patchwork Tue Aug 8 21:47:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109683 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp31190qge; Tue, 8 Aug 2017 14:49:12 -0700 (PDT) X-Received: by 10.98.129.197 with SMTP id t188mr5840268pfd.318.1502228951997; Tue, 08 Aug 2017 14:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228951; cv=none; d=google.com; s=arc-20160816; b=cCV9UD+iJKFU/EAgZwgKG8NOrCVMCUa1cEzDcxKTHZQRqIuoXPRT2JDjvQo/H5xhdc ptMwY5TP5qgqHRLZg3nU2VLcfdqq8TSaqOrPjAvRRpSGkAQHyo4+ET6u9OsGkBeHB7Hh qrTM6eNlRS6H7xnt+6x0cufD8vvejtebcKUvet3iJ9mYxEM+cK87WevCjN6YZ/njZd1x oUv7zkDHmUEMzdhd/47XyOnMasYsn7T9sNcuVtx3POkqYsRRAW1Ji9RiKNJyOjCrckyw M3Jp1naGNe7A5zwIbzk3/X4VKZmZZ4nRRdgtMudvB2KAbmrBpUOKlTgBoVMRte1GwFvB 8aJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=amdqtbzheZtlBZ4Ydq2iNhVSmAP00TohlMP3sm7Q810=; b=T6ANGY3phONPRMRIFyflFFPlo88NOXDlJrnnJmP6ot8UMmLQBK14YxvAxe2WYWnB9H oNgcRYPNYYd8/YHpdxqVL/a5NF6Zbq3IvP/23XZziL3pAefUT01HJPOviTwubkg0w9G8 t/aDrzIQBTT7ILxoK6bChYXUU2BsCiGMBBpdmpRsQIQEfbY9CjTvweVmpYX+2OpbxjU4 +V3tLN5KgQLcYy57pA3MvjY68BIy6kio7U7Wvg0sWTcJjAw8vmXe/7OqzgGILvkQhOtI C5Yj79VClMObKJ2Of33wzWeMTV3McD2nxfl2gImjoPjLVrnchSd9Texd1asSQDVQboTd ZL/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cN1AMtS+; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id v26si1353747pgc.87.2017.08.08.14.49.11; Tue, 08 Aug 2017 14:49:11 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=cN1AMtS+; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B2A7677D67; Tue, 8 Aug 2017 21:48:25 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f173.google.com (mail-pf0-f173.google.com [209.85.192.173]) by mail.openembedded.org (Postfix) with ESMTP id 8EF6077BB1 for ; Tue, 8 Aug 2017 21:48:19 +0000 (UTC) Received: by mail-pf0-f173.google.com with SMTP id o86so19592993pfj.1 for ; Tue, 08 Aug 2017 14:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=XebsINcA7a1E1Tqa1/KlOUCydXEpsbR7nKQR9slcEgE=; b=cN1AMtS+QGGn5jDAerKRF5sw8mxehR/dHC0Oqv7IkHdTAF2JQSe0Mipw5cqXK+I4W1 crw6bauQ8EGJNbEXYVJosQ0F7M0gNvSt8KusaMxgJiX8H1u3eYY/NpTj/IySn1vwB58e nQhFzyytDnWaGkyea+rJi0KlOVKobfZvh07GNO1DI7dGWAurjIXEmRqO9M30TNNuXGO4 0irtV+KNyhVI561jqPGEfgYhzF1mzazXaT87PF1KuZf7MbTTaN2asfztJ0dtS9tGNzkj /Tv1qzAUlWM9TCzzsr70U4PMgM3fRuOLcqXN/XeDd/SooTrSjFCyDWjuCUAYDEMVqx8Z qzJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=XebsINcA7a1E1Tqa1/KlOUCydXEpsbR7nKQR9slcEgE=; b=F+6qiuxkI1yE8BFeyKPoWk9chfuKzVNouuSJU2MP00GhYA2XY8N0qr1mTnh0/AKO0B +4dd/3X796t1fMY8Q1QaOnSFiu4Hvpc++KVE7PwM5I8qBbggRnehDM1wuuNqKf1+RKrc wBvBMU5C8CKo5AAWL4XBNOgTJ1ZhJRkHxFLpIfqEbX96Ek1NymDzIA7P2HKotxTLnUvf hIX9fis/y5shyyXLN/lVc72FsyXY0hCWRr8lU1uixWrxLvv7g3Y42Df3Q7XgWMJLwcjE 6RhN48h79xJiWhJ9zl2bxvlOsT8Py7tFd7kEGkGbqD61cChdyAM7jYqVsHaKMzijEFUP 4w6g== X-Gm-Message-State: AHYfb5hgGnir/ndEbiQf2yF1kvH2jm+feYXpWMVMOHeI0/wi6Q+ioLAJ zSolzvGZfsPjLZ7F X-Received: by 10.98.63.83 with SMTP id m80mr5881179pfa.161.1502228900947; Tue, 08 Aug 2017 14:48:20 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:20 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:58 -0700 Message-Id: <20170808214800.39621-7-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-python][PATCH 7/9] python-grpcio: Do not hardcode compiler -std options X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...up.py-Do-not-mix-C-and-C-compiler-options.patch | 36 ++++++++++++++++++++++ .../recipes-devtools/python/python-grpcio_1.4.0.bb | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch b/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch new file mode 100644 index 000000000..3686144b3 --- /dev/null +++ b/meta-python/recipes-devtools/python/python-grpcio/0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch @@ -0,0 +1,36 @@ +From b02be74a2eff8abc612ef84f30e0fbce6a7f65f5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Fri, 4 Aug 2017 09:04:07 -0700 +Subject: [PATCH] setup.py: Do not mix C and C++ compiler options + +EXTRA_ENV_COMPILE_ARGS is used both with CC and CXX +so using -std=c++11 or -std=gnu99 together will cause +build time errors espcially with clang + +error: invalid argument '-std=gnu99' not allowed with 'C++' + +gcc7 ( defaults are -std=gnu11 and -std=gnu++14 ) + as well clang default to these standards mode or newer +anyway + +Signed-off-by: Khem Raj +--- + setup.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/setup.py b/setup.py +index cb85273..f79878d 100644 +--- a/setup.py ++++ b/setup.py +@@ -116,7 +116,7 @@ if EXTRA_ENV_COMPILE_ARGS is None: + elif 'win32' in sys.platform: + EXTRA_ENV_COMPILE_ARGS += ' -D_PYTHON_MSVC' + elif "linux" in sys.platform: +- EXTRA_ENV_COMPILE_ARGS += ' -std=c++11 -std=gnu99 -fvisibility=hidden -fno-wrapv' ++ EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv' + elif "darwin" in sys.platform: + EXTRA_ENV_COMPILE_ARGS += ' -fvisibility=hidden -fno-wrapv' + +-- +2.13.4 + diff --git a/meta-python/recipes-devtools/python/python-grpcio_1.4.0.bb b/meta-python/recipes-devtools/python/python-grpcio_1.4.0.bb index 5412e0243..2446411a1 100644 --- a/meta-python/recipes-devtools/python/python-grpcio_1.4.0.bb +++ b/meta-python/recipes-devtools/python/python-grpcio_1.4.0.bb @@ -4,6 +4,8 @@ SECTION = "devel/python" DEPENDS = "python-protobuf" +SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch \ + " RDEPENDS_${PN} = "python-enum34 \ python-futures \ python-protobuf \ From patchwork Tue Aug 8 21:47:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109684 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp31375qge; Tue, 8 Aug 2017 14:49:23 -0700 (PDT) X-Received: by 10.99.99.135 with SMTP id x129mr5451213pgb.357.1502228963053; Tue, 08 Aug 2017 14:49:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228963; cv=none; d=google.com; s=arc-20160816; b=KpGZyHs9JECbcsdRTT1LFIEvEqZHkfznWggO64X/Kj+SRG62iTzDH/1A2VQ/GY8Jvn 2fzbsHyqUklXqz10R7F8SQ23w47jR7DeMGUJzFeb9GIu6ht2SJHTTHC2wxskg7q+1+x7 DAo738Y/+KJ6UqBLmBBb64K0hJ0xdJnyY91P5Ys3oED0KnolEseypGCfKapsM76LTL7X xgt11B4iUFWNF47S7Z3fSlnEDiAx8Jh5zBVAlFmBxjE2Bts6LhXalOc8T9E7szcet42v itcDbglnXJIl+3/IvO7daZwkpSxSA/txKK2Oz3FbUXcnMXoJQ0OqU8ltXu0PR6qNtdcS EsGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=NKbWoIZrh2pkF9kzG+txDsBwSqXcaaypDrc2O2VxJLk=; b=AFCLVyFPnfWbjrOURHeU2bgB01FnxPoX+eNX9g3HM0UWfiEe/QGj7ZQ+SQ6cd9lrml TqyqlRCUzJcdzu+GxQ7/u9RfrlarOpUXX4lNYLWbj9LpfGrfkCWVlnfPN/O/LXeSFYN3 0newP52vT9OaYnNeuIVPgix0I+c6KKxRDcwTe9CIjaf9jaxJSltkNMefNBoNcFgCOmhd 16fjm3xdw9Wv01RJ0pnGtplJNbnUUkWbgWFekPX+WOy3waajDSmFFLOd/RgZ4sC5CWqh k/huWMJx4st7g8C5NP0pnX06Af7MqOKTIskB+Gkgi4tz2zt0SML3amko5eK1U9FKQ3cJ 62Ag== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ZgPLLgZK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id w62si1361482pgb.340.2017.08.08.14.49.22; Tue, 08 Aug 2017 14:49:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=ZgPLLgZK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 015B477D9F; Tue, 8 Aug 2017 21:48:27 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by mail.openembedded.org (Postfix) with ESMTP id 48BF077CF1 for ; Tue, 8 Aug 2017 21:48:21 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id p13so4234923pfd.4 for ; Tue, 08 Aug 2017 14:48:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3IT20T1twAP0Hfc5/Xn3FegFjj51kedixrTTx7eG3/8=; b=ZgPLLgZKxTM90eU2wRHEhJTIYjrDNtL+84SfHNMEl1bdNlmClfa5xJihTSdt3LCGZ9 7lFGoSvaTxiHV+cAoGK4qgZ5Aj2HBWEYMRWOCr5CUcDVBjy3PLNOb4qlfGmH+pgEGGtv oKLHOnIH9e398XNatlp4LXaPajUa2yy7T4WJh7rOK9zhTueQ+MoyJu5pxl8Ptuk7yQOJ e77+ZyszhXt84zgfKLC3OEYxaG9WpwqvI72kuNAToB4mh2r2SRHRBnvByjvfTL8uCKGM wSwg9gSvklE7k6UNqrOXOK+xpO39qe/oLnWwpwCKNoTY6aSKDwl9hoLaIkpUvAWQoF3L +hjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=3IT20T1twAP0Hfc5/Xn3FegFjj51kedixrTTx7eG3/8=; b=GK77DvJuTaQCdS3LD+AZkFuZNK8GbLxHeldFBGOTNGEmkslFaYntYtH8eE2THgsie+ wTplUmlAnwjCpanfo3WiYN1DCoZ2Xb4TWvYEgGeoqgUV3gSVSlDZ1wHs+Ra0m1upoGUz fK8sxItXHoEmpOXp6DxAXd2QV+ztgagTl8cfHRXvQLfnIIt1YSWOgv5qAhwmcK586P1X ZRY3WjNuxelh2HQlst7R91J3FMxChlzDQ/FMlAcjahdwBKFYV70GFyrRuq99laDARC9b G28mpEXHrcTvJAoqkvTEgnwPlWTtja4t+u8wZJkAqsTYd8E8ZW+ahIfDliYzDJ3eES2o /qPg== X-Gm-Message-State: AHYfb5iW8h1iUkCA02eU6L5Je4CaH6sQSwqbxnU7Q3Hpz+TqlXPFOT+M LD8ESdgYunBUzMwS X-Received: by 10.84.129.71 with SMTP id 65mr6297635plb.49.1502228902393; Tue, 08 Aug 2017 14:48:22 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:21 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:47:59 -0700 Message-Id: <20170808214800.39621-8-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 8/9] collectd: Fix build with clang X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Signed-off-by: Khem Raj --- ...onfigure-Check-for-Wno-error-format-truncation-comp.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch index 70b0983e4..5069a639c 100644 --- a/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch +++ b/meta-oe/recipes-extended/collectd/collectd/0001-configure-Check-for-Wno-error-format-truncation-comp.patch @@ -1,14 +1,18 @@ -From 14d469bc82c758116aef7d549abd49c131b4170f Mon Sep 17 00:00:00 2001 +From b459c55e4968321e5a82272cb39aa69d4054990f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 22 Apr 2017 11:54:57 -0700 Subject: [PATCH] configure: Check for -Wno-error=format-truncation compiler option If this option is supported by compiler then disable it ( gcc7+) +Use -Werror to elevate the warning to an error in case compiler like clang +which warn about unknown options but not error out unless asked for + Fixes client.c:834:23: error: '%s' directive output may be truncated writing up to 1023 bytes into a region of size 1010 [-Werror=format-truncation=] Signed-off-by: Khem Raj + --- configure.ac | 3 +- m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ @@ -16,7 +20,7 @@ Signed-off-by: Khem Raj create mode 100644 m4/ax_check_compile_flag.m4 diff --git a/configure.ac b/configure.ac -index 8854542..f3a6b57 100644 +index 8854542..edb8cfb 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,6 @@ AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)]) @@ -31,7 +35,7 @@ index 8854542..f3a6b57 100644 AM_CFLAGS="$AM_CFLAGS -Werror" AM_CXXFLAGS="$AM_CXXFLAGS -Werror" fi -+AX_CHECK_COMPILE_FLAG([-Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) ++AX_CHECK_COMPILE_FLAG([-Werror -Werror=format-truncation],[AM_CFLAGS="$AM_CFLAGS -Wno-error=format-truncation" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-error=format-truncation"]) + AC_SUBST([AM_CFLAGS]) AC_SUBST([AM_CXXFLAGS]) @@ -117,5 +121,5 @@ index 0000000..dcabb92 +AS_VAR_POPDEF([CACHEVAR])dnl +])dnl AX_CHECK_COMPILE_FLAGS -- -2.12.2 +2.13.4 From patchwork Tue Aug 8 21:48:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 109685 Delivered-To: patch@linaro.org Received: by 10.140.95.78 with SMTP id h72csp31488qge; Tue, 8 Aug 2017 14:49:31 -0700 (PDT) X-Received: by 10.84.215.206 with SMTP id g14mr6302384plj.217.1502228971877; Tue, 08 Aug 2017 14:49:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1502228971; cv=none; d=google.com; s=arc-20160816; b=i9ImeJEkWBpuO9sWWZbiJnAknEZ6B7dSOofjfRvF0qKVmIBS9Rf7f7YsSKFmZo8oz4 LcvLwHdPXNxw19Y6gz/R4qbtADbswnowQKSn/86m2sHKWJBhTYDLQU7kYrPamo4xTTT7 SCSbPwPkNL3/qfkJ7qCW3GQNkmGaIipIL1R8uUD4oZMgiom93LfDCiz89v22IalPW6Hx QB6JnPoDqctx7VZuIbgX0n/J++orQgVVZnnPpiNGO5KNH1ANI0tQnKIycOya2nPMsNIT qYMHVleWmkp20mD4P8qH+2LjMAfvD0d5/Gre8QHyu/bO/XMKEuNAbsbRiMjTdfM1tdrO UHDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:references:in-reply-to:message-id:date :to:from:dkim-signature:delivered-to:arc-authentication-results; bh=RJ1hoIYWFYzM0BA9nqf+k7sYKc50qjJQPQrzjtRTU6g=; b=yBXxXwjJTqvOr9petNwnqM0OLm+fPaV1J0b/HXq/47KNjqag3/At0Pna5dqGXtEzCs ml1NTg2Mr8VIsTBClLhpvaZe/u2TJjXipJyzIZR9wHdnFb6/XcvymfWYGQWuTeNTlnEn IXo0R1A+v2Oh1kanih4+O9d98u1BwwXVKnjIH8SKUF9k0yeFPr/G/CAuiMcIE+ABTHfW DLwqbYc3WKuLJT5gPUnMaUilyiVaVBjfIzEN/sWOIf5xBjAD5mM1xBM7h+/ckGcDo8Lp eEP9CVq37Kt1v93ME1JbINL0/dvM49pHM44aksFlmMPcQAmMa18AmrH8Ko3goVZ773mY nxQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=he1IctBK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id t76si1349001pgc.539.2017.08.08.14.49.31; Tue, 08 Aug 2017 14:49:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=he1IctBK; spf=pass (google.com: best guess record for domain of openembedded-devel-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-devel-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 1B85D77DB6; Tue, 8 Aug 2017 21:48:28 +0000 (UTC) X-Original-To: openembedded-devel@lists.openembedded.org Delivered-To: openembedded-devel@lists.openembedded.org Received: from mail-pf0-f182.google.com (mail-pf0-f182.google.com [209.85.192.182]) by mail.openembedded.org (Postfix) with ESMTP id 3292377D2F for ; Tue, 8 Aug 2017 21:48:23 +0000 (UTC) Received: by mail-pf0-f182.google.com with SMTP id c28so19543879pfe.3 for ; Tue, 08 Aug 2017 14:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ex+/3pYYRaGwTyz0AcebhC0EStNwCRYmtmt8MZuy5WM=; b=he1IctBKXkkdx7Hmm9MPZEHYTNG5sg1+xqAhUItOqaHuHHwp1tWoXG5hGpB48Im3b9 wK4Qi4xnxUHHZKoqMFGVXzRnqGnMDZmu5k0tZaBGgJDYAyZPip3F36dPEhw3iXI/E6zO GGZqQcCTET/Gdfe1UTW2L0Jl8ZIyhdy4T1gpUJF0dIZopMFgIQ9qP69jkxvgUbYkOhz1 SMQx11stwAl845wV/y0MKKXWaXCEJ5tl9aw8MVy52sryvs7eBHPjyHKOBtggx2riG7kt yw3nOdmSf30HsMXTMNhAAxe7OOEbkjhpINPXHnWhi9X3CDQfOwUS3wFYHulS1jSsSrPI Lk1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ex+/3pYYRaGwTyz0AcebhC0EStNwCRYmtmt8MZuy5WM=; b=tpRWmhR7+CClhGk+q0RwyBQHmjqbnTY0jBEfFLWQgrg9n7s4I1TbQA+sxkj8bZYfaQ YpkruNduNDyC0heBTDh9f2UkeRTpncNJz0neVWePieQjKxe080jAZfQ/NQ0liA6GtQVF dNHIOtkjW2oKNV3hG8DF1ooCdMwzPGUoNLt35OaIlfxCtfzzFhv6XhOWuWJH0KMl+3s7 wQUR6YTh765SAM/UgUhobcKR4IYlvYfoLn+xqlkuN2JbLpiG3cdDP1AuW0mXHqRbWkm+ kM+GRHXAjVBzvbKK/LXI3oLMPCT6VMqZozhIJS5wWi0XxRDkEPlTh8IzhMLgO/gwqjxE oAzw== X-Gm-Message-State: AHYfb5i+M+YhBrvvrA18pdc/AMjbr39zsrvKFEUMnobxr2ox2SrBdEZz QXAaYWIyoRFHkNAW X-Received: by 10.84.229.68 with SMTP id d4mr6293362pln.89.1502228903903; Tue, 08 Aug 2017 14:48:23 -0700 (PDT) Received: from localhost.localdomain ([2601:646:8882:b8c::f213]) by smtp.gmail.com with ESMTPSA id d135sm2768713pga.6.2017.08.08.14.48.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Aug 2017 14:48:23 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Date: Tue, 8 Aug 2017 14:48:00 -0700 Message-Id: <20170808214800.39621-9-raj.khem@gmail.com> X-Mailer: git-send-email 2.14.0 In-Reply-To: <20170808214800.39621-1-raj.khem@gmail.com> References: <20170808214800.39621-1-raj.khem@gmail.com> Subject: [oe] [meta-oe][PATCH 9/9] fbida: Fix build with libjpeg-turbo X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-devel-bounces@lists.openembedded.org Errors-To: openembedded-devel-bounces@lists.openembedded.org Dont hardcode cpp to point to gcc collection, helps compiling with clang Signed-off-by: Khem Raj --- meta-oe/recipes-graphics/fbida/fbida_2.10.bb | 5 +- .../fbida/files/fix-preprocessor.patch | 14 + .../fbida/files/support-jpeg-turbo.patch | 1854 ++++++++++++++++++++ .../fbida/files/use-jpeg-turbo.patch | 13 + 4 files changed, 1885 insertions(+), 1 deletion(-) create mode 100644 meta-oe/recipes-graphics/fbida/files/fix-preprocessor.patch create mode 100644 meta-oe/recipes-graphics/fbida/files/support-jpeg-turbo.patch create mode 100644 meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch -- 2.14.0 -- _______________________________________________ Openembedded-devel mailing list Openembedded-devel@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-devel diff --git a/meta-oe/recipes-graphics/fbida/fbida_2.10.bb b/meta-oe/recipes-graphics/fbida/fbida_2.10.bb index 1febac8e9..0bf48ace6 100644 --- a/meta-oe/recipes-graphics/fbida/fbida_2.10.bb +++ b/meta-oe/recipes-graphics/fbida/fbida_2.10.bb @@ -12,6 +12,9 @@ DEPENDS = "virtual/libiconv jpeg fontconfig freetype libexif" SRC_URI = "https://www.kraxel.org/releases/fbida/fbida-${PV}.tar.gz \ file://0001-Avoid-using-host-path.patch \ + file://fix-preprocessor.patch \ + file://support-jpeg-turbo.patch \ + file://use-jpeg-turbo.patch \ " SRC_URI[md5sum] = "09460b964b58c2e39b665498eca29018" SRC_URI[sha256sum] = "7a5a3aac61b40a6a2bbf716d270a46e2f8e8d5c97e314e927d41398a4d0b6cb6" @@ -34,7 +37,7 @@ PACKAGECONFIG[lirc] = ",,lirc" do_compile() { sed -i -e 's# fbgs# \$(srcdir)/fbgs#; s#-Ijpeg#-I\$(srcdir)/jpeg#; s# jpeg/# \$(srcdir)/jpeg/#' ${S}/GNUmakefile sed -i -e 's:/sbin/ldconfig:echo x:' ${S}/mk/Autoconf.mk - sed -i -e 's: cpp: ${TARGET_PREFIX}cpp -I${STAGING_INCDIR}:' ${S}/GNUmakefile + sed -i -e 's: cpp: ${CPP}:' ${S}/GNUmakefile # Be sure to respect preferences (force to "no") # Also avoid issues when ${BUILD_ARCH} == ${HOST_ARCH} diff --git a/meta-oe/recipes-graphics/fbida/files/fix-preprocessor.patch b/meta-oe/recipes-graphics/fbida/files/fix-preprocessor.patch new file mode 100644 index 000000000..909a0a6c0 --- /dev/null +++ b/meta-oe/recipes-graphics/fbida/files/fix-preprocessor.patch @@ -0,0 +1,14 @@ +Index: fbida-2.13/GNUmakefile +=================================================================== +--- fbida-2.13.orig/GNUmakefile ++++ fbida-2.13/GNUmakefile +@@ -53,8 +53,7 @@ include $(srcdir)/mk/Autoconf.mk + + ac_jpeg_ver = $(shell \ + $(call ac_init,for libjpeg version);\ +- $(call ac_s_cmd,echo JPEG_LIB_VERSION \ +- | cpp -include jpeglib.h | tail -n 1);\ ++ $(call ac_s_cmd,cpp -include jpeglib.h -dM -E -x c /dev/null | grep 'define JPEG_LIB_VERSION' | cut -f 3 -d' ');\ + $(call ac_fini)) + + define make-config diff --git a/meta-oe/recipes-graphics/fbida/files/support-jpeg-turbo.patch b/meta-oe/recipes-graphics/fbida/files/support-jpeg-turbo.patch new file mode 100644 index 000000000..05cd74da9 --- /dev/null +++ b/meta-oe/recipes-graphics/fbida/files/support-jpeg-turbo.patch @@ -0,0 +1,1854 @@ +Add patch by Ondrej Sury to migrate to libjpeg-turbo (Closes: #763263) + +Index: fbida-2.10/jpeg/62/jpegcomp.h +=================================================================== +--- /dev/null ++++ fbida-2.10/jpeg/62/jpegcomp.h +@@ -0,0 +1,30 @@ ++/* ++ * jpegcomp.h ++ * ++ * Copyright (C) 2010, D. R. Commander ++ * For conditions of distribution and use, see the accompanying README file. ++ * ++ * JPEG compatibility macros ++ * These declarations are considered internal to the JPEG library; most ++ * applications using the library shouldn't need to include this file. ++ */ ++ ++#if JPEG_LIB_VERSION >= 70 ++#define _DCT_scaled_size DCT_h_scaled_size ++#define _DCT_h_scaled_size DCT_h_scaled_size ++#define _DCT_v_scaled_size DCT_v_scaled_size ++#define _min_DCT_scaled_size min_DCT_h_scaled_size ++#define _min_DCT_h_scaled_size min_DCT_h_scaled_size ++#define _min_DCT_v_scaled_size min_DCT_v_scaled_size ++#define _jpeg_width jpeg_width ++#define _jpeg_height jpeg_height ++#else ++#define _DCT_scaled_size DCT_scaled_size ++#define _DCT_h_scaled_size DCT_scaled_size ++#define _DCT_v_scaled_size DCT_scaled_size ++#define _min_DCT_scaled_size min_DCT_scaled_size ++#define _min_DCT_h_scaled_size min_DCT_scaled_size ++#define _min_DCT_v_scaled_size min_DCT_scaled_size ++#define _jpeg_width image_width ++#define _jpeg_height image_height ++#endif +Index: fbida-2.10/jpeg/62/transupp.c +=================================================================== +--- fbida-2.10.orig/jpeg/62/transupp.c ++++ fbida-2.10/jpeg/62/transupp.c +@@ -1,8 +1,10 @@ + /* + * transupp.c + * +- * Copyright (C) 1997, Thomas G. Lane. +- * This file is part of the Independent JPEG Group's software. ++ * This file was part of the Independent JPEG Group's software: ++ * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding. ++ * libjpeg-turbo Modifications: ++ * Copyright (C) 2010, D. R. Commander. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains image transformation routines and other utility code +@@ -20,6 +22,17 @@ + #include "jinclude.h" + #include "jpeglib.h" + #include "transupp.h" /* My own external interface */ ++#include "jpegcomp.h" ++#include /* to declare isdigit() */ ++ ++ ++#if JPEG_LIB_VERSION >= 70 ++#define dstinfo_min_DCT_h_scaled_size dstinfo->min_DCT_h_scaled_size ++#define dstinfo_min_DCT_v_scaled_size dstinfo->min_DCT_v_scaled_size ++#else ++#define dstinfo_min_DCT_h_scaled_size DCTSIZE ++#define dstinfo_min_DCT_v_scaled_size DCTSIZE ++#endif + + + #if TRANSFORMS_SUPPORTED +@@ -28,7 +41,8 @@ + * Lossless image transformation routines. These routines work on DCT + * coefficient arrays and thus do not require any lossy decompression + * or recompression of the image. +- * Thanks to Guido Vollbeding for the initial design and code of this feature. ++ * Thanks to Guido Vollbeding for the initial design and code of this feature, ++ * and to Ben Jackson for introducing the cropping feature. + * + * Horizontal flipping is done in-place, using a single top-to-bottom + * pass through the virtual source array. It will thus be much the +@@ -42,6 +56,13 @@ + * arrays for most of the transforms. That could result in much thrashing + * if the image is larger than main memory. + * ++ * If cropping or trimming is involved, the destination arrays may be smaller ++ * than the source arrays. Note it is not possible to do horizontal flip ++ * in-place when a nonzero Y crop offset is specified, since we'd have to move ++ * data from one block row to another but the virtual array manager doesn't ++ * guarantee we can touch more than one row at a time. So in that case, ++ * we have to use a separate destination array. ++ * + * Some notes about the operating environment of the individual transform + * routines: + * 1. Both the source and destination virtual arrays are allocated from the +@@ -54,20 +75,65 @@ + * and we may as well take that as the effective iMCU size. + * 4. When "trim" is in effect, the destination's dimensions will be the + * trimmed values but the source's will be untrimmed. +- * 5. All the routines assume that the source and destination buffers are ++ * 5. When "crop" is in effect, the destination's dimensions will be the ++ * cropped values but the source's will be uncropped. Each transform ++ * routine is responsible for picking up source data starting at the ++ * correct X and Y offset for the crop region. (The X and Y offsets ++ * passed to the transform routines are measured in iMCU blocks of the ++ * destination.) ++ * 6. All the routines assume that the source and destination buffers are + * padded out to a full iMCU boundary. This is true, although for the + * source buffer it is an undocumented property of jdcoefct.c. +- * Notes 2,3,4 boil down to this: generally we should use the destination's +- * dimensions and ignore the source's. + */ + + + LOCAL(void) +-do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, +- jvirt_barray_ptr *src_coef_arrays) +-/* Horizontal flip; done in-place, so no separate dest array is required */ ++do_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, ++ jvirt_barray_ptr *src_coef_arrays, ++ jvirt_barray_ptr *dst_coef_arrays) ++/* Crop. This is only used when no rotate/flip is requested with the crop. */ ++{ ++ JDIMENSION dst_blk_y, x_crop_blocks, y_crop_blocks; ++ int ci, offset_y; ++ JBLOCKARRAY src_buffer, dst_buffer; ++ jpeg_component_info *compptr; ++ ++ /* We simply have to copy the right amount of data (the destination's ++ * image size) starting at the given X and Y offsets in the source. ++ */ ++ for (ci = 0; ci < dstinfo->num_components; ci++) { ++ compptr = dstinfo->comp_info + ci; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; ++ for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; ++ dst_blk_y += compptr->v_samp_factor) { ++ dst_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, ++ (JDIMENSION) compptr->v_samp_factor, TRUE); ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_y + y_crop_blocks, ++ (JDIMENSION) compptr->v_samp_factor, FALSE); ++ for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { ++ jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, ++ dst_buffer[offset_y], ++ compptr->width_in_blocks); ++ } ++ } ++ } ++} ++ ++ ++LOCAL(void) ++do_flip_h_no_crop (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, ++ jvirt_barray_ptr *src_coef_arrays) ++/* Horizontal flip; done in-place, so no separate dest array is required. ++ * NB: this only works when y_crop_offset is zero. ++ */ + { +- JDIMENSION MCU_cols, comp_width, blk_x, blk_y; ++ JDIMENSION MCU_cols, comp_width, blk_x, blk_y, x_crop_blocks; + int ci, k, offset_y; + JBLOCKARRAY buffer; + JCOEFPTR ptr1, ptr2; +@@ -79,17 +145,20 @@ do_flip_h (j_decompress_ptr srcinfo, j_c + * mirroring by changing the signs of odd-numbered columns. + * Partial iMCUs at the right edge are left untouched. + */ +- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); ++ MCU_cols = srcinfo->output_width / ++ (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; + for (blk_y = 0; blk_y < compptr->height_in_blocks; + blk_y += compptr->v_samp_factor) { + buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { ++ /* Do the mirroring */ + for (blk_x = 0; blk_x * 2 < comp_width; blk_x++) { + ptr1 = buffer[offset_y][blk_x]; + ptr2 = buffer[offset_y][comp_width - blk_x - 1]; +@@ -105,6 +174,80 @@ do_flip_h (j_decompress_ptr srcinfo, j_c + *ptr2++ = -temp1; + } + } ++ if (x_crop_blocks > 0) { ++ /* Now left-justify the portion of the data to be kept. ++ * We can't use a single jcopy_block_row() call because that routine ++ * depends on memcpy(), whose behavior is unspecified for overlapping ++ * source and destination areas. Sigh. ++ */ ++ for (blk_x = 0; blk_x < compptr->width_in_blocks; blk_x++) { ++ jcopy_block_row(buffer[offset_y] + blk_x + x_crop_blocks, ++ buffer[offset_y] + blk_x, ++ (JDIMENSION) 1); ++ } ++ } ++ } ++ } ++ } ++} ++ ++ ++LOCAL(void) ++do_flip_h (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, ++ jvirt_barray_ptr *src_coef_arrays, ++ jvirt_barray_ptr *dst_coef_arrays) ++/* Horizontal flip in general cropping case */ ++{ ++ JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; ++ int ci, k, offset_y; ++ JBLOCKARRAY src_buffer, dst_buffer; ++ JBLOCKROW src_row_ptr, dst_row_ptr; ++ JCOEFPTR src_ptr, dst_ptr; ++ jpeg_component_info *compptr; ++ ++ /* Here we must output into a separate array because we can't touch ++ * different rows of a single virtual array simultaneously. Otherwise, ++ * this is essentially the same as the routine above. ++ */ ++ MCU_cols = srcinfo->output_width / ++ (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); ++ ++ for (ci = 0; ci < dstinfo->num_components; ci++) { ++ compptr = dstinfo->comp_info + ci; ++ comp_width = MCU_cols * compptr->h_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; ++ for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; ++ dst_blk_y += compptr->v_samp_factor) { ++ dst_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, ++ (JDIMENSION) compptr->v_samp_factor, TRUE); ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_y + y_crop_blocks, ++ (JDIMENSION) compptr->v_samp_factor, FALSE); ++ for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { ++ dst_row_ptr = dst_buffer[offset_y]; ++ src_row_ptr = src_buffer[offset_y]; ++ for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { ++ if (x_crop_blocks + dst_blk_x < comp_width) { ++ /* Do the mirrorable blocks */ ++ dst_ptr = dst_row_ptr[dst_blk_x]; ++ src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; ++ /* this unrolled loop doesn't need to know which row it's on... */ ++ for (k = 0; k < DCTSIZE2; k += 2) { ++ *dst_ptr++ = *src_ptr++; /* copy even column */ ++ *dst_ptr++ = - *src_ptr++; /* copy odd column with sign change */ ++ } ++ } else { ++ /* Copy last partial block(s) verbatim */ ++ jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, ++ dst_row_ptr + dst_blk_x, ++ (JDIMENSION) 1); ++ } ++ } + } + } + } +@@ -113,11 +256,13 @@ do_flip_h (j_decompress_ptr srcinfo, j_c + + LOCAL(void) + do_flip_v (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* Vertical flip */ + { + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; +@@ -131,33 +276,39 @@ do_flip_v (j_decompress_ptr srcinfo, j_c + * of odd-numbered rows. + * Partial iMCUs at the bottom edge are copied verbatim. + */ +- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); ++ MCU_rows = srcinfo->output_height / ++ (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); +- if (dst_blk_y < comp_height) { ++ if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], +- comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, ++ comp_height - y_crop_blocks - dst_blk_y - ++ (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge blocks will be copied verbatim. */ + src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { +- if (dst_blk_y < comp_height) { ++ if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ + dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; ++ src_row_ptr += x_crop_blocks; + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; +@@ -173,7 +324,8 @@ do_flip_v (j_decompress_ptr srcinfo, j_c + } + } else { + /* Just copy row verbatim. */ +- jcopy_block_row(src_buffer[offset_y], dst_buffer[offset_y], ++ jcopy_block_row(src_buffer[offset_y] + x_crop_blocks, ++ dst_buffer[offset_y], + compptr->width_in_blocks); + } + } +@@ -184,11 +336,12 @@ do_flip_v (j_decompress_ptr srcinfo, j_c + + LOCAL(void) + do_transpose (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* Transpose source into destination */ + { +- JDIMENSION dst_blk_x, dst_blk_y; ++ JDIMENSION dst_blk_x, dst_blk_y, x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; +@@ -201,6 +354,8 @@ do_transpose (j_decompress_ptr srcinfo, + */ + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) +@@ -210,11 +365,12 @@ do_transpose (j_decompress_ptr srcinfo, + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { +- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ src_ptr = src_buffer[offset_x][dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -228,6 +384,7 @@ do_transpose (j_decompress_ptr srcinfo, + + LOCAL(void) + do_rot_90 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* 90 degree rotation is equivalent to +@@ -237,6 +394,7 @@ do_rot_90 (j_decompress_ptr srcinfo, j_c + */ + { + JDIMENSION MCU_cols, comp_width, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; +@@ -246,11 +404,14 @@ do_rot_90 (j_decompress_ptr srcinfo, j_c + * at the (output) right edge properly. They just get transposed and + * not mirrored. + */ +- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); ++ MCU_cols = srcinfo->output_height / ++ (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) +@@ -259,15 +420,26 @@ do_rot_90 (j_decompress_ptr srcinfo, j_c + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { +- src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, +- (JDIMENSION) compptr->h_samp_factor, FALSE); ++ if (x_crop_blocks + dst_blk_x < comp_width) { ++ /* Block is within the mirrorable area. */ ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ comp_width - x_crop_blocks - dst_blk_x - ++ (JDIMENSION) compptr->h_samp_factor, ++ (JDIMENSION) compptr->h_samp_factor, FALSE); ++ } else { ++ /* Edge blocks are transposed but not mirrored. */ ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_x + x_crop_blocks, ++ (JDIMENSION) compptr->h_samp_factor, FALSE); ++ } + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { +- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; +- if (dst_blk_x < comp_width) { ++ dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ +- dst_ptr = dst_buffer[offset_y] +- [comp_width - dst_blk_x - offset_x - 1]; ++ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] ++ [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -277,7 +449,8 @@ do_rot_90 (j_decompress_ptr srcinfo, j_c + } + } else { + /* Edge blocks are transposed but not mirrored. */ +- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ src_ptr = src_buffer[offset_x] ++ [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -292,6 +465,7 @@ do_rot_90 (j_decompress_ptr srcinfo, j_c + + LOCAL(void) + do_rot_270 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* 270 degree rotation is equivalent to +@@ -301,6 +475,7 @@ do_rot_270 (j_decompress_ptr srcinfo, j_ + */ + { + JDIMENSION MCU_rows, comp_height, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; +@@ -310,11 +485,14 @@ do_rot_270 (j_decompress_ptr srcinfo, j_ + * at the (output) bottom edge properly. They just get transposed and + * not mirrored. + */ +- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); ++ MCU_rows = srcinfo->output_width / ++ (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_height = MCU_rows * compptr->v_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) +@@ -324,14 +502,15 @@ do_rot_270 (j_decompress_ptr srcinfo, j_ + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { + src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_x + x_crop_blocks, + (JDIMENSION) compptr->h_samp_factor, FALSE); + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { + dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; +- if (dst_blk_y < comp_height) { ++ if (y_crop_blocks + dst_blk_y < comp_height) { + /* Block is within the mirrorable area. */ + src_ptr = src_buffer[offset_x] +- [comp_height - dst_blk_y - offset_y - 1]; ++ [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -341,7 +520,8 @@ do_rot_270 (j_decompress_ptr srcinfo, j_ + } + } else { + /* Edge blocks are transposed but not mirrored. */ +- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; ++ src_ptr = src_buffer[offset_x] ++ [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -356,6 +536,7 @@ do_rot_270 (j_decompress_ptr srcinfo, j_ + + LOCAL(void) + do_rot_180 (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* 180 degree rotation is equivalent to +@@ -365,89 +546,95 @@ do_rot_180 (j_decompress_ptr srcinfo, j_ + */ + { + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JBLOCKROW src_row_ptr, dst_row_ptr; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + +- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); +- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); ++ MCU_cols = srcinfo->output_width / ++ (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); ++ MCU_rows = srcinfo->output_height / ++ (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, dst_coef_arrays[ci], dst_blk_y, + (JDIMENSION) compptr->v_samp_factor, TRUE); +- if (dst_blk_y < comp_height) { ++ if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the vertically mirrorable area. */ + src_buffer = (*srcinfo->mem->access_virt_barray) + ((j_common_ptr) srcinfo, src_coef_arrays[ci], +- comp_height - dst_blk_y - (JDIMENSION) compptr->v_samp_factor, ++ comp_height - y_crop_blocks - dst_blk_y - ++ (JDIMENSION) compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } else { + /* Bottom-edge rows are only mirrored horizontally. */ + src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_y, ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_y + y_crop_blocks, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { +- if (dst_blk_y < comp_height) { ++ dst_row_ptr = dst_buffer[offset_y]; ++ if (y_crop_blocks + dst_blk_y < comp_height) { + /* Row is within the mirrorable area. */ +- dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[compptr->v_samp_factor - offset_y - 1]; +- /* Process the blocks that can be mirrored both ways. */ +- for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { ++ for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { + dst_ptr = dst_row_ptr[dst_blk_x]; +- src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; +- for (i = 0; i < DCTSIZE; i += 2) { +- /* For even row, negate every odd column. */ +- for (j = 0; j < DCTSIZE; j += 2) { +- *dst_ptr++ = *src_ptr++; +- *dst_ptr++ = - *src_ptr++; ++ if (x_crop_blocks + dst_blk_x < comp_width) { ++ /* Process the blocks that can be mirrored both ways. */ ++ src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; ++ for (i = 0; i < DCTSIZE; i += 2) { ++ /* For even row, negate every odd column. */ ++ for (j = 0; j < DCTSIZE; j += 2) { ++ *dst_ptr++ = *src_ptr++; ++ *dst_ptr++ = - *src_ptr++; ++ } ++ /* For odd row, negate every even column. */ ++ for (j = 0; j < DCTSIZE; j += 2) { ++ *dst_ptr++ = - *src_ptr++; ++ *dst_ptr++ = *src_ptr++; ++ } + } +- /* For odd row, negate every even column. */ +- for (j = 0; j < DCTSIZE; j += 2) { +- *dst_ptr++ = - *src_ptr++; +- *dst_ptr++ = *src_ptr++; ++ } else { ++ /* Any remaining right-edge blocks are only mirrored vertically. */ ++ src_ptr = src_row_ptr[x_crop_blocks + dst_blk_x]; ++ for (i = 0; i < DCTSIZE; i += 2) { ++ for (j = 0; j < DCTSIZE; j++) ++ *dst_ptr++ = *src_ptr++; ++ for (j = 0; j < DCTSIZE; j++) ++ *dst_ptr++ = - *src_ptr++; + } + } + } +- /* Any remaining right-edge blocks are only mirrored vertically. */ +- for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { +- dst_ptr = dst_row_ptr[dst_blk_x]; +- src_ptr = src_row_ptr[dst_blk_x]; +- for (i = 0; i < DCTSIZE; i += 2) { +- for (j = 0; j < DCTSIZE; j++) +- *dst_ptr++ = *src_ptr++; +- for (j = 0; j < DCTSIZE; j++) +- *dst_ptr++ = - *src_ptr++; +- } +- } + } else { + /* Remaining rows are just mirrored horizontally. */ +- dst_row_ptr = dst_buffer[offset_y]; + src_row_ptr = src_buffer[offset_y]; +- /* Process the blocks that can be mirrored. */ +- for (dst_blk_x = 0; dst_blk_x < comp_width; dst_blk_x++) { +- dst_ptr = dst_row_ptr[dst_blk_x]; +- src_ptr = src_row_ptr[comp_width - dst_blk_x - 1]; +- for (i = 0; i < DCTSIZE2; i += 2) { +- *dst_ptr++ = *src_ptr++; +- *dst_ptr++ = - *src_ptr++; ++ for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { ++ if (x_crop_blocks + dst_blk_x < comp_width) { ++ /* Process the blocks that can be mirrored. */ ++ dst_ptr = dst_row_ptr[dst_blk_x]; ++ src_ptr = src_row_ptr[comp_width - x_crop_blocks - dst_blk_x - 1]; ++ for (i = 0; i < DCTSIZE2; i += 2) { ++ *dst_ptr++ = *src_ptr++; ++ *dst_ptr++ = - *src_ptr++; ++ } ++ } else { ++ /* Any remaining right-edge blocks are only copied. */ ++ jcopy_block_row(src_row_ptr + dst_blk_x + x_crop_blocks, ++ dst_row_ptr + dst_blk_x, ++ (JDIMENSION) 1); + } + } +- /* Any remaining right-edge blocks are only copied. */ +- for (; dst_blk_x < compptr->width_in_blocks; dst_blk_x++) { +- dst_ptr = dst_row_ptr[dst_blk_x]; +- src_ptr = src_row_ptr[dst_blk_x]; +- for (i = 0; i < DCTSIZE2; i++) +- *dst_ptr++ = *src_ptr++; +- } + } + } + } +@@ -457,6 +644,7 @@ do_rot_180 (j_decompress_ptr srcinfo, j_ + + LOCAL(void) + do_transverse (j_decompress_ptr srcinfo, j_compress_ptr dstinfo, ++ JDIMENSION x_crop_offset, JDIMENSION y_crop_offset, + jvirt_barray_ptr *src_coef_arrays, + jvirt_barray_ptr *dst_coef_arrays) + /* Transverse transpose is equivalent to +@@ -470,18 +658,23 @@ do_transverse (j_decompress_ptr srcinfo, + */ + { + JDIMENSION MCU_cols, MCU_rows, comp_width, comp_height, dst_blk_x, dst_blk_y; ++ JDIMENSION x_crop_blocks, y_crop_blocks; + int ci, i, j, offset_x, offset_y; + JBLOCKARRAY src_buffer, dst_buffer; + JCOEFPTR src_ptr, dst_ptr; + jpeg_component_info *compptr; + +- MCU_cols = dstinfo->image_width / (dstinfo->max_h_samp_factor * DCTSIZE); +- MCU_rows = dstinfo->image_height / (dstinfo->max_v_samp_factor * DCTSIZE); ++ MCU_cols = srcinfo->output_height / ++ (dstinfo->max_h_samp_factor * dstinfo_min_DCT_h_scaled_size); ++ MCU_rows = srcinfo->output_width / ++ (dstinfo->max_v_samp_factor * dstinfo_min_DCT_v_scaled_size); + + for (ci = 0; ci < dstinfo->num_components; ci++) { + compptr = dstinfo->comp_info + ci; + comp_width = MCU_cols * compptr->h_samp_factor; + comp_height = MCU_rows * compptr->v_samp_factor; ++ x_crop_blocks = x_crop_offset * compptr->h_samp_factor; ++ y_crop_blocks = y_crop_offset * compptr->v_samp_factor; + for (dst_blk_y = 0; dst_blk_y < compptr->height_in_blocks; + dst_blk_y += compptr->v_samp_factor) { + dst_buffer = (*srcinfo->mem->access_virt_barray) +@@ -490,17 +683,26 @@ do_transverse (j_decompress_ptr srcinfo, + for (offset_y = 0; offset_y < compptr->v_samp_factor; offset_y++) { + for (dst_blk_x = 0; dst_blk_x < compptr->width_in_blocks; + dst_blk_x += compptr->h_samp_factor) { +- src_buffer = (*srcinfo->mem->access_virt_barray) +- ((j_common_ptr) srcinfo, src_coef_arrays[ci], dst_blk_x, +- (JDIMENSION) compptr->h_samp_factor, FALSE); ++ if (x_crop_blocks + dst_blk_x < comp_width) { ++ /* Block is within the mirrorable area. */ ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ comp_width - x_crop_blocks - dst_blk_x - ++ (JDIMENSION) compptr->h_samp_factor, ++ (JDIMENSION) compptr->h_samp_factor, FALSE); ++ } else { ++ src_buffer = (*srcinfo->mem->access_virt_barray) ++ ((j_common_ptr) srcinfo, src_coef_arrays[ci], ++ dst_blk_x + x_crop_blocks, ++ (JDIMENSION) compptr->h_samp_factor, FALSE); ++ } + for (offset_x = 0; offset_x < compptr->h_samp_factor; offset_x++) { +- if (dst_blk_y < comp_height) { +- src_ptr = src_buffer[offset_x] +- [comp_height - dst_blk_y - offset_y - 1]; +- if (dst_blk_x < comp_width) { ++ dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ if (y_crop_blocks + dst_blk_y < comp_height) { ++ if (x_crop_blocks + dst_blk_x < comp_width) { + /* Block is within the mirrorable area. */ +- dst_ptr = dst_buffer[offset_y] +- [comp_width - dst_blk_x - offset_x - 1]; ++ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] ++ [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -516,7 +718,8 @@ do_transverse (j_decompress_ptr srcinfo, + } + } else { + /* Right-edge blocks are mirrored in y only */ +- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ src_ptr = src_buffer[offset_x] ++ [comp_height - y_crop_blocks - dst_blk_y - offset_y - 1]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) { + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -526,11 +729,10 @@ do_transverse (j_decompress_ptr srcinfo, + } + } + } else { +- src_ptr = src_buffer[offset_x][dst_blk_y + offset_y]; +- if (dst_blk_x < comp_width) { ++ if (x_crop_blocks + dst_blk_x < comp_width) { + /* Bottom-edge blocks are mirrored in x only */ +- dst_ptr = dst_buffer[offset_y] +- [comp_width - dst_blk_x - offset_x - 1]; ++ src_ptr = src_buffer[compptr->h_samp_factor - offset_x - 1] ++ [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) { + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -540,7 +742,8 @@ do_transverse (j_decompress_ptr srcinfo, + } + } else { + /* At lower right corner, just transpose, no mirroring */ +- dst_ptr = dst_buffer[offset_y][dst_blk_x + offset_x]; ++ src_ptr = src_buffer[offset_x] ++ [dst_blk_y + offset_y + y_crop_blocks]; + for (i = 0; i < DCTSIZE; i++) + for (j = 0; j < DCTSIZE; j++) + dst_ptr[j*DCTSIZE+i] = src_ptr[i*DCTSIZE+j]; +@@ -554,83 +757,372 @@ do_transverse (j_decompress_ptr srcinfo, + } + + ++/* Parse an unsigned integer: subroutine for jtransform_parse_crop_spec. ++ * Returns TRUE if valid integer found, FALSE if not. ++ * *strptr is advanced over the digit string, and *result is set to its value. ++ */ ++ ++LOCAL(boolean) ++jt_read_integer (const char ** strptr, JDIMENSION * result) ++{ ++ const char * ptr = *strptr; ++ JDIMENSION val = 0; ++ ++ for (; isdigit(*ptr); ptr++) { ++ val = val * 10 + (JDIMENSION) (*ptr - '0'); ++ } ++ *result = val; ++ if (ptr == *strptr) ++ return FALSE; /* oops, no digits */ ++ *strptr = ptr; ++ return TRUE; ++} ++ ++ ++/* Parse a crop specification (written in X11 geometry style). ++ * The routine returns TRUE if the spec string is valid, FALSE if not. ++ * ++ * The crop spec string should have the format ++ * [f]x[f]{+-}{+-} ++ * where width, height, xoffset, and yoffset are unsigned integers. ++ * Each of the elements can be omitted to indicate a default value. ++ * (A weakness of this style is that it is not possible to omit xoffset ++ * while specifying yoffset, since they look alike.) ++ * ++ * This code is loosely based on XParseGeometry from the X11 distribution. ++ */ ++ ++GLOBAL(boolean) ++jtransform_parse_crop_spec (jpeg_transform_info *info, const char *spec) ++{ ++ info->crop = FALSE; ++ info->crop_width_set = JCROP_UNSET; ++ info->crop_height_set = JCROP_UNSET; ++ info->crop_xoffset_set = JCROP_UNSET; ++ info->crop_yoffset_set = JCROP_UNSET; ++ ++ if (isdigit(*spec)) { ++ /* fetch width */ ++ if (! jt_read_integer(&spec, &info->crop_width)) ++ return FALSE; ++ if (*spec == 'f' || *spec == 'F') { ++ spec++; ++ info->crop_width_set = JCROP_FORCE; ++ } else ++ info->crop_width_set = JCROP_POS; ++ } ++ if (*spec == 'x' || *spec == 'X') { ++ /* fetch height */ ++ spec++; ++ if (! jt_read_integer(&spec, &info->crop_height)) ++ return FALSE; ++ if (*spec == 'f' || *spec == 'F') { ++ spec++; ++ info->crop_height_set = JCROP_FORCE; ++ } else ++ info->crop_height_set = JCROP_POS; ++ } ++ if (*spec == '+' || *spec == '-') { ++ /* fetch xoffset */ ++ info->crop_xoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; ++ spec++; ++ if (! jt_read_integer(&spec, &info->crop_xoffset)) ++ return FALSE; ++ } ++ if (*spec == '+' || *spec == '-') { ++ /* fetch yoffset */ ++ info->crop_yoffset_set = (*spec == '-') ? JCROP_NEG : JCROP_POS; ++ spec++; ++ if (! jt_read_integer(&spec, &info->crop_yoffset)) ++ return FALSE; ++ } ++ /* We had better have gotten to the end of the string. */ ++ if (*spec != '\0') ++ return FALSE; ++ info->crop = TRUE; ++ return TRUE; ++} ++ ++ ++/* Trim off any partial iMCUs on the indicated destination edge */ ++ ++LOCAL(void) ++trim_right_edge (jpeg_transform_info *info, JDIMENSION full_width) ++{ ++ JDIMENSION MCU_cols; ++ ++ MCU_cols = info->output_width / info->iMCU_sample_width; ++ if (MCU_cols > 0 && info->x_crop_offset + MCU_cols == ++ full_width / info->iMCU_sample_width) ++ info->output_width = MCU_cols * info->iMCU_sample_width; ++} ++ ++LOCAL(void) ++trim_bottom_edge (jpeg_transform_info *info, JDIMENSION full_height) ++{ ++ JDIMENSION MCU_rows; ++ ++ MCU_rows = info->output_height / info->iMCU_sample_height; ++ if (MCU_rows > 0 && info->y_crop_offset + MCU_rows == ++ full_height / info->iMCU_sample_height) ++ info->output_height = MCU_rows * info->iMCU_sample_height; ++} ++ ++ + /* Request any required workspace. + * ++ * This routine figures out the size that the output image will be ++ * (which implies that all the transform parameters must be set before ++ * it is called). ++ * + * We allocate the workspace virtual arrays from the source decompression + * object, so that all the arrays (both the original data and the workspace) + * will be taken into account while making memory management decisions. + * Hence, this routine must be called after jpeg_read_header (which reads + * the image dimensions) and before jpeg_read_coefficients (which realizes + * the source's virtual arrays). ++ * ++ * This function returns FALSE right away if -perfect is given ++ * and transformation is not perfect. Otherwise returns TRUE. + */ + +-GLOBAL(void) ++GLOBAL(boolean) + jtransform_request_workspace (j_decompress_ptr srcinfo, + jpeg_transform_info *info) + { +- jvirt_barray_ptr *coef_arrays = NULL; ++ jvirt_barray_ptr *coef_arrays; ++ boolean need_workspace, transpose_it; + jpeg_component_info *compptr; +- int ci; ++ JDIMENSION xoffset, yoffset; ++ JDIMENSION width_in_iMCUs, height_in_iMCUs; ++ JDIMENSION width_in_blocks, height_in_blocks; ++ int ci, h_samp_factor, v_samp_factor; + ++ /* Determine number of components in output image */ + if (info->force_grayscale && + srcinfo->jpeg_color_space == JCS_YCbCr && +- srcinfo->num_components == 3) { ++ srcinfo->num_components == 3) + /* We'll only process the first component */ + info->num_components = 1; +- } else { ++ else + /* Process all the components */ + info->num_components = srcinfo->num_components; ++ ++ /* Compute output image dimensions and related values. */ ++#if JPEG_LIB_VERSION >= 80 ++ jpeg_core_output_dimensions(srcinfo); ++#else ++ srcinfo->output_width = srcinfo->image_width; ++ srcinfo->output_height = srcinfo->image_height; ++#endif ++ ++ /* Return right away if -perfect is given and transformation is not perfect. ++ */ ++ if (info->perfect) { ++ if (info->num_components == 1) { ++ if (!jtransform_perfect_transform(srcinfo->output_width, ++ srcinfo->output_height, ++ srcinfo->_min_DCT_h_scaled_size, ++ srcinfo->_min_DCT_v_scaled_size, ++ info->transform)) ++ return FALSE; ++ } else { ++ if (!jtransform_perfect_transform(srcinfo->output_width, ++ srcinfo->output_height, ++ srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size, ++ srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size, ++ info->transform)) ++ return FALSE; ++ } ++ } ++ ++ /* If there is only one output component, force the iMCU size to be 1; ++ * else use the source iMCU size. (This allows us to do the right thing ++ * when reducing color to grayscale, and also provides a handy way of ++ * cleaning up "funny" grayscale images whose sampling factors are not 1x1.) ++ */ ++ switch (info->transform) { ++ case JXFORM_TRANSPOSE: ++ case JXFORM_TRANSVERSE: ++ case JXFORM_ROT_90: ++ case JXFORM_ROT_270: ++ info->output_width = srcinfo->output_height; ++ info->output_height = srcinfo->output_width; ++ if (info->num_components == 1) { ++ info->iMCU_sample_width = srcinfo->_min_DCT_v_scaled_size; ++ info->iMCU_sample_height = srcinfo->_min_DCT_h_scaled_size; ++ } else { ++ info->iMCU_sample_width = ++ srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size; ++ info->iMCU_sample_height = ++ srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size; ++ } ++ break; ++ default: ++ info->output_width = srcinfo->output_width; ++ info->output_height = srcinfo->output_height; ++ if (info->num_components == 1) { ++ info->iMCU_sample_width = srcinfo->_min_DCT_h_scaled_size; ++ info->iMCU_sample_height = srcinfo->_min_DCT_v_scaled_size; ++ } else { ++ info->iMCU_sample_width = ++ srcinfo->max_h_samp_factor * srcinfo->_min_DCT_h_scaled_size; ++ info->iMCU_sample_height = ++ srcinfo->max_v_samp_factor * srcinfo->_min_DCT_v_scaled_size; ++ } ++ break; + } + ++ /* If cropping has been requested, compute the crop area's position and ++ * dimensions, ensuring that its upper left corner falls at an iMCU boundary. ++ */ ++ if (info->crop) { ++ /* Insert default values for unset crop parameters */ ++ if (info->crop_xoffset_set == JCROP_UNSET) ++ info->crop_xoffset = 0; /* default to +0 */ ++ if (info->crop_yoffset_set == JCROP_UNSET) ++ info->crop_yoffset = 0; /* default to +0 */ ++ if (info->crop_xoffset >= info->output_width || ++ info->crop_yoffset >= info->output_height) ++ ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); ++ if (info->crop_width_set == JCROP_UNSET) ++ info->crop_width = info->output_width - info->crop_xoffset; ++ if (info->crop_height_set == JCROP_UNSET) ++ info->crop_height = info->output_height - info->crop_yoffset; ++ /* Ensure parameters are valid */ ++ if (info->crop_width <= 0 || info->crop_width > info->output_width || ++ info->crop_height <= 0 || info->crop_height > info->output_height || ++ info->crop_xoffset > info->output_width - info->crop_width || ++ info->crop_yoffset > info->output_height - info->crop_height) ++ ERREXIT(srcinfo, JERR_BAD_CROP_SPEC); ++ /* Convert negative crop offsets into regular offsets */ ++ if (info->crop_xoffset_set == JCROP_NEG) ++ xoffset = info->output_width - info->crop_width - info->crop_xoffset; ++ else ++ xoffset = info->crop_xoffset; ++ if (info->crop_yoffset_set == JCROP_NEG) ++ yoffset = info->output_height - info->crop_height - info->crop_yoffset; ++ else ++ yoffset = info->crop_yoffset; ++ /* Now adjust so that upper left corner falls at an iMCU boundary */ ++ if (info->crop_width_set == JCROP_FORCE) ++ info->output_width = info->crop_width; ++ else ++ info->output_width = ++ info->crop_width + (xoffset % info->iMCU_sample_width); ++ if (info->crop_height_set == JCROP_FORCE) ++ info->output_height = info->crop_height; ++ else ++ info->output_height = ++ info->crop_height + (yoffset % info->iMCU_sample_height); ++ /* Save x/y offsets measured in iMCUs */ ++ info->x_crop_offset = xoffset / info->iMCU_sample_width; ++ info->y_crop_offset = yoffset / info->iMCU_sample_height; ++ } else { ++ info->x_crop_offset = 0; ++ info->y_crop_offset = 0; ++ } ++ ++ /* Figure out whether we need workspace arrays, ++ * and if so whether they are transposed relative to the source. ++ */ ++ need_workspace = FALSE; ++ transpose_it = FALSE; + switch (info->transform) { + case JXFORM_NONE: ++ if (info->x_crop_offset != 0 || info->y_crop_offset != 0) ++ need_workspace = TRUE; ++ /* No workspace needed if neither cropping nor transforming */ ++ break; + case JXFORM_FLIP_H: +- /* Don't need a workspace array */ ++ if (info->trim) ++ trim_right_edge(info, srcinfo->output_width); ++ if (info->y_crop_offset != 0 || info->slow_hflip) ++ need_workspace = TRUE; ++ /* do_flip_h_no_crop doesn't need a workspace array */ + break; + case JXFORM_FLIP_V: +- case JXFORM_ROT_180: +- /* Need workspace arrays having same dimensions as source image. +- * Note that we allocate arrays padded out to the next iMCU boundary, +- * so that transform routines need not worry about missing edge blocks. +- */ +- coef_arrays = (jvirt_barray_ptr *) +- (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, +- SIZEOF(jvirt_barray_ptr) * info->num_components); +- for (ci = 0; ci < info->num_components; ci++) { +- compptr = srcinfo->comp_info + ci; +- coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) +- ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, +- (JDIMENSION) jround_up((long) compptr->width_in_blocks, +- (long) compptr->h_samp_factor), +- (JDIMENSION) jround_up((long) compptr->height_in_blocks, +- (long) compptr->v_samp_factor), +- (JDIMENSION) compptr->v_samp_factor); +- } ++ if (info->trim) ++ trim_bottom_edge(info, srcinfo->output_height); ++ /* Need workspace arrays having same dimensions as source image. */ ++ need_workspace = TRUE; + break; + case JXFORM_TRANSPOSE: ++ /* transpose does NOT have to trim anything */ ++ /* Need workspace arrays having transposed dimensions. */ ++ need_workspace = TRUE; ++ transpose_it = TRUE; ++ break; + case JXFORM_TRANSVERSE: ++ if (info->trim) { ++ trim_right_edge(info, srcinfo->output_height); ++ trim_bottom_edge(info, srcinfo->output_width); ++ } ++ /* Need workspace arrays having transposed dimensions. */ ++ need_workspace = TRUE; ++ transpose_it = TRUE; ++ break; + case JXFORM_ROT_90: ++ if (info->trim) ++ trim_right_edge(info, srcinfo->output_height); ++ /* Need workspace arrays having transposed dimensions. */ ++ need_workspace = TRUE; ++ transpose_it = TRUE; ++ break; ++ case JXFORM_ROT_180: ++ if (info->trim) { ++ trim_right_edge(info, srcinfo->output_width); ++ trim_bottom_edge(info, srcinfo->output_height); ++ } ++ /* Need workspace arrays having same dimensions as source image. */ ++ need_workspace = TRUE; ++ break; + case JXFORM_ROT_270: +- /* Need workspace arrays having transposed dimensions. +- * Note that we allocate arrays padded out to the next iMCU boundary, +- * so that transform routines need not worry about missing edge blocks. +- */ ++ if (info->trim) ++ trim_bottom_edge(info, srcinfo->output_width); ++ /* Need workspace arrays having transposed dimensions. */ ++ need_workspace = TRUE; ++ transpose_it = TRUE; ++ break; ++ } ++ ++ /* Allocate workspace if needed. ++ * Note that we allocate arrays padded out to the next iMCU boundary, ++ * so that transform routines need not worry about missing edge blocks. ++ */ ++ if (need_workspace) { + coef_arrays = (jvirt_barray_ptr *) + (*srcinfo->mem->alloc_small) ((j_common_ptr) srcinfo, JPOOL_IMAGE, +- SIZEOF(jvirt_barray_ptr) * info->num_components); ++ SIZEOF(jvirt_barray_ptr) * info->num_components); ++ width_in_iMCUs = (JDIMENSION) ++ jdiv_round_up((long) info->output_width, ++ (long) info->iMCU_sample_width); ++ height_in_iMCUs = (JDIMENSION) ++ jdiv_round_up((long) info->output_height, ++ (long) info->iMCU_sample_height); + for (ci = 0; ci < info->num_components; ci++) { + compptr = srcinfo->comp_info + ci; ++ if (info->num_components == 1) { ++ /* we're going to force samp factors to 1x1 in this case */ ++ h_samp_factor = v_samp_factor = 1; ++ } else if (transpose_it) { ++ h_samp_factor = compptr->v_samp_factor; ++ v_samp_factor = compptr->h_samp_factor; ++ } else { ++ h_samp_factor = compptr->h_samp_factor; ++ v_samp_factor = compptr->v_samp_factor; ++ } ++ width_in_blocks = width_in_iMCUs * h_samp_factor; ++ height_in_blocks = height_in_iMCUs * v_samp_factor; + coef_arrays[ci] = (*srcinfo->mem->request_virt_barray) + ((j_common_ptr) srcinfo, JPOOL_IMAGE, FALSE, +- (JDIMENSION) jround_up((long) compptr->height_in_blocks, +- (long) compptr->v_samp_factor), +- (JDIMENSION) jround_up((long) compptr->width_in_blocks, +- (long) compptr->h_samp_factor), +- (JDIMENSION) compptr->h_samp_factor); ++ width_in_blocks, height_in_blocks, (JDIMENSION) v_samp_factor); + } +- break; +- } +- info->workspace_coef_arrays = coef_arrays; ++ info->workspace_coef_arrays = coef_arrays; ++ } else ++ info->workspace_coef_arrays = NULL; ++ ++ return TRUE; + } + + +@@ -642,13 +1134,18 @@ transpose_critical_parameters (j_compres + int tblno, i, j, ci, itemp; + jpeg_component_info *compptr; + JQUANT_TBL *qtblptr; +- JDIMENSION dtemp; ++ JDIMENSION jtemp; + UINT16 qtemp; + +- /* Transpose basic image dimensions */ +- dtemp = dstinfo->image_width; ++ /* Transpose image dimensions */ ++ jtemp = dstinfo->image_width; + dstinfo->image_width = dstinfo->image_height; +- dstinfo->image_height = dtemp; ++ dstinfo->image_height = jtemp; ++#if JPEG_LIB_VERSION >= 70 ++ itemp = dstinfo->min_DCT_h_scaled_size; ++ dstinfo->min_DCT_h_scaled_size = dstinfo->min_DCT_v_scaled_size; ++ dstinfo->min_DCT_v_scaled_size = itemp; ++#endif + + /* Transpose sampling factors */ + for (ci = 0; ci < dstinfo->num_components; ci++) { +@@ -674,47 +1171,162 @@ transpose_critical_parameters (j_compres + } + + +-/* Trim off any partial iMCUs on the indicated destination edge */ ++/* Adjust Exif image parameters. ++ * ++ * We try to adjust the Tags ExifImageWidth and ExifImageHeight if possible. ++ */ + ++#if JPEG_LIB_VERSION >= 70 + LOCAL(void) +-trim_right_edge (j_compress_ptr dstinfo) ++adjust_exif_parameters (JOCTET FAR * data, unsigned int length, ++ JDIMENSION new_width, JDIMENSION new_height) + { +- int ci, max_h_samp_factor; +- JDIMENSION MCU_cols; ++ boolean is_motorola; /* Flag for byte order */ ++ unsigned int number_of_tags, tagnum; ++ unsigned int firstoffset, offset; ++ JDIMENSION new_value; ++ ++ if (length < 12) return; /* Length of an IFD entry */ ++ ++ /* Discover byte order */ ++ if (GETJOCTET(data[0]) == 0x49 && GETJOCTET(data[1]) == 0x49) ++ is_motorola = FALSE; ++ else if (GETJOCTET(data[0]) == 0x4D && GETJOCTET(data[1]) == 0x4D) ++ is_motorola = TRUE; ++ else ++ return; ++ ++ /* Check Tag Mark */ ++ if (is_motorola) { ++ if (GETJOCTET(data[2]) != 0) return; ++ if (GETJOCTET(data[3]) != 0x2A) return; ++ } else { ++ if (GETJOCTET(data[3]) != 0) return; ++ if (GETJOCTET(data[2]) != 0x2A) return; ++ } + +- /* We have to compute max_h_samp_factor ourselves, +- * because it hasn't been set yet in the destination +- * (and we don't want to use the source's value). +- */ +- max_h_samp_factor = 1; +- for (ci = 0; ci < dstinfo->num_components; ci++) { +- int h_samp_factor = dstinfo->comp_info[ci].h_samp_factor; +- max_h_samp_factor = MAX(max_h_samp_factor, h_samp_factor); ++ /* Get first IFD offset (offset to IFD0) */ ++ if (is_motorola) { ++ if (GETJOCTET(data[4]) != 0) return; ++ if (GETJOCTET(data[5]) != 0) return; ++ firstoffset = GETJOCTET(data[6]); ++ firstoffset <<= 8; ++ firstoffset += GETJOCTET(data[7]); ++ } else { ++ if (GETJOCTET(data[7]) != 0) return; ++ if (GETJOCTET(data[6]) != 0) return; ++ firstoffset = GETJOCTET(data[5]); ++ firstoffset <<= 8; ++ firstoffset += GETJOCTET(data[4]); + } +- MCU_cols = dstinfo->image_width / (max_h_samp_factor * DCTSIZE); +- if (MCU_cols > 0) /* can't trim to 0 pixels */ +- dstinfo->image_width = MCU_cols * (max_h_samp_factor * DCTSIZE); +-} ++ if (firstoffset > length - 2) return; /* check end of data segment */ + +-LOCAL(void) +-trim_bottom_edge (j_compress_ptr dstinfo) +-{ +- int ci, max_v_samp_factor; +- JDIMENSION MCU_rows; ++ /* Get the number of directory entries contained in this IFD */ ++ if (is_motorola) { ++ number_of_tags = GETJOCTET(data[firstoffset]); ++ number_of_tags <<= 8; ++ number_of_tags += GETJOCTET(data[firstoffset+1]); ++ } else { ++ number_of_tags = GETJOCTET(data[firstoffset+1]); ++ number_of_tags <<= 8; ++ number_of_tags += GETJOCTET(data[firstoffset]); ++ } ++ if (number_of_tags == 0) return; ++ firstoffset += 2; + +- /* We have to compute max_v_samp_factor ourselves, +- * because it hasn't been set yet in the destination +- * (and we don't want to use the source's value). +- */ +- max_v_samp_factor = 1; +- for (ci = 0; ci < dstinfo->num_components; ci++) { +- int v_samp_factor = dstinfo->comp_info[ci].v_samp_factor; +- max_v_samp_factor = MAX(max_v_samp_factor, v_samp_factor); ++ /* Search for ExifSubIFD offset Tag in IFD0 */ ++ for (;;) { ++ if (firstoffset > length - 12) return; /* check end of data segment */ ++ /* Get Tag number */ ++ if (is_motorola) { ++ tagnum = GETJOCTET(data[firstoffset]); ++ tagnum <<= 8; ++ tagnum += GETJOCTET(data[firstoffset+1]); ++ } else { ++ tagnum = GETJOCTET(data[firstoffset+1]); ++ tagnum <<= 8; ++ tagnum += GETJOCTET(data[firstoffset]); ++ } ++ if (tagnum == 0x8769) break; /* found ExifSubIFD offset Tag */ ++ if (--number_of_tags == 0) return; ++ firstoffset += 12; ++ } ++ ++ /* Get the ExifSubIFD offset */ ++ if (is_motorola) { ++ if (GETJOCTET(data[firstoffset+8]) != 0) return; ++ if (GETJOCTET(data[firstoffset+9]) != 0) return; ++ offset = GETJOCTET(data[firstoffset+10]); ++ offset <<= 8; ++ offset += GETJOCTET(data[firstoffset+11]); ++ } else { ++ if (GETJOCTET(data[firstoffset+11]) != 0) return; ++ if (GETJOCTET(data[firstoffset+10]) != 0) return; ++ offset = GETJOCTET(data[firstoffset+9]); ++ offset <<= 8; ++ offset += GETJOCTET(data[firstoffset+8]); ++ } ++ if (offset > length - 2) return; /* check end of data segment */ ++ ++ /* Get the number of directory entries contained in this SubIFD */ ++ if (is_motorola) { ++ number_of_tags = GETJOCTET(data[offset]); ++ number_of_tags <<= 8; ++ number_of_tags += GETJOCTET(data[offset+1]); ++ } else { ++ number_of_tags = GETJOCTET(data[offset+1]); ++ number_of_tags <<= 8; ++ number_of_tags += GETJOCTET(data[offset]); + } +- MCU_rows = dstinfo->image_height / (max_v_samp_factor * DCTSIZE); +- if (MCU_rows > 0) /* can't trim to 0 pixels */ +- dstinfo->image_height = MCU_rows * (max_v_samp_factor * DCTSIZE); ++ if (number_of_tags < 2) return; ++ offset += 2; ++ ++ /* Search for ExifImageWidth and ExifImageHeight Tags in this SubIFD */ ++ do { ++ if (offset > length - 12) return; /* check end of data segment */ ++ /* Get Tag number */ ++ if (is_motorola) { ++ tagnum = GETJOCTET(data[offset]); ++ tagnum <<= 8; ++ tagnum += GETJOCTET(data[offset+1]); ++ } else { ++ tagnum = GETJOCTET(data[offset+1]); ++ tagnum <<= 8; ++ tagnum += GETJOCTET(data[offset]); ++ } ++ if (tagnum == 0xA002 || tagnum == 0xA003) { ++ if (tagnum == 0xA002) ++ new_value = new_width; /* ExifImageWidth Tag */ ++ else ++ new_value = new_height; /* ExifImageHeight Tag */ ++ if (is_motorola) { ++ data[offset+2] = 0; /* Format = unsigned long (4 octets) */ ++ data[offset+3] = 4; ++ data[offset+4] = 0; /* Number Of Components = 1 */ ++ data[offset+5] = 0; ++ data[offset+6] = 0; ++ data[offset+7] = 1; ++ data[offset+8] = 0; ++ data[offset+9] = 0; ++ data[offset+10] = (JOCTET)((new_value >> 8) & 0xFF); ++ data[offset+11] = (JOCTET)(new_value & 0xFF); ++ } else { ++ data[offset+2] = 4; /* Format = unsigned long (4 octets) */ ++ data[offset+3] = 0; ++ data[offset+4] = 1; /* Number Of Components = 1 */ ++ data[offset+5] = 0; ++ data[offset+6] = 0; ++ data[offset+7] = 0; ++ data[offset+8] = (JOCTET)(new_value & 0xFF); ++ data[offset+9] = (JOCTET)((new_value >> 8) & 0xFF); ++ data[offset+10] = 0; ++ data[offset+11] = 0; ++ } ++ } ++ offset += 12; ++ } while (--number_of_tags); + } ++#endif + + + /* Adjust output image parameters as needed. +@@ -736,18 +1348,22 @@ jtransform_adjust_parameters (j_decompre + { + /* If force-to-grayscale is requested, adjust destination parameters */ + if (info->force_grayscale) { +- /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed +- * properly. Among other things, the target h_samp_factor & v_samp_factor +- * will get set to 1, which typically won't match the source. +- * In fact we do this even if the source is already grayscale; that +- * provides an easy way of coercing a grayscale JPEG with funny sampling +- * factors to the customary 1,1. (Some decoders fail on other factors.) ++ /* First, ensure we have YCbCr or grayscale data, and that the source's ++ * Y channel is full resolution. (No reasonable person would make Y ++ * be less than full resolution, so actually coping with that case ++ * isn't worth extra code space. But we check it to avoid crashing.) + */ +- if ((dstinfo->jpeg_color_space == JCS_YCbCr && +- dstinfo->num_components == 3) || +- (dstinfo->jpeg_color_space == JCS_GRAYSCALE && +- dstinfo->num_components == 1)) { +- /* We have to preserve the source's quantization table number. */ ++ if (((dstinfo->jpeg_color_space == JCS_YCbCr && ++ dstinfo->num_components == 3) || ++ (dstinfo->jpeg_color_space == JCS_GRAYSCALE && ++ dstinfo->num_components == 1)) && ++ srcinfo->comp_info[0].h_samp_factor == srcinfo->max_h_samp_factor && ++ srcinfo->comp_info[0].v_samp_factor == srcinfo->max_v_samp_factor) { ++ /* We use jpeg_set_colorspace to make sure subsidiary settings get fixed ++ * properly. Among other things, it sets the target h_samp_factor & ++ * v_samp_factor to 1, which typically won't match the source. ++ * We have to preserve the source's quantization table number, however. ++ */ + int sv_quant_tbl_no = dstinfo->comp_info[0].quant_tbl_no; + jpeg_set_colorspace(dstinfo, JCS_GRAYSCALE); + dstinfo->comp_info[0].quant_tbl_no = sv_quant_tbl_no; +@@ -755,50 +1371,66 @@ jtransform_adjust_parameters (j_decompre + /* Sorry, can't do it */ + ERREXIT(dstinfo, JERR_CONVERSION_NOTIMPL); + } ++ } else if (info->num_components == 1) { ++ /* For a single-component source, we force the destination sampling factors ++ * to 1x1, with or without force_grayscale. This is useful because some ++ * decoders choke on grayscale images with other sampling factors. ++ */ ++ dstinfo->comp_info[0].h_samp_factor = 1; ++ dstinfo->comp_info[0].v_samp_factor = 1; + } + +- /* Correct the destination's image dimensions etc if necessary */ ++ /* Correct the destination's image dimensions as necessary ++ * for rotate/flip, resize, and crop operations. ++ */ ++#if JPEG_LIB_VERSION >= 70 ++ dstinfo->jpeg_width = info->output_width; ++ dstinfo->jpeg_height = info->output_height; ++#endif ++ ++ /* Transpose destination image parameters */ + switch (info->transform) { +- case JXFORM_NONE: +- /* Nothing to do */ +- break; +- case JXFORM_FLIP_H: +- if (info->trim) +- trim_right_edge(dstinfo); +- break; +- case JXFORM_FLIP_V: +- if (info->trim) +- trim_bottom_edge(dstinfo); +- break; + case JXFORM_TRANSPOSE: +- transpose_critical_parameters(dstinfo); +- /* transpose does NOT have to trim anything */ +- break; + case JXFORM_TRANSVERSE: +- transpose_critical_parameters(dstinfo); +- if (info->trim) { +- trim_right_edge(dstinfo); +- trim_bottom_edge(dstinfo); +- } +- break; + case JXFORM_ROT_90: +- transpose_critical_parameters(dstinfo); +- if (info->trim) +- trim_right_edge(dstinfo); +- break; +- case JXFORM_ROT_180: +- if (info->trim) { +- trim_right_edge(dstinfo); +- trim_bottom_edge(dstinfo); +- } +- break; + case JXFORM_ROT_270: ++#if JPEG_LIB_VERSION < 70 ++ dstinfo->image_width = info->output_height; ++ dstinfo->image_height = info->output_width; ++#endif + transpose_critical_parameters(dstinfo); +- if (info->trim) +- trim_bottom_edge(dstinfo); ++ break; ++ default: ++#if JPEG_LIB_VERSION < 70 ++ dstinfo->image_width = info->output_width; ++ dstinfo->image_height = info->output_height; ++#endif + break; + } + ++ /* Adjust Exif properties */ ++ if (srcinfo->marker_list != NULL && ++ srcinfo->marker_list->marker == JPEG_APP0+1 && ++ srcinfo->marker_list->data_length >= 6 && ++ GETJOCTET(srcinfo->marker_list->data[0]) == 0x45 && ++ GETJOCTET(srcinfo->marker_list->data[1]) == 0x78 && ++ GETJOCTET(srcinfo->marker_list->data[2]) == 0x69 && ++ GETJOCTET(srcinfo->marker_list->data[3]) == 0x66 && ++ GETJOCTET(srcinfo->marker_list->data[4]) == 0 && ++ GETJOCTET(srcinfo->marker_list->data[5]) == 0) { ++ /* Suppress output of JFIF marker */ ++ dstinfo->write_JFIF_header = FALSE; ++#if JPEG_LIB_VERSION >= 70 ++ /* Adjust Exif image parameters */ ++ if (dstinfo->jpeg_width != srcinfo->image_width || ++ dstinfo->jpeg_height != srcinfo->image_height) ++ /* Align data segment to start of TIFF structure for parsing */ ++ adjust_exif_parameters(srcinfo->marker_list->data + 6, ++ srcinfo->marker_list->data_length - 6, ++ dstinfo->jpeg_width, dstinfo->jpeg_height); ++#endif ++ } ++ + /* Return the appropriate output data set */ + if (info->workspace_coef_arrays != NULL) + return info->workspace_coef_arrays; +@@ -816,40 +1448,110 @@ jtransform_adjust_parameters (j_decompre + */ + + GLOBAL(void) +-jtransform_execute_transformation (j_decompress_ptr srcinfo, +- j_compress_ptr dstinfo, +- jvirt_barray_ptr *src_coef_arrays, +- jpeg_transform_info *info) ++jtransform_execute_transform (j_decompress_ptr srcinfo, ++ j_compress_ptr dstinfo, ++ jvirt_barray_ptr *src_coef_arrays, ++ jpeg_transform_info *info) + { + jvirt_barray_ptr *dst_coef_arrays = info->workspace_coef_arrays; + ++ /* Note: conditions tested here should match those in switch statement ++ * in jtransform_request_workspace() ++ */ + switch (info->transform) { + case JXFORM_NONE: ++ if (info->x_crop_offset != 0 || info->y_crop_offset != 0) ++ do_crop(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_FLIP_H: +- do_flip_h(srcinfo, dstinfo, src_coef_arrays); ++ if (info->y_crop_offset != 0 || info->slow_hflip) ++ do_flip_h(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); ++ else ++ do_flip_h_no_crop(srcinfo, dstinfo, info->x_crop_offset, ++ src_coef_arrays); + break; + case JXFORM_FLIP_V: +- do_flip_v(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_flip_v(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSPOSE: +- do_transpose(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_transpose(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_TRANSVERSE: +- do_transverse(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_transverse(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_90: +- do_rot_90(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_rot_90(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_180: +- do_rot_180(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_rot_180(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + case JXFORM_ROT_270: +- do_rot_270(srcinfo, dstinfo, src_coef_arrays, dst_coef_arrays); ++ do_rot_270(srcinfo, dstinfo, info->x_crop_offset, info->y_crop_offset, ++ src_coef_arrays, dst_coef_arrays); + break; + } + } + ++/* jtransform_perfect_transform ++ * ++ * Determine whether lossless transformation is perfectly ++ * possible for a specified image and transformation. ++ * ++ * Inputs: ++ * image_width, image_height: source image dimensions. ++ * MCU_width, MCU_height: pixel dimensions of MCU. ++ * transform: transformation identifier. ++ * Parameter sources from initialized jpeg_struct ++ * (after reading source header): ++ * image_width = cinfo.image_width ++ * image_height = cinfo.image_height ++ * MCU_width = cinfo.max_h_samp_factor * cinfo.block_size ++ * MCU_height = cinfo.max_v_samp_factor * cinfo.block_size ++ * Result: ++ * TRUE = perfect transformation possible ++ * FALSE = perfect transformation not possible ++ * (may use custom action then) ++ */ ++ ++GLOBAL(boolean) ++jtransform_perfect_transform(JDIMENSION image_width, JDIMENSION image_height, ++ int MCU_width, int MCU_height, ++ JXFORM_CODE transform) ++{ ++ boolean result = TRUE; /* initialize TRUE */ ++ ++ switch (transform) { ++ case JXFORM_FLIP_H: ++ case JXFORM_ROT_270: ++ if (image_width % (JDIMENSION) MCU_width) ++ result = FALSE; ++ break; ++ case JXFORM_FLIP_V: ++ case JXFORM_ROT_90: ++ if (image_height % (JDIMENSION) MCU_height) ++ result = FALSE; ++ break; ++ case JXFORM_TRANSVERSE: ++ case JXFORM_ROT_180: ++ if (image_width % (JDIMENSION) MCU_width) ++ result = FALSE; ++ if (image_height % (JDIMENSION) MCU_height) ++ result = FALSE; ++ break; ++ default: ++ break; ++ } ++ ++ return result; ++} ++ + #endif /* TRANSFORMS_SUPPORTED */ + + +Index: fbida-2.10/jpeg/62/transupp.h +=================================================================== +--- fbida-2.10.orig/jpeg/62/transupp.h ++++ fbida-2.10/jpeg/62/transupp.h +@@ -1,7 +1,7 @@ + /* + * transupp.h + * +- * Copyright (C) 1997, Thomas G. Lane. ++ * Copyright (C) 1997-2011, Thomas G. Lane, Guido Vollbeding. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * +@@ -22,32 +22,6 @@ + #define TRANSFORMS_SUPPORTED 1 /* 0 disables transform code */ + #endif + +-/* Short forms of external names for systems with brain-damaged linkers. */ +- +-#ifdef NEED_SHORT_EXTERNAL_NAMES +-#define jtransform_request_workspace jTrRequest +-#define jtransform_adjust_parameters jTrAdjust +-#define jtransform_execute_transformation jTrExec +-#define jcopy_markers_setup jCMrkSetup +-#define jcopy_markers_execute jCMrkExec +-#endif /* NEED_SHORT_EXTERNAL_NAMES */ +- +- +-/* +- * Codes for supported types of image transformations. +- */ +- +-typedef enum { +- JXFORM_NONE, /* no transformation */ +- JXFORM_FLIP_H, /* horizontal flip */ +- JXFORM_FLIP_V, /* vertical flip */ +- JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ +- JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ +- JXFORM_ROT_90, /* 90-degree clockwise rotation */ +- JXFORM_ROT_180, /* 180-degree rotation */ +- JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ +-} JXFORM_CODE; +- + /* + * Although rotating and flipping data expressed as DCT coefficients is not + * hard, there is an asymmetry in the JPEG format specification for images +@@ -75,6 +49,25 @@ typedef enum { + * (For example, -rot 270 -trim trims only the bottom edge, but -rot 90 -trim + * followed by -rot 180 -trim trims both edges.) + * ++ * We also offer a lossless-crop option, which discards data outside a given ++ * image region but losslessly preserves what is inside. Like the rotate and ++ * flip transforms, lossless crop is restricted by the JPEG format: the upper ++ * left corner of the selected region must fall on an iMCU boundary. If this ++ * does not hold for the given crop parameters, we silently move the upper left ++ * corner up and/or left to make it so, simultaneously increasing the region ++ * dimensions to keep the lower right crop corner unchanged. (Thus, the ++ * output image covers at least the requested region, but may cover more.) ++ * The adjustment of the region dimensions may be optionally disabled. ++ * ++ * We also provide a lossless-resize option, which is kind of a lossless-crop ++ * operation in the DCT coefficient block domain - it discards higher-order ++ * coefficients and losslessly preserves lower-order coefficients of a ++ * sub-block. ++ * ++ * Rotate/flip transform, resize, and crop can be requested together in a ++ * single invocation. The crop is applied last --- that is, the crop region ++ * is specified in terms of the destination image after transform/resize. ++ * + * We also offer a "force to grayscale" option, which simply discards the + * chrominance channels of a YCbCr image. This is lossless in the sense that + * the luminance channel is preserved exactly. It's not the same kind of +@@ -83,22 +76,100 @@ typedef enum { + * be aware of the option to know how many components to work on. + */ + ++ ++/* Short forms of external names for systems with brain-damaged linkers. */ ++ ++#ifdef NEED_SHORT_EXTERNAL_NAMES ++#define jtransform_parse_crop_spec jTrParCrop ++#define jtransform_request_workspace jTrRequest ++#define jtransform_adjust_parameters jTrAdjust ++#define jtransform_execute_transform jTrExec ++#define jtransform_perfect_transform jTrPerfect ++#define jcopy_markers_setup jCMrkSetup ++#define jcopy_markers_execute jCMrkExec ++#endif /* NEED_SHORT_EXTERNAL_NAMES */ ++ ++ ++/* ++ * Codes for supported types of image transformations. ++ */ ++ ++typedef enum { ++ JXFORM_NONE, /* no transformation */ ++ JXFORM_FLIP_H, /* horizontal flip */ ++ JXFORM_FLIP_V, /* vertical flip */ ++ JXFORM_TRANSPOSE, /* transpose across UL-to-LR axis */ ++ JXFORM_TRANSVERSE, /* transpose across UR-to-LL axis */ ++ JXFORM_ROT_90, /* 90-degree clockwise rotation */ ++ JXFORM_ROT_180, /* 180-degree rotation */ ++ JXFORM_ROT_270 /* 270-degree clockwise (or 90 ccw) */ ++} JXFORM_CODE; ++ ++/* ++ * Codes for crop parameters, which can individually be unspecified, ++ * positive or negative for xoffset or yoffset, ++ * positive or forced for width or height. ++ */ ++ ++typedef enum { ++ JCROP_UNSET, ++ JCROP_POS, ++ JCROP_NEG, ++ JCROP_FORCE ++} JCROP_CODE; ++ ++/* ++ * Transform parameters struct. ++ * NB: application must not change any elements of this struct after ++ * calling jtransform_request_workspace. ++ */ ++ + typedef struct { + /* Options: set by caller */ + JXFORM_CODE transform; /* image transform operator */ ++ boolean perfect; /* if TRUE, fail if partial MCUs are requested */ + boolean trim; /* if TRUE, trim partial MCUs as needed */ + boolean force_grayscale; /* if TRUE, convert color image to grayscale */ ++ boolean crop; /* if TRUE, crop source image */ ++ boolean slow_hflip; /* For best performance, the JXFORM_FLIP_H transform ++ normally modifies the source coefficients in place. ++ Setting this to TRUE will instead use a slower, ++ double-buffered algorithm, which leaves the source ++ coefficients in tact (necessary if other transformed ++ images must be generated from the same set of ++ coefficients. */ ++ ++ /* Crop parameters: application need not set these unless crop is TRUE. ++ * These can be filled in by jtransform_parse_crop_spec(). ++ */ ++ JDIMENSION crop_width; /* Width of selected region */ ++ JCROP_CODE crop_width_set; /* (forced disables adjustment) */ ++ JDIMENSION crop_height; /* Height of selected region */ ++ JCROP_CODE crop_height_set; /* (forced disables adjustment) */ ++ JDIMENSION crop_xoffset; /* X offset of selected region */ ++ JCROP_CODE crop_xoffset_set; /* (negative measures from right edge) */ ++ JDIMENSION crop_yoffset; /* Y offset of selected region */ ++ JCROP_CODE crop_yoffset_set; /* (negative measures from bottom edge) */ + + /* Internal workspace: caller should not touch these */ + int num_components; /* # of components in workspace */ + jvirt_barray_ptr * workspace_coef_arrays; /* workspace for transformations */ ++ JDIMENSION output_width; /* cropped destination dimensions */ ++ JDIMENSION output_height; ++ JDIMENSION x_crop_offset; /* destination crop offsets measured in iMCUs */ ++ JDIMENSION y_crop_offset; ++ int iMCU_sample_width; /* destination iMCU size */ ++ int iMCU_sample_height; + } jpeg_transform_info; + + + #if TRANSFORMS_SUPPORTED + ++/* Parse a crop specification (written in X11 geometry style) */ ++EXTERN(boolean) jtransform_parse_crop_spec ++ JPP((jpeg_transform_info *info, const char *spec)); + /* Request any required workspace */ +-EXTERN(void) jtransform_request_workspace ++EXTERN(boolean) jtransform_request_workspace + JPP((j_decompress_ptr srcinfo, jpeg_transform_info *info)); + /* Adjust output image parameters */ + EXTERN(jvirt_barray_ptr *) jtransform_adjust_parameters +@@ -106,10 +177,24 @@ EXTERN(jvirt_barray_ptr *) jtransform_ad + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); + /* Execute the actual transformation, if any */ +-EXTERN(void) jtransform_execute_transformation ++EXTERN(void) jtransform_execute_transform + JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo, + jvirt_barray_ptr *src_coef_arrays, + jpeg_transform_info *info)); ++/* Determine whether lossless transformation is perfectly ++ * possible for a specified image and transformation. ++ */ ++EXTERN(boolean) jtransform_perfect_transform ++ JPP((JDIMENSION image_width, JDIMENSION image_height, ++ int MCU_width, int MCU_height, ++ JXFORM_CODE transform)); ++ ++/* jtransform_execute_transform used to be called ++ * jtransform_execute_transformation, but some compilers complain about ++ * routine names that long. This macro is here to avoid breaking any ++ * old source code that uses the original name... ++ */ ++#define jtransform_execute_transformation jtransform_execute_transform + + #endif /* TRANSFORMS_SUPPORTED */ + diff --git a/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch b/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch new file mode 100644 index 000000000..99639554c --- /dev/null +++ b/meta-oe/recipes-graphics/fbida/files/use-jpeg-turbo.patch @@ -0,0 +1,13 @@ +Index: fbida-2.10/GNUmakefile +=================================================================== +--- fbida-2.10.orig/GNUmakefile ++++ fbida-2.10/GNUmakefile +@@ -51,7 +51,7 @@ HAVE_LIBSANE := $(call ac_lib,sane_init, + HAVE_LIBCURL := $(call ac_lib,curl_easy_init,curl) + HAVE_LIBLIRC := $(call ac_lib,lirc_init,lirc_client) + HAVE_MOTIF := $(call ac_lib,XmStringGenerate,Xm,-L/usr/X11R6/$(LIB) -lXpm -lXt -lXext -lX11) +-JPEG_VER := $(call ac_jpeg_ver) ++JPEG_VER := 62 + endef + + # transposing