import notecase-1.7.2, a Hierarchical note manager

pkgsrc notes:
-modified to use system libz instead of a bundled copy
-disabled the option to create self-extracting combinations of
 the executable with a data file. This relies on reliable deduction
 of the currrent executable's path which cannot be done in a portable
 way, and it doesn't make much sense anyway because that thing needs
 a zillion of shared libraries.
This commit is contained in:
drochner 2007-11-22 20:50:09 +00:00
parent cba0168a54
commit eac4e73f27
12 changed files with 269 additions and 0 deletions

6
editors/notecase/DESCR Normal file
View file

@ -0,0 +1,6 @@
NoteCase is a hierarchical note manager (aka. outliner). It helps you
organize your everyday text notes into a single document, with
individual notes placed in the tree-like structure (each note can have
its sub-notes, ...).
To ensure your privacy, encrypted document format is supported,
along with standard unencrypted format.

27
editors/notecase/Makefile Normal file
View file

@ -0,0 +1,27 @@
# $NetBSD: Makefile,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
#
DISTNAME= notecase-1.7.2_src
PKGNAME= notecase-1.7.2
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=notecase/}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://notecase.sourceforge.net/
COMMENT= Hierarchical note manager
WRKSRC= ${WRKDIR}/notecase-1.7.2
USE_LANGUAGES= c c++
USE_TOOLS+= gmake pkg-config gsed
TOOLS_PLATFORM.gsed= #empty, override nonsense in tools
USE_DIRS+= xdg-1.1
pre-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/notecase
${INSTALL_DATA_DIR} ${PREFIX}/share/locale/fr_CA/LC_MESSAGES
.include "../../x11/gtk2/buildlink3.mk"
.include "../../sysutils/gnome-vfs/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../databases/shared-mime-info/mimedb.mk"
.include "../../mk/bsd.pkg.mk"

43
editors/notecase/PLIST Normal file
View file

@ -0,0 +1,43 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
bin/notecase
share/applications/notecase.desktop
share/doc/notecase/help.ncd
share/locale/ar/LC_MESSAGES/notecase.mo
share/locale/ca/LC_MESSAGES/notecase.mo
share/locale/cs/LC_MESSAGES/notecase.mo
share/locale/da/LC_MESSAGES/notecase.mo
share/locale/de/LC_MESSAGES/notecase.mo
share/locale/el/LC_MESSAGES/notecase.mo
share/locale/es/LC_MESSAGES/notecase.mo
share/locale/et/LC_MESSAGES/notecase.mo
share/locale/fi/LC_MESSAGES/notecase.mo
share/locale/fr/LC_MESSAGES/notecase.mo
share/locale/fr_CA/LC_MESSAGES/notecase.mo
share/locale/hr/LC_MESSAGES/notecase.mo
share/locale/hu/LC_MESSAGES/notecase.mo
share/locale/id/LC_MESSAGES/notecase.mo
share/locale/it/LC_MESSAGES/notecase.mo
share/locale/ja/LC_MESSAGES/notecase.mo
share/locale/ko/LC_MESSAGES/notecase.mo
share/locale/ms/LC_MESSAGES/notecase.mo
share/locale/nl/LC_MESSAGES/notecase.mo
share/locale/no/LC_MESSAGES/notecase.mo
share/locale/pl/LC_MESSAGES/notecase.mo
share/locale/pt/LC_MESSAGES/notecase.mo
share/locale/pt_BR/LC_MESSAGES/notecase.mo
share/locale/ro/LC_MESSAGES/notecase.mo
share/locale/ru/LC_MESSAGES/notecase.mo
share/locale/sk/LC_MESSAGES/notecase.mo
share/locale/sl/LC_MESSAGES/notecase.mo
share/locale/sr/LC_MESSAGES/notecase.mo
share/locale/sv/LC_MESSAGES/notecase.mo
share/locale/ta/LC_MESSAGES/notecase.mo
share/locale/tr/LC_MESSAGES/notecase.mo
share/locale/zh_CN/LC_MESSAGES/notecase.mo
share/locale/zh_TW/LC_MESSAGES/notecase.mo
share/mime/packages/notecase.xml
share/pixmaps/notecase.xpm
@comment in xdg-dirs: @dirrm share/pixmaps
@comment in shared-mime-info: @dirrm share/mime/packages
@dirrm share/doc/notecase
@comment in xdg-dirs: @dirrm share/applications

13
editors/notecase/distinfo Normal file
View file

@ -0,0 +1,13 @@
$NetBSD: distinfo,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
SHA1 (notecase-1.7.2_src.tar.gz) = 0b3fd6efc99436826e470f90ce09cd370ce1aad9
RMD160 (notecase-1.7.2_src.tar.gz) = fd9fce7d4e9e9f909e7949aaac49396243868596
Size (notecase-1.7.2_src.tar.gz) = 866430 bytes
SHA1 (patch-aa) = c7f1734e0741fdd5c1280012391a425291bd7300
SHA1 (patch-ab) = 360a714e1642102ee113c881d97ad787f37e7630
SHA1 (patch-ac) = 638b0cb716c8107f2d3fb243a2c0e6f6b75cc3c3
SHA1 (patch-ad) = 1d38f1b9ae02d962999b240c59e9ac25a2e39d91
SHA1 (patch-ae) = f74a3bd32df5959c54851bbc04bbf4eaa2d589e8
SHA1 (patch-af) = eab3d1dfa00cb2eed49b4a08ad780d295b9a9dda
SHA1 (patch-ag) = 376e7c934beb5b666503b92e970695ece879d4cc
SHA1 (patch-ah) = cb8cca8e9980f13a6e3c4b1731fa1ae17136dd09

View file

@ -0,0 +1,13 @@
$NetBSD: patch-aa,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/callbacks.cpp.orig 2007-11-12 15:41:56.000000000 +0100
+++ src/callbacks.cpp
@@ -23,7 +23,7 @@
#include "lib/debug.h"
#include "ExecuteFile.h"
-#if defined (__FreeBSD__) || defined (__APPLE__)
+#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__NetBSD__)
#include <libgen.h> //basename
#endif

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ab,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/main.cpp.orig 2007-11-12 15:40:07.000000000 +0100
+++ src/main.cpp
@@ -32,7 +32,7 @@
#include <unistd.h> //access
#endif
-#if defined (__FreeBSD__) || defined (__APPLE__)
+#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__NetBSD__)
#include <libgen.h> //basename
#endif

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/gui/GuiLanguage.cpp.orig 2007-11-12 15:42:48.000000000 +0100
+++ src/gui/GuiLanguage.cpp
@@ -25,7 +25,7 @@
#define access _access
#endif
-#if defined (__FreeBSD__) || defined (__APPLE__)
+#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__NetBSD__)
#include <libgen.h> //basename
#endif

View file

@ -0,0 +1,39 @@
$NetBSD: patch-ad,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- Makefile.orig 2007-11-11 18:37:32.000000000 +0100
+++ Makefile
@@ -10,7 +10,7 @@
VERSION=1.7.2
# define install target dirs
-prefix=/usr
+prefix=${PREFIX}
bindir=$(prefix)/bin
datadir=$(prefix)/share
@@ -103,7 +103,7 @@ FLAGS=$(CFLAGS)
BIN=./bin
OBJ=./bin
-INSTALL=install -D
+INSTALL=install -c
ifdef OSX_BUILD
INSTALL=install -c
endif
@@ -131,7 +131,7 @@ CC=$(QC) $(CXX) $(DEBUG) $(PROFILE) -DEN
ifdef WINDIR
LD=$(QL) $(CXX) $(DEBUG) $(PROFILE) $(LDFLAGS) -L$(OBJ) -lz
else
- LD=$(QL) $(CXX) $(DEBUG) $(PROFILE) $(LDFLAGS) -ldl
+ LD=$(QL) $(CXX) $(DEBUG) $(PROFILE) $(LDFLAGS) -L${LOCALBASE}/lib -Wl,-R${LOCALBASE}/lib -lz
endif
#
@@ -158,7 +158,6 @@ OBJS= $(OBJ)/main.o $(OBJ)/support.o $(O
$(OBJ)/IOLayerRedirect.o $(OBJ)/FileExportDlg.o $(OBJ)/FormatIOTxt.o $(OBJ)/FindReplaceDlg.o \
$(OBJ)/FindReplaceInfo.o $(OBJ)/LinkInfo.o $(OBJ)/LinkPropertiesDlg.o $(OBJ)/ExecuteFile.o \
$(OBJ)/FileSaveAsDlg.o $(OBJ)/CircularBuffer.o $(OBJ)/FormatIOMMLX.o \
- $(OBJ)/libz.a \
$(OBJ)/ProgressDlg.o $(OBJ)/DocActionPix.o $(OBJ)/DocActionFinish.o $(OBJ)/DocActionFmt.o $(OBJ)/FmtInfo.o \
$(OBJ)/FileAttachmentDlg.o $(OBJ)/DocActionAtt.o $(OBJ)/PixPropertiesDlg.o $(OBJ)/DocActionFinishDel.o \
$(OBJ)/ShortcutsList.o $(OBJ)/ShortcutsListDlg.o $(OBJ)/DateTimeDlg.o $(OBJ)/AboutDlg.o $(OBJ)/EditDlg.o

View file

@ -0,0 +1,46 @@
$NetBSD: patch-ae,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/lib/FilePath.cpp.orig 2007-07-31 07:47:28.000000000 +0200
+++ src/lib/FilePath.cpp
@@ -23,6 +23,8 @@
#include <unistd.h>
#endif
+#include "../config.h"
+
#define PATH_DELIMITERS "\\/"
std::string GetHomeDir()
@@ -95,31 +97,7 @@ std::string GetAppPath()
::GetModuleFileName(NULL, buf, 511);
path = buf;
#else
- //code adapted from public domain code by Nicolai Haehnle <prefect_@gmx.net>
- char linkname[64]; /* /proc/<pid>/exe */
- int ret;
-
- /* Get our PID and build the name of the link in /proc */
- pid_t pid = getpid();
-
- if (snprintf(linkname, sizeof(linkname), "/proc/%i/exe", pid) < 0)
- return path; //error
-
- /* Now read the symbolic link */
- char buffer[2048];
- ret = readlink(linkname, buffer, sizeof(buffer));
-
- /* In case of an error, leave the handling up to the caller */
- if (ret == -1)
- return path;
-
- /* Report insufficient buffer size */
- if (ret >= (int)sizeof(buffer))
- return path;
-
- buffer[ret] = '\0'; //terminate the buffer
-
- path = buffer;
+ path = INSTALL_PREFIX "/bin/notecase";
#endif
found = true;
}

View file

@ -0,0 +1,13 @@
$NetBSD: patch-af,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- ./src/lib/IOLayerZlib.h.orig 2007-11-21 20:13:30.000000000 +0100
+++ ./src/lib/IOLayerZlib.h
@@ -18,7 +18,7 @@
#endif // _MSC_VER > 1000
#include "IOLayerBase.h"
-#include "zlib/zlib.h"
+#include <zlib.h>
class IOLayerZlib : public IOLayerBase
{

View file

@ -0,0 +1,30 @@
$NetBSD: patch-ag,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/FileExportDlg.cpp.orig 2007-11-21 20:49:35.000000000 +0100
+++ src/FileExportDlg.cpp
@@ -48,6 +48,7 @@ FileExportDlg::FileExportDlg()
m_formats[3].szFilter = "*.html";
m_formats[4].szName = _("Text file (*.txt)");
m_formats[4].szFilter = "*.txt";
+#if 0
#ifdef _WIN32
m_formats[5].szName = _("Standalone executable (*.exe)");
m_formats[5].szFilter = "*.exe";
@@ -55,6 +56,7 @@ FileExportDlg::FileExportDlg()
m_formats[5].szName = _("Standalone executable");
m_formats[5].szFilter = "*";
#endif
+#endif
Create();
}
@@ -187,7 +189,9 @@ int FileExportDlg::GetFormatCode()
case 2: return FORMAT_NOTECENTER_HTML;
case 3: return FORMAT_HTML;
case 4: return FORMAT_TXT;
+#if 0
case 5: return FORMAT_EXECUTABLE;
+#endif
}
return FORMAT_NONE;
}

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ah,v 1.1.1.1 2007/11/22 20:50:09 drochner Exp $
--- src/FileExportDlg.h.orig 2007-11-22 16:15:06.000000000 +0100
+++ src/FileExportDlg.h
@@ -43,7 +43,7 @@ public:
bool GetExportLinked();
public:
- struct _fmt m_formats[6]; //export formats info
+ struct _fmt m_formats[5]; //export formats info
void ForceFormatExtension();
protected: