Chris Rees <utis...@gmail.com> writes:

> On 30 March 2011 21:00, Chris Rees <utis...@gmail.com> wrote:
>> Hi all,
>>
>> I'm updating castor to the new version (thanks for the email
>> Portscout!), and I've decided to add in docs option.
>>
>> However... when I set PORTDOCS= * as normal, on deinstall it complains
>> about being unable to remove ${DOCSDIR}, yet it has been deleted.

I've seen similar errors when one *explicitly* adds @dirrm for ${DOCSDIR}.

>>
>> I've looked in +CONTENTS after installing it, and sure enough there's
>> a @dirrm share/doc/castor. What 'gotchas' are there with PORTDOCS?
>>
>> It installs ~70 docfiles, so I was hoping not to have to list it in
>> pkg-plist, for the sake of space if anything else!
>
> After some kind advice from b.f., I've tracked it down (I think).
>
> As far as I can see, you can't use PORTDOCS= * when there are
> directories inside ${DOCSDIR}, for some reason.

Are you sure? The following diff doesn't produce any errors here.

%%
Index: java/castor/Makefile
===================================================================
RCS file: /a/.cvsup/ports/java/castor/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- java/castor/Makefile        1 Jul 2010 21:13:01 -0000       1.14
+++ java/castor/Makefile        31 Mar 2011 21:21:33 -0000
@@ -28,6 +28,7 @@ JARSUFXS=     -anttasks.jar \
                        -xml.jar \
                        .jar
 
+PORTDOCS=      *
 PLIST_FILES=   %%JAVAJARDIR%%/${PORTNAME}-anttasks.jar \
                                %%JAVAJARDIR%%/${PORTNAME}-codegen.jar \
                                %%JAVAJARDIR%%/${PORTNAME}-core.jar \
@@ -44,5 +45,9 @@ do-install:
                ${JAVAJARDIR}/${PORTNAME}${f}
        @${ECHO_MSG} " [ DONE ]"
 .endfor
+       @${ECHO_MSG} -n ">> Installing documentation under ${DOCSDIR}..."
+       @${MKDIR} ${DOCSDIR}
+       @${TAR} cf - -C${WRKSRC}/doc . | ${TAR} xof - -C${DOCSDIR}
+       @${ECHO_MSG} " [ DONE ]"
 
 .include <bsd.port.mk>
%%
_______________________________________________
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to "freebsd-ports-unsubscr...@freebsd.org"

Reply via email to