From patchwork Fri Aug 10 14:47:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Christopher McCrory X-Patchwork-Id: 956272 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ESxqZfdB"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41n7JX0qDCz9ryt for ; Sat, 11 Aug 2018 00:47:39 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id CD03C86D8F; Fri, 10 Aug 2018 14:47:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ad16592w0vGd; Fri, 10 Aug 2018 14:47:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 08FEB86CDB; Fri, 10 Aug 2018 14:47:35 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 38EAD1C1011 for ; Fri, 10 Aug 2018 14:47:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 3650787A34 for ; Fri, 10 Aug 2018 14:47:34 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id horxqFwVpBmO for ; Fri, 10 Aug 2018 14:47:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by whitealder.osuosl.org (Postfix) with ESMTPS id 946DA87A33 for ; Fri, 10 Aug 2018 14:47:33 +0000 (UTC) Received: by mail-pg1-f195.google.com with SMTP id x5-v6so4507767pgp.7 for ; Fri, 10 Aug 2018 07:47:33 -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=6g/PEfSKqr11yA6vB4TN0UaTFEI3b1lh9cVAMj/kUY8=; b=ESxqZfdBi7M5MsITunlpl4ieRyVnTjODtomNZTaHm9t1/kfaa9K3YXvn298UhA6Jhj wLOWD4XP/cp3Am6EYAVwF462v5h+6Wt93qzECqW9eh0ChrKVbPZX+bG3wW8XDVh8dUpC Ae8METfnSxh2hYQ7iWDMI/ddAQRSDt72up+wm7bu7xCoBDHu2eTamDpyIlzpUfSj9SAL qZ9m71pjAlEjfVnW3t9/mQvPT/MPrs1nP3kLSr0rgXXq4eJBkH1pis95C2ZojO3lsYvC 73wszUIHCGz0Fi1V15Irrk8x4wRpLwXSihedQydDXDjo9sX5FPsdbCV5Uoo87YWnHtAa 5h+g== 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=6g/PEfSKqr11yA6vB4TN0UaTFEI3b1lh9cVAMj/kUY8=; b=e8tcH987OPlvr7nlrqso3DfmDlR+M7dcmErCvHR+jGvY5zdEFu1+jRqQXrWwaUmfwo mY4Ycq6IhbBHMRnsLvT6WV5k15ertEtJ774IWN+bcakI/MFGQfcK88R1MWb2EZqK/rJW 9zNCkJj0yZ9mhU6OpKQilOxqpsrWxL/U/1rXk2yxXM32ci/GkH8O2K6A9qaWLAwn8bRR uM6W/2dFwRdplRQf8S4P7LbXH/TIGGW/l+h5G8bzTd7F02A6Tdv5JFPzvabd1DuumTiD QMgC8pJ7zEMRllMDzGxJbK8nzIE4xyNweHDJ2hQCylZ7UbZQWTZOUVO8ANBOPPaUJIuG lB0g== X-Gm-Message-State: AOUpUlG9HqH6SoiAPc3d0nVrJ8yd0304Cwu6KgtldznzwudlT6ymoDxK U3ehlNUfq5+tsTij8TmOVp8jgzFT X-Google-Smtp-Source: AA+uWPxBYIee4ZLeoelw91+ndRiCFdmpLJkh/2jnzNlb9/ghpmx6Gb+l6kevmcBLLHLVpqHLg11NoA== X-Received: by 2002:a63:3246:: with SMTP id y67-v6mr6668077pgy.399.1533912452901; Fri, 10 Aug 2018 07:47:32 -0700 (PDT) Received: from localhost.localdomain ([2600:1012:b011:a55d:750d:4ad1:410a:5fdd]) by smtp.gmail.com with ESMTPSA id j5-v6sm10084222pgp.6.2018.08.10.07.47.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Aug 2018 07:47:32 -0700 (PDT) From: Christopher McCrory To: buildroot@buildroot.org Date: Fri, 10 Aug 2018 07:47:24 -0700 Message-Id: <20180810144724.16347-1-chrismcc@gmail.com> X-Mailer: git-send-email 2.14.4 Subject: [Buildroot] [PATCH 2/3] perl: add vendorprefix X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christopher McCrory MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This adds vendorprefix to configure args Signed-off-by: Christopher McCrory Signed-off-by: Christopher McCrory <chrismcc@gmail.com>


What is the rational of this patch ?

Currently, core modules (ie. built directly with the perl distribution) are installed in /usr/lib/perl5/5.xx.y,
others modules (built by the perl-package infrastructure) are installed in /usr/lib/perl5/site-perl/5.xx.y.
Why adding /usr/lib/perl5/vendor-perl/5.xx.y ?

François

Signed-off-by: Christopher McCrory <chrismcc@gmail.com>


What is the rational of this patch ?

Currently, core modules (ie. built directly with the perl distribution) are installed in /usr/lib/perl5/5.xx.y,
others modules (built by the perl-package infrastructure) are installed in /usr/lib/perl5/site-perl/5.xx.y.
Why adding /usr/lib/perl5/vendor-perl/5.xx.y ?


I'm far from a perl expert.  Short answer is so it is there. 

Longer answer, I'm trying to package ZoneMinder for buildroot.  It is a complicated package to say the least.  It is written in C++, configured with cmake, and perl, and php.  It uses the vendor perl directories.  So when it installs, instead of using TARGET_DIR/usr/lib/perl5/site_perl/... it uses  TARGET_DIR/ .  So all the perl bits end up in the top directory, which is sub optimal.  The ZoneMinder authors provide prebuilt binaries for the major distributions because it is very difficult to successfully compile from source.  Cross compiling with buildroot adds even more challenges.  Adding a vendor directory to perl like most other distributions is the easiest solution by far.

That said, if you don't want to add this change, I would understand.



OK, for configuring vendorprefix.

But a target-finalize hook is not the right place to create a directory (see https://buildroot.org/downloads/manual/manual.html#hooks).

You could create the directory usr/lib/perl5/vendor_perl in the INSTALL_TARGET_CMDS of your package ZoneMinder.

François
 

 

François

--- package/perl/perl.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/perl/perl.mk b/package/perl/perl.mk index b0eea3eff4..19a8f95f7b 100644 --- a/package/perl/perl.mk +++ b/package/perl/perl.mk @@ -48,6 +48,7 @@ PERL_CONF_OPTS = \ --target=$(GNU_TARGET_NAME) \ --target-tools-prefix=$(TARGET_CROSS) \ --prefix=/usr \ + --vendorprefix=/usr \ -Dld="$(TARGET_CC)" \ -Dccflags="$(TARGET_CFLAGS)" \ -Dldflags="$(TARGET_LDFLAGS) -lm" \ @@ -92,6 +93,7 @@ endef HOST_PERL_CONF_OPTS = \ -des \ -Dprefix="$(HOST_DIR)" \ + -Dvendorprefix="$(HOST_DIR)" \ -Dcc="$(HOSTCC)" define HOST_PERL_CONFIGURE_CMDS @@ -111,6 +113,7 @@ $(eval $(generic-package)) $(eval $(host-generic-package)) define PERL_FINALIZE_TARGET + mkdir -p $(TARGET_DIR)/usr/lib/perl5/vendor_perl/$(PERL_VERSION)/$(PERL_ARCHNAME) rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/pod rm -rf $(TARGET_DIR)/usr/lib/perl5/$(PERL_VERSION)/$(PERL_ARCHNAME)/CORE find $(TARGET_DIR)/usr/lib/perl5/ -name 'extralibs.ld' -print0 | xargs -0 rm -f