[77277] trunk/dports/textproc/doxygen/Portfile

Ryan Schmidt ryandesign at macports.org
Fri Mar 25 15:46:48 PDT 2011


On Mar 25, 2011, at 05:40, css at macports.org wrote:

> Revision: 77277
>          http://trac.macports.org/changeset/77277
> Author:   css at macports.org
> Date:     2011-03-25 03:40:27 -0700 (Fri, 25 Mar 2011)
> Log Message:
> -----------
> doxygen: add tcl variant (refs #28426)
> 
> Modified Paths:
> --------------
>    trunk/dports/textproc/doxygen/Portfile
> 
> Modified: trunk/dports/textproc/doxygen/Portfile
> ===================================================================
> --- trunk/dports/textproc/doxygen/Portfile	2011-03-25 07:54:43 UTC (rev 77276)
> +++ trunk/dports/textproc/doxygen/Portfile	2011-03-25 10:40:27 UTC (rev 77277)
> @@ -4,7 +4,7 @@
> 
> name			doxygen
> version			1.7.3
> -revision                1
> +revision                2
> categories		textproc devel
> maintainers		css
> description		Documentation system for several programming languages
> @@ -29,7 +29,7 @@
> 			ftp://ftp.stack.nl/pub/users/dimitri/
> distfiles		${distname}.src${extract.suffix}
> 
> -checksums           md5     6cc5ad566dbec5cf843dc600b1162808 \
> +checksums           doxygen-1.7.3.src.tar.gz \

Using ${distfiles} here would save you from having to update the version number in two places. See "port lint".


>                     sha1    06e1d84b50beecdfe0f91393b83c29e8a3db1011 \
>                     rmd160  52f0826451535754c77b7984e580f02f1c7d50f3
> 
> @@ -112,6 +112,15 @@
> 	}
> }
> 
> +# This is a patch written by René Zaumseil that adds Tcl support to Doxygen.
> +variant tcl description {Add EXPERIMENTAL support for Tcl (http://wiki.tcl.tk/27011)} {
> +    patch_sites         sourceforge:kbskit/doxygen\+tcl
> +    patchfiles-append   doxygen\+tcl.patch
> +    checksums-append    doxygen\+tcl.patch \
> +                        sha1    c9276520bb386f63756def5c064c4756975e06a7 \
> +                        rmd160  d3ff1de4a6b75d33655ae44dbe11a60c04224419 \
> +}
> +
> platform darwin {
> 	# Specify the platform explicitly to avoid a universal build.
> 	global tmake_conf arch_flags
> @@ -124,3 +133,10 @@
> 		set arch_flags ${configure.universal_cflags}
> 	}
> }
> +
> +pre-patch {
> +    if {[variant_isset tcl]} {
> +        reinplace "s|^--- 746doxygen-svn/|--- |" ${distpath}/doxygen\+tcl.patch
> +        reinplace "s|^+++ doxygen-svn/|+++ |"    ${distpath}/doxygen\+tcl.patch
> +    }
> +}

You must not reinplace things in or otherwise change the distfiles (or things in the port's files directory), which are supposed to be immutable! The checksums for the patchfile will not match anymore if you change their contents! Observe:


$ sudo port install doxygen +tcl
--->  Computing dependencies for doxygen
--->  Fetching doxygen
--->  Verifying checksum(s) for doxygen
--->  Extracting doxygen
--->  Applying patches to doxygen
--->  Configuring doxygen
^C
$ sudo port clean doxygen
--->  Cleaning doxygen
$ sudo port install doxygen +tcl
--->  Computing dependencies for doxygen
--->  Fetching doxygen
--->  Verifying checksum(s) for doxygen
Error: Checksum (sha1) mismatch for doxygen+tcl.patch
Error: Checksum (rmd160) mismatch for doxygen+tcl.patch
Error: Target org.macports.checksum returned: Unable to verify file checksums
Log for doxygen is at: /opt/local/var/macports/logs/_Users_rschmidt_macports_dports_textproc_doxygen/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>


It looks like you're just trying to make the patch work with -p0 here? Instead, just tell the port to use -p1, and change your existing patchfiles to work with -p1 as well. (This is what the php5 port does for the +suhosin variant.)


Here is the fix. I have only update the patch-addon_doxywizard_Makefile.in.diff patchfile; the other patchfiles appear to be unused and could be deleted.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: doxygen.diff
Type: application/octet-stream
Size: 1652 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20110325/e081cd27/attachment.obj>


More information about the macports-dev mailing list