Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jan 2017 15:06:39 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r431881 - head/Mk/Scripts
Message-ID:  <201701191506.v0JF6dmd083038@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Thu Jan 19 15:06:38 2017
New Revision: 431881
URL: https://svnweb.freebsd.org/changeset/ports/431881

Log:
  Provide a port/perl module mapping utility.
  
  Sometime, Perl ports names do not map to the modules they provide
  easily, and it makes it impossible to check for the existence of those
  modules in Perl core.
  
  Sponsored by:	Absolight

Modified:
  head/Mk/Scripts/qa.sh   (contents, props changed)

Modified: head/Mk/Scripts/qa.sh
==============================================================================
--- head/Mk/Scripts/qa.sh	Thu Jan 19 14:49:51 2017	(r431880)
+++ head/Mk/Scripts/qa.sh	Thu Jan 19 15:06:38 2017	(r431881)
@@ -737,6 +737,20 @@ sonames() {
 	EOT
 }
 
+perlcore_port_module_mapping() {
+	case "$1" in
+		Net)
+			echo "Net::Config"
+			;;
+		libwww)
+			echo "LWP"
+			;;
+		*)
+			echo "$1" | sed -e 's/-/::/g'
+			;;
+	esac
+}
+
 perlcore() {
 	local portname version module gotsome
 	[ -x "${LOCALBASE}/bin/corelist" ] || return 0
@@ -744,7 +758,7 @@ perlcore() {
 		portname=$(expr "${dep}" : ".*/p5-\(.*\)")
 		if [ -n "${portname}" ]; then
 			gotsome=1
-			module=$(echo ${portname}|sed -e 's/-/::/g')
+			module=$(perlcore_port_module_mapping "${portname}")
 			version=$(expr "${dep}" : ".*>=*\([^:<]*\)")
 
 			while read l; do



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701191506.v0JF6dmd083038>