--On January 3, 2012 9:52:15 PM +0100 Olli Hauer <oha...@freebsd.org> wrote:
Hi,
I'm searching a solution to detect the version of p5-JSON-RPC during
build time.
JSON-RPC-1.01 is *not* backward compatible to 0.96 so I have to apply a
fix to the port only if JSON-RPC > 0.96 is installed.
From http://cpansearch.perl.org/src/DMAKI/JSON-RPC-1.01/Changes
1.00_01 2011 Nov 16
- If you are using old JSON::RPC code (up to 0.96), DO NOT EXPECT
YOUR CODE TO WORK. THIS VERSION IS BACKWARDS *INCOMPATIBLE*
...................................................^^^^^^^^^^^^^^
This returns the installed package:
pkg_info -qa | grep "p5-JSON-RPC" | sort | uniq
so maybe you could do something like?
JSON_VER=`pkg_info -qa | grep "p5-JSON-RPC" | sort | uniq | cut -d'-' -f4`
.if ${JSON_VER} >= 1
do this
.else
do this
.endif
--
Paul Schmehl, Senior Infosec Analyst
As if it wasn't already obvious, my opinions
are my own and not those of my employer.
*******************************************
"It is as useless to argue with those who have
renounced the use of reason as to administer
medication to the dead." Thomas Jefferson
"There are some ideas so wrong that only a very
intelligent person could believe in them." George Orwell
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"