Summary: | [PATCH] FIXED systemc installation problem and cleaned up Makefile | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Daniel Thiele <dthiele> |
Component: | Individual Port(s) | Assignee: | freebsd-ports-bugs (Nobody) <ports-bugs> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | ||
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any |
Description
Daniel Thiele
2006-02-27 00:50:02 UTC
Class Changed From-To: update->maintainer-update Fix category (submitter is maintainer) Hello,
> diff -Nur /usr/ports/cad/systemc/files/patch-configure ./files/patch-configure
> --- /usr/ports/cad/systemc/files/patch-configure Thu Jan 1 01:00:00 1970
> +++ ./files/patch-configure Sun Feb 26 23:36:43 2006
> @@ -0,0 +1,36 @@
> +--- configure.orig Sun Feb 26 23:35:41 2006
> ++++ configure Sun Feb 26 23:34:39 2006
> +@@ -3309,6 +3309,25 @@
> + AS=as
> + QT_ARCH="sparc-os2"
> + ;;
> ++ *freebsd*)
> ++ case "$CXX_COMP" in
> ++ c++ | g++)
> ++ EXTRA_CXXFLAGS="-Wall"
> ++ DEBUG_CXXFLAGS="-g"
> ++ OPT_CXXFLAGS="-O3"
> ++ TARGET_ARCH="freebsd"
> ++ CC="$CXX"
> ++ CFLAGS="$EXTRA_CXXFLAGS $OPT_CXXFLAGS"
Why do you force optimization flag to -O3? In these cases, you don't
respect the original CFLAGS. Please run
find /usr/ports -name Makefile | xargs grep OPTIMIZED_CFLAGS
to find some examples of ports dealing with this.
Regards,
--
Th. Thomas.
Hello, thank you for your hint at OPTIMIZED_CFLAGS. I went through the information you provided and adjusted the port's Makefile (hopefully in the right way). The new Makefile should now look like this (except for the $FreeBSD line): --- Makefile start --- # New ports collection makefile for: systemc # Date created: 15 December 2005 # Whom: Daniel Thiele # # $FreeBSD: ports/cad/systemc/Makefile,v 1.1 2005/12/18 11:23:43 lawrance Exp $ # PORTNAME= systemc PORTVERSION= 2.1.v1 PORTREVISION= 1 CATEGORIES= cad devel EXTRACT_SUFX= .tgz MAINTAINER= dthiele@gmx.net COMMENT= A modeling platform for system-level C++ models RESTRICTED= You have to register at http://www.systemc.org/account/register.php first USE_GMAKE= yes HAS_CONFIGURE= yes CONFIGURE_SCRIPT= ../configure CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} CONFIGURE_ARGS= --prefix=${PREFIX}/systemc ${CONFIGURE_TARGET} CONFIGURE_WRKSRC= ${WRKSRC}/objdir BUILD_WRKSRC= ${WRKSRC}/objdir INSTALL_WRKSRC= ${WRKSRC}/objdir .include <bsd.port.pre.mk> .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}) IGNORE= is restricted. You have to register at http://www.systemc.org/account/register.php and download ${DISTFILES} from there first. Then put ${DISTFILES} into ${DISTDIR} and run make again .endif .if defined(WITH_OPTIMIZED_CFLAGS) CXXFLAGS+= -O3 .endif pre-everything:: .if !defined(WITH_OPTIMIZED_CFLAGS) @${ECHO_MSG} "You can enable additional compilation optimizations" @${ECHO_MSG} "by defining WITH_OPTIMIZED_CFLAGS" .endif pre-configure: @${MKDIR} ${WRKSRC}/objdir @${REINPLACE_CMD} -e 's|\(OPT_CXXFLAGS="\).*"|\1${CXXFLAGS}"|g' \ ${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT} .include <bsd.port.post.mk> --- Makefile end --- Since REINPLACE_CMD with the above arguments replaces the entire OPT_CXXFLAGS lines of the configure script the file patch-configure can remain as it is or the CXXFLAGS line may be canged to OPT_CXXFLAGS="". Regards, Daniel State Changed From-To: open->closed Committed, thanks! |