diff --git a/converters/wv2/Makefile b/converters/wv2/Makefile index 4e88afe78ca..ce2a1797458 100644 --- a/converters/wv2/Makefile +++ b/converters/wv2/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.27 2012/09/01 14:36:56 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.28 2012/11/29 19:07:57 pascal Exp $ COMMENT= library functions to access Microsoft Word/Excel files -DISTNAME= wv2-0.2.3 -REVISION= 7 -SHARED_LIBS += wv2 3.0 # .1.8 +DISTNAME= wv2-0.4.2 +SHARED_LIBS += wv2 4.0 # .1.8 CATEGORIES= converters MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=wvware/} EXTRACT_SUFX= .tar.bz2 @@ -17,22 +16,14 @@ PERMIT_PACKAGE_FTP= Yes PERMIT_DISTFILES_CDROM= Yes PERMIT_DISTFILES_FTP= Yes -WANTLIB += gobject-2.0 gio-2.0 gmodule-2.0 pcre m z -WANTLIB += glib-2.0 xml2 gsf-1 bz2 ffi gthread-2.0 stdc++ +WANTLIB += glib-2.0 gsf-1 m stdc++ z -MODULES= devel/gettext +MODULES= converters/libiconv \ + devel/cmake LIB_DEPENDS+= devel/glib2 \ - textproc/libxml \ - devel/libgsf \ - archivers/bzip2 + devel/libgsf -USE_LIBTOOL= Yes -USE_GMAKE= Yes -CONFIGURE_STYLE= gnu -CONFIGURE_ARGS+= ${CONFIGURE_SHARED} -CONFIGURE_ARGS+= --disable-debug \ - --enable-static \ - --with-libiconv="${LOCALBASE}" +CONFIGURE_ARGS +=-DLIBwv2_VERSION=${LIBwv2_VERSION} .include diff --git a/converters/wv2/distinfo b/converters/wv2/distinfo index 4c6cc97ec6b..4941ce7f2ed 100644 --- a/converters/wv2/distinfo +++ b/converters/wv2/distinfo @@ -1,5 +1,2 @@ -MD5 (wv2-0.2.3.tar.bz2) = 6n4zMfvllxhQcMB4RBGj9w== -RMD160 (wv2-0.2.3.tar.bz2) = BTTdsj7FpuIiy7x25pX46lz1Msc= -SHA1 (wv2-0.2.3.tar.bz2) = g3j0OAa8JhTM6ismUVnOBUgZJgE= -SHA256 (wv2-0.2.3.tar.bz2) = jyzySl7dtnEde6ScBce13dwIzgr1ZKugmPUWx8u4tWA= -SIZE (wv2-0.2.3.tar.bz2) = 908983 +SHA256 (wv2-0.4.2.tar.bz2) = nyttORDLDinJ/0Mvk1pZTO7AEBvKRrovwlGv8lHuONw= +SIZE (wv2-0.4.2.tar.bz2) = 452759 diff --git a/converters/wv2/patches/patch-CMakeLists_txt b/converters/wv2/patches/patch-CMakeLists_txt new file mode 100644 index 00000000000..bbcad4c9e61 --- /dev/null +++ b/converters/wv2/patches/patch-CMakeLists_txt @@ -0,0 +1,38 @@ +$OpenBSD: patch-CMakeLists_txt,v 1.1 2012/11/29 19:07:57 pascal Exp $ +--- CMakeLists.txt.orig Sat Oct 31 19:22:43 2009 ++++ CMakeLists.txt Tue Nov 27 17:44:05 2012 +@@ -59,8 +59,16 @@ IF( HAVE_SYS_ICONV_H ) + SET( ICONV_COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS} "-DHAVE_SYS_ICONV_H" ) + ENDIF( HAVE_SYS_ICONV_H ) + +-TRY_RUN( MODERN_ICONV_RUN MODERN_ICONV_COMPILE ${wvWare_BINARY_DIR}/CMakeTmp ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c COMPILE_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS} ) ++SET(CMAKE_REQUIRED_DEFINITIONS ${ICONV_COMPILE_DEFINITIONS}) ++SET(CMAKE_REQUIRED_INCLUDES ${ICONV_INCLUDE_DIR}) ++SET(CMAKE_REQUIRED_LIBRARIES ${ICONV_LIBRARIES}) ++execute_process(COMMAND /bin/cat ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c OUTPUT_VARIABLE SRC) ++#TRY_RUN( MODERN_ICONV_RUN MODERN_ICONV_COMPILE ${wvWare_BINARY_DIR}/CMakeTmp ${wvWare_SOURCE_DIR}/cmake/TestModernIconv.c COMPILE_DEFINITIONS "${ICONV_COMPILE_DEFINITIONS}" OUTPUT_VARIABLE OUTPUT ) ++include(CheckCSourceCompiles) ++check_c_source_compiles("${SRC}" MODERN_ICONV_COMPILE ) + ++message( "${OUTPUT}" ) ++ + IF( MODERN_ICONV_RUN GREATER 0 OR NOT MODERN_ICONV_COMPILE ) + MESSAGE( STATUS "wv2 depends on a modern iconv installation, supporting UNICODELITTLE and" ) + MESSAGE( STATUS "UNICODEBIG. The detected iconv version doesn't support these conversions." ) +@@ -139,7 +147,6 @@ ENDIF( MODERN_ZLIB_RUN GREATER 0 AND WITH_ZLIB ) + + IF( ZLIB_FOUND ) + SET( _WV2_LDFLAGS ${_WV2_LDFLAGS} ${ZLIB_LIBRARIES} ) +- SET( _WV2_CFLAGS ${_WV2_CFLAGS} ${ZLIB_INCLUDE_DIR} ) + ENDIF( ZLIB_FOUND ) + + IF( LIBGSF_FOUND ) +@@ -165,7 +172,7 @@ LIST( REMOVE_DUPLICATES _WV2_CFLAGS ) + + FOREACH( _lib ${_WV2_LDFLAGS} ) + # Remove path to the library and suffixes. Transformation example: libglib-2.0.so => glib-2.0 +- STRING( REGEX REPLACE "[\\\\ _\\/\\.a-zA-Z0-9\\-]*\\/lib([_\\.a-zA-Z0-9\\-]*)\\.[_a-zA-Z0-9\\-\\.]*" \\1 _lib_no_path ${_lib} ) ++ STRING( REGEX REPLACE "[\\\\ _\\/\\.a-zA-Z0-9\\-]*\\/lib([_\\.a-zA-Z0-9\\-]*)\\.so\\.[_a-zA-Z0-9\\-\\.]*" \\1 _lib_no_path ${_lib} ) + SET( WV2_LDFLAGS "${WV2_LDFLAGS} ${CMAKE_LINK_LIBRARY_FLAG}${_lib_no_path}" ) + ENDFOREACH( _lib ) + diff --git a/converters/wv2/patches/patch-cmake_MacroCreateLibtoolFile_cmake b/converters/wv2/patches/patch-cmake_MacroCreateLibtoolFile_cmake new file mode 100644 index 00000000000..ae6bf3132e6 --- /dev/null +++ b/converters/wv2/patches/patch-cmake_MacroCreateLibtoolFile_cmake @@ -0,0 +1,28 @@ +$OpenBSD: patch-cmake_MacroCreateLibtoolFile_cmake,v 1.1 2012/11/29 19:07:57 pascal Exp $ +--- cmake/MacroCreateLibtoolFile.cmake.orig Sat Oct 31 19:22:43 2009 ++++ cmake/MacroCreateLibtoolFile.cmake Fri Jul 13 11:07:39 2012 +@@ -16,19 +16,19 @@ MACRO(CREATE_LIBTOOL_FILE _target _install_DIR) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_age ${_target} LT_VERSION_AGE 0) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_revision ${_target} LT_VERSION_REVISION 0) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_installed ${_target} LT_INSTALLED yes) +- GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK yes) ++ GET_TARGET_PROPERTY_WITH_DEFAULT(_target_shouldnotlink ${_target} LT_SHOULDNOTLINK no) + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlopen ${_target} LT_DLOPEN "") + GET_TARGET_PROPERTY_WITH_DEFAULT(_target_dlpreopen ${_target} LT_DLPREOPEN "") + GET_FILENAME_COMPONENT(_laname ${_target_location} NAME_WE) + GET_FILENAME_COMPONENT(_soname ${_target_location} NAME) + SET(_laname ${PROJECT_BINARY_DIR}/${_laname}.la) + FILE(WRITE ${_laname} "# ${_laname} - a libtool library file\n") +- FILE(WRITE ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n") +- FILE(WRITE ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" ) ++ FILE(APPEND ${_laname} "# Generated by CMake ${CMAKE_VERSION} (like GNU libtool)\n") ++ FILE(APPEND ${_laname} "\n# Please DO NOT delete this file!\n# It is necessary for linking the library with libtool.\n\n" ) + FILE(APPEND ${_laname} "# The name that we can dlopen(3).\n") +- FILE(APPEND ${_laname} "dlname='${_soname}'\n\n") ++ FILE(APPEND ${_laname} "dlname='${_soname}.${LIBwv2_VERSION}'\n\n") + FILE(APPEND ${_laname} "# Names of this library.\n") +- FILE(APPEND ${_laname} "library_names='${_soname}.${_target_current}.${_target_age}.${_target_revision} ${_soname}.${_target_current} ${_soname}'\n\n") ++ FILE(APPEND ${_laname} "library_names='${_soname}.${LIBwv2_VERSION} ${_soname}.${LIBwv2_VERSION} ${_soname}.${LIBwv2_VERSION}'\n\n") + FILE(APPEND ${_laname} "# The name of the static archive.\n") + FILE(APPEND ${_laname} "old_library='${_target_static_lib}'\n\n") + FILE(APPEND ${_laname} "# Libraries that this one depends upon.\n") diff --git a/converters/wv2/patches/patch-configure b/converters/wv2/patches/patch-configure deleted file mode 100644 index 9ac791b1505..00000000000 --- a/converters/wv2/patches/patch-configure +++ /dev/null @@ -1,28 +0,0 @@ -$OpenBSD: patch-configure,v 1.1 2008/07/25 15:16:34 sthen Exp $ ---- configure.orig Fri Jul 25 15:59:24 2008 -+++ configure Fri Jul 25 16:01:23 2008 -@@ -25945,6 +25945,7 @@ _ACEOF - cat confdefs.h >>conftest.$ac_ext - cat >>conftest.$ac_ext <<_ACEOF - /* end confdefs.h. */ -+#include - - /* Override any gcc2 internal prototype to avoid an error. */ - #ifdef __cplusplus -@@ -25952,13 +25953,12 @@ extern "C" - #endif - /* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ --char isnan (); -+double val = 0.0; -+ - int - main () - { --isnan (); -- ; -- return 0; -+ return isnan (val); - } - _ACEOF - rm -f conftest.$ac_objext conftest$ac_exeext diff --git a/converters/wv2/patches/patch-src_CMakeLists_txt b/converters/wv2/patches/patch-src_CMakeLists_txt new file mode 100644 index 00000000000..aa8e9866a96 --- /dev/null +++ b/converters/wv2/patches/patch-src_CMakeLists_txt @@ -0,0 +1,32 @@ +$OpenBSD: patch-src_CMakeLists_txt,v 1.1 2012/11/29 19:07:57 pascal Exp $ +--- src/CMakeLists.txt.orig Sat Oct 31 19:22:43 2009 ++++ src/CMakeLists.txt Tue Nov 27 18:19:03 2012 +@@ -74,6 +74,7 @@ SET( wv2_HEADERS + ) + + ADD_LIBRARY( wv2 SHARED ${wv2_SOURCES} ${wv2_HEADERS} ) ++ADD_LIBRARY( wv2Static STATIC ${wv2_SOURCES} ${wv2_HEADERS} ) + TARGET_LINK_LIBRARIES( wv2 ${ZLIB_LIBRARIES} ${LIBGSF_LIBRARIES} ${ICONV_LIBRARIES} ${GLIB2_LIBRARIES} ) + SET_TARGET_PROPERTIES( wv2 PROPERTIES + SOVERSION ${LT_VERSION_CURRENT} +@@ -83,15 +84,18 @@ SET_TARGET_PROPERTIES( wv2 PROPERTIES + LT_VERSION_REVISION ${LT_VERSION_REVISION} + LT_DEPENDENCY_LIBS ${WV2_LDFLAGS} + ) ++SET_TARGET_PROPERTIES( wv2Static PROPERTIES ++ OUTPUT_NAME wv2 ++ ) + IF( WIN32 ) + SET_TARGET_PROPERTIES( wv2 PROPERTIES DEFINE_SYMBOL WV2_DLL ) + ENDIF( WIN32 ) + +-INSTALL( TARGETS wv2 ++INSTALL( TARGETS wv2 wv2Static + EXPORT wvWare + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib${LIB_SUFFIX} +- ARCHIVE DESTINATION lib${LIB_SUFFIX}/static ++ ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + + INSTALL( EXPORT wvWare DESTINATION lib${LIB_SUFFIX}/wvWare FILE wv2.cmake ) diff --git a/converters/wv2/patches/patch-src_zcodec_cxx b/converters/wv2/patches/patch-src_zcodec_cxx new file mode 100644 index 00000000000..7243ba62e23 --- /dev/null +++ b/converters/wv2/patches/patch-src_zcodec_cxx @@ -0,0 +1,12 @@ +$OpenBSD: patch-src_zcodec_cxx,v 1.1 2012/11/29 19:07:57 pascal Exp $ +--- src/zcodec.cxx.orig Fri Jul 13 09:57:48 2012 ++++ src/zcodec.cxx Fri Jul 13 09:58:02 2012 +@@ -267,7 +267,7 @@ long ZCodec::Decompress( OLEStreamReader& rIStm, std:: + //set the "finished" flag if we got the stream-end signal? + if ( err == Z_STREAM_END ) + mbFinish = TRUE; +- wvlog << " total_in=" << PZSTREAM->total_in << ",total_out=" << PZSTREAM->total_out << std::endl; ++ wvlog << " total_in=" << (char *)PZSTREAM->total_in << ",total_out=" << (char *)PZSTREAM->total_out << std::endl; + //return code: -1 if mbStatus is false, otherwise # of bytes decompressed + return ( mbStatus ) ? (long)(PZSTREAM->total_out - nOldTotal_Out) : -1; + } diff --git a/converters/wv2/pkg/PLIST b/converters/wv2/pkg/PLIST index aac2c1e3473..8b5ee48ae5c 100644 --- a/converters/wv2/pkg/PLIST +++ b/converters/wv2/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.2 2004/09/14 23:25:51 espie Exp $ +@comment $OpenBSD: PLIST,v 1.3 2012/11/29 19:07:57 pascal Exp $ bin/wv2-config include/wv2/ include/wv2/associatedstrings.h @@ -24,7 +24,12 @@ include/wv2/utilities.h include/wv2/word95_generated.h include/wv2/word97_generated.h include/wv2/word_helper.h +include/wv2/wv2version.h include/wv2/wvlog.h +include/wv2/zcodec.hxx lib/libwv2.a lib/libwv2.la %%SHARED%% +lib/wvWare/ +lib/wvWare/wv2-noconfig.cmake +lib/wvWare/wv2.cmake