Ticket #42152: patch-CMakeLists-v2.txt.diff

File patch-CMakeLists-v2.txt.diff, 2.1 KB (added by neurodroid (Christoph Schmidt-Hieber), 10 years ago)

patch for biosig 1.5.10 to build with MacPorts on all OS X versions

  • CMakeLists.txt

    diff -ur ../biosig4c++-1.5.10/CMakeLists.txt ./CMakeLists.txt
    old new  
    77# Version number
    88set (libbiosig_VERSION_MAJOR 1)
    99set (libbiosig_VERSION_MINOR 5)
    10 set (libbiosig_VERSION_PATCH 0)
     10set (libbiosig_VERSION_PATCH 10)
    1111
    1212find_program (GAWK NAMES gawk)
    1313
     
    2323  DEPENDS units.awk extern/units.csv
    2424)
    2525
     26add_custom_target (annexb
     27  COMMAND ${GAWK} -f annotatedECG.awk extern/11073-10102-AnnexB.txt > "11073-10102-AnnexB.i"
     28  WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
     29  DEPENDS annotatedECG.awk extern/11073-10102-AnnexB.txt
     30)
     31
    2632set (headers
    2733  t210/abfheadr.h
    2834  XMLParser/tinyxml.h
     
    6167  )
    6268endif ()
    6369
     70if (APPLE)
     71  list (APPEND sources
     72    win32/getdelim.c
     73    win32/getline.c
     74    win32/getlogin.c
     75  )
     76endif ()
     77
    6478# Cannot have same name for static and shared library,
    6579# so we'll correct that later on
    6680add_library (biosigstatic STATIC
     
    8094     )
    8195endif ()
    8296
    83 add_dependencies (biosigstatic eventcodes units)
    84 add_dependencies (biosigshared eventcodes units)
     97add_dependencies (biosigstatic eventcodes units annexb)
     98add_dependencies (biosigshared eventcodes units annexb)
    8599
    86100if (USE_ZLIB)
    87101  add_definitions (-D=WITH_ZLIB)
  • win32/getdelim.c

    diff -ur ../biosig4c++-1.5.10/win32/getdelim.c ./win32/getdelim.c
    old new  
    2727#include <stdint.h>
    2828#include <stdlib.h>
    2929#include <errno.h>
     30#ifdef MACPORTS
     31#include <unistd.h>
     32#endif
    3033
    3134#ifndef SSIZE_MAX
    3235# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
  • win32/getline.c

    diff -ur ../biosig4c++-1.5.10/win32/getline.c ./win32/getline.c
    old new  
    1717/* Written by Simon Josefsson. */
    1818
    1919#include <stdio.h>
     20#ifdef MACPORTS
     21#include <unistd.h>
     22#endif
    2023
    2124ssize_t
    2225getline (char **lineptr, size_t *n, FILE *stream)