[63626] trunk/dports/sysutils/clamav/Portfile

dluke at macports.org dluke at macports.org
Wed Feb 10 09:07:01 PST 2010


Revision: 63626
          http://trac.macports.org/changeset/63626
Author:   dluke at macports.org
Date:     2010-02-10 09:06:59 -0800 (Wed, 10 Feb 2010)
Log Message:
-----------
clamav - use muniversal port group (fixes #22702)

Modified Paths:
--------------
    trunk/dports/sysutils/clamav/Portfile

Modified: trunk/dports/sysutils/clamav/Portfile
===================================================================
--- trunk/dports/sysutils/clamav/Portfile	2010-02-10 16:54:58 UTC (rev 63625)
+++ trunk/dports/sysutils/clamav/Portfile	2010-02-10 17:06:59 UTC (rev 63626)
@@ -1,6 +1,7 @@
 # $Id$
 
 PortSystem 1.0
+PortGroup muniversal 1.0
 
 name			clamav
 version		 	0.95.3
@@ -28,6 +29,8 @@
 
 depends_lib		port:libiconv port:zlib port:bzip2 port:ncurses
 
+set merger_dont_diff	${prefix}/bin/clamav-config
+
 platform darwin 7 {
 			patchfiles patch-clamdtop.c.diff
 			#workaround gcc bug 28045 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045
@@ -41,6 +44,18 @@
 post-destroot {
 			file rename "${destroot}${prefix}/etc/freshclam.conf" "${destroot}${prefix}/etc/example-freshclam.conf"
 			file rename "${destroot}${prefix}/etc/clamd.conf" "${destroot}${prefix}/etc/example-clamd.conf"
+			
+			#muniversal should allow this to be hooked in some way that's less gross
+			#this code copied from nspr's portfile
+			if {[variant_isset universal]} {
+				copy ${destroot}${prefix}/bin/${build_arch}-clamav-config ${destroot}${prefix}/bin/bak-config
+				foreach file [glob ${destroot}${prefix}/bin/*clamav-config] {
+					delete $file
+					}
+				move ${destroot}${prefix}/bin/bak-config ${destroot}${prefix}/bin/clamav-config
+				reinplace "s|-arch ${build_arch}||g" ${destroot}${prefix}/bin/clamav-config
+				reinplace "s|-L\$\{exec_prefix\}/lib/${build_arch}||g" ${destroot}${prefix}/bin/clamav-config
+				}
 			}
 
 variant clamav_milter description {build with libmilter support} {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100210/49ffd3fb/attachment.html>


More information about the macports-changes mailing list