Bug 171932 - wrong excutable program installed in ports/biology/mopac
Summary: wrong excutable program installed in ports/biology/mopac
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Xin LI
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 02:20 UTC by jszhao
Modified: 2013-04-29 18:40 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jszhao 2012-09-25 02:20:06 UTC
when ran the following command, no correct ouput...

%cp /usr/local/share/examples/mopac/test/1scf.dat .
%mopac7 1scf

it output:
starting mopac7 job 1scf
/usr/local/bin/mopac7: ./src/mopac7: not found
mopac7 job 1scf finished

In fact, ``./src/mopac7'' is not installed. The port just install the script file ``run_mopac7'', and rename it to ``mopac7''.

Fix: 

I don't know how to patch the Makefile in order to install correct file. I just try the following way manually, and it works.

cd /usr/ports/biology/mopac
make -DBATCH install
cd /usr/local/bin
## the mopac7 in /usr/local/bin is actually a script file, 
## which call the real mopac7 program
## At the same time, line 22 of script file ``mopac7'' contains path ``./src'',
## which I think should be remove. So line 22 may be changed to ``mopac7'', 
## and then change the script file to ``runmopac7''
mv mopac7 runmopac7
## the following ``mopac7'' is the real one that should be installed.
## However it is not be installed in the current ports.
cp /usr/ports/biology/mopac/work/mopac7-1.11/src/.libs/mopac7 .
cd /usr/ports/biology/mopac
make clean

## Test...
cd ~
cp /usr/local/share/examples/mopac/test/1scf.dat .
runmopac7 1scf

Now, it give the correct output.
How-To-Repeat: cd /usr/ports/biology/mopac
make -DBATCH install clean
cd ~
cp /usr/local/share/examples/mopac/test/1scf.dat .
mopac7 1scf
Comment 1 dfilter service freebsd_committer freebsd_triage 2013-04-29 18:30:17 UTC
Author: delphij
Date: Mon Apr 29 17:30:09 2013
New Revision: 316832
URL: http://svnweb.freebsd.org/changeset/ports/316832

Log:
  Workaround the way mopac installs executables.
  
  PR:		ports/171932
  Reported by:	Jinsong Zhao <jszhao yeah net>

Modified:
  head/biology/mopac/Makefile
  head/biology/mopac/pkg-plist

Modified: head/biology/mopac/Makefile
==============================================================================
--- head/biology/mopac/Makefile	Mon Apr 29 16:43:05 2013	(r316831)
+++ head/biology/mopac/Makefile	Mon Apr 29 17:30:09 2013	(r316832)
@@ -7,7 +7,7 @@
 
 PORTNAME=	mopac
 PORTVERSION=	7.${MOPAC_SUBVERSION}
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	biology
 MASTER_SITES=	SF/${PORTNAME}7/${PORTNAME}7/${PORTNAME}7-1.00
@@ -34,10 +34,12 @@ post-patch:
 	@${REINPLACE_CMD} -e '/pkgconfig/s|$$(libdir)|$$(prefix)/libdata|g' \
 		${WRKSRC}/Makefile.am
 	@${REINPLACE_CMD} -e '/usage/s|run_||g' \
+		-e 's|./src/mopac7|${PREFIX}/libexec/mopac7|g' \
 		${WRKSRC}/run_${PORTNAME}7
 
 post-install:
 	${INSTALL_SCRIPT} ${WRKSRC}/run_${PORTNAME}7 ${PREFIX}/bin/${PORTNAME}7
+	${INSTALL_PROGRAM} ${WRKSRC}/src/.libs/${PORTNAME}7 ${PREFIX}/libexec/${PORTNAME}7
 .if !defined(NOPORTEXAMPLES)
 	@${MKDIR} ${EXAMPLESDIR}/test
 	${INSTALL_DATA} ${WRKSRC}/tests/*.dat ${EXAMPLESDIR}/test

Modified: head/biology/mopac/pkg-plist
==============================================================================
--- head/biology/mopac/pkg-plist	Mon Apr 29 16:43:05 2013	(r316831)
+++ head/biology/mopac/pkg-plist	Mon Apr 29 17:30:09 2013	(r316832)
@@ -5,6 +5,7 @@ lib/libmopac7.la
 lib/libmopac7.so
 lib/libmopac7.so.0
 libdata/pkgconfig/libmopac7.pc
+libexec/mopac7
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/test/1scf.dat
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/test/elements.dat
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/test/force.dat
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 2 Xin LI freebsd_committer freebsd_triage 2013-04-29 18:30:22 UTC
State Changed
From-To: open->closed

A fix have been committed as r316832. 


Comment 3 Xin LI freebsd_committer freebsd_triage 2013-04-29 18:30:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->delphij

Take.