From 87f79bfd646238cbaff8ae4d449e3dfdb76e4c0c Mon Sep 17 00:00:00 2001 From: Anssi Hannula Date: Sat, 8 Aug 2009 10:34:27 +0000 Subject: Update perl_convert_version to keep alphabetic tail in version number (Luca Berra). --- NEWS | 3 +++ build.macros.in | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ca344df..c11fc56 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +- update perl_convert_version to keep alphabetic tail in version number + (Luca Berra) + Version 1.93 - 28 July 2009, by Christophe Fergeau - update perl_convert_version macro (Jérôme Quelin) diff --git a/build.macros.in b/build.macros.in index b7a2aeb..009a6c8 100644 --- a/build.macros.in +++ b/build.macros.in @@ -223,7 +223,16 @@ GCONF_CONFIG_SOURCE=`%{_gconftool_bin} --get-default-source` %{_gconftool_bin} - # -%perl_convert_version() %(perl -Mversion -le '$v=version->new("%{1}")->normal; $v=~s/^v//; print $v') +%perl_convert_version() %(perl -Mversion -le ' + $x = "%{1}"; + $y = $x; + $x =~ s/[[:alpha:]]*$//; + $y =~ s/^$x//; + $x =~ s/\D*$//; + $v = version->new($x)->normal; + $v =~ s/^v//; + print "$v$y"; +') # kept for compatibility, but should not be used, especially the ugly perl_archlib! %perl_sitearch %(eval "`perl -V:installsitearch`"; echo $installsitearch) -- cgit v1.2.1