From b107927c8aabc6bf72e8dead20b991faabe6d2f6 Mon Sep 17 00:00:00 2001 From: pav Date: Wed, 22 Mar 2006 00:09:22 +0000 Subject: - Fix mozilla renderer: * Fix patching of start script * Add option * Use bsd.gecko.mk framework * WITH_MOZILLA is now WITH_GECKO * Fix initialization bug which caused segfault on startup Reported by: mezz (1,5) Fixed by: marcus (5) Clue provided by: marcus (3) --- net/liferea/Makefile | 40 +++++++++++++--------------------- net/liferea/files/patch-src-liferea.in | 37 +++++++++++++++++++++++++++++++ net/liferea/files/patch-src::liferea | 37 ------------------------------- 3 files changed, 52 insertions(+), 62 deletions(-) create mode 100644 net/liferea/files/patch-src-liferea.in delete mode 100644 net/liferea/files/patch-src::liferea (limited to 'net') diff --git a/net/liferea/Makefile b/net/liferea/Makefile index 818fae05b14f..4fd85c3dcc15 100644 --- a/net/liferea/Makefile +++ b/net/liferea/Makefile @@ -7,6 +7,7 @@ PORTNAME= liferea PORTVERSION= 1.0.8 +PORTREVISION= 1 CATEGORIES= net gnome MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= liferea @@ -15,6 +16,7 @@ MAINTAINER= pav@FreeBSD.org COMMENT= Simple RSS/RDF feed reader USE_X_PREFIX= yes +USE_GECKO= mozilla firefox USE_GNOME= gnomeprefix gnomehack libgtkhtml USE_GMAKE= yes GNU_CONFIGURE= yes @@ -24,31 +26,17 @@ CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include" \ MAN1= liferea.1 GCONF_SCHEMAS= liferea.schemas -OPTIONS= DBUS "Enable dbus support" on +OPTIONS= DBUS "Enable dbus support" on \ + MOZILLA "Use Mozilla for rendering" off .include .ifdef WITH_MOZILLA -.if ${WITH_MOZILLA}=="mozilla" || ${WITH_MOZILLA}=="yes" -MOZILLA= mozilla -MOZ_BUILD= mozilla -.elif ${WITH_MOZILLA}=="mozilla-devel" -MOZILLA= mozilla-devel -MOZ_BUILD= mozilla -MOZ_SUFFIX= -devel -.elif ${WITH_MOZILLA}=="firefox" -MOZILLA= firefox -MOZ_BUILD= firefox -.else -IGNORE= : Available options for WITH_MOZILLA are: mozilla mozilla-devel firefox -.endif -.endif # WITH_MOZILLA - -.ifdef MOZILLA -BUILD_DEPENDS+= ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA} -RUN_DEPENDS+= ${X11BASE}/lib/${MOZILLA}/components/libwidget_gtk2.so:${PORTSDIR}/www/${MOZILLA} +.include "${PORTSDIR}/www/mozilla/bsd.gecko.mk" +CONFIGURE_ARGS+=--enable-gecko=${GECKO} PLIST_SUB= MOZ="" .else +CONFIGURE_ARGS+=--disable-gecko PLIST_SUB= MOZ="@comment " .endif @@ -59,14 +47,16 @@ LIB_DEPENDS+= dbus-1.2:${PORTSDIR}/devel/dbus .endif post-patch: - ${REINPLACE_CMD} -e 's,/usr/lib/mozilla,${X11BASE}/lib/${MOZ_BUILD},g' \ - ${WRKSRC}/src/liferea +.ifdef WITH_MOZILLA + ${REINPLACE_CMD} -e 's,/usr/lib/mozilla,${X11BASE}/lib/${GECKO},g ; \ + s,%FREEBSD_MOZILLA_HOME%,${X11BASE}/lib/${GECKO},' \ + ${WRKSRC}/src/liferea.in ${REINPLACE_CMD} -e 's,firefox-,$$gecko_provider-,g' \ - -e 's,\(gecko_provider=\).*$$,\1${MOZ_BUILD},' \ - -e 's,-gtkmozembed,-gtkmozembed${MOZ_SUFFIX},' \ + -e 's,\(gecko_provider=\).*$$,\1${GECKO},' \ -e 's,{print $$1},{print $$2},g' \ ${WRKSRC}/configure - ${REINPLACE_CMD} -e 's,%FREEBSD_MOZILLA_HOME%,${X11BASE}/lib/${MOZILLA},' \ - ${WRKSRC}/src/liferea + ${REINPLACE_CMD} -e 's|gtk_moz_embed_set_comp_path(NULL)|gtk_moz_embed_set_comp_path("${X11BASE}/lib/${GECKO}")|' \ + ${WRKSRC}/src/mozilla/mozembed.c +.endif .include diff --git a/net/liferea/files/patch-src-liferea.in b/net/liferea/files/patch-src-liferea.in new file mode 100644 index 000000000000..79bda00feba3 --- /dev/null +++ b/net/liferea/files/patch-src-liferea.in @@ -0,0 +1,37 @@ +--- src/liferea.in.orig Sun Mar 19 03:50:55 2006 ++++ src/liferea.in Tue Mar 21 09:56:50 2006 +@@ -22,15 +22,17 @@ + + look_for_mozilla() { + +- results=`ls -1d $1 2>/dev/null | sort -n` +- while [ -n "$results" ] +- do +- path=`echo "$results" | tail -n 1` +- results=`echo "$results" | grep -v $path` +- path=`dirname $path` # strip comm.jar +- path=`dirname $path` # strip chrome +- run_with_mozilla $path +- ++ for p in $1; do ++ results=`ls -1d $p 2>/dev/null | sort -n` ++ while [ -n "$results" ] ++ do ++ path=`echo "$results" | tail -n 1` ++ results=`echo "$results" | grep -v $path` ++ path=`dirname $path` # strip comm.jar ++ path=`dirname $path` # strip chrome ++ run_with_mozilla $path ++ ++ done + done + } + +@@ -39,6 +41,7 @@ + fi + + @MOZILLA_LIB_DIR_SEARCH@ ++look_for_mozilla "%FREEBSD_MOZILLA_HOME%/chrome/comm.jar" + look_for_mozilla "/usr/lib/mozilla*/chrome/comm.jar" + look_for_mozilla "/usr/lib64/mozilla*/chrome/comm.jar" + look_for_mozilla "/usr/local/mozilla*/chrome/comm.jar" diff --git a/net/liferea/files/patch-src::liferea b/net/liferea/files/patch-src::liferea deleted file mode 100644 index e1b2db08aced..000000000000 --- a/net/liferea/files/patch-src::liferea +++ /dev/null @@ -1,37 +0,0 @@ ---- src/liferea.orig Fri Mar 3 23:18:13 2006 -+++ src/liferea Thu Mar 16 17:18:19 2006 -@@ -22,15 +22,17 @@ - - look_for_mozilla() { - -- results=`ls -1d $1 2>/dev/null | sort -n` -- while [ -n "$results" ] -- do -- path=`echo "$results" | tail -n 1` -- results=`echo "$results" | grep -v $path` -- path=`dirname $path` # strip comm.jar -- path=`dirname $path` # strip chrome -- run_with_mozilla $path -- -+ for p in $1; do -+ results=`ls -1d $p 2>/dev/null | sort -n` -+ while [ -n "$results" ] -+ do -+ path=`echo "$results" | tail -n 1` -+ results=`echo "$results" | grep -v $path` -+ path=`dirname $path` # strip comm.jar -+ path=`dirname $path` # strip chrome -+ run_with_mozilla $path -+ -+ done - done - } - -@@ -38,6 +40,7 @@ - run_with_mozilla $MOZILLA_FIVE_HOME - fi - -+look_for_mozilla "%FREEBSD_MOZILLA_HOME%/chrome/comm.jar" - look_for_mozilla "/usr/lib/mozilla" - look_for_mozilla "/usr/lib/mozilla*/chrome/comm.jar" - look_for_mozilla "/usr/local/mozilla*/chrome/comm.jar" -- cgit