Ticket #55303: Portfile.diff
File Portfile.diff, 4.3 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 7 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 PortGroup select 1.0 5 5 PortGroup compiler_blacklist_versions 1.0 6 PortGroup muniversal 1.0 6 7 7 8 #remember to update the -doc and -server as well 8 9 name postgresql96 … … 29 30 30 31 use_bzip2 yes 31 32 33 # do not build man or html files (use postgresqlXY-doc instead) 34 patchfiles-append patch-no_doc.diff 35 32 36 depends_lib port:readline path:lib/libssl.dylib:openssl port:zlib port:libxml2 port:libxslt 33 37 depends_build port:bison 34 38 depends_run port:postgresql_select … … 41 45 --libdir=${libdir} \ 42 46 --includedir=${prefix}/include/${name} \ 43 47 --datadir=${prefix}/share/${name} \ 48 --docdir=${prefix}/share/doc/${name} \ 44 49 --mandir=${prefix}/share/man \ 45 50 --with-includes=${prefix}/include \ 46 51 --with-libraries=${prefix}/lib \ … … 63 68 64 69 if {[variant_isset universal]} { 65 70 configure.cflags-append -DAC_APPLE_UNIVERSAL_BUILD 66 post-configure {67 system "cd ${worksrcpath}/src/include \68 && ed - pg_config.h < ${filespath}/pg95_config.h.ed \69 && touch stamp-h"70 system "cd ${worksrcpath}/src/interfaces/ecpg/include \71 && ed - ecpg_config.h < ${filespath}/ecpg_config.h.ed \72 && touch stamp-h"73 }74 71 } 75 72 76 73 build.type gnu 77 build.target 74 build.target world 78 75 79 76 test.run yes 80 77 test.target check 81 78 79 destroot.target install-world 80 82 81 # remember to change livecheck with first proper release 83 82 livecheck.type regex 84 83 #livecheck.regex (9\\.6\[.0-9\]*\[a-z\]+\[0-9\]) 85 84 livecheck.regex (9\\.6\\.\[.0-9\]+) 86 85 livecheck.url ${homepage}/ftp/source/ 87 86 88 # prepare the contrib modules89 set contribs {}90 91 post-build {92 # remove a Linux-specific contrib before continuing93 file delete -force ${worksrcpath}/contrib/sepgsql94 # remove perl-specific contrib, if no perl variant95 if {![variant_isset perl]} {96 file delete -force ${worksrcpath}/contrib/hstore_plperl97 }98 # remove python-specific contrib, if no python27 variant99 if {![variant_isset python27]} {100 file delete -force ${worksrcpath}/contrib/hstore_plpython101 file delete -force ${worksrcpath}/contrib/ltree_plpython102 }103 set contribdirs [glob -nocomplain -type d ${worksrcpath}/contrib/*]104 foreach d [lsort $contribdirs] {105 if { [file exists $d/Makefile] } {106 lappend contribs [file tail $d]107 }108 }109 foreach contrib ${contribs} {110 system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"111 }112 }113 114 87 post-destroot { 115 foreach contrib ${contribs} { 116 system "echo contrib: \"${contrib}\"" 117 system "cd ${worksrcpath}/contrib/${contrib}/ && \ 118 ${destroot.cmd} install ${destroot.destdir} && touch DONE" 119 } 120 system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql96" 121 file delete -force ${destroot}${prefix}/share/doc/postgresql \ 122 ${destroot}${prefix}/share/man 123 124 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 125 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global 88 ln -sf ${libdir}/bin/psql ${destroot}${prefix}/bin/psql96 126 89 127 90 reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \ 128 91 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global … … 131 94 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global 132 95 } 133 96 97 if {![variant_isset universal]} { 98 post-destroot { 99 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 100 ${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global 101 } 102 } else { 103 merger-post-destroot { 104 foreach arch ${configure.universal_archs} { 105 reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \ 106 ${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global 107 108 reinplace -E "s#${worksrcpath}-${arch}#${worksrcpath}#g" \ 109 ${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global 110 } 111 } 112 } 113 134 114 select.group postgresql 135 115 select.file ${filespath}/${name} 136 116