Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 14:47:25 +0200 (CEST)
From:      Stefan Sperling <freebsd-gnats@stsp.in-berlin.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/102691: [maintainer update] small fixes for emulators/zsnes
Message-ID:  <200608301247.k7UClPbu007546@ted.stsp.lan>
Resent-Message-ID: <200608301300.k7UD0YDx093341@freefall.freebsd.org>

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

>Number:         102691
>Category:       ports
>Synopsis:       [maintainer update] small fixes for emulators/zsnes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 30 13:00:33 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Sperling
>Release:        FreeBSD 6.1-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD ted.stsp.lan 6.1-RELEASE-p5 FreeBSD 6.1-RELEASE-p5 #0: Mon Aug 28 22:42:19 CEST 2006 stsp@ted.stsp.lan:/usr/mylocal/obj/usr/src/sys/TED i386


	
>Description:
	These are a couple of small fixes and improvements I have
	accumulated for the emulators/zsnes port:

	* Heed CFLAGS and CPPFLAGS set in /etc/make.conf.
	  Without this, C/C++ code is not optimised for ${CPUTYPE}
	  but always for i386 instead.
	  CFLAGS were ignored entirely before this update, even
	  though the port contains both C and C++ code.
	  CPPFLAGS were passed to configure but overridden again
	  for the actual compile.
	* Only search headers and libaries in ${X11BASE} if building
	  with X11 support. This is rather cosmetic, really.
	* Fix configure script summary to report correct zsnes version.
	* Fix compiler warnings about __FreeBSD__ being redefined.

>How-To-Repeat:
>Fix:

--- Makefile.orig	Wed Aug  9 03:46:18 2006
+++ Makefile	Wed Aug 30 14:26:50 2006
@@ -33,14 +33,15 @@
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
 CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CONFIGURE_ENV=	CFLAGS="${CFLAGS}" CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 ALL_TARGET=	ALL
 
 MAN1=		zsnes.1
 PLIST_FILES=	bin/zsnes
 
-CPPFLAGS=	-I${LOCALBASE}/include -I${X11BASE}/include
-LDFLAGS=	-L${LOCALBASE}/lib -L${X11BASE}/lib
+CFLAGS+=	-I${LOCALBASE}/include
+CPPFLAGS+=	-I${LOCALBASE}/include
+LDFLAGS+=	-L${LOCALBASE}/lib
 
 .include <bsd.port.pre.mk>
 
@@ -49,6 +50,9 @@
 PKGNAMESUFFIX=	-nox11
 .else
 CONFIGURE_ARGS+=--with-x
+CFLAGS+=	-I${X11BASE}/include
+CPPFLAGS+=	-I${X11BASE}/include
+LDFLAGS+=	-L${X11BASE}/lib
 .endif
 
 .if defined(WITH_OPENGL)
@@ -62,6 +66,8 @@
 	@${REINPLACE_CMD} -e \
 		's| -pipe||g ; \
 		 s| -I/usr/local/include||g ; \
+		 s|^VERSION=1.41|VERSION=${PORTVERSION}|; \
+		 s| -D__FreeBSD__||g; \
 		 s| -I/usr/include||g ; \
 		 s| -O3 .* -s||g' ${WRKSRC}/configure
 	@${REINPLACE_CMD} -e \


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



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