Ticket #24927: highlight-3.4.0.diff
File highlight-3.4.0.diff, 3.2 KB (added by ryandesign (Ryan Carsten Schmidt), 13 years ago) |
---|
-
Portfile
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 16 checksums sha1 c17ab1dfb052fee807c3d48c7577b5d8fc1b5593 \ 17 rmd160 55e6b808e08eb3c160ded9b04f1e16d0e477240e 18 16 19 use_bzip2 yes 17 20 18 configure { 19 reinplace "s|/usr/share/highlight/|${prefix}/share/${name}/|g" \ 20 ${worksrcpath}/highlight/datadir.cpp 21 reinplace "s|/etc/highlight/|${prefix}/etc/highlight/|g" \ 22 ${worksrcpath}/highlight/datadir.cpp 23 } 21 depends_lib port:boost \ 22 port:lua 24 23 24 patchfiles makefiles.patch 25 26 use_configure no 27 28 build.post_args PREFIX=${prefix} 29 25 30 # Avoid stripping the binary (-s flag) during linking as this corrupts the executable. 26 31 # Strip after building 27 32 platform darwin 8 { build.args LDFLAGS="" } 28 33 34 variant perl description {add Perl bindings} { 35 depends_lib-append port:swig-perl 36 37 pre-build { 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 post-destroot { 45 xinstall -m 644 ${worksrcpath}/examples/swig/highlight.dylib \ 46 ${destroot}${prefix}/lib/ 47 set vendor_lib \ 48 [exec perl -MConfig -e print\ \$Config{installvendorlib}] 49 xinstall -m 755 -d ${destroot}${vendor_lib} 50 xinstall -m 644 ${worksrcpath}/examples/swig/highlight.pm \ 51 ${destroot}${vendor_lib} 52 foreach file { highlight.dylib highlight.pm \ 53 highlight_wrap.cpp highlight_wrap.o \ 54 lib-stamp } { 55 file delete ${destroot}${prefix}/share/doc/${name}/examples/swig/${file} 56 } 57 } 58 } 59 29 60 set conf_file "filetypes.conf" 30 61 set old_conf_files { "scriptre.conf" "extensions.conf" } 31 62 destroot { 32 xinstall -m 755 ${worksrcpath}/ highlight/highlight ${destroot}${prefix}/bin63 xinstall -m 755 ${worksrcpath}/src/highlight ${destroot}${prefix}/bin 33 64 34 65 xinstall -m 755 -d ${destroot}${prefix}/etc/${name} 35 66 xinstall -m 644 ${worksrcpath}/${conf_file} \ 36 67 ${destroot}${prefix}/etc/${name}/${conf_file}.sample 37 68 38 69 xinstall -m 755 -d ${destroot}${prefix}/share/${name} 39 foreach dir { "langDefs" "themes" "indentSchemes" "helpmsg"} {70 foreach dir { langDefs themes plugins } { 40 71 file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name} 41 72 system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*" 42 73 } … … 46 77 ${destroot}${prefix}/share/man/man1 47 78 48 79 xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} 49 foreach file { "AUTHORS" "README" "README_DE" "README_INDENT" "ChangeLog" \ 50 "COPYING" "INSTALL" } { 51 xinstall -m 644 ${worksrcpath}/${file} \ 52 ${destroot}${prefix}/share/doc/${name} 53 } 80 xinstall -m 644 -W ${worksrcpath} AUTHORS README README_DE \ 81 README_PLUGINS ChangeLog README_REGEX README_LANGLIST \ 82 COPYING INSTALL ${destroot}${prefix}/share/doc/${name} 54 83 55 84 file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name} 56 85 }