diff --git a/graphics/ale/Makefile b/graphics/ale/Makefile index baf85b157dd2..69c468c694e4 100644 --- a/graphics/ale/Makefile +++ b/graphics/ale/Makefile @@ -7,33 +7,50 @@ # PORTNAME= ale -PORTVERSION= 0.5.1 -PORTREVISION= 1 +PORTVERSION= 0.7.0 CATEGORIES= graphics MASTER_SITES= http://auricle.dyndns.org/ALE/download/ -PATCH_SITES= http://auricle.dyndns.org/ALE/bugs/ -PATCHFILES= 0.5.1.patch1 0.5.1.patch2 -PATCH_DIST_ARGS= -p1 -d ${PATCH_WRKSRC} MAINTAINER= ports@FreeBSD.org COMMENT= Anti-Lamenessing Engine PLIST_FILES= bin/ale USE_GMAKE= yes - -.if !defined(WITHOUT_IMAGEMAGICK) -LIB_DEPENDS= Magick.6:${PORTSDIR}/graphics/ImageMagick -MAKE_ARGS= IMAGEMAGICK=1 -.endif +USE_REINPLACE= yes .include -.if ${OSVERSION} < 500035 -USE_REINPLACE= yes -USE_GCC= 3.1 +.if ${OSVERSION} < 500000 +USE_GCC= 3.3 +.endif + +.if !defined(WITHOUT_IMAGEMAGICK) +LIB_DEPENDS+= Magick.6:${PORTSDIR}/graphics/ImageMagick +MAKE_ARGS+= IMAGEMAGICK=1 +.endif + +.if !defined(WITHOUT_FFTW3) +LIB_DEPENDS+= fftw3.3:${PORTSDIR}/math/fftw3 +MAKE_ARGS+= FFTW=1 +.endif + +pre-everything:: +.if !defined(WITHOUT_IMAGEMAGICK) + @${ECHO_MSG} "===> Disable ImageMagick Support by defining WITHOUT_IMAGEMAGICK" +.endif +.if !defined(WITHOUT_FFTW3) + @${ECHO_MSG} "===> Disable FFTW3 Support by defining WITHOUT_FFTW3" +.endif post-patch: - @${REINPLACE_CMD} -e "s|^ g++| ${CXX}|" ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|; \ + s|g++|${CXX}|' ${WRKSRC}/${MAKEFILE} + @${REINPLACE_CMD} -e 's|stdint.h|inttypes.h|' \ + ${WRKSRC}/*.h ${WRKSRC}/*/*.h +.if ${OSVERSION} < 502114 + @${REINPLACE_CMD} -e 's|round|rint|' \ + ${WRKSRC}/d2/image_rw.h \ + ${WRKSRC}/d2/ppm.h .endif do-install: diff --git a/graphics/ale/distinfo b/graphics/ale/distinfo index d7bb5c68b5bc..b380034a94b4 100644 --- a/graphics/ale/distinfo +++ b/graphics/ale/distinfo @@ -1,6 +1,2 @@ -MD5 (ale-0.5.1.tar.gz) = 5c08c6f8b1d7cec89771d64ef09e2bef -SIZE (ale-0.5.1.tar.gz) = 50082 -MD5 (0.5.1.patch1) = 4de11856fdc611c0446c1ea81e6fee67 -SIZE (0.5.1.patch1) = 1805 -MD5 (0.5.1.patch2) = b87e6023f4f6d4aa3f604582a691b3b8 -SIZE (0.5.1.patch2) = 6141 +MD5 (ale-0.7.0.tar.gz) = 0e812b29d10c2cc6a48baf5326e597bd +SIZE (ale-0.7.0.tar.gz) = 96247 diff --git a/graphics/ale/files/patch-Makefile b/graphics/ale/files/patch-Makefile new file mode 100644 index 000000000000..4a2254a9c939 --- /dev/null +++ b/graphics/ale/files/patch-Makefile @@ -0,0 +1,19 @@ +--- Makefile.orig Wed Aug 4 16:46:34 2004 ++++ Makefile Sat Aug 7 13:11:43 2004 +@@ -41,14 +41,14 @@ + DEBUG_CFLAGS:=$(if $(subst 0,,$(DEBUG)),-DDEBUG,-DNDEBUG) + IMAGEMAGICK_CFLAGS:=$(if $(use_imagemagick),-DUSE_MAGICK $(shell Magick-config --cflags --cppflags),) + IMAGEMAGICK_LDFLAGS:=$(if $(use_imagemagick),$(shell Magick-config --ldflags --libs),) +-FFTW_CFLAGS:=$(if $(subst 0,,$(FFTW)),-DUSE_FFTW,) ++FFTW_CFLAGS:=-I%%LOCALBASE%%/include -DUSE_FFTW + POSIX_CFLAGS:=$(if $(subst 0,,$(POSIX)),-DUSE_UNIX,) + PRECISION_CFLAGS:=$(if $(subst SINGLE,,$(COLORS)),,-DALE_COLORS=SINGLE)\ + $(if $(subst DOUBLE,,$(COLORS)),,-DALE_COLORS=DOUBLE)\ + $(if $(subst HALF,,$(COLORS)),,-DALE_COLORS=HALF)\ + $(if $(subst SINGLE,,$(COORDINATES)),,-DALE_COORDINATES=SINGLE)\ + $(if $(subst DOUBLE,,$(COORDINATES)),,-DALE_COORDINATES=DOUBLE) +-FFTW_LDFLAGS:=$(if $(subst 0,,$(FFTW)),-lfftw3,) ++FFTW_LDFLAGS:=-L%%LOCALBASE%%/lib -lfftw3 + + CFLAGS:= $(POSIX_CFLAGS) $(DEBUG_CFLAGS) $(FFTW_CFLAGS) $(PRECISION_CFLAGS) \ + $(if $(use_imagemagick),$(IMAGEMAGICK_CFLAGS),-Wall -O2) diff --git a/graphics/ale/files/patch-channel.h b/graphics/ale/files/patch-channel.h deleted file mode 100644 index 5de445b973e7..000000000000 --- a/graphics/ale/files/patch-channel.h +++ /dev/null @@ -1,11 +0,0 @@ ---- channel.h.orig Tue Jan 27 10:59:02 2004 -+++ channel.h Tue Jan 27 10:59:10 2004 -@@ -20,7 +20,7 @@ - #ifndef __channel_h__ - #define __channel_h__ - --#include -+#include - - /* - * Channel type used by ALE. diff --git a/graphics/ale/files/patch-ppm.h b/graphics/ale/files/patch-ppm.h deleted file mode 100644 index 060097ec7669..000000000000 --- a/graphics/ale/files/patch-ppm.h +++ /dev/null @@ -1,11 +0,0 @@ ---- ppm.h.orig Wed Dec 17 11:56:17 2003 -+++ ppm.h Wed Dec 17 11:57:01 2003 -@@ -189,7 +189,7 @@ - } - - if (mcv != CHANNEL_MAX) -- ival = (int) round(((double) ival / (double) (mcv)) * (CHANNEL_MAX)); -+ ival = (int) ceil(((double) ival / (double) (mcv)) * (CHANNEL_MAX) + 0.5); - - im->set_pixel_component(i, j, k, ival); - }