Ticket #5956: py-libdnet.diff

File py-libdnet.diff, 3.7 KB (added by chris.owen@…, 19 years ago)

This patch fixes problems in the first revision

  • py-libdnet/Portfile

    diff -Naur /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports/python/py-libdnet/Portfile /Users/swank/py-libdnet/Portfile
    old new  
    11# $Id: Portfile,v 1.1 2005/12/05 16:37:14 jmpp Exp $
    22PortSystem              1.0
    3 PortGroup               python24 1.0
     3
     4set python.bin  ${prefix}/bin/python2.4
    45
    56name                    py-libdnet
    67version                 1.10
     8revision                1
    79categories              python net
    810maintainers             chris.owen@consault.com
    911description             A python module for the libdnet low-level networking library.
     
    1719master_sites            sourceforge:libdnet
    1820distname                libdnet-${version}
    1921
    20 depends_lib-append      port:libdnet
    21 
    22 checksums md5            416b765e9d9961501ac85e9a366fd219
    23 checksums sha1           1dd9594adb5a3af121960abd6960bcedfc815f37
    24 checksums rmd160         167cf841b3fdd061ec8d6a56d53c341678ee5a9e
     22depends_lib-append      port:python24 port:libdnet
    2523
    26 worksrcdir              ${worksrcdir}/python
     24checksums               \
     25        md5             416b765e9d9961501ac85e9a366fd219 \
     26        sha1            1dd9594adb5a3af121960abd6960bcedfc815f37 \
     27        rmd160          167cf841b3fdd061ec8d6a56d53c341678ee5a9e
    2728
    28 post-extract {
    29         file copy ${filespath}/setup.py ${worksrcpath}
     29pre-destroot {
     30        worksrcdir       ${worksrcdir}/python
    3031}
     32destroot.cmd             ${python.bin} setup.py
     33destroot.destdir         --prefix=${prefix} --root=${destroot}
  • py-libdnet/files/setup.py

    diff -Naur /opt/local/var/db/dports/sources/rsync.rsync.opendarwin.org_dpupdate_dports/python/py-libdnet/files/setup.py /Users/swank/py-libdnet/files/setup.py
    old new  
    1 #!/usr/bin/env python
    2 
    3 import glob, os, sys
    4 from distutils.core import setup, Extension
    5 
    6 dnet_srcs = [ './dnet.c' ]
    7 dnet_incdirs = [ '../include' ]
    8 dnet_libdirs = []
    9 dnet_libs = []
    10 dnet_extargs = []
    11 dnet_extobj = []
    12 
    13 if sys.platform == 'win32':
    14     winpcap_dir = '../../WPdpack'
    15     dnet_srcs.extend(['../src/addr-util.c', '../src/addr.c', '../src/blob.c', '../src/ip-util.c', '../src/ip6.c', '../src/rand.c', '../src/err.c', '../src/strlcat.c', '../src/strlcpy.c', '../src/err.c', '../src/strlcat.c', '../src/strlcpy.c', '../src/strsep.c', '../src/arp-win32.c', '../src/eth-win32.c', '../src/fw-pktfilter.c', '../src/intf-win32.c', '../src/ip-win32.c', '../src/route-win32.c', '../src/tun-none.c'])
    16     dnet_incdirs.append(winpcap_dir + '/Include')
    17     dnet_libdirs.append(winpcap_dir + '/Lib')
    18     dnet_libs.extend([ 'advapi32', 'iphlpapi', 'ws2_32', 'packet' ])
    19 else:
    20     # XXX - can't build on Cygwin+MinGW yet.
    21     #if sys.platform == 'cygwin':
    22     #    dnet_extargs.append('-mno-cygwin')
    23     dnet_extobj.extend(glob.glob('../src/.libs/*.o'))
    24 
    25 dnet = Extension('dnet',
    26                  map(os.path.realpath, dnet_srcs),
    27                  include_dirs=map(os.path.realpath, dnet_incdirs),
    28                  library_dirs=map(os.path.realpath, dnet_libdirs),
    29                  libraries=dnet_libs,
    30                  extra_compile_args=dnet_extargs,
    31                  extra_objects=map(os.path.realpath, dnet_extobj))
    32 
    33 setup(name='dnet',
    34       version='1.10',
    35       description='low-level networking library',
    36       author='Dug Song',
    37       author_email='dugsong@monkey.org',
    38       url='http://libdnet.sourceforge.net/',
    39       ext_modules = [ dnet ])