Ticket #50290: Portfile_95.diff
File Portfile_95.diff, 4.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 postgresql95 … … 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}/pg95_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 # remove perl-specific contrib, if no perl variant85 # remove perl-specific contrib, if no perl variant 96 86 if {![variant_isset perl]} { 97 87 file delete -force ${worksrcpath}/contrib/hstore_plperl 98 88 } 99 # remove python-specific contrib, if no python27 variant89 # remove python-specific contrib, if no python27 variant 100 90 if {![variant_isset python27]} { 101 91 file delete -force ${worksrcpath}/contrib/hstore_plpython 102 92 file delete -force ${worksrcpath}/contrib/ltree_plpython … … 110 100 foreach contrib ${contribs} { 111 101 system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}" 112 102 } 103 } 104 } else { 105 post-build { 106 foreach arch ${universal_archs_to_use} { 107 # remove a Linux-specific contrib before continuing 108 file delete -force ${worksrcpath}-${arch}/contrib/sepgsql 109 # remove perl-specific contrib, if no perl variant 110 if {![variant_isset perl]} { 111 file delete -force ${worksrcpath}-${arch}/contrib/hstore_plperl 112 } 113 # remove python-specific contrib, if no python27 variant 114 if {![variant_isset python27]} { 115 file delete -force ${worksrcpath}-${arch}/contrib/hstore_plpython 116 file delete -force ${worksrcpath}-${arch}/contrib/ltree_plpython 117 } 118 set contribdirs [glob -nocomplain -type d ${worksrcpath}-${arch}/contrib/*] 119 foreach d [lsort $contribdirs] { 120 if { [file exists $d/Makefile] } { 121 lappend contribs [file tail $d] 122 } 123 } 124 foreach contrib ${contribs} { 125 system "cd ${worksrcpath}-${arch}/contrib/${contrib}/ && ${build.cmd}" 126 } 127 } 128 } 113 129 } 114 130 115 post-destroot { 131 if { ![variant_isset universal] } { 132 post-destroot { 116 133 foreach contrib ${contribs} { 117 134 system "echo contrib: \"${contrib}\"" 118 135 system "cd ${worksrcpath}/contrib/${contrib}/ && \ 119 136 ${destroot.cmd} install ${destroot.destdir} && touch DONE" 120 137 } 121 system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql95"122 file delete -force ${destroot}${prefix}/share/doc/postgresql \123 ${destroot}${prefix}/share/man124 138 139 # remove architecture flags from global Makefile 125 140 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 126 141 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global 142 } 143 } else { 144 merger-post-destroot { 145 foreach arch ${universal_archs_to_use} { 146 foreach contrib ${contribs} { 147 system "echo contrib: \"${contrib}\"" 148 system "cd ${worksrcpath}-${arch}/contrib/${contrib}/ && \ 149 ${destroot.cmd} install ${destroot.destdir}-${arch} && touch DONE" 150 } 151 152 # remove architecture flags from global Makefile 153 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 154 ${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global 155 156 reinplace "s#${worksrcpath}-${arch}#${worksrcpath}#g" \ 157 ${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global 158 } 159 } 160 } 161 162 post-destroot { 163 system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql95" 164 file delete -force ${destroot}${prefix}/share/doc/postgresql \ 165 ${destroot}${prefix}/share/man 127 166 128 167 reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \ 129 168 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global