[49848] trunk/dports/textproc/c2html

toby at macports.org toby at macports.org
Sun Apr 19 00:05:51 PDT 2009


Revision: 49848
          http://trac.macports.org/changeset/49848
Author:   toby at macports.org
Date:     2009-04-19 00:05:50 -0700 (Sun, 19 Apr 2009)
Log Message:
-----------
update to 1.1.0
format Portfile better
take maintainership
fix universal build

Modified Paths:
--------------
    trunk/dports/textproc/c2html/Portfile

Added Paths:
-----------
    trunk/dports/textproc/c2html/files/
    trunk/dports/textproc/c2html/files/patch-Makefile
    trunk/dports/textproc/c2html/files/patch-check_begin.c
    trunk/dports/textproc/c2html/files/patch-error.c
    trunk/dports/textproc/c2html/files/patch-makefile.default

Modified: trunk/dports/textproc/c2html/Portfile
===================================================================
--- trunk/dports/textproc/c2html/Portfile	2009-04-19 07:05:25 UTC (rev 49847)
+++ trunk/dports/textproc/c2html/Portfile	2009-04-19 07:05:50 UTC (rev 49848)
@@ -2,29 +2,39 @@
 
 PortSystem 1.0
 
-name			c2html
-version			1.0.0
-categories		textproc
-platforms		darwin
-maintainers		nomaintainer
-description		c2html converts C source files to highlighted html
-long_description	c2html is a program which converts C source files to \
-				highlighted html files. The produced file can be used for \
-				creating technical manuals. A highlighted source code listing \
-				is usually much easier to read.
+name            c2html
+version         1.1.0
+categories      textproc
+maintainers     toby
+description     c2html converts C source files to highlighted html
+long_description \
+	c2html is a program which converts C source files to \
+	highlighted html files. The produced file can be used for \
+	creating technical manuals. A highlighted source code listing \
+	is usually much easier to read.
+homepage        http://c2html.sourceforge.net/
+platforms       darwin
 
-homepage		http://c2html.sourceforge.net/
-master_sites	sourceforge
-distname		${name}_${version}
-checksums		md5 b6348896e0272e6cd41b883efa5f9574
+master_sites    sourceforge
+distname        ${name}_${version}
+checksums       md5 819e263c4b8712ac1b7026ae8fc88d29 \
+                sha1 bc9fe51875ec5d1b517f318c47429fdd00de18ee \
+                rmd160 d00543035f753f7f5edb67d275cc0b6f62cc04ac
 
-worksrcdir		${name}
+worksrcdir      ${name}
 
-use_configure	no
+patchfiles      patch-Makefile patch-makefile.default \
+                patch-check_begin.c patch-error.c
 
-destroot	{
+configure {
+	reinplace "s|__CC__|${configure.cc}|" ${worksrcpath}/Makefile
+	reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/Makefile
+	reinplace "s|__LDFLAGS__|${configure.ldflags}|" ${worksrcpath}/makefile.default
+}
+
+destroot {
 	xinstall -m 755 ${worksrcpath}/c2html ${destroot}${prefix}/bin
 	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name}
-	xinstall -m 644 -W ${worksrcpath} INSTALL Installation\ guide.pdf LICENSE \
-		User\ manual.pdf ${destroot}${prefix}/share/doc/${name}
+	xinstall -m 644 "${worksrcpath}/User manual.pdf" \
+		${destroot}${prefix}/share/doc/${name}
 }

Added: trunk/dports/textproc/c2html/files/patch-Makefile
===================================================================
--- trunk/dports/textproc/c2html/files/patch-Makefile	                        (rev 0)
+++ trunk/dports/textproc/c2html/files/patch-Makefile	2009-04-19 07:05:50 UTC (rev 49848)
@@ -0,0 +1,13 @@
+--- Makefile.orig	2009-04-18 23:54:10.000000000 -0700
++++ Makefile	2009-04-18 23:54:18.000000000 -0700
+@@ -14,8 +14,8 @@
+ INSTALL_FILES=\
+ 	'User manual.pdf'
+ 
+-CFLAGS=-I. -O3 -Wall
+-CC=gcc
++CFLAGS=-I. __CFLAGS__ -Wall
++CC=__CC__
+ 
+ RMDIR=rmdir
+ 

Added: trunk/dports/textproc/c2html/files/patch-check_begin.c
===================================================================
--- trunk/dports/textproc/c2html/files/patch-check_begin.c	                        (rev 0)
+++ trunk/dports/textproc/c2html/files/patch-check_begin.c	2009-04-19 07:05:50 UTC (rev 49848)
@@ -0,0 +1,30 @@
+--- check_begin.c.orig	2009-04-19 00:03:22.000000000 -0700
++++ check_begin.c	2009-04-19 00:03:41.000000000 -0700
+@@ -83,8 +83,8 @@
+ const char hyphens[NUM_HYPHENS] = {'_', '@', '$', '\'', '"', '`'};
+ 
+ /*
+-   There are two types of comments: those who start with "/*" and those who start with "//"
+-   If the current comment starts with "/*" comment1 is TRUE otherwise it is FALSE
++   There are two types of comments: those who start with "/ *" and those who start with "//"
++   If the current comment starts with "/ *" comment1 is TRUE otherwise it is FALSE
+ */
+ char comment1;
+ 
+@@ -159,14 +159,14 @@
+ 	const char *begin2 = "//";
+ 
+ 	/*
+-	   If line is the beginning of a comment which begins with "/*"
++	   If line is the beginning of a comment which begins with "/ *"
+ 	*/
+ 	if ( isbeginend(begin1, line) )
+ 	{
+ 		comment1 = TRUE;
+ 		return (TRUE); /* line is the beginning of a comment */
+ 	}
+-	comment1 = FALSE; /* line is definitely not the beginnig of a comment starting with "/*" */
++	comment1 = FALSE; /* line is definitely not the beginnig of a comment starting with "/ *" */
+ 
+ 	/* line can now only be the beginning of a comment which begins with "//" */
+ 	return ( isbeginend(begin2, line) );

Added: trunk/dports/textproc/c2html/files/patch-error.c
===================================================================
--- trunk/dports/textproc/c2html/files/patch-error.c	                        (rev 0)
+++ trunk/dports/textproc/c2html/files/patch-error.c	2009-04-19 07:05:50 UTC (rev 49848)
@@ -0,0 +1,10 @@
+--- error.c.orig	2009-04-19 00:02:33.000000000 -0700
++++ error.c	2009-04-19 00:02:42.000000000 -0700
+@@ -24,6 +24,7 @@
+     (replace (at) by @ and (dot) by .)
+ ---------------------------------------------------------------------------------*/
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <c2html.h>
+ 
+ 

Added: trunk/dports/textproc/c2html/files/patch-makefile.default
===================================================================
--- trunk/dports/textproc/c2html/files/patch-makefile.default	                        (rev 0)
+++ trunk/dports/textproc/c2html/files/patch-makefile.default	2009-04-19 07:05:50 UTC (rev 49848)
@@ -0,0 +1,11 @@
+--- makefile.default.orig	2009-04-18 23:54:52.000000000 -0700
++++ makefile.default	2009-04-18 23:55:04.000000000 -0700
+@@ -16,7 +16,7 @@
+ 	mkdir $(DESTDIR)
+ 
+ $(TARGET): $(OBJECTS)
+-	$(CC) -o  $@ $(OBJECTS)
++	$(CC) __LDFLAGS__ -o  $@ $(OBJECTS)
+ 
+ install: $(TARGET) $(DESTDIR)
+ 	cp $(INSTALLFILES) $(DESTDIR)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090419/52ccf76d/attachment-0001.html>


More information about the macports-changes mailing list