need help from a C programmer
Melvyn Sopacua
freebsd.ports at melvyn.homeunix.org
Thu Dec 15 15:21:52 PST 2005
On Thursday 15 December 2005 22:03, Fernan Aguero wrote:
> | +_MACHTYPE!= uname -m
> | +MACHTYPE?= ${_MACHTYPE}
> | +MAKE_ENV+= MACHTYPE=${MACHTYPE}
> |
> | post-patch:
> | @${MKDIR} ${WRKSRC}/bin/${MACHTYPE}
>
> Mmm ... it worked fine for me in FreeBSD-4.11
>
> Anyway, it works also with your patch ;)
Probably cause you have MACHTYPE in your env. Anyway, this sets it if unset,
which means crossbuilds are theoretically supported ;-)
> | As for the error, there's some redefining going on in common.h, and
> | probably screwing up some macros in the end.
> | # cat files/patch-hg-pslPretty-pslPretty.c
> | --- hg/pslPretty/pslPretty.c.orig Fri Mar 26 02:03:59 2004
> | +++ hg/pslPretty/pslPretty.c Thu Dec 15 21:09:52 2005
> | @@ -686,7 +686,7 @@
> | if (--dotMod <= 0)
> | {
> | printf(".");
> | - fflush(stdout);
> | + fflush(uglyOut);
> | dotMod = dot;
> | }
> | }
>
> +----]
>
> I've tried this patch but it didn't fix the problem.
>
> Are you suggesting that other references to 'stdout' should
> be replaced by 'uglyOut'?
You sure it fails there, cause it actually fails right after currently,
because of a makefile problem in the next target (using $HOME ...).
Thanks to Nikola - there's left-over object files in the source distribution.
THe previous fix worked, simply because the .c file was changed and therefore
the object file had to be remade.
<indepth>
BSD's stdio.h defines stdout to __stdoutp, the object files in the
distribution apparently do not and so stdout becomes undefined.
</indepth>
As for the port, you can delete all the patches from files (accept
patch-lib-sqlum.c, didn't look at that) and use the attached Makefile, which
takes care of the build process.
--
Melvyn Sopacua
freebsd.ports at melvyn.homeunix.org
FreeBSD 6.0-STABLE
Qt: 3.3.5
KDE: 3.4.3
-------------- next part --------------
# ex:ts=8
# New ports collection makefile for: blat
# Date created: 08 Dec 2005
# Whom: Fernan Aguero <fernan at iib.unsam.edu.ar>
#
# $FreeBSD$
#
PORTNAME= blat
PORTVERSION= 33
CATEGORIES= biology
MASTER_SITES= http://www.soe.ucsc.edu/~kent/src/
DISTNAME= ${PORTNAME}Src${PORTVERSION}
MAINTAINER= fernan at iib.unsam.edu.ar
COMMENT= A
USE_ZIP= yes
USE_GMAKE= yes
USE_GCC= 3.4+
USE_REINPLACE= yes
MAKEFILE= makefile
WRKSRC= ${WRKDIR}/${PORTNAME}Src
_MACHTYPE!= uname -m
MACHTYPE?= ${_MACHTYPE}
MAKE_ENV+= MACHTYPE=${MACHTYPE} WRKSRC=${WRKSRC}
post-patch:
@${MKDIR} ${WRKSRC}/bin/${MACHTYPE}
@${MKDIR} ${WRKSRC}/lib/${MACHTYPE}
@${FIND} ${WRKSRC} -name makefile -print | ${XARGS} ${REINPLACE_CMD} \
-e "s%\$$(HOME)%\$$(WRKSRC)%" \
-e "s%\$${HOME}%\$$(WRKSRC)%" \
-e "s%gcc%\$$(CC)%"
@${FIND} ${WRKSRC} -name '*.o' -delete
.include <bsd.port.mk>
More information about the freebsd-ports
mailing list