Ticket #1902: libpcap_Portfile.2.diff

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

patch to fix libpcap shared variant so it works properly

  • 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        2
    77categories      net
    88maintainers     fkr@opendarwin.org
    99description     Packet Capture library
     
    2323variant shared {
    2424        configure.env   CFLAGS="-I. -dynamic -fno-common -DHAVE_CONFIG_H"
    2525        patchfiles      patch-Makefile.in
     26        pre-configure   {
     27                reinplace "s/COMPAT_INFO/-compatibility_version $version -current_version $version/" \
     28                Makefile.in
     29                }
    2630}
  • 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