Git commit e4f47125828e2e04f5f83151a1a6e5cee68e89f2 by Patrick Spendrin. Committed on 01/02/2012 at 00:39. Pushed by sengels into branch 'python3'. Libofx 0.9.5 is the latest release. PATCH by Cristian Onet (cherry picked from commit 187c6e9375767ca4c8c85f307096a23bfdb9a752) A +323 -0 portage/win32libs-sources/libofx-src/libofx-0.9.5-20120131.d= iff M +6 -1 portage/win32libs-sources/libofx-src/libofx-src-200110215.py http://commits.kde.org/emerge/e4f47125828e2e04f5f83151a1a6e5cee68e89f2 diff --git a/portage/win32libs-sources/libofx-src/libofx-0.9.5-20120131.dif= f b/portage/win32libs-sources/libofx-src/libofx-0.9.5-20120131.diff new file mode 100644 index 0000000..2f8102b --- /dev/null +++ b/portage/win32libs-sources/libofx-src/libofx-0.9.5-20120131.diff @@ -0,0 +1,323 @@ +diff -Nru libofx-0.9.5.orig/CMakeLists.txt libofx-0.9.5/CMakeLists.txt +--- libofx-0.9.5.orig/CMakeLists.txt 1970-01-01 02:00:00.000000000 +0200 ++++ libofx-0.9.5/CMakeLists.txt 2012-01-31 20:04:34.813263600 +0200 +@@ -0,0 +1,98 @@ ++project(ofx) ++ ++set (VERSION_MAJOR 0) ++set (VERSION_MINOR 9) ++set (VERSION_PATH 5) ++ ++cmake_minimum_required(VERSION 2.6) ++ ++list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}) ++find_package(OpenSP REQUIRED) ++ ++if(MSVC) ++ add_definitions(-D_CRT_SECURE_NO_WARNINGS) ++endif(MSVC) ++ ++include_directories( ++ inc ++ ${OPENSP_INCLUDES} ++ ${CMAKE_INSTALL_PREFIX}/include ++) ++ ++add_definitions( ++ -DOS_WIN32 ++ -DMAKEFILE_DTD_PATH=3D"${CMAKE_PREFIX_PATH}/share/libofx/dtd/" ++) ++ ++set (COEFF_HDRS = ++ inc/libofx.h ++ lib/messages.hh ++ lib/ofx_preproc.hh ++ lib/file_preproc.hh ++ lib/context.hh ++ lib/ofx_sgml.hh ++ lib/ofc_sgml.hh ++ lib/ofx_aggregate.hh ++ lib/ofx_error_msg.hh ++ lib/ofx_containers.hh ++ lib/ofx_request.hh ++ lib/ofx_request_accountinfo.hh ++ lib/ofx_request_statement.hh ++ lib/ofx_utilities.hh ++ lib/tree.hh ++ lib/win32.hh ++ ) ++ ++set (SRC_SOURCES ++ lib/messages.cpp ++ lib/ofx_utilities.cpp ++ lib/file_preproc.cpp ++ lib/context.cpp ++ lib/ofx_preproc.cpp ++ lib/ofx_container_generic.cpp ++ lib/ofx_container_main.cpp ++ lib/ofx_container_security.cpp ++ lib/ofx_container_statement.cpp ++ lib/ofx_container_account.cpp ++ lib/ofx_container_transaction.cpp ++ lib/ofx_containers_misc.cpp ++ lib/ofx_request.cpp ++ lib/ofx_request_accountinfo.cpp ++ lib/ofx_request_statement.cpp ++ lib/ofx_sgml.cpp ++ lib/ofc_sgml.cpp ++ lib/win32.cpp ++ ${COEFF_HDRS} ++) ++ ++# We would like it to be shared, but libofx does not export symbols manua= lly ++# thus it causes troubles on MSVC ++#add_library(ofx SHARED ${SRC_SOURCES}) ++add_library(ofx ${SRC_SOURCES}) ++ ++FIND_LIBRARY( ICONV_LIBRARIES iconv ) ++if(MSVC) ++ set_target_properties(ofx PROPERTIES OUTPUT_NAME "libofx") ++endif(MSVC) ++target_link_libraries(ofx ${OPENSP_LIBRARIES} ${ICONV_LIBRARIES}) ++ ++######### add a utility function so that we can test ofx files ########## ++set(ofxdump_SRCS ++ ofxdump/cmdline.c ++ ofxdump/ofxdump.cpp = ++) ++ ++if(MSVC) ++ set(ofxdump_SRCS ${ofxdump_SRCS} lib/messages.cpp lib/getopt.c lib/ge= topt1.c) ++endif(MSVC) ++ ++add_definitions(-DCMDLINE_PARSER_PACKAGE=3D\"ofxdump\" -DCMDLINE_PARSER_P= ACKAGE_NAME=3D\"ofxdump\" -DCMDLINE_PARSER_VERSION=3D\"0.9.5\") ++add_executable(ofxdump ${ofxdump_SRCS}) ++target_link_libraries(ofxdump ofx) ++ ++install(TARGETS ofx ofxdump RUNTIME DESTINATION bin ARCHIVE DESTINATION l= ib LIBRARY DESTINATION lib) ++install(FILES inc/libofx.h DESTINATION include/libofx) ++install(FILES dtd/opensp.dcl DESTINATION ${CMAKE_PREFIX_PATH}/share/libof= x/dtd) ++install(FILES dtd/ofx160.dtd DESTINATION ${CMAKE_PREFIX_PATH}/share/libof= x/dtd) ++install(FILES dtd/ofx201.dtd DESTINATION ${CMAKE_PREFIX_PATH}/share/libof= x/dtd) ++install(FILES dtd/ofc.dtd DESTINATION ${CMAKE_PREFIX_PATH}/share/libofx/d= td) +diff -Nru libofx-0.9.5.orig/config.h libofx-0.9.5/config.h +--- libofx-0.9.5.orig/config.h 1970-01-01 02:00:00.000000000 +0200 ++++ libofx-0.9.5/config.h 2012-01-31 19:57:23.409470600 +0200 +@@ -0,0 +1,71 @@ ++// Have these ++#define HAVE_EVENTGENERATOR_H 1 ++#define HAVE_LIBCURL 1 ++#define HAVE_MEMORY_H 1 ++#define HAVE_PARSEREVENTGENERATORKIT_H 1 ++#define HAVE_SGMLAPPLICATION_H 1 ++#define HAVE_STDLIB_H 1 ++#define HAVE_STRING_H 1 ++#define HAVE_SYS_STAT_H 1 ++#define HAVE_SYS_TYPES_H 1 ++ ++// Do not exist ++#undef HAVE_DLFCN_H ++#undef HAVE_GETOPT_H ++#undef HAVE_GETOPT_LONG ++#undef HAVE_INTTYPES_H ++#undef HAVE_STDINT_H ++#undef HAVE_STRINGS_H ++#undef HAVE_UNISTD_H ++ ++ ++// Unsure ++#define HAVE_ICONV 1 ++#define HAVE_LIBXMLPP 1 ++ ++#undef LIBCURL_FEATURE_ASYNCHDNS ++ ++/* Defined if libcurl supports IPv6 */ ++#undef LIBCURL_FEATURE_IPV6 ++ ++/* Defined if libcurl supports KRB4 */ ++#undef LIBCURL_FEATURE_KRB4 ++ ++/* Defined if libcurl supports libz */ ++#undef LIBCURL_FEATURE_LIBZ ++ ++/* Defined if libcurl supports SSL */ ++#undef LIBCURL_FEATURE_SSL ++ ++/* Defined if libcurl supports DICT */ ++#undef LIBCURL_PROTOCOL_DICT ++ ++/* Defined if libcurl supports FILE */ ++#undef LIBCURL_PROTOCOL_FILE ++ ++/* Defined if libcurl supports FTP */ ++#undef LIBCURL_PROTOCOL_FTP ++ ++/* Defined if libcurl supports FTPS */ ++#undef LIBCURL_PROTOCOL_FTPS ++ ++/* Defined if libcurl supports GOPHER */ ++#undef LIBCURL_PROTOCOL_GOPHER ++ ++/* Defined if libcurl supports HTTP */ ++#undef LIBCURL_PROTOCOL_HTTP ++ ++/* Defined if libcurl supports HTTPS */ ++#undef LIBCURL_PROTOCOL_HTTPS ++ ++/* Defined if libcurl supports LDAP */ ++#undef LIBCURL_PROTOCOL_LDAP ++ ++/* Defined if libcurl supports TELNET */ ++#undef LIBCURL_PROTOCOL_TELNET ++ ++ ++// MSVC Defines we seem to need ++#ifdef _MSC_VER ++typedef int ssize_t; ++#endif +diff -Nru libofx-0.9.5.orig/FindOpenSP.cmake libofx-0.9.5/FindOpenSP.cmake +--- libofx-0.9.5.orig/FindOpenSP.cmake 1970-01-01 02:00:00.000000000 +0200 ++++ libofx-0.9.5/FindOpenSP.cmake 2012-01-31 19:57:23.409470600 +0200 +@@ -0,0 +1,36 @@ ++# - Try to find the OpenSP library ++# = ++# Once done this will define ++# ++# OPENSP_FOUND - system has OPENSP ++# OPENSP_INCLUDES - the OPENSP include directories ++# OPENSP_LIBRARIES - The libraries needed to use OPENSP ++ ++if (WIN32) ++ ++ set(OPENSP_FOUND FALSE) ++ find_path(OPENSP_INCLUDES ParserEventGeneratorKit.h ++ ${CMAKE_PREFIX_PATH}/include/opensp ++ ) ++ ++ find_library(OPENSP_LIBRARIES ++ NAMES sp133 ++ PATHS ++ ${CMAKE_PREFIX_PATH}/lib ++ ) ++ ++ if (OPENSP_INCLUDES AND OPENSP_OPENSP_LIBRARIES) ++ set(OPENSP_FOUND TRUE) ++ endif (OPENSP_INCLUDES AND OPENSP_OPENSP_LIBRARIES) ++ ++ if (OPENSP_FOUND) ++ if (NOT OPENSP_FIND_QUIETLY) ++ message(STATUS "Found OPENSP library: ${OPENSP_LIBRARIES}") ++ endif (NOT OPENSP_FIND_QUIETLY) ++ ++ else (OPENSP_FOUND) ++ if (OPENSP_FIND_REQUIRED) ++ message(FATAL_ERROR "Could NOT find OPENSP library\nPlease install = it first") ++ endif (OPENSP_FIND_REQUIRED) ++ endif (OPENSP_FOUND) ++endif (WIN32) +diff -Nru libofx-0.9.5.orig/lib/getopt.c libofx-0.9.5/lib/getopt.c +--- libofx-0.9.5.orig/lib/getopt.c 2011-03-31 01:30:50.000000000 +0300 ++++ libofx-0.9.5/lib/getopt.c 2012-01-31 19:57:23.409470600 +0200 +@@ -40,6 +40,7 @@ + #endif + = + #include ++#include "getopt.h" + = + /* Comment out all this code if we are using the GNU C Library, and are n= ot + actually compiling the library itself. This code is part of the GNU C +@@ -199,7 +200,7 @@ + # define my_index strchr + #else + = +-# if HAVE_STRING_H ++# if HAVE_STRING_H || defined(_MSC_VER) + # include + # else + # include +diff -Nru libofx-0.9.5.orig/lib/getopt.h libofx-0.9.5/lib/getopt.h +--- libofx-0.9.5.orig/lib/getopt.h 1970-01-01 02:00:00.000000000 +0200 ++++ libofx-0.9.5/lib/getopt.h 2012-01-31 19:57:23.425095600 +0200 +@@ -0,0 +1,20 @@ ++#ifndef _getopt_h ++#define _getopt_h ++ ++#ifndef _MSC_VER ++#include ++#else ++struct option { ++ const char *name; ++ int has_arg; ++ int *flag; ++ int val; ++}; ++ ++extern char *optarg; ++extern int optind; ++ ++ ++int getopt_long(int argc, char *const *argv, const char *shortopts, const= struct option *longopts, int *indexptr); ++#endif ++#endif +diff -Nru libofx-0.9.5.orig/lib/win32.cpp libofx-0.9.5/lib/win32.cpp +--- libofx-0.9.5.orig/lib/win32.cpp 2011-03-31 01:30:50.000000000 +0300 ++++ libofx-0.9.5/lib/win32.cpp 2012-01-31 19:57:23.425095600 +0200 +@@ -18,7 +18,9 @@ + #include + #include + #include ++#ifdef HAVE_UNISTD_H + #include ++#endif + #include + #include + #include +@@ -27,6 +29,14 @@ + = + #ifdef OS_WIN32 + = ++#ifdef _MSC_VER ++#include ++#include ++#define strcasecmp strcmpi ++#define snprintf _snprintf ++#define open _open ++#endif ++ + int mkstemp(char *tmpl) + { + int fd =3D -1; +diff -Nru libofx-0.9.5.orig/ofxdump/cmdline.c libofx-0.9.5/ofxdump/cmdline= .c +--- libofx-0.9.5.orig/ofxdump/cmdline.c 2012-01-10 19:49:40.000000000 +0200 ++++ libofx-0.9.5/ofxdump/cmdline.c 2012-01-31 20:05:05.263527600 +0200 +@@ -21,7 +21,7 @@ + #define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */ + #endif + = +-#include ++#include "getopt.h" + = + #include "cmdline.h" + = +@@ -384,7 +384,6 @@ + const char *val =3D value; + int found; + char **string_field; +- FIX_UNUSED (field); + = + stop_char =3D 0; + found =3D 0; +@@ -480,8 +479,6 @@ + = + optarg =3D 0; + optind =3D 0; +- opterr =3D params->print_errors; +- optopt =3D '?'; + = + while (1) + { +diff -Nru libofx-0.9.5.orig/ofxdump/getopt.h libofx-0.9.5/ofxdump/getopt.h +--- libofx-0.9.5.orig/ofxdump/getopt.h 1970-01-01 02:00:00.000000000 +0200 ++++ libofx-0.9.5/ofxdump/getopt.h 2012-01-31 19:57:23.425095600 +0200 +@@ -0,0 +1 @@ ++#include "../lib/getopt.h" diff --git a/portage/win32libs-sources/libofx-src/libofx-src-200110215.py b= /portage/win32libs-sources/libofx-src/libofx-src-200110215.py index 01a699b..075dabd 100644 --- a/portage/win32libs-sources/libofx-src/libofx-src-200110215.py +++ b/portage/win32libs-sources/libofx-src/libofx-src-200110215.py @@ -18,8 +18,13 @@ class subinfo( info.infoclass ): self.patchToApply['0.9.2'].append(("ofx-msvc.diff", 1)) self.patchToApply['0.9.2'].append(("libofx-0.9.2-20110215.diff", 1= )) = + self.targets['0.9.5'] =3D "http://downloads.sourceforge.net/projec= t/libofx/libofx/0.9.5/libofx-0.9.5.tar.gz" + self.targetDigests['0.9.5'] =3D '7e5245d68a0f3f7efad2fd809b2afbbff= 6ba0e73' + self.targetInstSrc['0.9.5'] =3D "libofx-0.9.5" + self.patchToApply['0.9.5'] =3D [("libofx-0.9.5-20120131.diff", 1)] + self.shortDescription =3D "a parser and an API for the OFX (Open F= inancial eXchange) specification" - self.defaultTarget =3D '0.9.2' + self.defaultTarget =3D '0.9.5' = def setDependencies( self ): self.dependencies['win32libs-bin/libopensp'] =3D 'default'