Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2006 00:41:56 GMT
From:      Daniel Thiele <dthiele@gmx.net>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/93879: [PATCH] FIXED systemc installation problem and cleaned up Makefile
Message-ID:  <200602270041.k1R0fuWV046463@www.freebsd.org>
Resent-Message-ID: <200602270050.k1R0o3wY006554@freefall.freebsd.org>

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

>Number:         93879
>Category:       ports
>Synopsis:       [PATCH] FIXED systemc installation problem and cleaned up Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Feb 27 00:50:02 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Daniel Thiele
>Release:        6.1-PRERELEASE i386
>Organization:
none
>Environment:
FreeBSD iridium.vnws.lan 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #1: Thu Feb 23 14:24:24 CET 2006     ianus@iridium.vnws.lan:/usr/obj/usr/src/sys/kernel_v0_6_0_44bsd_nosnd_ich_s3  i386
>Description:
1.)
After a "make install" in /usr/ports/cad/systemc I got the following error message:

===>  Installing for systemc-2.1.v1
===>   Generating temporary packing list
===>  Checking if cad/systemc already installed
Making install in src
gmake[1]: Entering directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src'
Making install in sysc
gmake[2]: Entering directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc'
Making install in kernel
gmake[3]: Entering directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc/kernel'
gmake[4]: Entering directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc/kernel'
gmake[4]: Nothing to be done for `install-exec-am'.
/usr/local/bin/bash ../../../../config/mkinstalldirs ../include/sysc/kernel
mkdir 
mkdir: .: No such file or directory
gmake[4]: *** [install-data-local] Error 1
gmake[4]: Leaving directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc/kernel'
gmake[3]: *** [install-am] Error 2
gmake[3]: Leaving directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc/kernel'
gmake[2]: *** [install-recursive] Error 1
gmake[2]: Leaving directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src/sysc'
gmake[1]: *** [install-recursive] Error 1
gmake[1]: Leaving directory `/usr/ports/cad/systemc/work/systemc-2.1.v1/objdir/src'
gmake: *** [install-recursive] Error 1
*** Error code 2

Stop in /usr/ports/cad/systemc.


2.)
Since the systemc port is restricted (see: http://www.systemc.org/account/register.php) it should also be listet in ports/LEGAL:
systemc-2.1.v1.tgz      cad/systemc          License agreement required


3.)
I also cleaned up the Makefile to let the FreeBSD ports infrastucture do most of the configure, make and install work. While doing this I also removed the utilization of the autotools and thus files/patch-configure.in is replaced by files/patch-configure (see fix below).
One thing that may need some testing is whether a restriction with "ONLY_FOR_ARCHS= i386" is neccessary. Since I do not own any amd64 hardware I am not sure whether systemc works on this architecture too.


4.)
Finally I made pkg-descr look pretty and made some sligth adjustments to pkg-plist
>How-To-Repeat:
1.)
With a recently checked out ports tree do:
cd /usr/ports/cad/systemc && make install
>Fix:
Apply the following patch to cad/systemc:
--------------------------------------------------------------------
diff -Nur /usr/ports/cad/systemc/Makefile ./Makefile
--- /usr/ports/cad/systemc/Makefile	Sun Dec 18 12:23:43 2005
+++ ./Makefile	Mon Feb 27 00:22:50 2006
@@ -7,20 +7,24 @@
 
 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"
+RESTRICTED=	You have to register at http://www.systemc.org/account/register.php first
 
-USE_AUTOTOOLS=	aclocal:19 automake:19 autoheader:259 autoconf:259
 USE_GMAKE=	yes
 HAS_CONFIGURE=	yes
-GNU_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>
 
@@ -28,20 +32,7 @@
 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
 
-do-configure:
+pre-configure:
 	@${MKDIR} ${WRKSRC}/objdir
-	@(cd ${WRKSRC}/objdir && \
-	${CONFIGURE_ENV} && \
-	${CONFIGURE_SCRIPT} --prefix=${PREFIX}/${PORTNAME})
-
-do-build:
-	@(cd ${WRKSRC}/objdir && \
-	${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
-	${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
-
-do-install:
-	@(cd ${WRKSRC}/objdir && \
-	${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} \
-	${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
 
 .include <bsd.port.post.mk>
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"
++                ;;
++            *)
++                { { echo "$as_me:$LINENO: error: \"sorry...compiler not supported\"" >&5
++echo "$as_me: error: \"sorry...compiler not supported\"" >&2;}
++   { (exit 1); exit 1; }; }
++		;;
++        esac
++	AS=as
++        QT_ARCH="iX86"
++        ;;
+     *linux*)
+         case "$CXX_COMP" in
+             c++ | g++)
+@@ -3387,7 +3406,6 @@
+ 
+ 
+ test "x$prefix" = xNONE && prefix=$srcdir
+-current_dir=`pwd`; cd $prefix; prefix=`pwd`; cd $current_dir
+ 
+ 
+ 
diff -Nur /usr/ports/cad/systemc/files/patch-configure.in ./files/patch-configure.in
--- /usr/ports/cad/systemc/files/patch-configure.in	Sat Feb 25 16:12:58 2006
+++ ./files/patch-configure.in	Thu Jan  1 01:00:00 1970
@@ -1,35 +0,0 @@
---- configure.in.orig	Mon Apr 11 23:49:25 2005
-+++ configure.in	Fri Dec 16 23:06:05 2005
-@@ -111,6 +111,23 @@
- 	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"
-+                ;;
-+            *)
-+                AC_MSG_ERROR("sorry...compiler not supported")
-+		;;
-+        esac
-+	AS=as
-+        QT_ARCH="iX86"
-+        ;;
-     *linux*)
-         case "$CXX_COMP" in
-             c++ | g++)
-@@ -187,7 +204,7 @@
- dnl
-
- test "x$prefix" = xNONE && prefix=$srcdir
--current_dir=`pwd`; cd $prefix; prefix=`pwd`; cd $current_dir
-+dnl current_dir=`pwd`; cd $prefix; prefix=`pwd`; cd $current_dir
-
- dnl
- dnl Substitution variables.
diff -Nur /usr/ports/cad/systemc/pkg-descr ./pkg-descr
--- /usr/ports/cad/systemc/pkg-descr	Sun Dec 18 12:23:43 2005
+++ ./pkg-descr	Sun Feb 26 23:07:06 2006
@@ -1,11 +1,9 @@
 SystemC provides hardware-oriented constructs within the context of C++ 
-as a
-class library implemented in standard C++.  Its use spans design and
+as a class library implemented in standard C++.  Its use spans design and
 verification from concept to implementation in hardware and software.
 
 SystemC provides an interoperable modeling platform which enables the
 development and exchange of very fast system-level C++ models. It also 
-provides
-a  stable platform for development of system-level tools.
+provides a  stable platform for development of system-level tools.
 
 WWW:	http://www.systemc.org/
diff -Nur /usr/ports/cad/systemc/pkg-plist ./pkg-plist
--- /usr/ports/cad/systemc/pkg-plist	Sun Jan 22 02:26:41 2006
+++ ./pkg-plist	Sun Feb 26 23:07:06 2006
@@ -280,10 +280,10 @@
 systemc/include/systemc.h
 systemc/lib-freebsd/libsystemc.a
 @dirrmtry systemc/docs
-@dirrm systemc/examples/sysc/2.1
-@dirrm systemc/examples/sysc/fft
-@dirrm systemc/examples/sysc
-@dirrm systemc/examples/systemc
+@dirrmtry systemc/examples/sysc/2.1
+@dirrmtry systemc/examples/sysc/fft
+@dirrmtry systemc/examples/sysc
+@dirrmtry systemc/examples/systemc
 @dirrmtry systemc/examples
 @dirrm systemc/include/sysc/communication
 @dirrm systemc/include/sysc/datatypes/bit
--------------------------------------------------------------------

Then in cad/systemc do:
% rm files/patch-configure.in*
% rm *.orig
% mv patch-configure files/

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



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