Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Aug 2009 20:13:44 -0700
From:      Gabriele Cecchetti <gabriele.cecchetti@gmail.com>
To:        bkoenig@alpha-tierchen.de
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: omnetpp-3.3_3
Message-ID:  <4A823368.9060802@gmail.com>

next in thread | raw e-mail | index | archive | help
Probably there is an error in the Makefile of omnetpp:

When I do portupgrade at the install phase the following output is shown:

--->  Installing the new version via the port
===>  Installing for omnetpp-3.3_3
===>   omnetpp-3.3_3 depends on executable: convert - found
===>   omnetpp-3.3_3 depends on executable: dot - found
===>   omnetpp-3.3_3 depends on executable: doxygen - found
===>   omnetpp-3.3_3 depends on executable: giftrans - found
===>   omnetpp-3.3_3 depends on file: /usr/local/bin/perl5.10.0 - found
===>   omnetpp-3.3_3 depends on executable: pkg-config - found
===>   omnetpp-3.3_3 depends on shared library: BLT24 - found
===>   omnetpp-3.3_3 depends on shared library: tcl84 - found
===>   omnetpp-3.3_3 depends on shared library: tk84 - found
===>   omnetpp-3.3_3 depends on shared library: glib-12.3 - found
===>   omnetpp-3.3_3 depends on shared library: xml.5 - found
===>   omnetpp-3.3_3 depends on shared library: xml2.5 - found
===>   omnetpp-3.3_3 depends on shared library: xslt.2 - found
cp: pkg-plist: No such file or directory
*** Error code 1

Stop in /usr/ports/science/omnetpp.
*** Error code 1

Stop in /usr/ports/science/omnetpp.
*** Error code 1

Stop in /usr/ports/science/omnetpp.
** Command failed [exit code 1]: /usr/bin/script -qa 
/tmp/portupgrade20090812-79645-1tpm94n-0 env UPGRADE_TOOL=portupgrade 
UPGRADE_PORT=omnetpp-3.3_2 UPGRADE_PORT_VER=3.3_2 make reinstall
--->  Restoring the old version
** Fix the installation problem and try again.
[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... - 298 packages 
found (-0 +1) . done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
         ! science/omnetpp (omnetpp-3.3_2)       (install error)

As you see the error is:
cp: pkg-plist: No such file or directory

This is produced by the Makefile 85th line:
pre-install:
         @${CP} pkg-plist ${PLIST}

Probably this work when port working directory is inside
the port directory.
But when working directory is elsewhere (e.g. in my case in a different 
working partition) it does not work because pkg-plist is still
in the port directory.

To correct this error I suggest the following change (tested):
pre-install:
         @(cd ${PORTSDIR}/science/omnetpp;; \
                 ${CP} pkg-plist ${PLIST} \
	)

or (not tested):
pre-install:
	@${CP} ${PORTSDIR}/science/omnetpp/pkg-plist ${PLIST}

I don't know if it is better to use another more elegant form to fix 
this at this moment.

Having a working directory is legal and this is set putting the 
following variable in /etc/make.conf
WRKDIRPREFIX=   /somedir

Check it, and when you can, please update the Makefile.

Cheers,
Gabriele




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