Ticket #14619: patch_universal_Portfile_postgresql83

File patch_universal_Portfile_postgresql83, 1.5 KB (added by Veence (Vincent), 16 years ago)

Patch to Postgresql83 Portfile

Line 
1--- Portfile_postgres83_orig    2008-12-17 11:17:49.000000000 +0100
2+++ /usr/pkg/var/macports/sources/rsync.macports.org/release/ports/databases/postgresql83/Portfile      2008-12-17 11:09:08.000000000 +0100
3@@ -63,6 +63,34 @@
4 
5 set contribs   "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2"
6 
7+pre-build {
8+       if {[variant_isset universal]} {
9+               copy ${portpath}/files/ld.sh ${worksrcpath}/ld.sh
10+               
11+               if {![info exists universal_archs]} {
12+                       set universal_archs {i386 x86_64 ppc ppc64}
13+               }
14+
15+               set out [open "${worksrcpath}/ld.sh" "a"]
16+               foreach arch $universal_archs {
17+               puts ${out} "/usr/bin/ld -r -arch ${arch} -o \${output_name}.${arch} \${newargs}"
18+               }
19+               #
20+               puts -nonewline ${out} "/usr/bin/lipo -create "
21+               foreach arch $universal_archs {
22+               puts -nonewline ${out} "\${output_name}.${arch} "
23+               }
24+               #
25+               puts ${out} "-output \${output_name}"
26+               close ${out}
27+               system "chmod +x ${worksrcpath}/ld.sh"
28+       
29+               system "cd ${worksrcpath}/src && mv Makefile.global Makefile.global.orig && sed 's#LD =.*#LD = ${worksrcpath}/ld.sh#' Makefile.global.orig > Makefile.global"
30+       
31+               system "cd ${worksrcpath} && patch -p0 < ${portpath}/files/patch_pg_config_h"
32+       }
33+}
34+               
35 post-build {
36        foreach contrib ${contribs} {
37                system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
38@@ -95,6 +123,10 @@
39        configure.args-append           --with-perl
40 }
41 
42+variant gcc42 description {compile with gcc42} {
43+       configure.cc    /usr/bin/gcc-4.2
44+}
45+
46 variant universal {
47        configure.cflags ${configure.universal_cflags}
48 }