Ticket #50290: Portfile_94.diff
File Portfile_94.diff, 3.6 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 9 years ago) |
---|
-
Portfile
old new 4 4 PortSystem 1.0 5 5 PortGroup select 1.0 6 6 PortGroup compiler_blacklist_versions 1.0 7 PortGroup muniversal 1.0 7 8 8 9 #remember to update the -doc and -server as well 9 10 name postgresql94 … … 62 63 compiler.blacklist-append {clang < 421} 63 64 notes "To use the postgresql server, install the ${name}-server port" 64 65 65 if {[variant_isset universal]} {66 configure.cflags-append -DAC_APPLE_UNIVERSAL_BUILD67 post-configure {68 system "cd ${worksrcpath}/src/include \69 && ed - pg_config.h < ${filespath}/pg_config.h.ed \70 && touch stamp-h"71 system "cd ${worksrcpath}/src/interfaces/ecpg/include \72 && ed - ecpg_config.h < ${filespath}/ecpg_config.h.ed \73 && touch stamp-h"74 }75 }76 77 66 build.type gnu 78 67 build.target 79 68 … … 89 78 # prepare the contrib modules 90 79 set contribs {} 91 80 92 post-build { 93 # remove a Linux-specific contrib before continuing 81 if { ![variant_isset universal] } { 82 post-build { 83 # remove a Linux-specific contrib before continuing 94 84 file delete -force ${worksrcpath}/contrib/sepgsql 95 85 set contribdirs [glob -nocomplain -type d ${worksrcpath}/contrib/*] 96 86 foreach d [lsort $contribdirs] { … … 101 91 foreach contrib ${contribs} { 102 92 system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}" 103 93 } 94 } 95 } else { 96 post-build { 97 foreach arch ${universal_archs_to_use} { 98 # remove a Linux-specific contrib before continuing 99 file delete -force ${worksrcpath}-${arch}/contrib/sepgsql 100 set contribdirs [glob -nocomplain -type d ${worksrcpath}-${arch}/contrib/*] 101 foreach d [lsort $contribdirs] { 102 if { [file exists $d/Makefile] } { 103 lappend contribs [file tail $d] 104 } 105 } 106 foreach contrib ${contribs} { 107 system "cd ${worksrcpath}-${arch}/contrib/${contrib}/ && ${build.cmd}" 108 } 109 } 110 } 104 111 } 105 112 106 post-destroot { 113 if { ![variant_isset universal] } { 114 post-destroot { 107 115 foreach contrib ${contribs} { 108 116 system "echo contrib: \"${contrib}\"" 109 117 system "cd ${worksrcpath}/contrib/${contrib}/ && \ 110 118 ${destroot.cmd} install ${destroot.destdir} && touch DONE" 111 119 } 112 system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql94"113 file delete -force ${destroot}${prefix}/share/doc/postgresql \114 ${destroot}${prefix}/share/man115 120 116 121 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 117 122 ${destroot}${prefix}/lib/postgresql94/pgxs/src/Makefile.global 123 } 124 } else { 125 merger-post-destroot { 126 foreach arch ${universal_archs_to_use} { 127 foreach contrib ${contribs} { 128 system "echo contrib: \"${contrib}\"" 129 system "cd ${worksrcpath}-${arch}/contrib/${contrib}/ && \ 130 ${destroot.cmd} install ${destroot.destdir}-${arch} && touch DONE" 131 } 132 133 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 134 ${destroot}-${arch}${prefix}/lib/postgresql94/pgxs/src/Makefile.global 135 136 reinplace "s#${worksrcpath}-${arch}#${worksrcpath}#g" \ 137 ${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global 138 } 139 } 140 } 141 142 post-destroot { 143 system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql94" 144 file delete -force ${destroot}${prefix}/share/doc/postgresql \ 145 ${destroot}${prefix}/share/man 118 146 119 147 reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \ 120 148 ${destroot}${prefix}/lib/postgresql94/pgxs/src/Makefile.global