Merge pull request #126490 from OPNA2608/update/cherrytree-0.99.37/21.11

This commit is contained in:
Sandro 2021-06-21 14:54:59 +02:00 committed by GitHub
commit a2760ea374
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 93 additions and 29 deletions

View File

@ -1,24 +1,52 @@
{ lib, fetchFromGitHub, python2Packages, gettext }:
{ stdenv
, lib
, fetchFromGitHub
, cmake
, pkg-config
, python3
, wrapGAppsHook
, gtkmm3
, gtksourceview
, gtksourceviewmm
, gspell
, libxmlxx
, sqlite
, curl
, libuchardet
, fmt
, spdlog
}:
python2Packages.buildPythonApplication rec {
stdenv.mkDerivation rec {
pname = "cherrytree";
version = "0.39.4";
version = "0.99.37";
src = fetchFromGitHub {
owner = "giuspen";
repo = "cherrytree";
rev = version;
sha256 = "1wycgn1f3b858qb6kn2bsaabak8n52qkpd24w54xz6fjizlnw7x0";
sha256 = "1a2scwjrjijxwyfpqih23zzay3yqhyzpxnp66388fcir1cmp8zih";
};
nativeBuildInputs = [ gettext ];
nativeBuildInputs = [
cmake
pkg-config
python3
wrapGAppsHook
];
propagatedBuildInputs = with python2Packages; [ pygtk dbus-python pygtksourceview ];
patches = [ ./subprocess.patch ];
doCheck = false;
buildInputs = [
gtkmm3
gtksourceview
gtksourceviewmm
gspell
libxmlxx
sqlite
curl
libuchardet
fmt
spdlog
];
meta = with lib; {
description = "An hierarchical note taking application";
@ -31,8 +59,9 @@ python2Packages.buildPythonApplication rec {
you have scattered around your hard drive can be conveniently placed into
a Cherrytree document where you can easily find it.
'';
homepage = "http://www.giuspen.com/cherrytree";
license = licenses.gpl3;
homepage = "https://www.giuspen.com/cherrytree";
changelog = "https://raw.githubusercontent.com/giuspen/cherrytree/${version}/changelog.txt";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,14 +0,0 @@
diff -Naur cherrytree-0.37.1-orig/setup.py cherrytree-0.37.1/setup.py
--- cherrytree-0.37.1-orig/setup.py 2016-01-08 20:50:50.000000000 +0100
+++ cherrytree-0.37.1/setup.py 2016-07-05 20:30:27.768178682 +0200
@@ -205,4 +205,9 @@
},
distclass=CherryTreeDist
)
- subprocess.call("update-desktop-database")
+ try:
+ subprocess.check_call(['update-desktop-database'])
+ except subprocess.CalledProcessError:
+ pass # handle errors in the called executable
+ except OSError:
+ pass # executable not found

View File

@ -0,0 +1,37 @@
From 2d6dd1c286eb57fbf968510318cafc94888b98de Mon Sep 17 00:00:00 2001
From: OPNA2608 <christoph.neidahl@gmail.com>
Date: Sun, 13 Jun 2021 21:56:03 +0200
Subject: [PATCH] Darwin build fix
---
gspell/Makefile.am | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/gspell/Makefile.am b/gspell/Makefile.am
index 69ee421..7c58973 100644
--- a/gspell/Makefile.am
+++ b/gspell/Makefile.am
@@ -95,6 +95,7 @@ nodist_libgspell_core_la_SOURCES = \
$(BUILT_SOURCES)
libgspell_core_la_LIBADD = \
+ $(GTK_MAC_LIBS) \
$(CODE_COVERAGE_LIBS)
libgspell_core_la_CFLAGS = \
@@ -161,6 +162,12 @@ gspell_private_headers += \
gspell_private_c_files += \
gspell-osx.c
+libgspell_core_la_CFLAGS += \
+ -xobjective-c
+
+libgspell_core_la_LDFLAGS += \
+ -framework Cocoa
+
endif # OS_OSX
if HAVE_INTROSPECTION
--
2.29.3

View File

@ -2,6 +2,8 @@
, fetchurl
, pkg-config
, libxml2
, autoreconfHook
, gtk-doc
, glib
, gtk3
, enchant2
@ -9,6 +11,7 @@
, vala
, gobject-introspection
, gnome
, gtk-mac-integration
}:
stdenv.mkDerivation rec {
@ -23,17 +26,26 @@ stdenv.mkDerivation rec {
sha256 = "1pdb4gbjrs8mk6r0ipw5vxyvzav1wvkjq46kiq53r3nyznfpdfyw";
};
patches = [
# Extracted from: https://github.com/Homebrew/homebrew-core/blob/2a27fb86b08afc7ae6dff79cf64aafb8ecc93275/Formula/gspell.rb#L125-L149
./0001-Darwin-build-fix.patch
];
nativeBuildInputs = [
pkg-config
vala
gobject-introspection
libxml2
autoreconfHook
gtk-doc
];
buildInputs = [
glib
gtk3
icu
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
gtk-mac-integration
];
propagatedBuildInputs = [
@ -53,6 +65,6 @@ stdenv.mkDerivation rec {
homepage = "https://wiki.gnome.org/Projects/gspell";
license = licenses.lgpl21Plus;
maintainers = teams.gnome.members;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
buildInputs = [ glibmm gtkmm3 gtksourceview3 ];
meta = with lib; {
platforms = platforms.linux;
platforms = platforms.unix;
homepage = "https://developer.gnome.org/gtksourceviewmm/";
description = "C++ wrapper for gtksourceview";
license = licenses.lgpl2;