Opened 14 years ago

Last modified 9 years ago

#24927 new update

highlight: add +perl variant

Reported by: lists@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), g5pw (Aljaž Srebrnič), kurthindenburg (Kurt Hindenburg)
Port: highlight

Description

Update the highlight Portfile to the latest release.

--- Portfile
+++ (clipboard)
@@ -3,7 +3,7 @@
 PortSystem 1.0
 
 name			highlight
-version			2.4.8
+version			2.16
 categories		textproc devel
 platforms		darwin
 maintainers		groovie.org:pjenvey
@@ -12,14 +12,16 @@
 
 homepage		http://www.andre-simon.de
 master_sites		${homepage}/zip/
-checksums		sha1 091689fde96c9f4e3de75ea1b7c1838e8d25708c
+checksums		sha1 b5fed14bb1a973fe134dd2133766bb86fdc7494e
 use_bzip2		yes
 
+use_configure	no
+
 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 = /usr$|PREFIX = ${prefix}|g" \
+		${worksrcpath}/makefile
+	reinplace "s|^conf_dir = /etc/highlight/$|conf_dir = ${prefix}/etc/highlight/|g" \
+  		${worksrcpath}/makefile
 }
 
 # Avoid stripping the binary (-s flag) during linking as this corrupts the executable.
@@ -27,16 +29,15 @@
 platform darwin 8 { build.args LDFLAGS="" }
 
 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 ${worksrcpath}/src/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 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" } {
+	foreach dir { "langDefs" "themes" } {
 		file copy ${worksrcpath}/${dir} ${destroot}${prefix}/share/${name}
 			system "chmod 644 ${destroot}${prefix}/share/${name}/${dir}/*"
 	}
@@ -46,8 +47,8 @@
 		${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" } {
+	foreach file { "AUTHORS" "README" "README_DE" "ChangeLog" \
+		"COPYING" "INSTALL" "README_LANGLIST" "README_REGEX" } {
 		xinstall -m 644 ${worksrcpath}/${file} \
 			${destroot}${prefix}/share/doc/${name}
 	}
@@ -55,13 +56,14 @@
 	file copy ${worksrcpath}/examples ${destroot}${prefix}/share/doc/${name}
 }
 
+set old_conf_files { "scriptre.conf" "extensions.conf" }
 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 {
@@ -84,4 +86,3 @@
 		}
 	}
 }

Attachments (3)

highlight-2.4.8-2.16.patch (2.7 KB) - added by lists@… 14 years ago.
highlight-2.4.8-to-3.4.0.patch (3.3 KB) - added by profjim@… 13 years ago.
Updates to 3.4.0, adds +perl variant
highlight-3.4.0.diff (3.2 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
revised patch

Download all attachments as: .zip

Change History (12)

Changed 14 years ago by lists@…

Attachment: highlight-2.4.8-2.16.patch added

comment:1 Changed 14 years ago by jmroot (Joshua Root)

Cc: pjenvey@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to pjenvey@…
Version: 1.8.2

comment:2 in reply to:  description Changed 13 years ago by profjim@…

Here is a new patch, that brings highlight from 2.4.8 up to 3.4.0, and additionally adds a +perl variant to build the perl bindings from the examples/swig subdirectory. (They are needed at least by the IkiWiki highlight plugin.)

Changed 13 years ago by profjim@…

Updates to 3.4.0, adds +perl variant

comment:3 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added
Summary: update: Update highlight Portfile to release 2.16highlight: update to 3.4.0

I'm attaching a revised patch with these changes from yours:

  • moved everything related to the perl variant into the perl variant
  • removed swig and perl5 dependencies from perl variant since the remaining swig-perl dependency already has dependencies on them
  • simplified how documentation files are installed in post-destroot to avoid the need for a foreach loop
  • removed md5 checksum
  • adjusted whitespace of additions to conform to portfile's existing whitespace conventions
  • removed unnecessary quotes around things

I have not committed it yet because it references a patchfile that has not been attached to this ticket. Can you attach "makefiles.patch"?

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: highlight-3.4.0.diff added

revised patch

comment:4 Changed 12 years ago by g5pw (Aljaž Srebrnič)

Resolution: fixed
Status: newclosed

Since highlight is now at version 3.9 and this ticket has been sitting here for 18 months, I'll just go ahead and resolve it as fixed.

comment:5 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: g5pw@… added
Resolution: fixed
Status: closedreopened

The perl variant added by the patch in this ticket does not appear to have made it into the port yet.

comment:6 Changed 11 years ago by g5pw (Aljaž Srebrnič)

Adding the perl variant to current highlight breaks the build, would you mind adding a patch against the current portfile?

comment:7 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from pjenvey@… to macports-tickets@…
Status: reopenednew

comment:8 Changed 9 years ago by kurthindenburg (Kurt Hindenburg)

Cc: khindenburg@… added
Summary: highlight: update to 3.4.0highlight: add +perl variant

It looks like the makefile needs patched

c++: Error: You should be using ${configure.cxx} See https://trac.macports.org/wiki/UsingTheRightCompiler

comment:9 in reply to:  8 Changed 9 years ago by g5pw (Aljaž Srebrnič)

Replying to khindenburg@…:

It looks like the makefile needs patched

c++: Error: You should be using ${configure.cxx} See https://trac.macports.org/wiki/UsingTheRightCompiler

What do you mean?

Note: See TracTickets for help on using tickets.