Ticket #29185: pyodbc.diff

File pyodbc.diff, 3.4 KB (added by kurthindenburg (Kurt Hindenburg), 9 years ago)
  • Portfile

     
    22
    33PortSystem          1.0
    44PortGroup           python 1.0
     5PortGroup           github 1.0
    56
     7github.setup        mkleehammer pyodbc 3.0.10
    68name                py-pyodbc
    7 set real_name       pyodbc
    8 version             3.0.6
    99categories-append   databases devel
    1010platforms           darwin
    1111license             MIT
     
    1515    ${description}. This project provides an up-to-date, convenient \
    1616    interface to ODBC using native data types like datetime and decimal.
    1717
    18 python.versions     26 27
     18python.versions     26 27 34 35
    1919
    20 homepage            http://code.google.com/p/${real_name}/
    21 master_sites        googlecode:${real_name}
    22 distname            ${real_name}-${version}
    23 use_zip             yes
     20checksums           rmd160  870ae2f5f039b85c29f60b6acb2745a479638ff2 \
     21                    sha256  4155f1adf372dd4f9694867feceb6e6b318451d07b239427d17c4ec1f91ebf67
    2422
    25 checksums           rmd160  6c175aa2d83b60808dff7c77bf9725b2e9d31681 \
    26                     sha256  e5a7f12deddf4b258bed904b5a071dd43c40c78de8e24c9228f8174e69f5366d
    27 
    2823if {${name} ne ${subport}} {
    29     depends_lib-append  port:unixODBC
     24    depends_build-append    port:py${python.version}-setuptools
    3025
    31     patchfiles          setup.py.patch
    32 
    3326    livecheck.type      none
    3427}
     28
     29variant unixodbc conflicts iodbc description {Use unixODBC} {
     30    depends_lib-append        port:unixODBC
     31}
     32
     33variant iodbc conflicts unixodbc description {Use iODBC} {
     34    depends_lib-append        port:libiodbc
     35    patchfiles                patch-setup.py.diff
     36}
     37
     38if {![variant_isset iodbc]} {
     39    default_variants +unixodbc
     40}
  • files/patch-setup.py.diff

     
     1--- setup.py    2016-01-03 21:49:06.000000000 -0500
     2+++ setup.py    2016-01-03 21:50:14.000000000 -0500
     3@@ -159,9 +159,6 @@
     4         settings['libraries'].append('odbc32')
     5 
     6     elif sys.platform == 'darwin':
     7-        # The latest versions of OS X no longer ship with iodbc.  Assume
     8-        # unixODBC for now.
     9-        settings['libraries'].append('odbc')
     10 
     11         # Python functions take a lot of 'char *' that really should be const.  gcc complains about this *a lot*
     12         settings['extra_compile_args'].extend([
     13@@ -169,10 +166,6 @@
     14             '-Wno-deprecated-declarations'
     15         ])
     16 
     17-        # Apple has decided they won't maintain the iODBC system in OS/X and has added deprecation warnings in 10.8.
     18-        # For now target 10.7 to eliminate the warnings.
     19-        settings['define_macros'].append( ('MAC_OS_X_VERSION_10_7',) )
     20-
     21     else:
     22         # Other posix-like: Linux, Solaris, etc.
     23 
  • files/setup.py.patch

     
    1 --- setup.py.orig       2012-06-24 17:49:34.000000000 -0500
    2 +++ setup.py    2013-02-07 23:59:21.000000000 -0600
    3 @@ -143,9 +143,6 @@
    4          # OS name not windows, but still on Windows
    5          settings['libraries'].append('odbc32')
    6  
    7 -    elif sys.platform == 'darwin':
    8 -        # OS/X now ships with iODBC.
    9 -        settings['libraries'].append('iodbc')
    10  
    11      else:
    12          # Other posix-like: Linux, Solaris, etc.