fix for math/octave on AMD64.

Roland Smith rsmith at xs4all.nl
Sat Dec 4 01:50:31 PST 2004


The attached patch allows octave to build on the amd64
platform. Basically, on amd64 octave is compiled with --disable-shared.

Roland
-- 
R.F. Smith                           /"\    ASCII Ribbon Campaign
r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in email
http://www.xs4all.nl/~rsmith/         X     No Word docs in email
                                     / \    Respect for open standards
-------------- next part --------------
--- Makefile.orig	Fri Dec  3 20:36:40 2004
+++ Makefile	Sat Dec  4 10:43:13 2004
@@ -23,10 +23,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${ARCH} == "amd64"
-BROKEN=		"Does not build on amd64 (Shared libraries must be compiled with -fPIC)"
-.endif
-
 .if ${PORTOBJFORMAT} == "elf"
 GNU_HOST=	${ARCH}-portbld-freebsd${OSREL}
 .else
@@ -38,11 +34,16 @@
 BLAS_LIBS=	"-L${LOCALBASE}/lib -lf77blas -lcblas -latlas"
 USE_GMAKE=	yes
 GNU_CONFIGURE=	yes
-USE_REINPLACE=	yes
 
-CONFIGURE_ARGS=	--host=${GNU_HOST} \
-		--with-fftw --with-blas=${BLAS_LIBS} --with-lapack=-lalapack \
-		--enable-shared
+CONIGURE_ARGS=  --host=${GNU_HOST} \
+		--with-fftw --with-blas=${BLAS_LIBS} --with-lapack=-lalapack
+.if ${ARCH} == "amd64"
+CONFIGURE_ARGS+= --disable-shared
+.else
+CONFIGURE_ARGS+= --enable-shared
+USE_REINPLACE=  yes
+.endif
+
 CONFIGURE_ENV=	CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
 		LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
 		CPPFLAGS="${CPPFLAGS} -I${LOCALBASE}/include" \
@@ -62,12 +63,14 @@
 	@${RM} -f ${WRKSRC}/doc/interpreter/octave.info*
 	@${RM} -f ${WRKSRC}/doc/liboctave/liboctave.info*
 post-install:
+.if ${ARCH} != "amd64"
 	${RM} ${PREFIX}/bin/octave
 	@${CP} ${FILESDIR}/octave ${WRKDIR}
 	@${REINPLACE_CMD} -e 's,%%PREFIX%%,${PREFIX},g ; \
 			      s,%%OCTAVE_VERSION%%,${OCTAVE_VERSION},g' \
 			      ${WRKDIR}/octave
 	${INSTALL_SCRIPT} ${WRKDIR}/octave ${PREFIX}/bin
+.endif
 	${INSTALL_DATA} ${WRKSRC}/doc/liboctave/liboctave.info ${PREFIX}/info
 	install-info --entry='* Octave: (octave).	Interactive language for numerical computations.' $(PREFIX)/info/octave.info $(PREFIX)/info/dir
 	install-info --entry='* LibOctave: (liboctave).	C++ class library for Octave.' $(PREFIX)/info/liboctave.info $(PREFIX)/info/dir
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20041204/7d533997/attachment.bin


More information about the freebsd-ports mailing list