Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2010 14:57:08 GMT
From:      Andras Horvath <han@log69.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/146831: graphics/aaphoto fix build on FreeBSD 6.x and earlier
Message-ID:  <201005221457.o4MEv881023807@www.freebsd.org>
Resent-Message-ID: <201005221500.o4MF09pv076822@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         146831
>Category:       ports
>Synopsis:       graphics/aaphoto fix build on FreeBSD 6.x and earlier
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 22 15:00:09 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Andras Horvath
>Release:        8.0-RELEASE-p2, 6.4-RELEASE-p7
>Organization:
>Environment:
>Description:
The port needs OpenMP multi processing feature since version 0.37 by default. GCC supports this since version 4.2, which is since FBSD 7.x.

On FBSD 6.x and earlier, CFLAGS should not have -fopenmp and -D__OPENMP__ flags. I solved the problem by adding patches to the original source's Makefiles that remove these flags by default, and rather apply it on platform 7.x and above.

I tested it on 6.4 and 8.0 platforms.

>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -ruN graphics/aaphoto.orig/Makefile graphics/aaphoto/Makefile
--- graphics/aaphoto.orig/Makefile	2010-05-22 18:30:16.000000000 +0200
+++ graphics/aaphoto/Makefile	2010-05-22 18:24:58.000000000 +0200
@@ -7,7 +7,7 @@
 
 PORTNAME=	aaphoto
 PORTVERSION=	0.37
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 MASTER_SITES=	http://log69.com/downloads/
 DISTNAME=	${PORTNAME}_sources_v${PORTVERSION}
@@ -31,8 +31,8 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} < 700000
-CFLAGS+=	-fno-openmp -Wno-unknown-pragmas -U__OPENMP__
+.if ${OSVERSION} >= 700000
+CFLAGS+=	-fopenmp -D__OPENMP__
 .endif
 
 do-install:
diff -ruN graphics/aaphoto.orig/files/patch-Makefile.am graphics/aaphoto/files/patch-Makefile.am
--- graphics/aaphoto.orig/files/patch-Makefile.am	1970-01-01 01:00:00.000000000 +0100
+++ graphics/aaphoto/files/patch-Makefile.am	2010-05-22 18:18:02.000000000 +0200
@@ -0,0 +1,8 @@
+--- Makefile.am.orig	2010-05-22 18:13:45.000000000 +0200
++++ Makefile.am	2010-05-22 18:15:43.000000000 +0200
+@@ -1,4 +1,4 @@
+-AM_CFLAGS = -Wall -O2 -D__OPENMP__ -fopenmp
++AM_CFLAGS = -Wall -O2 -Wno-unknown-pragmas
+ AM_LDFLAGS = -ljasper -ljpeg -lpng -lm
+ bin_PROGRAMS = aaphoto
+ aaphoto_SOURCES = aaphoto.c
diff -ruN graphics/aaphoto.orig/files/patch-Makefile.in graphics/aaphoto/files/patch-Makefile.in
--- graphics/aaphoto.orig/files/patch-Makefile.in	1970-01-01 01:00:00.000000000 +0100
+++ graphics/aaphoto/files/patch-Makefile.in	2010-05-22 18:18:02.000000000 +0200
@@ -0,0 +1,11 @@
+--- Makefile.in.orig	2010-05-22 18:13:54.000000000 +0200
++++ Makefile.in	2010-05-22 18:15:25.000000000 +0200
+@@ -157,7 +157,7 @@
+ target_alias = @target_alias@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+-AM_CFLAGS = -Wall -O2 -D__OPENMP__ -fopenmp
++AM_CFLAGS = -Wall -O2 -Wno-unknown-pragmas
+ AM_LDFLAGS = -ljasper -ljpeg -lpng -lm
+ aaphoto_SOURCES = aaphoto.c
+ INCLUDES = 


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201005221457.o4MEv881023807>