Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libvisio2svg for openSUSE:Factory checked in at 2026-10-27 16:47:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libvisio2svg (Old) and /work/SRC/openSUSE:Factory/.libvisio2svg.new.2252680 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libvisio2svg" Tue Oct 27 16:47:48 2026 rev:4 rq:1392755 version:0.5.8 Changes: -------- --- /work/SRC/openSUSE:Factory/libvisio2svg/libvisio2svg.changes 2020-03-18 12:45:53.128973391 +0100 +++ /work/SRC/openSUSE:Factory/.libvisio2svg.new.2252680/libvisio2svg.changes 2026-10-27 16:48:07.813393972 +0100 @@ -1,0 +2,15 @@ +Sun Oct 18 05:55:05 UTC 2026 - Martin Pluskal <[email protected]> + +- Update to version 0.5.8: + * Build now requires a C++17 capable compiler. + * Fix crash/double free caused by libxml2 memory management. + * Fix crash on shapes without title (empty string instead of + NULL pointer). + * Reset input stream position between parse passes. + * Copy libxml2 output buffer instead of reusing freed memory. + * Rework argp detection in CMake; require CMake 3.5 or newer. +- Spec cleanup: drop Group tags, use pkgconfig-style + BuildRequires, explicitly require gcc and make. +- Drop the SLE12 gcc7 build conditional. + +------------------------------------------------------------------- Old: ---- libvisio2svg-0.5.5.tar.gz New: ---- libvisio2svg-0.5.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libvisio2svg.spec ++++++ --- /var/tmp/diff_new_pack.zoKcHr/_old 2026-10-27 16:48:08.532424126 +0100 +++ /var/tmp/diff_new_pack.zoKcHr/_new 2026-10-27 16:48:08.533424168 +0100 @@ -1,7 +1,7 @@ # # spec file for package libvisio2svg # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2026 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,25 @@ %define soversion 0 Name: libvisio2svg -Version: 0.5.5 +Version: 0.5.8 Release: 0 Summary: Library to convert Visio Documents and Stencils (VSS and VSD) to SVG License: GPL-2.0-only -Group: Productivity/Graphics/Convertors URL: https://github.com/kakwa/libvisio2svg Source0: https://github.com/kakwa/libvisio2svg/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: cmake -BuildRequires: freetype2-devel -%if 0%{?suse_version} > 1320 +BuildRequires: gcc BuildRequires: gcc-c++ -%else -# SLE12 -BuildRequires: gcc7-c++ -#!Buildignore: libgcc_s1 -%endif BuildRequires: libemf2svg-devel >= 1.1.0 -BuildRequires: librevenge-devel -BuildRequires: libvisio-devel -BuildRequires: libwmf-devel -BuildRequires: libxml2-devel +BuildRequires: make +BuildRequires: pkgconfig +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(librevenge-generators-0.0) +BuildRequires: pkgconfig(librevenge-stream-0.0) +BuildRequires: pkgconfig(libvisio-0.1) +BuildRequires: pkgconfig(libwmf) +BuildRequires: pkgconfig(libxml-2.0) %description Library for conversion of Visio Documents and Stencils (VSS and VSD) to SVG. @@ -48,7 +46,6 @@ %package -n %{name}%{soversion} Summary: Library to convert Visio Documents and Stencils (VSS and VSD) to SVG -Group: System/Libraries %description -n %{name}%{soversion} Library for conversion of Visio Documents and Stencils (VSS and VSD) to SVG. @@ -58,7 +55,6 @@ %package devel Summary: Development Files for applications which will use libvisio2svg -Group: Development/Libraries/C and C++ Requires: %{name}%{soversion} = %{version} %description devel @@ -68,7 +64,6 @@ %package -n visio2svg-conv Summary: VSS/VDS to SVG converter -Group: Productivity/Graphics/Convertors Requires: %{name}%{soversion} >= %{version} %description -n visio2svg-conv @@ -78,8 +73,6 @@ %setup -q %build -test -x "$(type -p gcc-7)" && export CC=gcc-7 -test -x "$(type -p g++-7)" && export CXX=g++-7 %cmake -DCMAKE_SKIP_RPATH=TRUE %cmake_build ++++++ libvisio2svg-0.5.5.tar.gz -> libvisio2svg-0.5.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/.github/workflows/ci.yml new/libvisio2svg-0.5.8/.github/workflows/ci.yml --- old/libvisio2svg-0.5.5/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/libvisio2svg-0.5.8/.github/workflows/ci.yml 2025-12-14 14:08:54.000000000 +0100 @@ -0,0 +1,60 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@v4 + + - name: Install dependencies (Ubuntu) + if: runner.os == 'Linux' + run: | + sudo apt-get update + sudo apt-get install -y \ + libvisio-dev \ + clang \ + libboost-dev \ + libxml2-dev \ + valgrind \ + cmake \ + libcppunit-dev \ + libfontconfig-dev \ + libfreetype-dev \ + autotools-dev \ + doxygen \ + gperf \ + libicu-dev \ + zlib1g-dev \ + libpng-dev \ + libwmf-dev \ + wget \ + pkg-config + + - name: Install dependencies (macOS) + if: runner.os == 'macOS' + run: | + brew update + brew install argp-standalone fontconfig freetype icu4c intltool librevenge libvisio libwmf libxml2 pkg-config wget + + - name: Set up dependencies + run: ./tests/setup-dependencies.sh + + - name: Build + run: | + mkdir build/ + cd build/ + CC=clang CXX=clang++ cmake .. -DCMAKE_LIBRARY_PATH=./tests/usr/local/lib/ -DCMAKE_INCLUDE_PATH=./tests/usr/local/include/ -DUSE_CLANG=ON -DUNSAFE_FILENAME=ON + make + + - name: Test VSS conversion + run: ./tests/test-vss-conversion.sh diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/.gitignore new/libvisio2svg-0.5.8/.gitignore --- old/libvisio2svg-0.5.5/.gitignore 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/.gitignore 2025-12-14 14:08:54.000000000 +0100 @@ -36,3 +36,4 @@ out tests/deps_build/ tests/usr/ +test_output/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/.travis.yml new/libvisio2svg-0.5.8/.travis.yml --- old/libvisio2svg-0.5.5/.travis.yml 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,46 +0,0 @@ -sudo: required - -install: - - ./tests/travis-setup.sh - -addons_shortcuts: - addons_clang: &clang - apt: - sources: [ 'ubuntu-toolchain-r-test', 'ppa:kubuntu-ppa/backports' ] - packages: - - libvisio-dev - - clang - - libboost-dev - - libxml2-dev - - valgrind - - cmake - - libcppunit-dev - - autotools-dev - - doxygen - - gperf - - libicu-dev - - zlib1g-dev - - libpng-dev - - libwmf-dev - -before_install: - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then xcode-select --install;true; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update ; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install argp-standalone; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libwmf; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install valgrind; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libxml2; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install icu4c; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install intltool; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install librevenge; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install libvisio; fi - -matrix: - include: - - os: linux - compiler: "clang" - addons: *clang - dist: trusty - - os: osx - -script: CC=clang CXX=clang++ cmake . -DCMAKE_LIBRARY_PATH=./tests/usr/local/lib/ -DCMAKE_INCLUDE_PATH=./tests/usr/local/include/ -DUSE_CLANG=ON -DUNSAFE_FILENAME=ON && make #&& ./tests/resources/check_correctness.sh -rsxn diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/CMakeLists.txt new/libvisio2svg-0.5.8/CMakeLists.txt --- old/libvisio2svg-0.5.5/CMakeLists.txt 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/CMakeLists.txt 2025-12-14 14:08:54.000000000 +0100 @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.5) project (vss2svg) @@ -10,11 +10,12 @@ find_package(libvisio REQUIRED) find_package(LibXml2 REQUIRED) find_package(Freetype REQUIRED) +find_package(argp) # Project version (sematic versionning) set(vss2svg_VERSION_MAJOR 0) set(vss2svg_VERSION_MINOR 5) -set(vss2svg_VERSION_PATCH 5) +set(vss2svg_VERSION_PATCH 8) set(vss2svg_VERSION ${vss2svg_VERSION_MAJOR}.${vss2svg_VERSION_MINOR}.${vss2svg_VERSION_PATCH}) # set version as a definition @@ -53,7 +54,6 @@ IF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Mac OS X specific code set(EXTERNAL_MEMSTREAM "memstream") - set(EXTERNAL_ARGP "argp") add_definitions(-DDARWIN) ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") @@ -87,6 +87,7 @@ ${FREETYPE_INCLUDE_DIR_ft2build} ${FREETYPE_INCLUDE_DIR_freetype2} ${LIBXML2_INCLUDE_DIR} + ${ARGP_INCLUDE_DIRS} ) add_executable(vss2svg-conv src/conv/vss2svg.cpp) @@ -128,7 +129,7 @@ ${LIBREVENGE_STREAM_LIBRARY} ${LIBXML2_LIBRARIES} TitleGenerator - ${EXTERNAL_ARGP} + ${ARGP_LIBRARIES} ) target_link_libraries(vss2svg-conv @@ -152,7 +153,7 @@ endif () -SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") INSTALL(TARGETS vss2svg-conv vsd2svg-conv TitleGenerator Visio2Svg RUNTIME DESTINATION ${BIN_INSTALL_DIR} LIBRARY DESTINATION ${LIB_INSTALL_DIR} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/README.md new/libvisio2svg-0.5.8/README.md --- old/libvisio2svg-0.5.5/README.md 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/README.md 2025-12-14 14:08:54.000000000 +0100 @@ -1,7 +1,7 @@ Libvisio2svg ============ -[](https://travis-ci.org/kakwa/libvisio2svg) +[](https://github.com/kakwa/libvisio2svg/actions) Library/Utilities to convert Microsoft (MS) Visio Documents and Stencils (VSS and VSD) to SVG. @@ -41,6 +41,7 @@ * [libemf2svg](https://github.com/kakwa/libemf2svg) * [libxml2](http://www.xmlsoft.org/) * [libwmf](http://wvware.sourceforge.net/libwmf.html) +* [fonts from the ghostscript project](https://www.ghostscript.com/) (libwmf requirement, usually the distribution package is named `gsfonts`) Building ======== @@ -213,6 +214,21 @@ Changelog ========= +0.5.8 +----- + +* Better argp build handling (cmake findpackage) on MacOS + +0.5.7 +----- + +* Fix crash/double free caused by iffy libxml2 memory management + +0.5.6 +----- + +* C++ 17 + 0.5.5 ----- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/cmake/Findargp.cmake new/libvisio2svg-0.5.8/cmake/Findargp.cmake --- old/libvisio2svg-0.5.5/cmake/Findargp.cmake 1970-01-01 01:00:00.000000000 +0100 +++ new/libvisio2svg-0.5.8/cmake/Findargp.cmake 2025-12-14 14:08:54.000000000 +0100 @@ -0,0 +1,85 @@ +# - try to find the argp library/component of glibc +# +# Users may optionally supply: +# ARGP_ROOT_DIR - a prefix to start searching. +# +# Cache Variables: (probably not for direct use in your scripts) +# ARGP_INCLUDE_DIR +# ARGP_LIBRARY, only defined if linking to an extra library is required +# +# Non-cache variables you might use in your CMakeLists.txt: +# ARGP_FOUND +# ARGP_INCLUDE_DIRS +# ARGP_LIBRARIES +# +# Requires these CMake modules: +# FindPackageHandleStandardArgs (known included with CMake >=2.6.2) +# +# Original Author: +# 2009-2010 Rylie Pavlik <[email protected]> +# https://ryliepavlik.com/ +# Iowa State University HCI Graduate Program/VRAC +# +# Copyright 2009-2010, Iowa State University +# +# Distributed under the Boost Software License, Version 1.0. +# (See accompanying file LICENSE_1_0.txt or copy at +# http://www.boost.org/LICENSE_1_0.txt) +# +# SPDX-License-Identifier: BSL-1.0 + +set(ARGP_ROOT_DIR + "${ARGP_ROOT_DIR}" + CACHE + PATH + "Path to search for ARGP library") + +### +# Configure ARGP +### +set(_check ARGP_INCLUDE_DIR) + +find_path(ARGP_INCLUDE_DIR + NAMES + argp.h + HINTS + "${ARGP_ROOT_DIR}" + PATHS + /usr/local + /opt/local + /sw) +mark_as_advanced(ARGP_INCLUDE_DIR) + +include(CheckFunctionExists) +check_function_exists(argp_parse ARGP_BUILTIN) + +if(NOT ARGP_BUILTIN) + find_library(ARGP_LIBRARY + NAMES + argp + HINTS + "${ARGP_ROOT_DIR}" + PATH_SUFFIXES + lib + lib64 + PATHS + /usr/local + /opt/local + /sw) + list(APPEND _check ARGP_LIBRARY) + mark_as_advanced(ARGP_LIBRARY) +endif() + +# handle the QUIETLY and REQUIRED arguments and set xxx_FOUND to TRUE if +# all listed variables are TRUE +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(argp + DEFAULT_MSG + ${_check}) + +if(ARGP_FOUND) + set(ARGP_INCLUDE_DIRS "${ARGP_INCLUDE_DIR}") + set(ARGP_LIBRARIES "${ARGP_LIBRARY}") + mark_as_advanced(ARGP_ROOT_DIR) +endif() + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/src/lib/visio2svg/TitleGenerator.cpp new/libvisio2svg-0.5.8/src/lib/visio2svg/TitleGenerator.cpp --- old/libvisio2svg-0.5.5/src/lib/visio2svg/TitleGenerator.cpp 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/src/lib/visio2svg/TitleGenerator.cpp 2025-12-14 14:08:54.000000000 +0100 @@ -18,7 +18,8 @@ if (propList["draw:name"]) { titles.append(propList["draw:name"]->getStr().cstr()); } else { - titles.append(NULL); + // Append empty string instead of NULL to avoid null pointer issues + titles.append(""); } } void TitleGenerator::startDocument( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/src/lib/visio2svg/Visio2Svg.cpp new/libvisio2svg-0.5.8/src/lib/visio2svg/Visio2Svg.cpp --- old/libvisio2svg-0.5.5/src/lib/visio2svg/Visio2Svg.cpp 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/src/lib/visio2svg/Visio2Svg.cpp 2025-12-14 14:08:54.000000000 +0100 @@ -301,6 +301,9 @@ return 1; } + // Reset stream position after isSupported check + input.seek(0, librevenge::RVNG_SEEK_SET); + int ret = 0; // Recover Titles of each sheets @@ -320,6 +323,9 @@ return 1; } + // Reset stream position before second parse + input.seek(0, librevenge::RVNG_SEEK_SET); + // Convert vss/vsd to SVG librevenge::RVNGStringVector output; librevenge::RVNGSVGDrawingGenerator generator(output, NULL); @@ -338,7 +344,7 @@ // Post Treatment loop and construction of the output hash table for (unsigned k = 0; k < output.size(); ++k) { - char *post_treated; + char *post_treated = NULL; // Convert <image> tag containing emf blobs // and resize image ret |= postTreatement(&output[k], &output_names[k], &post_treated, @@ -709,7 +715,6 @@ // parse svg/xml generated by librevenge/libvisio with libxml2 #ifdef DEBUG std::cerr << "Converting: " << name->cstr() << std::endl; -// std::cerr << "Converting: " << in->cstr() << std::endl; #endif doc = xmlReadMemory(in->cstr(), in->size(), name->cstr(), NULL, XML_PARSE_RECOVER | XML_PARSE_NOBLANKS | @@ -726,10 +731,9 @@ xmlBufferPtr nodeBuffer = xmlBufferCreate(); xmlNodeDump(nodeBuffer, doc, root_element, 0, 1); // Dump the generated svg to out - *out = (char *)nodeBuffer->content; + *out = strdup((char *)xmlBufferContent(nodeBuffer)); // free some memory xmlFreeDoc(doc); - nodeBuffer->content = NULL; xmlBufferFree(nodeBuffer); xmlCleanupParser(); return ret; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/tests/setup-dependencies.sh new/libvisio2svg-0.5.8/tests/setup-dependencies.sh --- old/libvisio2svg-0.5.5/tests/setup-dependencies.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/libvisio2svg-0.5.8/tests/setup-dependencies.sh 2025-12-14 14:08:54.000000000 +0100 @@ -0,0 +1,64 @@ +#!/bin/sh + +help(){ + cat <<EOF +usage: `basename $0` <args> + +<description> + +arguments: + <options> +EOF + exit 1 +} + +while getopts ":hn:" opt; do + case $opt in + + h) + help + ;; + n) + NAME="$OPTARG" + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + help + exit 1 + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + help + exit 1 + ;; + esac +done + +OUT=`dirname $0` +OUT=`readlink -f $OUT` +mkdir -p ${OUT}/deps_build +cd ${OUT}/deps_build + +RVNG_VERSION=0.0.5 +VISIO_VERSION=0.1.10 +EMF_VERSION=master + +! [ -e "${EMF_VERSION}.tar.gz" ] && wget https://github.com/kakwa/libemf2svg/archive/${EMF_VERSION}.tar.gz +rm -rf libemf2svg-${EMF_VERSION} +tar -xf ${EMF_VERSION}.tar.gz || exit 1 +cd libemf2svg-${EMF_VERSION} && CC=clang CXX=clang++ cmake . -DUSE_CLANG=ON -DCMAKE_POLICY_VERSION_MINIMUM=3.5 && make && make install DESTDIR=$OUT && cd - || exit 1 + +if ! [ "`uname`" = "Darwin" ] +then + ! [ -e "librevenge-${RVNG_VERSION}.tar.bz2" ] && wget https://dev-www.libreoffice.org/src/librevenge-${RVNG_VERSION}.tar.bz2 + rm -rf librevenge-${RVNG_VERSION} + tar -xf librevenge-${RVNG_VERSION}.tar.bz2 || exit 1 + cd librevenge-${RVNG_VERSION} && ./configure --disable-tests --without-docs && make && make install DESTDIR=$OUT && cd - || exit 1 + find $OUT -name "*.pc" -exec sed -i "s|^prefix=|prefix=$OUT|" {} \; + + export PKG_CONFIG_PATH="$OUT/usr/local/lib/pkgconfig" + ! [ -e "libvisio-${VISIO_VERSION}.tar.xz" ] && wget https://dev-www.libreoffice.org/src/libvisio-${VISIO_VERSION}.tar.xz + rm -rf libvisio-${VISIO_VERSION} + tar -xf libvisio-${VISIO_VERSION}.tar.xz || exit 1 + cd libvisio-${VISIO_VERSION} && ./configure --disable-tests --disable-tools --without-docs && make && make install DESTDIR=$OUT && cd - || exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/tests/test-vss-conversion.sh new/libvisio2svg-0.5.8/tests/test-vss-conversion.sh --- old/libvisio2svg-0.5.5/tests/test-vss-conversion.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/libvisio2svg-0.5.8/tests/test-vss-conversion.sh 2025-12-14 14:08:54.000000000 +0100 @@ -0,0 +1,99 @@ +#!/bin/sh + +# Test script for VSS to SVG conversion +# This script downloads a test VSS file and verifies that vss2svg-conv can convert it + +set -e + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' # No Color + +# Determine script directory and project root +SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" + +echo "=== VSS Conversion Test ===" +echo "Script directory: ${SCRIPT_DIR}" +echo "Project root: ${PROJECT_ROOT}" +echo + +# Create test directory +TEST_DIR="${SCRIPT_DIR}/test_output" +echo "Creating test directory: ${TEST_DIR}" +rm -rf "${TEST_DIR}" +mkdir -p "${TEST_DIR}" +cd "${TEST_DIR}" + +echo "Step 1: Downloading test VSS file..." +if ! wget -q "http://www.visiocafe.com/downloads/hp/HPE-Recent_2025-10-14.zip"; then + echo -e "${RED}ERROR: Failed to download test file${NC}" + exit 1 +fi + +echo "Step 2: Extracting files..." +if ! unzip -q HPE-Recent_2025-10-14.zip; then + echo -e "${RED}ERROR: Failed to extract test file${NC}" + exit 1 +fi + +echo "Step 3: Creating output directory..." +mkdir -p output + +echo "Step 4: Finding VSS files..." +VSS_FILES=$(find . -name "*.vss") +if [ -z "$VSS_FILES" ]; then + echo -e "${RED}ERROR: No VSS files found in extracted archive${NC}" + exit 1 +fi + +echo "Found VSS files:" +echo "$VSS_FILES" +echo + +echo "Step 5: Running VSS to SVG conversion..." +# Run conversion with path adjusted for tests/ directory +if find . -name "*.vss" -exec "${PROJECT_ROOT}/build/vss2svg-conv" -o output/ -s 50 -i {} \;; then + CONVERSION_EXIT_CODE=$? + echo "Conversion command completed with exit code: ${CONVERSION_EXIT_CODE}" +else + CONVERSION_EXIT_CODE=$? + echo -e "${RED}Conversion command failed with exit code: ${CONVERSION_EXIT_CODE}${NC}" +fi + +echo +echo "Step 6: Validating results..." + +# Check if SVG files were generated +SVG_COUNT=$(ls -A output/*.svg 2>/dev/null | wc -l) +SVG_FILES=$(ls -la output/*.svg 2>/dev/null) + +if [ $CONVERSION_EXIT_CODE -eq 0 ] && [ $SVG_COUNT -gt 0 ]; then + echo -e "${GREEN}✅ SUCCESS: VSS conversion test passed!${NC}" + echo "SVG files generated: ${SVG_COUNT}" + echo "Generated files:" + echo "$SVG_FILES" + echo + echo -e "${GREEN}Test completed successfully!${NC}" + exit 0 +else + echo -e "${RED}❌ FAIL: VSS conversion test failed${NC}" + echo "Exit code: ${CONVERSION_EXIT_CODE}" + echo "SVG files found: ${SVG_COUNT}" + echo + echo "Output directory contents:" + ls -la output/ || echo "No output directory found" + echo + echo -e "${YELLOW}Possible issues:${NC}" + echo "1. vss2svg-conv executable not found (check if project was built)" + echo "2. Missing dependencies (fontconfig, etc.)" + echo "3. Build failed or incomplete" + echo + echo "To debug further, check:" + echo "- Build status: ls -la ${PROJECT_ROOT}/build/" + echo "- Executable: ls -la ${PROJECT_ROOT}/build/vss2svg-conv" + echo "- Dependencies: run ${SCRIPT_DIR}/setup-dependencies.sh" + exit 1 +fi diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libvisio2svg-0.5.5/tests/travis-setup.sh new/libvisio2svg-0.5.8/tests/travis-setup.sh --- old/libvisio2svg-0.5.5/tests/travis-setup.sh 2018-03-08 19:51:30.000000000 +0100 +++ new/libvisio2svg-0.5.8/tests/travis-setup.sh 1970-01-01 01:00:00.000000000 +0100 @@ -1,64 +0,0 @@ -#!/bin/sh - -help(){ - cat <<EOF -usage: `basename $0` <args> - -<description> - -arguments: - <options> -EOF - exit 1 -} - -while getopts ":hn:" opt; do - case $opt in - - h) - help - ;; - n) - NAME="$OPTARG" - ;; - \?) - echo "Invalid option: -$OPTARG" >&2 - help - exit 1 - ;; - :) - echo "Option -$OPTARG requires an argument." >&2 - help - exit 1 - ;; - esac -done - -OUT=`dirname $0` -OUT=`readlink -f $OUT` -mkdir -p ${OUT}/deps_build -cd ${OUT}/deps_build - -RVNG_VERSION=0.0.4 -VISIO_VERSION=0.1.5 -EMF_VERSION=master - -! [ -e "${EMF_VERSION}.tar.gz" ] && wget https://github.com/kakwa/libemf2svg/archive/${EMF_VERSION}.tar.gz -rm -rf libemf2svg-${EMF_VERSION} -tar -xf ${EMF_VERSION}.tar.gz || exit 1 -cd libemf2svg-${EMF_VERSION} && CC=clang CXX=clang++ cmake . -DUSE_CLANG=ON && make && make install DESTDIR=$OUT && cd - || exit 1 - -if ! [ "`uname`" = "Darwin" ] -then - ! [ -e "librevenge-${RVNG_VERSION}.tar.xz" ] && wget http://ks1.kakwalab.ovh/src/librevenge-${RVNG_VERSION}.tar.xz - rm -rf librevenge-${RVNG_VERSION} - tar -xf librevenge-${RVNG_VERSION}.tar.xz || exit 1 - cd librevenge-${RVNG_VERSION} && ./configure --disable-tests --without-docs && make && make install DESTDIR=$OUT && cd - || exit 1 - find $OUT -name "*.pc" -exec sed -i "s|^prefix=|prefix=$OUT|" {} \; - - export PKG_CONFIG_PATH="$OUT/usr/local/lib/pkgconfig" - ! [ -e "libvisio-${VISIO_VERSION}.tar.xz" ] && wget http://ks1.kakwalab.ovh/src/libvisio-${VISIO_VERSION}.tar.xz - rm -rf libvisio-${VISIO_VERSION} - tar -xf libvisio-${VISIO_VERSION}.tar.xz || exit 1 - cd libvisio-${VISIO_VERSION} && ./configure --disable-tests --disable-tools --without-docs && make && make install DESTDIR=$OUT && cd - || exit 1 -fi
