Summary: | [PATCH] Fix ezm3 for 64-bit time_t on sparc64 5.x-current | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Garance A Drosehn <gad> |
Component: | Individual Port(s) | Assignee: | John Polstra <jdp> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Garance A Drosehn
2004-05-02 04:10:21 UTC
Responsible Changed From-To: freebsd-ports-bugs->jdp Over to maintainer. The patch at http://people.freebsd.org/~gad/time-64/port-ezm3.diff causes some problems as it makes the Makefile evaluate CHECKRESULT every time it's run, even when WRKSRC doesn't exists. This causes e.g. `make -V <something>` to break: marius@nephilim:/tmp/co/ezm3 > make -V PGKNAME /usr/bin/ld: cannot open output file /checktimet: Permission denied "Makefile", line 63: warning: "/bin/rm -rf /checktimet && cc -o /checktimet /tmp/co/ezm3/files/checktimet.c && /checktimet" returned non-zero status While the ezm3 port probably can be made to use checktimet.c without causing problems it now should be sufficient to use OSVERSION to decide whether the value of time_t should be changed to int64_t. The reason for this is that FreeBSD/sparc64 fully switched to 64bit time_t by default with __FreeBSD_version 502107; there should be no more testing of the time_t change and going back and forth between 32bit and 64bit time_t, just users that recompile their ports after switching to a 64bit time_t FreeBSD/sparc64. The author of the above mentioned patch basically agreed to this in: http://lists.freebsd.org/pipermail/freebsd-sparc64/2004-March/001444.html A patch which makes the ezm3 port change time_t on FreeBSD/sparc64 based on OSVERSION is below. Index: Makefile =================================================================== RCS file: /mnt/futile/usr/data/bsd/cvs/fbsd/ports/lang/ezm3/Makefile,v retrieving revision 1.9 diff -u -r1.9 Makefile --- Makefile 4 Feb 2004 05:21:33 -0000 1.9 +++ Makefile 4 Mar 2004 18:42:30 -0000 @@ -26,6 +26,7 @@ SCRIPTS_ENV+= TARGET=${TARGET} USE_BZIP2= yes USE_GMAKE= yes +USE_REINPLACE= yes PROGS= bin/m3build \ bin/m3bundle \ @@ -57,6 +58,12 @@ BOOTSTRAP= ezm3-${PORTVERSION}-${TARGET}-boot.tar.bz2 .endif +post-patch: +.if ${ARCH} == "sparc64" && ${OSVERSION} >= 502107 + @${REINPLACE_CMD} -E -e 's|(^.*time_t.*=.*)int32_t;|\1int64_t;|' \ + ${WRKSRC}/libs/m3core/src/unix/freebsd-4.sparc64/Utypes.i3 +.endif + do-build: @${ECHO_MSG} "This port does everything in the install step." @${ECHO_MSG} "The build step is a no-op." State Changed From-To: open->closed Fixed in ports/lang/ezm3/Makefile revision 1.10. I used the simpler patch submitted by Marius Strobl because of the problems mentioned in the PR that occur if WRKSRC doesn't exist (and also just because it's simpler). Many thanks to both submitters for helping solve this problem. |