From: Andrea Zagli Date: Sun, 5 Apr 2015 09:27:46 +0000 (+0200) Subject: gnome-calendar: nuovo pacchetto WIP. X-Git-Url: https://saetta.ns0.it/gitweb?a=commitdiff_plain;h=58230369a7818fbf586f3069b8da97f2c4e0a984;p=msys2 gnome-calendar: nuovo pacchetto WIP. --- diff --git a/packages/mingw-w64-gnome-calendar/001-win.patch b/packages/mingw-w64-gnome-calendar/001-win.patch new file mode 100644 index 0000000..b000557 --- /dev/null +++ b/packages/mingw-w64-gnome-calendar/001-win.patch @@ -0,0 +1,135 @@ +--- ./src/gcal-date-selector.c.orig 2015-03-29 11:50:43.874205000 +0200 ++++ ./src/gcal-date-selector.c 2015-03-29 13:42:26.409247700 +0200 +@@ -20,7 +20,11 @@ + #include "gcal-date-selector.h" + + #include ++#ifndef G_OS_WIN32 + #include ++#else ++#include ++#endif + #include + #include + +@@ -233,7 +237,18 @@ + priv->month = 1; + priv->year = 1970; + ++#ifndef G_OS_WIN32 + priv->mask = nl_langinfo (D_FMT); ++#else ++ int ret; ++ char shortdate[80]; ++ ++ ret = GetLocaleInfo (LOCALE_USER_DEFAULT, ++ LOCALE_SSHORTDATE, ++ (LPTSTR)&shortdate, ++ 80); ++ priv->mask = g_strdup ((gchar *)&shortdate); ++#endif + + /** + * Select the day, month and year indexes. This will +@@ -270,6 +285,9 @@ + case 'b': + case 'B': + case 'm': ++#ifdef G_OS_WIN32 ++ case 'M': ++#endif + priv->month_pos = d_index++; + break; + +--- ./src/gcal-utils.c.orig 2015-03-06 17:31:55.000000000 +0100 ++++ ./src/gcal-utils.c 2015-03-29 11:50:04.158190400 +0200 +@@ -27,11 +27,16 @@ + + #include + ++#ifndef G_OS_WIN32 + #include ++#else ++#include ++#endif + + #include + #include + ++#ifndef G_OS_WIN32 + static const gint + ab_day[7] = + { +@@ -60,6 +65,36 @@ + MON_11, + MON_12 + }; ++#else ++static const gint ++ab_day[7] = ++{ ++ LOCALE_SABBREVDAYNAME1, ++ LOCALE_SABBREVDAYNAME2, ++ LOCALE_SABBREVDAYNAME3, ++ LOCALE_SABBREVDAYNAME4, ++ LOCALE_SABBREVDAYNAME5, ++ LOCALE_SABBREVDAYNAME6, ++ LOCALE_SABBREVDAYNAME7, ++}; ++ ++static const gint ++month_item[12] = ++{ ++ LOCALE_SABBREVMONTHNAME1, ++ LOCALE_SABBREVMONTHNAME2, ++ LOCALE_SABBREVMONTHNAME3, ++ LOCALE_SABBREVMONTHNAME4, ++ LOCALE_SABBREVMONTHNAME5, ++ LOCALE_SABBREVMONTHNAME6, ++ LOCALE_SABBREVMONTHNAME7, ++ LOCALE_SABBREVMONTHNAME8, ++ LOCALE_SABBREVMONTHNAME9, ++ LOCALE_SABBREVMONTHNAME10, ++ LOCALE_SABBREVMONTHNAME11, ++ LOCALE_SABBREVMONTHNAME12 ++}; ++#endif + + G_DEFINE_BOXED_TYPE (icaltimetype, icaltime, gcal_dup_icaltime, g_free) + +@@ -89,13 +124,35 @@ + gchar* + gcal_get_weekday (gint i) + { ++#ifndef G_OS_WIN32 + return nl_langinfo (ab_day[i]); ++#else ++ int ret; ++ char day[80]; ++ ++ ret = GetLocaleInfo (LOCALE_USER_DEFAULT, ++ ab_day[i], ++ (LPTSTR)&day, ++ 80); ++ return (gchar *)day; ++#endif + } + + gchar* + gcal_get_month_name (gint i) + { ++#ifndef G_OS_WIN32 + return nl_langinfo (month_item[i]); ++#else ++ int ret; ++ char month[80]; ++ ++ ret = GetLocaleInfo (LOCALE_USER_DEFAULT, ++ month_item[i], ++ (LPTSTR)&month, ++ 80); ++ return (gchar *)month; ++#endif + } + + /** diff --git a/packages/mingw-w64-gnome-calendar/PKGBUILD b/packages/mingw-w64-gnome-calendar/PKGBUILD new file mode 100644 index 0000000..4d8893f --- /dev/null +++ b/packages/mingw-w64-gnome-calendar/PKGBUILD @@ -0,0 +1,53 @@ +# Maintainer: Andrea Zagli + +_realname=gnome-calendar +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" +pkgver=3.16.0 +pkgrel=1 +arch=('any') +pkgdesc="Calendar application for GNOME (mingw-w64)" +options=(strip staticlibs) +depends=("${MINGW_PACKAGE_PREFIX}-gtk3" + "${MINGW_PACKAGE_PREFIX}-gsettings-desktop-schemas" + "${MINGW_PACKAGE_PREFIX}-adwaita-icon-theme" + "${MINGW_PACKAGE_PREFIX}-evolution-data-server" + "${MINGW_PACKAGE_PREFIX}-libical") +makedepends=("${MINGW_PACKAGE_PREFIX}-gobject-introspection" + "${MINGW_PACKAGE_PREFIX}-vala") +options=('!strip' 'debug' 'staticlibs') +license=("GPL 2") +url="http://www.gnome.org" +install=${_realname}-${CARCH}.install +source=(http://ftp.gnome.org/pub/gnome/sources/${_realname}/${pkgver%.*}/${_realname}-$pkgver.tar.xz + 001-win.patch) +sha256sums=('d4f6512f6ef0aad71c0142ea0307ba7b4f333aa156f626aed734e3daf1bc86e9' + '7fea6821563d2ea95c454e81495ecfe044e3e937668b21029cbf96cf8857420a') + +prepare() { + cd "${srcdir}"/${_realname}-${pkgver} + + patch -b -V simple -p1 -i ${srcdir}/001-win.patch + + autoreconf -fi +} + +build() { + mkdir -p build-${MINGW_CHOST} + cd build-${MINGW_CHOST} + + ../${_realname}-${pkgver}/configure \ + --prefix=${MINGW_PREFIX} \ + --libexecdir=${MINGW_PREFIX}/lib \ + --host=${MINGW_CHOST} \ + --target=${MINGW_CHOST} \ + --build=${MINGW_CHOST} + + make +} + +package() { + cd "$srcdir/build-${MINGW_CHOST}" + make DESTDIR=$pkgdir install + + install -Dm644 "${srcdir}/${_realname}-${pkgver}/COPYING" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/COPYING" +} diff --git a/packages/mingw-w64-gnome-calendar/gnome-calendar-i686.install b/packages/mingw-w64-gnome-calendar/gnome-calendar-i686.install new file mode 100644 index 0000000..375e708 --- /dev/null +++ b/packages/mingw-w64-gnome-calendar/gnome-calendar-i686.install @@ -0,0 +1,11 @@ +post_install() { + mingw32/bin/glib-compile-schemas /mingw32/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +} diff --git a/packages/mingw-w64-gnome-calendar/gnome-calendar-x86_64.install b/packages/mingw-w64-gnome-calendar/gnome-calendar-x86_64.install new file mode 100644 index 0000000..d43ee14 --- /dev/null +++ b/packages/mingw-w64-gnome-calendar/gnome-calendar-x86_64.install @@ -0,0 +1,11 @@ +post_install() { + mingw64/bin/glib-compile-schemas /mingw64/share/glib-2.0/schemas +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + post_install $1 +}