From 37e8d1e2cdc9ad098a1421ec7da1ea6ea0b9be75 Mon Sep 17 00:00:00 2001 From: bcallah Date: Mon, 29 Apr 2013 14:22:32 +0000 Subject: [PATCH] Import editors/tpad - a simple, fast GTK-based text editor. tweak from and ok sthen@ --- editors/tpad/Makefile | 44 +++++++++++++++++++++++ editors/tpad/distinfo | 2 ++ editors/tpad/patches/patch-po_POTFILES_in | 12 +++++++ editors/tpad/patches/patch-src_main_c | 12 +++++++ editors/tpad/pkg/DESCR | 17 +++++++++ editors/tpad/pkg/PLIST | 13 +++++++ 6 files changed, 100 insertions(+) create mode 100644 editors/tpad/Makefile create mode 100644 editors/tpad/distinfo create mode 100644 editors/tpad/patches/patch-po_POTFILES_in create mode 100644 editors/tpad/patches/patch-src_main_c create mode 100644 editors/tpad/pkg/DESCR create mode 100644 editors/tpad/pkg/PLIST diff --git a/editors/tpad/Makefile b/editors/tpad/Makefile new file mode 100644 index 00000000000..ef27b7a1956 --- /dev/null +++ b/editors/tpad/Makefile @@ -0,0 +1,44 @@ +# $OpenBSD: Makefile,v 1.1.1.1 2013/04/29 14:22:32 bcallah Exp $ + +COMMENT = simple, fast GTK-based text editor +DISTNAME = tpad-4.7.6 +CATEGORIES = editors x11 + +HOMEPAGE = https://launchpad.net/tpad-project/ + +MAINTAINER = Brian Callahan + +# GPLv3+ +PERMIT_PACKAGE_CDROM = Yes + +MASTER_SITES = https://launchpad.net/tpad-project/3.0/3.0.0/+download/ + +WANTLIB += ICE SM X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi +WANTLIB += Xinerama Xrandr Xrender atk-1.0 atk-bridge-2.0 atspi c +WANTLIB += cairo cairo-gobject config dbus-1 enchant expat ffi +WANTLIB += fontconfig freetype gdk-3 gdk_pixbuf-2.0 gio-2.0 glib-2.0 +WANTLIB += gmodule-2.0 gobject-2.0 graphite2 gthread-2.0 gtk-3 +WANTLIB += gtksourceview-3.0 gtkspell3-3 gucharmap_2_90 harfbuzz +WANTLIB += icudata icule icuuc m pango-1.0 pangocairo-1.0 pangoft2-1.0 +WANTLIB += pcre pixman-1 png pthread pthread-stubs stdc++ xcb +WANTLIB += xcb-render xcb-shm xml2 z + +MODULES = devel/gettext + +LIB_DEPENDS = devel/libconfig \ + textproc/gtkspell3 \ + x11/gnome/gucharmap \ + x11/gtksourceview3 + +RUN_DEPENDS = devel/desktop-file-utils + +CONFIGURE_STYLE = gnu +USE_GMAKE = Yes +FAKE_FLAGS = itlocaledir=${PREFIX}/share/locale \ + tpaddocdir= +TEST_FLAGS = XGETTEXT=${LOCALBASE}/bin/xgettext + +post-patch: + perl -pi -e "s,Linux User's,OpenBSD Reference,g" ${WRKSRC}/man/tpad.1 + +.include diff --git a/editors/tpad/distinfo b/editors/tpad/distinfo new file mode 100644 index 00000000000..f3f997b7081 --- /dev/null +++ b/editors/tpad/distinfo @@ -0,0 +1,2 @@ +SHA256 (tpad-4.7.6.tar.gz) = r+KoR5dbwmEkrYROWgVWtDNeb0XjkGKF2TPKnWKrtvo= +SIZE (tpad-4.7.6.tar.gz) = 463007 diff --git a/editors/tpad/patches/patch-po_POTFILES_in b/editors/tpad/patches/patch-po_POTFILES_in new file mode 100644 index 00000000000..21a6d10e74d --- /dev/null +++ b/editors/tpad/patches/patch-po_POTFILES_in @@ -0,0 +1,12 @@ +'make test' needs this to pass. + +$OpenBSD: patch-po_POTFILES_in,v 1.1.1.1 2013/04/29 14:22:32 bcallah Exp $ +--- po/POTFILES.in.orig Sun Apr 28 19:54:09 2013 ++++ po/POTFILES.in Sun Apr 28 19:54:30 2013 +@@ -1,4 +1,6 @@ + # List of source files containing translatable strings. + ++script/tpad.desktop.in ++script/tpad.desktop.in.in + src/main.c + src/include.h diff --git a/editors/tpad/patches/patch-src_main_c b/editors/tpad/patches/patch-src_main_c new file mode 100644 index 00000000000..07f5c1cbff0 --- /dev/null +++ b/editors/tpad/patches/patch-src_main_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_main_c,v 1.1.1.1 2013/04/29 14:22:32 bcallah Exp $ +--- src/main.c.orig Sun Apr 28 19:15:28 2013 ++++ src/main.c Sun Apr 28 19:15:37 2013 +@@ -95,7 +95,7 @@ int main(int argc,char *argv[]) + #endif + /* Find user's home directory, append path to config file to it + and store the value in cfg_file. */ +- struct passwd *pw = getpwuid(syscall(__NR_getuid)); ++ struct passwd *pw = getpwuid(getuid()); + cfg_file=g_strconcat((gchar*)pw->pw_dir,"/.tpad.cfg",NULL); + // Import saved config or write default one if not found + config_setup((char*)g_strdup(cfg_file)); diff --git a/editors/tpad/pkg/DESCR b/editors/tpad/pkg/DESCR new file mode 100644 index 00000000000..2f2cb5983d5 --- /dev/null +++ b/editors/tpad/pkg/DESCR @@ -0,0 +1,17 @@ +Tpad was designed to be simple, fast, and easy to use. + +We have lots of great text editors in the world. On one end of the +spectrum we have programs like gvim that are fast, feature loaded, +versatile and for users who are experienced with them they are easy to +use. Not so much for the rest of us. The problem: the number of features +can be overwhelming, making documentation difficult for newer/less +sophisticated users. They also tend to behave in ways that these users +do not expect. They are not intuitive for such users. + +Then we have programs like the current gedit. Lots of features, plug-ins +and they behave in an intuitive manner. The problem: they are slow, +buggy, bloated and unstable. + +The goal of Tpad: use GTK to create a text editor that is intuitive for +new users (easy to use) that is also fast and stable. We want all the +core features without the bloat. diff --git a/editors/tpad/pkg/PLIST b/editors/tpad/pkg/PLIST new file mode 100644 index 00000000000..81abbf0568b --- /dev/null +++ b/editors/tpad/pkg/PLIST @@ -0,0 +1,13 @@ +@comment $OpenBSD: PLIST,v 1.1.1.1 2013/04/29 14:22:32 bcallah Exp $ +@bin bin/tpad +@man man/man1/tpad.1 +share/applications/tpad.desktop +share/icons/ +share/icons/tpad.png +share/locale/de/LC_MESSAGES/tpad.mo +share/locale/en/LC_MESSAGES/tpad.mo +share/locale/es/LC_MESSAGES/tpad.mo +share/locale/fr/LC_MESSAGES/tpad.mo +share/locale/tr/LC_MESSAGES/tpad.mo +@exec %D/bin/update-desktop-database +@unexec-delete %D/bin/update-desktop-database