Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2014 09:32:54 +0000 (UTC)
From:      Pawel Pekala <pawel@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r352589 - in head/graphics/yafray: . files
Message-ID:  <201404290932.s3T9Wsjn051913@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pawel
Date: Tue Apr 29 09:32:53 2014
New Revision: 352589
URL: http://svnweb.freebsd.org/changeset/ports/352589
QAT: https://qat.redports.org/buildarchive/r352589/

Log:
  - Fix build on 10+, make it PREFIX safe, respect CXXFLAGS
  - Add staging support
  - Remove leading article from COMMENT
  - Convert to new LIB_DEPENDS format
  - Strip binaries
  
  MFH:		2014Q2

Modified:
  head/graphics/yafray/Makefile
  head/graphics/yafray/files/patch-SConstruct
  head/graphics/yafray/files/patch-freebsd-settings.py

Modified: head/graphics/yafray/Makefile
==============================================================================
--- head/graphics/yafray/Makefile	Tue Apr 29 08:50:37 2014	(r352588)
+++ head/graphics/yafray/Makefile	Tue Apr 29 09:32:53 2014	(r352589)
@@ -9,23 +9,26 @@ MASTER_SITES=	http://freebsd.nsu.ru/dist
 		#http://www.yafaray.org/sites/default/files/download/builds/
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A fast XML based raytracer
+COMMENT=	Fast XML based raytracer
 
-LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg
+LIB_DEPENDS=	libjpeg.so:${PORTSDIR}/graphics/jpeg
 
 USES=		scons
 USE_LDCONFIG=	yes
 
 WRKSRC=		${WRKDIR}/${PORTNAME}
 
-NO_STAGE=	yes
 pre-patch:
 	@${MV} ${WRKSRC}/linux-settings.py ${WRKSRC}/freebsd-settings.py
 
-.include <bsd.port.pre.mk>
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+		-e 's|%%CXXFLAGS%%|${CXXFLAGS}|' \
+		${WRKSRC}/freebsd-settings.py
+
+do-install:
+	(cd ${WRKSRC} && ${MAKE_CMD} prefix=${STAGEDIR}${PREFIX} install)
+	(cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} bin/${PORTNAME} \
+		lib/*.so lib/yafray/*.so)
 
-.if ${OSVERSION} >= 1000000
-BROKEN=		does not build
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Modified: head/graphics/yafray/files/patch-SConstruct
==============================================================================
--- head/graphics/yafray/files/patch-SConstruct	Tue Apr 29 08:50:37 2014	(r352588)
+++ head/graphics/yafray/files/patch-SConstruct	Tue Apr 29 09:32:53 2014	(r352589)
@@ -1,6 +1,6 @@
---- SConstruct.orig	2006-06-20 21:24:00.000000000 +0400
-+++ SConstruct	2009-11-04 20:56:07.000000000 +0300
-@@ -8,6 +8,11 @@
+--- SConstruct.orig	2006-06-20 19:24:00.000000000 +0200
++++ SConstruct	2014-04-28 22:26:00.000000000 +0200
+@@ -8,6 +8,13 @@
  ficheros = {
  'darwin' : 'darwin-settings',
  'linux2' : 'linux-settings',
@@ -9,6 +9,8 @@
 +'freebsd7' : 'freebsd-settings',
 +'freebsd8' : 'freebsd-settings',
 +'freebsd9' : 'freebsd-settings',
++'freebsd10' : 'freebsd-settings',
++'freebsd11' : 'freebsd-settings',
  'win32' : 'win32-settings',
  'sunos5' : 'sunos5-settings'
  }

Modified: head/graphics/yafray/files/patch-freebsd-settings.py
==============================================================================
--- head/graphics/yafray/files/patch-freebsd-settings.py	Tue Apr 29 08:50:37 2014	(r352588)
+++ head/graphics/yafray/files/patch-freebsd-settings.py	Tue Apr 29 09:32:53 2014	(r352589)
@@ -1,13 +1,22 @@
---- freebsd-settings.py.orig	Sat Sep 23 00:21:17 2006
-+++ freebsd-settings.py	Sat Sep 23 00:21:29 2006
+--- freebsd-settings.py.orig	2006-07-14 12:14:52.000000000 +0200
++++ freebsd-settings.py	2014-04-29 10:49:21.918250680 +0200
 @@ -10,6 +10,7 @@
  	global prefix
  	prefix = args.get('prefix','/usr/local')
  
-+def get_include(args): return prefix+"/usr/local/include"
++def get_include(args): return "%%LOCALBASE%%/include"
  def get_libpath(args): return prefix+"/lib"
  def get_pluginpath(args): return prefix+"/lib/yafray"
  def get_binpath(args): return prefix+"/bin"
+@@ -22,7 +23,7 @@
+ 	if debug:
+ 		flags+=' -O3 -ffast-math -ggdb'
+ 	else:
+-		flags+=' -O3 -ffast-math -fomit-frame-pointer'
++		flags+=' %%CXXFLAGS%%'
+ 	if arch!='':
+ 		flags+=' -march='+arch
+ 	if tune!='':
 @@ -46,9 +47,9 @@
  class jpeg(globalinfo.library):
  	C_ID = 'JPEG'
@@ -15,9 +24,9 @@
 -	def present(args): return os.path.exists("/usr/include/jpeglib.h")
 -	def get_include(args): return []
 -	def get_libpath(args): return []
-+	def present(args): return os.path.exists("/usr/local/include/jpeglib.h")
-+	def get_include(args): return ['/usr/local/include']
-+	def get_libpath(args): return ['/usr/local/lib']
++	def present(args): return os.path.exists("%%LOCALBASE%%/include/jpeglib.h")
++	def get_include(args): return ['%%LOCALBASE%%/include']
++	def get_libpath(args): return ['%%LOCALBASE%%/lib']
  	def get_libs(args): return ['jpeg']
  
  class pthread(globalinfo.library):



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