[94288] trunk/dports/textproc/highlight
mww at macports.org
mww at macports.org
Thu Jun 14 01:47:45 PDT 2012
Revision: 94288
https://trac.macports.org/changeset/94288
Author: mww at macports.org
Date: 2012-06-14 01:47:45 -0700 (Thu, 14 Jun 2012)
Log Message:
-----------
highlight: version 3.9 -- #34808
Modified Paths:
--------------
trunk/dports/textproc/highlight/Portfile
Added Paths:
-----------
trunk/dports/textproc/highlight/files/
trunk/dports/textproc/highlight/files/patch-makefile.diff
Modified: trunk/dports/textproc/highlight/Portfile
===================================================================
--- trunk/dports/textproc/highlight/Portfile 2012-06-14 04:01:51 UTC (rev 94287)
+++ trunk/dports/textproc/highlight/Portfile 2012-06-14 08:47:45 UTC (rev 94288)
@@ -3,85 +3,43 @@
PortSystem 1.0
name highlight
-version 2.4.8
+version 3.9
categories textproc devel
platforms darwin
+license GPL-3
maintainers groovie.org:pjenvey
description converts source code to formatted text with syntax highlighting
long_description ${description}
homepage http://www.andre-simon.de
master_sites ${homepage}/zip/
-checksums sha1 091689fde96c9f4e3de75ea1b7c1838e8d25708c
+checksums rmd160 bd48eff6f6bbaff54fec61001e44a9cd2e124437 \
+ sha256 4ae69795e3ca4ffef47355a7b6dc371e2d781735efd44fa12ff3a1ffc990daef
use_bzip2 yes
+depends_build port:boost
+depends_lib port:lua
+
+patchfiles patch-makefile.diff
+
configure {
- reinplace "s|/usr/share/highlight/|${prefix}/share/${name}/|g" \
- ${worksrcpath}/highlight/datadir.cpp
- reinplace "s|/etc/highlight/|${prefix}/etc/highlight/|g" \
- ${worksrcpath}/highlight/datadir.cpp
+ reinplace "s|@prefix@|${prefix}|g" ${worksrcpath}/Makefile
+ reinplace "s|@destroot@|${destroot}|g" ${worksrcpath}/Makefile
}
-# Avoid stripping the binary (-s flag) during linking as this corrupts the executable.
-# Strip after building
-platform darwin 8 { build.args LDFLAGS="" }
+build.args CXX="${configure.cxx}" LDFLAGS="${configure.ldflags}" CXXFLAGS="${configure.cxxflags}"
+build.target cli lib
-set conf_file "filetypes.conf"
-set old_conf_files { "scriptre.conf" "extensions.conf" }
-destroot {
- xinstall -m 755 ${worksrcpath}/highlight/highlight ${destroot}${prefix}/bin
-
- xinstall -m 755 -d ${destroot}${prefix}/etc/${name}
- xinstall -m 644 ${worksrcpath}/${conf_file} \
- ${destroot}${prefix}/etc/${name}/${conf_file}.sample
-
- xinstall -m 755 -d ${destroot}${prefix}/share/${name}
- foreach dir { "langDefs" "themes" "indentSchemes" "helpmsg" } {
- file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name}
- system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*"
- }
-
- xinstall -m 755 -d ${destroot}${prefix}/share/man/man1
- xinstall -m 644 ${worksrcpath}/man/highlight.1.gz \
- ${destroot}${prefix}/share/man/man1
-
- xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
- foreach file { "AUTHORS" "README" "README_DE" "README_INDENT" "ChangeLog" \
- "COPYING" "INSTALL" } {
- xinstall -m 644 ${worksrcpath}/${file} \
- ${destroot}${prefix}/share/doc/${name}
- }
-
- file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
+post-destroot {
+ file rename ${destroot}${prefix}/etc/highlight/filetypes.conf \
+ ${destroot}${prefix}/etc/highlight/filetypes.conf.sample
}
post-activate {
- # copy over the sample conf file if necessary
- if { ![file exists ${prefix}/etc/${name}/${conf_file}] } {
- file copy ${prefix}/etc/${name}/${conf_file}.sample \
- ${prefix}/etc/${name}/${conf_file}
- }
-
- # warn the user of deprecated conf files
- set deprecated_conf_files {}
- foreach file $old_conf_files {
- if { [file exists ${prefix}/etc/${name}/${file}] } {
- file rename ${prefix}/etc/${name}/${file} \
- ${prefix}/etc/${name}/${file}.dport_bak
- lappend deprecated_conf_files ${file}
- }
- }
- if { [llength $deprecated_conf_files] } {
- ui_msg "\nWarning: Old highlight conf files: ${deprecated_conf_files}"
- ui_msg "have been replaced by: ${conf_file}"
- ui_msg "as of highlight-2.4.5."
- ui_msg "\nThe following old conf files have been renamed (and should be"
- ui_msg "removed):\n"
- foreach file $deprecated_conf_files {
- ui_msg "${prefix}/etc/${name}/${file} ->"
- ui_msg "${prefix}/etc/${name}/${file}.dport_bak"
- ui_msg ""
- }
- }
+ # copy over the sample conf file if necessary
+ if { ![file exists ${prefix}/etc/filetypes.conf] } {
+ file copy ${prefix}/etc/filetypes.conf.sample \
+ ${prefix}/etc/filetypes.conf.sample
+ }
}
Added: trunk/dports/textproc/highlight/files/patch-makefile.diff
===================================================================
--- trunk/dports/textproc/highlight/files/patch-makefile.diff (rev 0)
+++ trunk/dports/textproc/highlight/files/patch-makefile.diff 2012-06-14 08:47:45 UTC (rev 94288)
@@ -0,0 +1,24 @@
+--- work/highlight-3.9/makefile 2010-07-28 23:16:48.000000000 +0200
++++ makefile 2012-06-09 10:20:54.000000000 +0200
+@@ -5,10 +5,10 @@
+ # Installation directories:
+
+ # Destination directory for installation (intended for packagers)
+-DESTDIR =
++DESTDIR = @destroot@
+
+ # Root directory for final installation
+-PREFIX = /usr
++PREFIX = @prefix@
+
+ # Location of the highlight data files:
+ data_dir = ${PREFIX}/share/highlight/
+@@ -26,7 +26,7 @@
+ examples_dir = ${doc_dir}examples/
+
+ # Location of the highlight config files:
+-conf_dir = /etc/highlight/
++conf_dir = ${PREFIX}/etc/highlight/
+ #conf_dir = ${PREFIX}/etc/highlight/
+
+ # Location of additional gui files
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120614/c6d6f2ed/attachment.html>
More information about the macports-changes
mailing list