Bug 58849 - Mozilla port overwrites Java plugin symlinks
Summary: Mozilla port overwrites Java plugin symlinks
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: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-03 00:10 UTC by Joe Kelsey
Modified: 2003-11-11 04:12 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 Joe Kelsey 2003-11-03 00:10:21 UTC
	Stop changing my java plugin link from 1.4.1 to 1.3.1

Fix: 

Detect presence or absence of various java versions.  Do not
	overwrite symbolic links in /usr/X11R6/lib/browser_plugin with
	non-existant versions of the plugin.  If jad1.4 installed and no
	existing symbolic link exists, use the jdk1.4 version of the
	plugin.  If jdk1.3 installed and no symbolic link exists, use
	the jdk1.3 version.
How-To-Repeat: 	1) Install jdk1.4.
	2) Remove jdk1.3
	3) reinstall mozilla
	4) Watch as java plugin no longer loads.
Comment 1 Ceri Davies freebsd_committer freebsd_triage 2003-11-03 18:32:53 UTC
Responsible Changed
From-To: gnats-admin->freebsd-ports-bugs

Reassign misfiled PR.
Comment 2 Greg Lewis freebsd_committer freebsd_triage 2003-11-04 18:00:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->gnome

The overwriting is actually being done by the Mozilla port.  So I have 
changed the synopsis to reflect that and assigned to gnome@, as that is 
who is listed as the maintainer. 

I suggest something like this (UNTESTED): 

Index: Makefile 
=================================================================== 
RCS file: /var/fcvs/ports/www/mozilla/Makefile,v 
retrieving revision 1.147 
diff -u -r1.147 Makefile 
--- Makefile	1 Nov 2003 21:51:07 -0000	1.147 
+++ Makefile	4 Nov 2003 18:10:17 -0000 
@@ -259,9 +259,17 @@ 
if [ ! -d ${PREFIX}/lib/browser_plugins ]; then  
${MKDIR} ${PREFIX}/lib/browser_plugins ;  
fi 
-	if [ ! -L ${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ]; then  
-	    ${LN} -sf ${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so  
-	    	${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so ;  
+	if [ ! -L "${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so" ]; then  
+	    if [ -f "${LOCALBASE}/jdk1.4.1/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so" ]; then  
+		${LN} -sf "${LOCALBASE}/jdk1.4.1/jre/plugin/${ARCH}/ns610/libjavaplugin_oji.so"  
+		    "${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so" ;  
+	    elif [ -f "${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so" ]; then  
+		${LN} -sf "${LOCALBASE}/diablo-jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so"  
+		    "${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so" ;  
+	    elif [ -f "${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so" ]; then  
+		${LN} -sf "${LOCALBASE}/jdk1.3.1/jre/plugin/${ARCH}/ns600/libjavaplugin_oji.so"  
+		    "${PREFIX}/lib/browser_plugins/libjavaplugin_oji.so" ;  
+	    fi  
fi 
for pcfile in ${PKGCONFIG_FILES}; do  
${INSTALL_DATA} ${WRKSRC}/build/unix/$${pcfile}.pc
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2003-11-11 04:12:16 UTC
State Changed
From-To: open->closed

Mozilla will now cycle through the three plug-in versions in Greg's suggested 
patch, and select the best one.  New plug-ins can also be easily added.