Ticket #1902: libpcap_Portfile.3.diff

File libpcap_Portfile.3.diff, 2.9 KB (added by opendarwin.org@…, 20 years ago)

patch to fix libpcap shared so it works and is default

  • Portfile

    RCS file: /Volumes/src/cvs/od/projects/darwinports/dports/net/libpcap/Portfile,v
    retrieving revision 1.17
    diff -u -r1.17 Portfile
     
    33PortSystem 1.0
    44name            libpcap
    55version         0.8.3
    6 revision        1
     6revision        3
    77categories      net
    8 maintainers     fkr@opendarwin.org
     8maintainers     fkr@opendarwin.org ricci@opendarwin.org
    99description     Packet Capture library
    1010long_description        The Packet Capture library provides a high level interface to packet \
    1111        capture systems. All  packets  on  the network, even those  destined \
     
    1515master_sites    ${homepage}release/
    1616checksums       md5 56a9d4615d8354fcfe8cff8c8443c77b
    1717configure.args  --mandir=${prefix}/share/man
     18configure.env   CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
     19patchfiles      patch-Makefile.in
     20pre-configure   {
     21        reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
     22        Makefile.in
     23}
    1824
    1925variant ipv6 {
    2026        configure.args-append   --enable-ipv6
    2127}
    2228
    23 variant shared {
    24         configure.env   CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
    25         patchfiles      patch-Makefile.in
     29variant no-shared {
     30        configure.env-delete    CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
     31        patchfiles-delete       patch-Makefile.in
     32        pre-configure   {
     33                reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
     34                Makefile.in
     35                }
    2636}
  • files/patch-Makefile.in

    RCS file: /Volumes/src/cvs/od/projects/darwinports/dports/net/libpcap/files/patch-Makefile.in,v
    retrieving revision 1.1
    diff -u -r1.1 patch-Makefile.in
     
    1 --- Makefile.in Sun Dec 14 17:42:23 2003
    2 +++ Makefile.in Mon May 24 17:18:58 2004
     1--- Makefile.in.orig    Tue Jun  1 23:07:11 2004
     2+++ Makefile.in Tue Jun  1 23:08:09 2004
    33@@ -94,15 +94,19 @@
    44 TAGFILES = \
    55        $(SRC) $(HDR) $(TAGHDR)
     
    1717 
    1818+libpcap.dylib: $(OBJ)
    1919+       @rm -f $@
    20 +       $(CC) -dynamiclib -o $@ $(OBJ) $(LIBS)
     20+       $(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/libpcap.DP.dylib COMPAT_INFO -o $@ $(OBJ) $(LIBS)
    2121+
    2222 scanner.c: $(srcdir)/scanner.l
    2323        @rm -f $@
    2424        $(LEX) -t $< > $$$$.$@; mv $$$$.$@ $@
    25 @@ -156,6 +160,7 @@
     25@@ -156,6 +160,8 @@
    2626            (mkdir -p $(DESTDIR)$(libdir); chmod 755 $(DESTDIR)$(libdir))
    2727        $(INSTALL_DATA) libpcap.a $(DESTDIR)$(libdir)/libpcap.a
    2828        $(RANLIB) $(DESTDIR)$(libdir)/libpcap.a
    29 +       $(INSTALL_DATA) libpcap.dylib $(DESTDIR)$(libdir)/libpcap.dylib
     29+       $(INSTALL_DATA) libpcap.dylib $(DESTDIR)$(libdir)/libpcap.DP.dylib
     30+       (cd $(DESTDIR)$(libdir) && ln -s libpcap.DP.dylib libpcap.dylib)
    3031        [ -d $(DESTDIR)$(includedir) ] || \
    3132            (mkdir -p $(DESTDIR)$(includedir); chmod 755 $(DESTDIR)$(includedir))
    3233        $(INSTALL_DATA) $(srcdir)/pcap.h $(DESTDIR)$(includedir)/pcap.h