Ticket #24927: highlight-2.4.8-to-3.4.0.patch
File highlight-2.4.8-to-3.4.0.patch, 3.3 KB (added by profjim@…, 13 years ago) |
---|
-
Portfile
old new 3 3 PortSystem 1.0 4 4 5 5 name highlight 6 version 2.4.86 version 3.4 7 7 categories textproc devel 8 8 platforms darwin 9 9 maintainers groovie.org:pjenvey … … 12 12 13 13 homepage http://www.andre-simon.de 14 14 master_sites ${homepage}/zip/ 15 checksums sha1 091689fde96c9f4e3de75ea1b7c1838e8d25708c 15 checksums md5 9f1c39ca3a04c4599a7f3fda9928de47 \ 16 sha1 c17ab1dfb052fee807c3d48c7577b5d8fc1b5593 \ 17 rmd160 55e6b808e08eb3c160ded9b04f1e16d0e477240e 16 18 use_bzip2 yes 19 depends_lib port:boost \ 20 port:lua 21 use_configure no 22 build.post_args "PREFIX='${prefix}'" 23 patchfiles makefiles.patch 17 24 18 configure {19 reinplace "s|/usr/share/highlight/|${prefix}/share/${name}/|g" \20 ${worksrcpath}/highlight/datadir.cpp21 reinplace "s|/etc/highlight/|${prefix}/etc/highlight/|g" \22 ${worksrcpath}/highlight/datadir.cpp23 }24 25 25 26 # Avoid stripping the binary (-s flag) during linking as this corrupts the executable. 26 27 # Strip after building 27 28 platform darwin 8 { build.args LDFLAGS="" } 28 29 30 variant perl description {add Perl bindings} { 31 depends_lib-append port:swig \ 32 port:swig-perl \ 33 bin:perl:perl5 34 } 35 36 pre-build { 37 if {[variant_isset perl]} { 38 system "cd '${worksrcpath}/examples/swig' && \ 39 CPATH='${prefix}/include' LIBRARY_PATH='${prefix}/lib' \ 40 make perl HL_DATA_DIR='${prefix}/share/${name}/' \ 41 HL_CONFIG_DIR='${prefix}/etc/highlight/'" 42 } 43 } 44 45 post-destroot { 46 if {[variant_isset perl]} { 47 xinstall -m 644 ${worksrcpath}/examples/swig/highlight.dylib \ 48 ${destroot}${prefix}/lib/highlight.dylib 49 set vendor_lib \ 50 [exec perl -MConfig -e print\ \$Config{installvendorlib}] 51 xinstall -m 755 -d ${destroot}${vendor_lib} 52 xinstall -m 644 ${worksrcpath}/examples/swig/highlight.pm \ 53 ${destroot}${vendor_lib}/highlight.pm 54 foreach file { "highlight.dylib" "highlight.pm" \ 55 "highlight_wrap.cpp" "highlight_wrap.o" \ 56 "lib-stamp" } { 57 file delete ${destroot}${prefix}/share/doc/${name}/examples/swig/${file} 58 } 59 } 60 } 61 29 62 set conf_file "filetypes.conf" 30 63 set old_conf_files { "scriptre.conf" "extensions.conf" } 31 64 destroot { 32 xinstall -m 755 ${worksrcpath}/ highlight/highlight ${destroot}${prefix}/bin65 xinstall -m 755 ${worksrcpath}/src/highlight ${destroot}${prefix}/bin 33 66 34 67 xinstall -m 755 -d ${destroot}${prefix}/etc/${name} 35 68 xinstall -m 644 ${worksrcpath}/${conf_file} \ 36 69 ${destroot}${prefix}/etc/${name}/${conf_file}.sample 37 70 38 71 xinstall -m 755 -d ${destroot}${prefix}/share/${name} 39 foreach dir { "langDefs" "themes" " indentSchemes" "helpmsg" } {72 foreach dir { "langDefs" "themes" "plugins" } { 40 73 file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name} 41 74 system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*" 42 75 } … … 46 79 ${destroot}${prefix}/share/man/man1 47 80 48 81 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} 49 foreach file { "AUTHORS" "README" "README_DE" "README_ INDENT" "ChangeLog" \50 " COPYING" "INSTALL" } {82 foreach file { "AUTHORS" "README" "README_DE" "README_PLUGINS" "ChangeLog" \ 83 "README_REGEX" "README_LANGLIST" "COPYING" "INSTALL" } { 51 84 xinstall -m 644 ${worksrcpath}/${file} \ 52 85 ${destroot}${prefix}/share/doc/${name} 53 86 }