diff --git a/math/tomsfastmath/Makefile b/math/tomsfastmath/Makefile index a819288aeb21..2e699fab7b28 100644 --- a/math/tomsfastmath/Makefile +++ b/math/tomsfastmath/Makefile @@ -4,26 +4,25 @@ PORTNAME= tomsfastmath PORTVERSION= 0.12 CATEGORIES= math MASTER_SITES= http://libtom.org/files/ -MASTER_SITE_SUBDIR= miwi DISTNAME= tfm-${PORTVERSION} MAINTAINER= ports@FreeBSD.org COMMENT= Portable fixed precision math library for fast exponentiations +BROKEN_powerpc= internal compiler error at src/mul/fp_mul_comba_48.c:398 + +USES= gmake tar:bzip2 WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} MAKEFILE= makefile -USES= gmake tar:bzip2 -USE_GCC= any ALL_TARGET= default PLIST_FILES= include/tfm.h lib/libtfm.a -.include +# Unbreak against Clang ("cc" is not a register) +post-patch: + @${REINPLACE_CMD} -e 's,"%cc","cc",' \ + ${WRKSRC}/src/mont/fp_montgomery_reduce.c \ + ${WRKSRC}/src/mul/fp_mul_comba.c \ + ${WRKSRC}/src/sqr/fp_sqr_comba.c -.if ${ARCH} == "ia64" || ${ARCH} == "sparc64" -BROKEN= Does not compile on ia64 or sparc64 -.elif ${ARCH} == "powerpc" -BROKEN= Causes gcc coredump on powerpc -.endif - -.include +.include diff --git a/math/tomsfastmath/files/patch-makefile b/math/tomsfastmath/files/patch-makefile index 81258ad4ea1b..953cd98b809f 100644 --- a/math/tomsfastmath/files/patch-makefile +++ b/math/tomsfastmath/files/patch-makefile @@ -1,6 +1,6 @@ --- makefile.orig Wed Apr 12 13:16:32 2006 +++ makefile Wed Apr 12 13:16:48 2006 -@@ -11,7 +11,7 @@ +@@ -11,7 +11,7 @@ endif ifndef IGNORE_SPEED @@ -9,8 +9,8 @@ #profiling #PROF=-pg -g -@@ -53,11 +53,11 @@ - HEADERS=tfm.h +@@ -52,11 +52,11 @@ HEADERS=src/headers/tfm.h + #END_INS ifndef LIBPATH - LIBPATH=/usr/lib @@ -23,3 +23,18 @@ endif ifndef INSTALL_GROUP +@@ -82,10 +82,10 @@ $(LIBNAME): $(OBJECTS) + ranlib $@ + + install: $(LIBNAME) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH) +- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH) +- install -g $(GROUP) -o $(USER) $(LIBNAME) $(DESTDIR)$(LIBPATH) +- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH) ++ install -d $(DESTDIR)$(LIBPATH) ++ install -d $(DESTDIR)$(INCPATH) ++ install -m 644 $(LIBNAME) $(DESTDIR)$(LIBPATH) ++ install -m 644 $(HEADERS) $(DESTDIR)$(INCPATH) + + mtest/mtest: mtest/mtest.o + cd mtest ; CFLAGS="$(CFLAGS) -I../" MAKE=${MAKE} ${MAKE} mtest