- make help button actually work and display help

- add update-mime goo
- take over maintainership

feedback and ok landry
This commit is contained in:
ajacoutot 2007-10-18 14:18:40 +00:00
parent 4e8f2f4045
commit df1e05c5c4
8 changed files with 202 additions and 60 deletions

View File

@ -1,13 +1,15 @@
# $OpenBSD: Makefile,v 1.47 2007/07/30 17:02:11 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.48 2007/10/18 14:18:40 ajacoutot Exp $
COMMENT= technical diagrams drawing tool
DISTNAME= dia-0.96.1
PKGNAME= ${DISTNAME}p2
PKGNAME= ${DISTNAME}p3
CATEGORIES= graphics
HOMEPAGE= http://live.gnome.org/Dia/
MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
MASTER_SITES= ${MASTER_SITE_GNOME:=sources/dia/0.96/}
# GPL
@ -15,18 +17,21 @@ PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
WANTLIB= X11 Xau Xcursor Xdmcp Xext Xfixes Xi Xinerama Xrandr \
Xrender atk-1.0 c cairo expat fontconfig freetype \
glib-2.0 glitz gmodule-2.0 gobject-2.0 gthread-2.0 m \
pango-1.0 pangocairo-1.0 pangoft2-1.0 png pthread xml2 z
BUILD_DEPENDS= :p5-XML-Parser-*:textproc/p5-XML-Parser \
::textproc/docbook-xsl
::textproc/xmlto \
::textproc/docbook
LIB_DEPENDS= gdk-x11-2.0,gdk_pixbuf-2.0,gtk-x11-2.0::x11/gtk+2 \
art_lgpl_2.>=5::graphics/libart \
popt::devel/popt \
xslt.>=1::textproc/libxslt
RUN_DEPENDS= :desktop-file-utils-*:devel/desktop-file-utils
RUN_DEPENDS= :desktop-file-utils-*:devel/desktop-file-utils \
:shared-mime-info-*:misc/shared-mime-info
MODULES= devel/gettext
@ -58,7 +63,14 @@ WANTLIB+= gthread-2.0 gnomevfs-2 ORBitCosNaming-2 crypto \
CONFIGURE_ARGS+= --disable-gnome
.endif
post-configure:
@rm -f ${WRKSRC}/doc/en/dia.1
pre-configure:
@perl -pi -e 's,!!PREFIX!!,${PREFIX},g' \
${WRKSRC}/app/commands.c
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dia/html/{en,pl}
xmlto -o ${PREFIX}/share/doc/dia/html/en html ${WRKSRC}/doc/en/dia.xml
xmlto -o ${PREFIX}/share/doc/dia/html/pl html ${WRKSRC}/doc/pl/dia.xml
@cd ${PREFIX}/share/doc/dia/html && ln -s en C
.include <bsd.port.mk>

View File

@ -0,0 +1,51 @@
$OpenBSD: patch-app_commands_c,v 1.1 2007/10/18 14:18:40 ajacoutot Exp $
--- app/commands.c.orig Sun Mar 18 20:49:14 2007
+++ app/commands.c Thu Oct 18 14:02:37 2007
@@ -523,16 +523,13 @@ edit_redo_callback (GtkAction *action)
void
help_manual_callback (GtkAction *action)
{
-#ifdef GNOME
- gnome_help_display("dia", NULL, NULL);
-#else
char *helpdir, *helpindex = NULL, *command;
guint bestscore = G_MAXINT;
GDir *dp;
const char *dentry;
GError *error = NULL;
- helpdir = dia_get_data_directory("help");
+ helpdir = g_strdup("!!PREFIX!!/share/doc/dia/html");
if (!helpdir) {
message_warning(_("Could not find help directory"));
return;
@@ -581,13 +578,16 @@ help_manual_callback (GtkAction *action)
ShellExecuteA (0, "open", helpindex, NULL, helpdir, SW_SHOWNORMAL);
#else
command = getenv("BROWSER");
+#ifdef GNOME
command = g_strdup_printf("%s 'file://%s' &", command ? command : "gnome-open", helpindex);
+#else
+ command = g_strdup_printf("%s '%s' &", command ? command : "xterm -e lynx", helpindex);
+#endif
system(command);
g_free(command);
#endif
g_free(helpindex);
-#endif
}
static void
@@ -599,7 +599,11 @@ activate_url (GtkAboutDialog *about,
ShellExecuteA (0, "open", link, NULL, NULL, SW_SHOWNORMAL);
#else
gchar *command = getenv("BROWSER");
+#ifdef GNOME
command = g_strdup_printf("%s '%s' &", command ? command : "gnome-open", link);
+#else
+ command = g_strdup_printf("%s '%s' &", command ? command : "xterm -e lynx", link);
+#endif
system(command);
g_free(command);
#endif

View File

@ -1,6 +1,15 @@
$OpenBSD: patch-doc_Makefile_in,v 1.1 2007/04/06 10:10:01 ajacoutot Exp $
--- doc/Makefile.in.orig Thu Apr 5 23:04:49 2007
+++ doc/Makefile.in Thu Apr 5 23:05:00 2007
$OpenBSD: patch-doc_Makefile_in,v 1.2 2007/10/18 14:18:40 ajacoutot Exp $
--- doc/Makefile.in.orig Thu Mar 29 11:15:09 2007
+++ doc/Makefile.in Thu Oct 18 11:27:51 2007
@@ -276,7 +276,7 @@ EXTRA_DIST = \
shape.dtd \
sheet.dtd
-@HAVE_GNOME_FALSE@helpdir = $(pkgdatadir)/help
+@HAVE_GNOME_FALSE@helpdir = $(datadir)/gnome/help/dia
@HAVE_GNOME_TRUE@helpdir = $(datadir)/gnome/help/dia
all: all-recursive
@@ -590,7 +590,7 @@ uninstall-info: uninstall-info-recursive
# a simple rule to symlink en to C

View File

@ -1,15 +1,16 @@
$OpenBSD: patch-doc_en_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
$OpenBSD: patch-doc_en_Makefile_in,v 1.4 2007/10/18 14:18:40 ajacoutot Exp $
--- doc/en/Makefile.in.orig Thu Mar 29 11:15:09 2007
+++ doc/en/Makefile.in Thu Apr 5 16:43:22 2007
@@ -338,6 +338,7 @@ entities =
# This variable (docdir) specifies where the documents should be installed.
# This default value should work for most packages.
@HAVE_GNOME_TRUE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+++ doc/en/Makefile.in Tue Oct 16 13:47:14 2007
@@ -332,7 +332,7 @@ docname = dia
lang = en
omffile =
entities =
-@HAVE_GNOME_FALSE@docdir = $(datadir)/help/$(docname)/$(lang)
+@HAVE_GNOME_FALSE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
# ********** You should not have to edit below this line **********
xml_files = $(entities) $(docname).xml authors.xml dia.xml \
@@ -600,7 +601,7 @@ install-data-hook-omf:
# ********** Begin of section some packagers may need to modify **********
# This variable (docdir) specifies where the documents should be installed.
@@ -600,7 +600,7 @@ install-data-hook-omf:
$(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
done; \
fi
@ -18,7 +19,7 @@ $OpenBSD: patch-doc_en_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
uninstall-local-omf:
-for file in $(srcdir)/*.omf; do \
@@ -617,7 +618,7 @@ clean-local-omf:
@@ -617,7 +617,7 @@ clean-local-omf:
done; \
fi
@ -27,7 +28,7 @@ $OpenBSD: patch-doc_en_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
$(docname).xml: $(entities)
-ourdir=`pwd`; \
@@ -633,7 +634,7 @@ app-dist-hook:
@@ -633,7 +633,7 @@ app-dist-hook:
done \
fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-doc_en_usage-layers_xml,v 1.1 2007/10/18 14:18:40 ajacoutot Exp $
--- doc/en/usage-layers.xml.orig Sun Jan 21 17:12:45 2007
+++ doc/en/usage-layers.xml Thu Oct 18 13:58:36 2007
@@ -26,7 +26,7 @@
</para>
</tip>
<para>
- Each new diagram comes with the default layer labelled “Background”. Of course you can change its name and settings to customize it to your needs as you can do with any other layer.
+ Each new diagram comes with the default layer labelled Background. Of course you can change its name and settings to customize it to your needs as you can do with any other layer.
</para>
<para>
You can use layers to create overlay slide show by drawing each incremental slide in a

View File

@ -1,15 +1,16 @@
$OpenBSD: patch-doc_eu_Makefile_in,v 1.2 2007/04/06 10:10:01 ajacoutot Exp $
$OpenBSD: patch-doc_eu_Makefile_in,v 1.3 2007/10/18 14:18:40 ajacoutot Exp $
--- doc/eu/Makefile.in.orig Thu Mar 29 11:15:09 2007
+++ doc/eu/Makefile.in Thu Apr 5 16:43:22 2007
@@ -338,6 +338,7 @@ entities =
# This variable (docdir) specifies where the documents should be installed.
# This default value should work for most packages.
@HAVE_GNOME_TRUE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+++ doc/eu/Makefile.in Tue Oct 16 13:47:26 2007
@@ -332,7 +332,7 @@ docname = dia
lang = eu
omffile =
entities =
-@HAVE_GNOME_FALSE@docdir = $(datadir)/help/$(docname)/$(lang)
+@HAVE_GNOME_FALSE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
# ********** You should not have to edit below this line **********
xml_files = $(entities) $(docname).xml
@@ -593,7 +594,7 @@ install-data-hook-omf:
# ********** Begin of section some packagers may need to modify **********
# This variable (docdir) specifies where the documents should be installed.
@@ -593,7 +593,7 @@ install-data-hook-omf:
$(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
done; \
fi
@ -18,7 +19,7 @@ $OpenBSD: patch-doc_eu_Makefile_in,v 1.2 2007/04/06 10:10:01 ajacoutot Exp $
uninstall-local-omf:
-for file in $(srcdir)/*.omf; do \
@@ -610,7 +611,7 @@ clean-local-omf:
@@ -610,7 +610,7 @@ clean-local-omf:
done; \
fi

View File

@ -1,15 +1,16 @@
$OpenBSD: patch-doc_pl_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
$OpenBSD: patch-doc_pl_Makefile_in,v 1.4 2007/10/18 14:18:40 ajacoutot Exp $
--- doc/pl/Makefile.in.orig Thu Mar 29 11:15:10 2007
+++ doc/pl/Makefile.in Thu Apr 5 16:43:22 2007
@@ -334,6 +334,7 @@ entities =
# This variable (docdir) specifies where the documents should be installed.
# This default value should work for most packages.
@HAVE_GNOME_TRUE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+docdir = $(datadir)/gnome/help/$(docname)/$(lang)
+++ doc/pl/Makefile.in Tue Oct 16 13:46:56 2007
@@ -328,7 +328,7 @@ docname = dia
lang = pl
omffile =
entities =
-@HAVE_GNOME_FALSE@docdir = $(datadir)/help/$(docname)/$(lang)
+@HAVE_GNOME_FALSE@docdir = $(datadir)/gnome/help/$(docname)/$(lang)
# ********** You should not have to edit below this line **********
xml_files = $(entities) $(docname).xml
@@ -535,7 +536,7 @@ install-data-hook-omf:
# ********** Begin of section some packagers may need to modify **********
# This variable (docdir) specifies where the documents should be installed.
@@ -535,7 +535,7 @@ install-data-hook-omf:
$(INSTALL_DATA) $$file.out $(DESTDIR)$(omf_dest_dir)/$$file; \
done; \
fi
@ -18,7 +19,7 @@ $OpenBSD: patch-doc_pl_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
uninstall-local-omf:
-for file in $(srcdir)/*.omf; do \
@@ -552,7 +553,7 @@ clean-local-omf:
@@ -552,7 +552,7 @@ clean-local-omf:
done; \
fi
@ -27,7 +28,7 @@ $OpenBSD: patch-doc_pl_Makefile_in,v 1.3 2007/04/06 10:10:01 ajacoutot Exp $
$(docname).xml: $(entities)
-ourdir=`pwd`; \
@@ -568,7 +569,7 @@ app-dist-hook:
@@ -568,7 +568,7 @@ app-dist-hook:
done \
fi

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.12 2007/07/30 17:02:11 ajacoutot Exp $
@comment $OpenBSD: PLIST,v 1.13 2007/10/18 14:18:40 ajacoutot Exp $
bin/dia
lib/dia/
lib/dia/libaadl_objects.a
@ -1698,6 +1698,71 @@ share/dia/xslt/dia-uml2java.xsl
share/dia/xslt/dia-uml2owl.xsl
share/dia/xslt/dia-uml2python.xsl
share/dia/xslt/stylesheets.xml
share/doc/dia/
share/doc/dia/html/
share/doc/dia/html/C
share/doc/dia/html/en/
share/doc/dia/html/en/ch01.html
share/doc/dia/html/en/ch02.html
share/doc/dia/html/en/ch02s02.html
share/doc/dia/html/en/ch02s03.html
share/doc/dia/html/en/ch02s04.html
share/doc/dia/html/en/ch02s05.html
share/doc/dia/html/en/ch02s06.html
share/doc/dia/html/en/ch02s07.html
share/doc/dia/html/en/ch03.html
share/doc/dia/html/en/ch03s02.html
share/doc/dia/html/en/ch03s03.html
share/doc/dia/html/en/ch03s04.html
share/doc/dia/html/en/ch03s05.html
share/doc/dia/html/en/ch04.html
share/doc/dia/html/en/ch04s02.html
share/doc/dia/html/en/ch04s03.html
share/doc/dia/html/en/ch04s04.html
share/doc/dia/html/en/ch05.html
share/doc/dia/html/en/ch06.html
share/doc/dia/html/en/ch06s02.html
share/doc/dia/html/en/ch07.html
share/doc/dia/html/en/ch07s02.html
share/doc/dia/html/en/ch08.html
share/doc/dia/html/en/ch08s02.html
share/doc/dia/html/en/ch09.html
share/doc/dia/html/en/ch10.html
share/doc/dia/html/en/ch10s02.html
share/doc/dia/html/en/ch10s03.html
share/doc/dia/html/en/ch11.html
share/doc/dia/html/en/ch12.html
share/doc/dia/html/en/index.html
share/doc/dia/html/pl/
share/doc/dia/html/pl/ch01.html
share/doc/dia/html/pl/ch01s02.html
share/doc/dia/html/pl/ch01s03.html
share/doc/dia/html/pl/ch01s04.html
share/doc/dia/html/pl/ch01s05.html
share/doc/dia/html/pl/ch01s06.html
share/doc/dia/html/pl/ch01s07.html
share/doc/dia/html/pl/ch02.html
share/doc/dia/html/pl/ch02s02.html
share/doc/dia/html/pl/ch02s03.html
share/doc/dia/html/pl/ch02s04.html
share/doc/dia/html/pl/ch02s05.html
share/doc/dia/html/pl/ch03.html
share/doc/dia/html/pl/ch03s02.html
share/doc/dia/html/pl/ch03s03.html
share/doc/dia/html/pl/ch03s04.html
share/doc/dia/html/pl/ch04.html
share/doc/dia/html/pl/ch04s02.html
share/doc/dia/html/pl/ch05.html
share/doc/dia/html/pl/ch05s02.html
share/doc/dia/html/pl/ch06.html
share/doc/dia/html/pl/ch06s02.html
share/doc/dia/html/pl/ch07.html
share/doc/dia/html/pl/ch08.html
share/doc/dia/html/pl/ch08s02.html
share/doc/dia/html/pl/ch08s03.html
share/doc/dia/html/pl/ch09.html
share/doc/dia/html/pl/ch10.html
share/doc/dia/html/pl/index.html
share/gnome/
share/gnome/help/
share/gnome/help/dia/
@ -1740,8 +1805,6 @@ share/locale/am/LC_MESSAGES/dia.mo
share/locale/ar/
share/locale/ar/LC_MESSAGES/
share/locale/ar/LC_MESSAGES/dia.mo
share/locale/az/
share/locale/az/LC_MESSAGES/
share/locale/az/LC_MESSAGES/dia.mo
share/locale/be/LC_MESSAGES/dia.mo
share/locale/bg/LC_MESSAGES/dia.mo
@ -1760,8 +1823,6 @@ share/locale/en_GB/
share/locale/en_GB/LC_MESSAGES/
share/locale/en_GB/LC_MESSAGES/dia.mo
share/locale/es/LC_MESSAGES/dia.mo
share/locale/eu/
share/locale/eu/LC_MESSAGES/
share/locale/eu/LC_MESSAGES/dia.mo
share/locale/fi/LC_MESSAGES/dia.mo
share/locale/fr/LC_MESSAGES/dia.mo
@ -1779,8 +1840,6 @@ share/locale/is/LC_MESSAGES/dia.mo
share/locale/it/LC_MESSAGES/dia.mo
share/locale/ja/LC_MESSAGES/dia.mo
share/locale/ko/LC_MESSAGES/dia.mo
share/locale/lt/
share/locale/lt/LC_MESSAGES/
share/locale/lt/LC_MESSAGES/dia.mo
share/locale/lv/LC_MESSAGES/dia.mo
share/locale/mk/
@ -1792,8 +1851,6 @@ share/locale/ml/LC_MESSAGES/dia.mo
share/locale/mn/
share/locale/mn/LC_MESSAGES/
share/locale/mn/LC_MESSAGES/dia.mo
share/locale/ms/
share/locale/ms/LC_MESSAGES/
share/locale/ms/LC_MESSAGES/dia.mo
share/locale/nb/LC_MESSAGES/dia.mo
share/locale/ne/
@ -1806,13 +1863,9 @@ share/locale/pt/LC_MESSAGES/dia.mo
share/locale/pt_BR/LC_MESSAGES/dia.mo
share/locale/ro/LC_MESSAGES/dia.mo
share/locale/ru/LC_MESSAGES/dia.mo
share/locale/rw/
share/locale/rw/LC_MESSAGES/
share/locale/rw/LC_MESSAGES/dia.mo
share/locale/sk/LC_MESSAGES/dia.mo
share/locale/sl/LC_MESSAGES/dia.mo
share/locale/sq/
share/locale/sq/LC_MESSAGES/
share/locale/sq/LC_MESSAGES/dia.mo
share/locale/sr/LC_MESSAGES/dia.mo
share/locale/sr@Latn/
@ -1830,12 +1883,14 @@ share/locale/zh_TW/LC_MESSAGES/dia.mo
share/mime-info/
share/mime-info/dia.keys
share/mime-info/dia.mime
share/oaf/
share/omf/
share/omf/dia/
@comment share/oaf/
@comment share/omf/
@comment share/omf/dia/
share/pixmaps/
share/pixmaps/dia-diagram.png
share/pixmaps/dia_gnome_icon.png
%%SHARED%%
@exec %D/bin/update-mime-database %D/share/mime
@unexec %D/bin/update-mime-database %D/share/mime
@exec %D/bin/update-desktop-database
@unexec %D/bin/update-desktop-database