Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Feb 2005 15:06:41 -0300
From:      Alejandro Pulver <alejandro@varnet.biz>
To:        freebsd-ports@freebsd.org
Subject:   Building port with options
Message-ID:  <20050219150641.43dd175f@ale.varnet.bsd>

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

I am making a port of an application that allows to build with the following options:

WITH_GTK	GTK+ interface (default).
WITH_SDL	Command-line interface (with WITH_SDL_AUDIO).
WITH_SDL_AUDIO	Use SDL audio instead of OSS (only available with GTK+).

The port always uses SDL, but it offers a graphical UI (GTK+). If the command-line program is built, it will automatically use SDL audio. If compiled with the GTK+ GUI, it allows the use of SDL audio or OSS. This is done by passing different options to 'configure'.

I can build it with all (3) the combinations (make -DWITH_*), but when the build terminates, I change the option "-D" to compile a different version, but it does nothing. So I have to 'make clean' or 'rm -rf work' before compiling with a different option.

I also tried 'WANT_GNOME' before including 'bsd.ports.pre.mk' and 'USE_GNOME' instead of 'WITH_GNOME'.

What am I doing wrong?

Here is the port's Makefile:

----------BEGIN----------
PORTNAME=	generator-cbiere
PORTVERSION=	0.35
PORTREVISION=	0
CATEGORIES=	emulators
MASTER_SITES=	http://www.ghostwhitecrab.com/generator/
DISTNAME=	generator-0.35-cbiere

MAINTAINER=	alejandro@varnet.biz
COMMENT=	SEGA Genesis emulator

LIB_DEPENDS=	jpeg.9:${PORTSDIR}/graphics/jpeg

USE_BZIP2=	yes
USE_REINPLACE=	yes
USE_SDL=	sdl
WRKSRC=		${WRKDIR}/generator-0.35-cbiere
USE_GMAKE=	yes
GNU_CONFIGURE=	yes
USE_AUTOCONF_VER=	259
CONFIGURE_TARGET=	--build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		LDFLAGS="-L${LOCALBASE}/lib"
MAKE_ARGS=	ACLOCAL="${TRUE}" AUTOCONF="${TRUE}" AUTOMAKE="${TRUE}" \
		AUTOHEADER="${TRUE}"

.include <bsd.port.pre.mk>

.if ${ARCH} == "alpha" && ${OSVERSION} >= 502102
BROKEN=		"Does not configure on alpha 5.x"
.endif

.if ${ARCH} == "i386"
BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
CONFIGURE_ARGS+=	--with-raze
.else
CONFIGURE_ARGS+=	--with-cmz80
.endif

.if defined(WITH_SDL)
CONFIGURE_ARGS+=	--with-sdl
PLIST_FILES=	bin/generator-cbiere-sdl
.else
CONFIGURE_ARGS+=	--with-gtk
WITH_GNOME=	gtk12
PLIST_FILES=	bin/generator-cbiere-gtk
.endif

.if defined(WITH_SDL_AUDIO) && !defined(WITH_SDL)
CONFIGURE_ARGS+=	--with-sdl-audio
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|-O3||g ; \
	 	 s|-minline-all-stringops||g ; \
		 s|-march=pentium||g ; \
		 s|-malign-loops=5||g ; \
		 s|-malign-jumps=5||g ; \
		 s|-malign-functions=5||g ; \
		 s|-Wall||g ; \
		 s|-Wunused||g ; \
		 s|-W\ ||g ; \
		 s|generator|generator-cbiere|g' ${WRKSRC}/configure.ac
	@${REINPLACE_CMD} -e 's|generator-|generator-cbiere-|g ; \
		 s|generator_|generator-cbiere_|g' \
		 ${WRKSRC}/main/Makefile.in

.include <bsd.port.post.mk>
----------END-----------



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