Also adding libical package.
/po/build-cc
/src/license.blurb
/src/mkportable.exe
+/src/Toolchain-mingw32.cmake
patches/libetpan-1.7/notests.patch \
patches/libetpan-1.7/sasl_set_path.patch \
patches/libetpan-1.7/mingw-closesocket-include.patch \
+ patches/libical-2.0.0/01-gmtime_r.patch \
patches/libiconv-1.14/01-aliases2_lookup-no-inline.patch \
patches/crypt-1.1/01-build-dll.patch \
patches/webkit-1.3.10/01-fixes.patch \
Then run the usual "./autogen.sh" to create the actual configure file
and run configure as described above.
+If the package is using cmake, set pkg_cm_<package>_cmake to "yes",
+and optionally set pkg_cm_<package>_cmake_args. Libical is an example
+to follow.
+
SASL and unofficial patches
===========================
AC_SUBST(gpg_dll_num)
AC_SUBST(libgcc_dll)
AC_SUBST(w64)
+AC_SUBST(host)
# For the manual we need:
AC_CHECK_PROGS(DOCBOOK2HTML, docbook2html)
CM_SPKG([cyrus-sasl])
CM_SPKG([libetpan], [gnutls cyrus-sasl])
CM_BPKG_GNUWIN32([bsfilter])
+CM_SPKG([libical])
CM_SPKG([claws-mail], [libiconv gettext zlib gtk+ libpng enchant glib dnl
gpgme crypt regex libetpan gnutls dnl
- libxml2 expat webkit curl])
+ libxml2 expat webkit curl libical])
CM_FINALIZE
AC_CONFIG_FILES(Makefile)
AC_CONFIG_FILES(packages/Makefile src/Makefile po/Makefile.in)
+AC_CONFIG_FILES(src/Toolchain-mingw32.cmake)
AC_CONFIG_FILES(po/build-cc)
AC_CONFIG_FILES(src/config.nsi src/claws-mail.mk)
AC_CONFIG_FILES(doc/Makefile)
[ $quiet = no ] && echo "package \`$url' ... already exists"
else
echo -n "downloading \`$url' ..."
- if ${WGET} -c -q "$url" -O "$name" ; then
+ if ${WGET} "$url" -O "$name" ; then
if [ $(stat -c'%s' "$name" 2>/dev/null || echo 0) -eq 0 ]; then
echo " FAILED (line $lnr)"
echo "line $lnr: $url has zero length" >> '.#download.failed'
file cyrus-sasl-2.1.26.tar.gz
chk d6669fb91434192529bd13ee95737a8a5040241c
+
+# libical
+server https://github.com/libical/libical/releases/download
+file v2.0.0/libical-2.0.0.tar.gz
+chk 8540d5d73422496e1d350b86ff32333daa08144c
--- /dev/null
+#! /bin/sh
+patch -p1 -f $* < $0
+exit $?
+
+diff -ruN libical-2.0.0-orig/config.h.cmake libical-2.0.0/config.h.cmake
+--- libical-2.0.0-orig/config.h.cmake 2015-12-28 22:44:53.000000000 +0100
++++ libical-2.0.0/config.h.cmake 2017-01-28 17:58:18.365969029 +0100
+@@ -495,34 +495,6 @@
+ #endif
+ #endif
+
+-/* gmtime_r - thread safe gmtime() really only needed on Unix */
+-#if !defined(HAVE_GMTIME_R)
+-#if !defined(_WIN32)
+-#error "No thread-safe gmtime function available"
+-#endif
+-/*on Windows there might be a macro called gmtime_r in pthread.h. don't use it.*/
+-#if defined(gmtime_r)
+-#undef gmtime_r
+-#endif
+-/* FYI: The gmtime() in Microsoft's C library is MT-safe */
+-#define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
+-#endif
+-#include <time.h>
+-
+-/* localtime_r - thread safe localtime() really only needed on Unix */
+-#if !defined(HAVE_LOCALTIME_R)
+-#if !defined(_WIN32)
+-#error "No thread-safe localtime function available"
+-#endif
+-/*on Windows there might be a macro called localtime_r in pthread.h. don't use it.*/
+-#if defined(localtime_r)
+-#undef localtime_r
+-#endif
+-/* FYI: The localtime() in Microsoft's C library is MT-safe */
+-#define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
+-#endif
+-#include <time.h>
+-
+ /* define MAXPATHLEN */
+ #if defined(_WIN32)
+ #include <windows.h> //for MAX_PATH
+diff -ruN libical-2.0.0-orig/ConfigureChecks.cmake libical-2.0.0/ConfigureChecks.cmake
+--- libical-2.0.0-orig/ConfigureChecks.cmake 2015-12-28 22:44:53.000000000 +0100
++++ libical-2.0.0/ConfigureChecks.cmake 2017-01-28 14:16:30.568151735 +0100
+@@ -10,6 +10,7 @@
+ check_include_files(fcntl.h HAVE_FCNTL_H)
+ check_include_files(unistd.h HAVE_UNISTD_H)
+ check_include_files(wctype.h HAVE_WCTYPE_H)
++check_include_files(time.h HAVE_TIME_H)
+
+ include(CheckFunctionExists)
+ if(WIN32 AND MSVC)
+diff -ruN libical-2.0.0-orig/Toolchain-mingw32.cmake libical-2.0.0/Toolchain-mingw32.cmake
+--- libical-2.0.0-orig/Toolchain-mingw32.cmake 1970-01-01 01:00:00.000000000 +0100
++++ libical-2.0.0/Toolchain-mingw32.cmake 2017-01-28 14:05:21.057799373 +0100
+@@ -0,0 +1,17 @@
++# the name of the target operating system
++SET(CMAKE_SYSTEM_NAME Windows)
++
++# which compilers to use for C and C++
++SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
++SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
++SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
++
++# here is the target environment located
++SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
++
++# adjust the default behaviour of the FIND_XXX() commands:
++# search headers and libraries in the target environment, search
++# programs in the host environment
++set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
++set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
++set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
gnupg-uninst.nsi \
sections-installer.nsi sections-uninstaller.nsi \
libiconv.def libintl.def \
- Memento.nsh
+ Memento.nsh Toolchain-mingw32.cmake.in
SUBDIRS = dictionaries
jpeg glib-networking libsoup webkit gmp nettle \
harfbuzz pango pixman cairo libetpan claws-mail \
libgcrypt libassuan cyrus-sasl \
- w32pth regex libiconv gettext
+ w32pth regex libiconv gettext libical
# Extra options to configure for individual packages.
# We can use $(idir) here for the installation prefix.
cm_pkg_pixman_make_args = -j$(NUMPROC)
cm_pkg_cairo_make_args = -j$(NUMPROC)
cm_pkg_cyrus_sasl_make_args = -j$(NUMPROC)
+cm_pkg_libical_make_args = -j$(NUMPROC)
-
+cm_pkg_libical_cmake = yes
cm_pkg_libiconv_configure = \
--enable-shared=yes --enable-static=no
CPPFLAGS=\"-I$(idir)/include -g -O2 -std=gnu++98 -mms-bitfields\" \
CC=$(CC) LIBS=\"-L$(idir)/lib\"
+cm_pkg_libical_cmake_args = \
+ -DCMAKE_TOOLCHAIN_FILE=$(tsdir)/src/Toolchain-mingw32.cmake
# This is not anymore needed sinces 3.8.0 already builds a PDF version.
# define cm_pkg_claws_mail_post_install
--- /dev/null
+# the name of the target operating system
+SET(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+SET(CMAKE_C_COMPILER @host@-gcc)
+SET(CMAKE_CXX_COMPILER @host@-g++)
+SET(CMAKE_RC_COMPILER @host@-windres)
+
+# here is the target environment located
+SET(CMAKE_FIND_ROOT_PATH /usr/@host@)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
pkg_dev="$(call GETVAR,cm_pkg_$(1)_dev)"; \
pkg_version_dev="$(1)-dev-$(call GETVAR,cm_pkg_$(1)_version)"; \
pkgidir_dev="$(ipdir)/$$$${pkg_version_dev}"; \
- pkgcfg="$(call GETVAR,cm_pkg_$(1)_configure)"; \
+ if [ "x$(call GETVAR,cm_pkg_$(1)_cmake)" = "xyes" ]; then \
+ pkgcmake="yes"; \
+ pkgcfg="$(call GETVAR,cm_pkg_$(1)_cmake_args)"; \
+ else \
+ pkgcfg="$(call GETVAR,cm_pkg_$(1)_configure)"; \
+ fi; \
pkgextracflags="$(call GETVAR,cm_pkg_$(1)_extracflags)"; \
pkgmkargs="$(call GETVAR,cm_pkg_$(1)_make_args)"; \
pkgmkargs_inst="$(call GETVAR,cm_pkg_$(1)_make_args_inst)";\
stamps/stamp-$(1)-02-configure: stamps/stamp-$(1)-01-patch
($(call SETVARS,$(1)); \
- mkdir "$$$${pkgbdir}"; \
- cd "$$$${pkgbdir}"; \
- eval "../$$$${pkg_version}/configure" \
- --prefix="$$$${pkgidir}" \
- --host=$(host) \
- --build=$(build) \
- $$$${pkgcfg} CFLAGS=\"-mms-bitfields $$$${pkgextracflags}\";\
- shopt -s nullglob; \
- for pfile in "$$$${pkgpbdir}"/*.postcfg \
- "$$$${pkgpdir}"/*.postcfg ; do \
- (cd "$$$${pkgsdir}"; "$$$${pfile}") \
- done; \
- for pfile in "$$$${pkgpbdir}"/*.postcfg-build \
- "$$$${pkgpdir}"/*.postcfg-build ; do \
- (cd "$$$${pkgbdir}"; "$$$${pfile}") \
- done)
+ mkdir "$$$${pkgbdir}"; \
+ cd "$$$${pkgbdir}"; \
+ if [ "$$$${pkgcmake}" = "yes" ]; then \
+ eval "cmake $$$${pkgcfg} -DCMAKE_INSTALL_PREFIX=$$$${pkgidir} ../$$$${pkg_version}"; \
+ else \
+ eval "../$$$${pkg_version}/configure" \
+ --prefix="$$$${pkgidir}" \
+ --host=$(host) \
+ --build=$(build) \
+ $$$${pkgcfg} CFLAGS=\"-mms-bitfields $$$${pkgextracflags}\"; \
+ shopt -s nullglob; \
+ for pfile in "$$$${pkgpbdir}"/*.postcfg \
+ "$$$${pkgpdir}"/*.postcfg ; do \
+ (cd "$$$${pkgsdir}"; "$$$${pfile}") \
+ done; \
+ for pfile in "$$$${pkgpbdir}"/*.postcfg-build \
+ "$$$${pkgpdir}"/*.postcfg-build ; do \
+ (cd "$$$${pkgbdir}"; "$$$${pfile}") \
+ done; \
+ fi)
touch stamps/stamp-$(1)-02-configure
stamps/stamp-$(1)-03-make: stamps/stamp-$(1)-02-configure
File ${prefix}/bin/libnettle-6-2.dll
File ${prefix}/bin/libhogweed-4-2.dll
+#######################################
+### nettle
+!insertmacro SetPrefix libical
+File ${prefix}/bin/libical.dll
+File ${prefix}/bin/libicalss.dll
+File ${prefix}/bin/libicalvcal.dll
+
#######################################
### claws-mail
!insertmacro SetPrefix2 claws_mail claws-mail
Delete "$INSTDIR\share\locale\tr\LC_MESSAGES\claws-mail.mo"
Delete "$INSTDIR\share\locale\zh_TW\LC_MESSAGES\claws-mail.mo"
+#######################################
+### libical
+Delete "$INSTDIR\libical.dll"
+Delete "$INSTDIR\libicalss.dll"
+Delete "$INSTDIR\libicalvcal.dll"
+
#######################################
### nettle
Delete "$INSTDIR\libhogweed-4-2.dll"