diff options
-rw-r--r-- | www/opera/Makefile | 17 | ||||
-rw-r--r-- | www/opera/files/extra-patch-symhack | 14 | ||||
-rw-r--r-- | www/opera/files/patch-ini_pluginpath.ini | 7 | ||||
-rw-r--r-- | www/opera/files/patch-install.sh | 46 | ||||
-rw-r--r-- | www/opera/files/symhack.c | 11 | ||||
-rw-r--r-- | www/opera/pkg-plist | 1 |
6 files changed, 68 insertions, 28 deletions
diff --git a/www/opera/Makefile b/www/opera/Makefile index f6968183ab1e..df67aa6c1e18 100644 --- a/www/opera/Makefile +++ b/www/opera/Makefile @@ -39,7 +39,6 @@ DOCSDIR= ${PREFIX}/share/doc/${PORTNAME} USE_BZIP2= yes WANT_GNOME= yes -USE_X_PREFIX= yes ONLY_FOR_ARCHS= i386 WRKSRC= ${WRKDIR}/${DISTNAME}-${OPERA_BUILD} @@ -67,6 +66,13 @@ OPERA_TYPE= 3 OPERA_TYPE= 1 .endif +.if ${OSVERSION} > 700000 +EXTRA_PATCHES= ${FILESDIR}/extra-patch-symhack +PLIST_SUB+= SYMHACK="" +.else +PLIST_SUB+= SYMHACK="@comment " +.endif + .if !defined(WITHOUT_ASPELL) LIB_DEPENDS+= aspell.16:${PORTSDIR}/textproc/aspell .endif @@ -104,14 +110,21 @@ post-patch: s|%%LOCALBASE%%|${LOCALBASE}|g ; s|%%X11BASE%%|${X11BASE}|g' \ ${WRKSRC}/install.sh ${WRKSRC}/ini/pluginpath.ini \ ${WRKSRC}/config/opera6rc + @${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/install.sh @${FIND} ${WRKSRC} -name '*.orig' -delete @${FIND} ${WRKSRC} -name '*.bak' -delete do-install: @(cd ${WRKSRC} && ./install.sh --prefix=${PREFIX}) -.if defined(WITHOUT_SHARED) && ${OSVERSION} >= 500000 post-install: +.if ${OSVERSION} > 700000 + @${CP} ${FILESDIR}/symhack.c ${WRKSRC}/ + @(cd ${WRKSRC}/ && ${CC} -shared -o symhack.so symhack.c) + @${INSTALL_DATA} ${WRKSRC}/symhack.so ${DATADIR}/ +.endif + +.if defined(WITHOUT_SHARED) && ${OSVERSION} >= 500000 @${CAT} ${PKGMESSAGE} .endif diff --git a/www/opera/files/extra-patch-symhack b/www/opera/files/extra-patch-symhack new file mode 100644 index 000000000000..cc06b1127b37 --- /dev/null +++ b/www/opera/files/extra-patch-symhack @@ -0,0 +1,14 @@ +--- install.sh.orig Thu Dec 7 02:20:36 2006 ++++ install.sh Thu Dec 7 02:21:19 2006 +@@ -842,6 +842,11 @@ + + wrapper_contain="#!/bin/sh + ++# ++# A dirty to run opera under 7.x, where the __h_error isn't defined ++# ++LD_PRELOAD=${LD_PRELOAD}:%%DATADIR%%/symhack.so ++ + # Required for Session Management + case \$0 in /*) OPERA_SCRIPT_PATH=\$0;; *) OPERA_SCRIPT_PATH=`/bin/pwd`/\$0;; esac + export OPERA_SCRIPT_PATH diff --git a/www/opera/files/patch-ini_pluginpath.ini b/www/opera/files/patch-ini_pluginpath.ini index b4c5b88e6b9c..de63ee9e44fc 100644 --- a/www/opera/files/patch-ini_pluginpath.ini +++ b/www/opera/files/patch-ini_pluginpath.ini @@ -1,6 +1,6 @@ ---- ini/pluginpath.ini.orig Tue Sep 19 17:09:09 2006 -+++ ini/pluginpath.ini Sun Sep 24 14:19:38 2006 -@@ -6,46 +6,19 @@ +--- ini/pluginpath.ini.orig Tue Sep 19 19:09:09 2006 ++++ ini/pluginpath.ini Fri Dec 8 22:38:49 2006 +@@ -6,46 +6,20 @@ plugins=$HOME/.kde/share/config/kcmnspluginrc [Paths] @@ -48,6 +48,7 @@ ; Netscape Plug-in Paths -$HOME/.netscape6/plugins=1 +%%X11BASE%%/lib/browser_plugins=1 ++%%LOCALBASE%%/lib/browser_plugins=1 $HOME/.netscape/plugins=1 -/opt/netscape/plugins=1 -/usr/lib/netscape/plugins=1 diff --git a/www/opera/files/patch-install.sh b/www/opera/files/patch-install.sh index 9e37cab9c721..98e99b3cd981 100644 --- a/www/opera/files/patch-install.sh +++ b/www/opera/files/patch-install.sh @@ -162,70 +162,70 @@ debug_msg 1 "in gnome()" - if test -d /opt/gnome/ -+ if test -d %%X11BASE%%/share/gnome/; ++ if test -d %%LOCALBASE%%/share/gnome/; then - # /opt/gnome share - if test -d /opt/gnome/share - then - # /opt/gnome icon - if test ! -d /opt/gnome/share/pixmaps/ -+ # %%X11BASE%%/share/gnome icon -+ if test ! -d %%X11BASE%%/share/gnome/pixmaps/; ++ # %%LOCALBASE%%/share/gnome icon ++ if test ! -d %%LOCALBASE%%/share/gnome/pixmaps/; then - if test -w /opt/gnome/share -+ if test -w %%X11BASE%%/share/gnome; ++ if test -w %%LOCALBASE%%/share/gnome; then - mkdir $mkdirv $mkdirp /opt/gnome/share/pixmaps/ - chmod $chmodv 755 /opt/gnome/share/pixmaps - cp $cpv $share_dir/images/opera.xpm /opt/gnome/share/pixmaps/opera.xpm -+ mkdir $mkdirv $mkdirp %%X11BASE%%/share/gnome/pixmaps/ -+ chmod $chmodv 755 %%X11BASE%%/share/gnome/pixmaps -+ cp $cpv $share_dir/images/opera.xpm %%X11BASE%%/share/gnome/pixmaps/opera.xpm ++ mkdir $mkdirv $mkdirp %%LOCALBASE%%/share/gnome/pixmaps/ ++ chmod $chmodv 755 %%LOCALBASE%%/share/gnome/pixmaps ++ cp $cpv $share_dir/images/opera.xpm %%LOCALBASE%%/share/gnome/pixmaps/opera.xpm fi - elif test -w /opt/gnome/share/pixmaps - then cp $cpv $share_dir/images/opera.xpm /opt/gnome/share/pixmaps/opera.xpm -+ elif test -w %%X11BASE%%/share/gnome/pixmaps -+ then cp $cpv $share_dir/images/opera.xpm %%X11BASE%%/share/gnome/pixmaps/opera.xpm ++ elif test -w %%LOCALBASE%%/share/gnome/pixmaps ++ then cp $cpv $share_dir/images/opera.xpm %%LOCALBASE%%/share/gnome/pixmaps/opera.xpm fi - # end /opt/gnome icon -+ # end %%X11BASE%%/share/gnome icon ++ # end %%LOCALBASE%%/share/gnome icon - # /opt/gnome link - if test -d /opt/gnome/share/gnome/apps/ -+ # %%X11BASE%%/share/gnome link -+ if test -d %%X11BASE%%/share/gnome/apps/ ++ # %%LOCALBASE%%/share/gnome link ++ if test -d %%LOCALBASE%%/share/gnome/apps/ then - if test -d /opt/gnome/share/gnome/apps/Internet/ -+ if test -d %%X11BASE%%/share/gnome/apps/Internet/ ++ if test -d %%LOCALBASE%%/share/gnome/apps/Internet/ then - if test -w /opt/gnome/share/gnome/apps/Internet - then generate_desktop /opt/gnome/share/gnome/apps/Internet -+ if test -w %%X11BASE%%/share/gnome/apps/Internet -+ then generate_desktop %%X11BASE%%/share/gnome/apps/Internet ++ if test -w %%LOCALBASE%%/share/gnome/apps/Internet ++ then generate_desktop %%LOCALBASE%%/share/gnome/apps/Internet fi - elif test -d /opt/gnome/share/gnome/apps/Networking/WWW/ -+ elif test -d %%X11BASE%%/share/gnome/apps/Networking/WWW/ ++ elif test -d %%LOCALBASE%%/share/gnome/apps/Networking/WWW/ then - if test -w /opt/gnome/share/gnome/apps/Networking/WWW - then generate_desktop /opt/gnome/share/gnome/apps/Networking/WWW -+ if test -w %%X11BASE%%/share/gnome/apps/Networking/WWW -+ then generate_desktop %%X11BASE%%/share/gnome/apps/Networking/WWW ++ if test -w %%LOCALBASE%%/share/gnome/apps/Networking/WWW ++ then generate_desktop %%LOCALBASE%%/share/gnome/apps/Networking/WWW fi - elif test -w /opt/gnome/share/gnome/apps -+ elif test -w %%X11BASE%%/share/gnome/apps ++ elif test -w %%LOCALBASE%%/share/gnome/apps then - mkdir $mkdirv $mkdirp /opt/gnome/share/gnome/apps/Internet/ - chmod $chmodv 755 /opt/gnome/share/gnome/apps/Internet - generate_desktop /opt/gnome/share/gnome/apps/Internet -+ mkdir $mkdirv $mkdirp %%X11BASE%%/share/gnome/apps/Internet/ -+ chmod $chmodv 755 %%X11BASE%%/share/gnome/apps/Internet -+ generate_desktop %%X11BASE%%/share/gnome/apps/Internet ++ mkdir $mkdirv $mkdirp %%LOCALBASE%%/share/gnome/apps/Internet/ ++ chmod $chmodv 755 %%LOCALBASE%%/share/gnome/apps/Internet ++ generate_desktop %%LOCALBASE%%/share/gnome/apps/Internet fi fi - # end /opt/gnome link - fi - # end /opt/gnome share -+ # end %%X11BASE%%/share/gnome link ++ # end %%LOCALBASE%%/share/gnome link elif test -d /usr/share/gnome/ then diff --git a/www/opera/files/symhack.c b/www/opera/files/symhack.c new file mode 100644 index 000000000000..57bc7c676de0 --- /dev/null +++ b/www/opera/files/symhack.c @@ -0,0 +1,11 @@ +#include <sys/cdefs.h> +#include <sys/types.h> +#include <netinet/in.h> +#include <netdb.h> +#include <resolv.h> + +int * +__h_error(void) +{ + return (&__res_state()->res_h_errno); +} diff --git a/www/opera/pkg-plist b/www/opera/pkg-plist index b2d2aa95e5d9..a6952eb3134e 100644 --- a/www/opera/pkg-plist +++ b/www/opera/pkg-plist @@ -74,6 +74,7 @@ bin/opera %%DATADIR%%/svg-sa.dat %%DATADIR%%/svg-mobd.dat %%DATADIR%%/svg-mo.dat +%%SYMHACK%%%%DATADIR%%/symhack.so %%GNOME%%share/gnome/apps/Internet/opera.desktop %%GNOME%%share/gnome/pixmaps/opera.xpm |