libical: 2.0.0 → 3.0.3

This commit is contained in:
Jan Tojnar 2018-06-29 12:49:33 +02:00
parent a8c71037e0
commit 9b7cb8be4d
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4
2 changed files with 35 additions and 11 deletions

View File

@ -1,29 +1,53 @@
{ stdenv, fetchFromGitHub, perl, cmake }: { stdenv, fetchFromGitHub, perl, pkgconfig, cmake, ninja, vala, gobjectIntrospection
, python3, tzdata, gtk-doc, docbook_xsl, docbook_xml_dtd_43, glib, libxml2, icu }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "libical-${version}"; name = "libical-${version}";
version = "2.0.0"; version = "3.0.3";
outputs = [ "out" "dev" "devdoc" ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "libical"; owner = "libical";
repo = "libical"; repo = "libical";
rev = "v${version}"; rev = "v${version}";
sha256 = "0xsvqy1hzmwxn783wrb2k8p751544pzv39v9ynr9pj4yzkwjzsvb"; sha256 = "0dhlfn6n136di4fbqd74gdaibyh5zz1vac5x8ii3bjc2d5h7hw8h";
}; };
nativeBuildInputs = [ perl cmake ]; nativeBuildInputs = [
perl pkgconfig cmake ninja vala gobjectIntrospection
(python3.withPackages (pkgs: with pkgs; [ pygobject3 ])) # running libical-glib tests
gtk-doc docbook_xsl docbook_xml_dtd_43 # docs
];
buildInputs = [ glib libxml2 icu ];
cmakeFlags = [
"-DGOBJECT_INTROSPECTION=True"
"-DICAL_GLIB_VAPI=True"
];
patches = [ patches = [
# TODO: upstream this patch # TODO: upstream this patch
# https://github.com/libical/libical/issues/350
./respect-env-tzdir.patch ./respect-env-tzdir.patch
]; ];
doCheck = false; # fails all the tests (ctest) # Using install check so we do not have to manually set
# LD_LIBRARY_PATH and GI_TYPELIB_PATH variables
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
export TZDIR=${tzdata}/share/zoneinfo
ctest --output-on-failure
runHook postInstallCheck
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://github.com/libical/libical; homepage = https://github.com/libical/libical;
description = "An Open Source implementation of the iCalendar protocols"; description = "An Open Source implementation of the iCalendar protocols";
license = licenses.mpl10; license = licenses.mpl20;
platforms = platforms.unix; platforms = platforms.unix;
maintainers = with maintainers; [ wkennington ]; maintainers = with maintainers; [ wkennington ];
}; };

View File

@ -1,9 +1,9 @@
--- a/src/libical/icaltz-util.c --- a/src/libical/icaltz-util.c
+++ b/src/libical/icaltz-util.c +++ b/src/libical/icaltz-util.c
@@ -96,9 +96,9 @@ typedef struct @@ -94,9 +94,9 @@
static char *zdir = NULL; static const char *zdir = NULL;
static char *search_paths[] = { static const char *search_paths[] = {
+ "/etc/zoneinfo", + "/etc/zoneinfo",
"/usr/share/zoneinfo", "/usr/share/zoneinfo",
"/usr/lib/zoneinfo", "/usr/lib/zoneinfo",
@ -11,13 +11,13 @@
"/usr/share/lib/zoneinfo" "/usr/share/lib/zoneinfo"
}; };
@@ -179,6 +179,15 @@ static void set_zonedir(void) @@ -178,6 +178,15 @@
const char *fname = ZONES_TAB_SYSTEM_FILENAME; const char *fname = ZONES_TAB_SYSTEM_FILENAME;
size_t i, num_search_paths; size_t i, num_search_paths;
+ const char *env_tzdir = getenv ("TZDIR"); + const char *env_tzdir = getenv ("TZDIR");
+ if (env_tzdir) { + if (env_tzdir) {
+ snprintf(file_path, MAXPATHLEN, "%s/%s", env_tzdir, fname); + sprintf (file_path, "%s/%s", env_tzdir, fname);
+ if (!access (file_path, F_OK|R_OK)) { + if (!access (file_path, F_OK|R_OK)) {
+ zdir = env_tzdir; + zdir = env_tzdir;
+ return; + return;