Ticket #43149: capstone-2.1.2.diff

File capstone-2.1.2.diff, 4.5 KB (added by aquynh@…, 11 years ago)

Diff file against old Portfile & patch-Makefile.diff

  • Portfile

    diff -Nurp capstone.org/Portfile capstone/Portfile
    old new  
    44PortSystem          1.0
    55
    66name                capstone
    7 version             2.1.1
     7version             2.1.2
    88categories          devel
    99platforms           darwin
    1010maintainers         gmail.com:aquynh
    homepage http://www.capstone- 
    1818master_sites        ${homepage}download/${version}/
    1919extract.suffix      .tgz
    2020
    21 checksums           sha256  8af3c0a0f439d516277f308938935003d072f34a34fcf2e8dcf07dd415b1ca65 \
    22                     rmd160  ae65771d182feef575fd4a19bc597170ba42ebcf
     21checksums           sha256  49e41d662c5ed4dcd391ec4cfce75fb31ca4bfd245eba9e8f0cb69d6f6e8d7cc \
     22                    rmd160  c4a542752c1ffc6262507a799f96470e076429b9
    2323
    2424patchfiles          patch-Makefile.diff
    2525
  • files/patch-Makefile.diff

    diff -Nurp capstone.org/files/patch-Makefile.diff capstone/files/patch-Makefile.diff
    old new  
    1 --- Makefile.org        2014-03-10 23:12:11.000000000 -0700
    2 +++ Makefile    2014-03-10 23:33:10.000000000 -0700
    3 @@ -22,20 +22,24 @@
    4  CFLAGS += -DUSE_SYS_DYN_MEM
    5  endif
    6  
    7 -LDFLAGS += -shared
    8 -
    9  PREFIX ?= /usr
    10  DESTDIR ?=
    11 -INCDIR = $(DESTDIR)$(PREFIX)/include
    12 +INCDIR = $(PREFIX)/include
    13  
    14 -LIBDIR = $(DESTDIR)$(PREFIX)/lib
    15 +UNAME_S := $(shell uname -s)
    16 +ifeq ($(UNAME_S),Darwin)
    17 +LDFLAGS += -dynamiclib -install_name $(LIBDIR)/$(LIBRARY)
    18 +else
    19 +LDFLAGS += -shared
    20 +endif
    21 +
    22 +
    23 +LIBDIR = $(PREFIX)/lib
    24  # on x86_64, we might have /usr/lib64 directory instead of /usr/lib
    25  UNAME_M := $(shell uname -m)
    26  ifeq ($(UNAME_M), x86_64)
    27  ifeq (,$(wildcard $(LIBDIR)))
    28 -LIBDIR = $(DESTDIR)$(PREFIX)/lib64
    29 -else
    30 -LIBDIR = $(DESTDIR)$(PREFIX)/lib
    31 +LIBDIR = $(PREFIX)/lib64
    32  endif
    33  endif
    34  
    35 @@ -138,7 +142,6 @@
    36  LIBOBJ += MCInst.o
    37  
    38  
    39 -UNAME_S := $(shell uname -s)
    40  PKGCFCGDIR = $(LIBDIR)/pkgconfig
    41  
    42  # OSX?
    43 @@ -149,13 +152,6 @@
    44  # remove string check because OSX kernel complains about missing symbols
    45  CFLAGS += -D_FORTIFY_SOURCE=0
    46  endif
     1--- Makefile.org        2014-04-01 06:08:49.000000000 -0700
     2+++ Makefile    2014-04-01 06:27:43.000000000 -0700
     3@@ -163,19 +163,6 @@
     4 VERSION_EXT = $(API_MAJOR).$(EXT)
     5 LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
     6 AR_EXT = a
     7-ifneq ($(HOMEBREW_CAPSTONE),1)
     8-ifneq ($(USE_SYS_DYN_MEM),yes)
     9-# remove string check because OSX kernel complains about missing symbols
     10-CFLAGS += -D_FORTIFY_SOURCE=0
     11-endif
    4712-# By default, suppose that Brew is installed & use Brew path for pkgconfig file
    4813-PKGCFCGDIR = /usr/local/lib/pkgconfig
    4914-# is Macport installed instead?
     
    5116-# then correct the path for pkgconfig file
    5217-PKGCFCGDIR = /opt/local/lib/pkgconfig
    5318-endif
     19-endif
    5420 else
    5521 # Cygwin?
    5622 IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
    57 @@ -237,25 +233,25 @@
     23@@ -239,15 +226,13 @@
    5824        echo 'Version: $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA)' >> $(PKGCFGF)
    5925 endif
    6026        echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
     
    6531        echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)
    6632 
    6733 install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
    68 -       mkdir -p $(LIBDIR)
    69 -       $(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(LIBDIR)
    70 -       $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(LIBDIR)
    71 -       mkdir -p $(INCDIR)/$(LIBNAME)
    72 -       $(INSTALL_DATA) include/*.h $(INCDIR)/$(LIBNAME)
    73 -       mkdir -p $(PKGCFCGDIR)
    74 -       $(INSTALL_DATA) $(PKGCFGF) $(PKGCFCGDIR)/
    75 +       mkdir -p $(DESTDIR)$(LIBDIR)
    76 +       $(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(DESTDIR)$(LIBDIR)
    77 +       $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(DESTDIR)$(LIBDIR)
    78 +       mkdir -p $(DESTDIR)$(INCDIR)/$(LIBNAME)
    79 +       $(INSTALL_DATA) include/*.h $(DESTDIR)$(INCDIR)/$(LIBNAME)
    80 +       mkdir -p $(DESTDIR)$(PKGCFCGDIR)
    81 +       $(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)$(PKGCFCGDIR)/
    82  
    83  uninstall:
    84 -       rm -rf $(INCDIR)/$(LIBNAME)
    85 -       rm -f $(LIBDIR)/lib$(LIBNAME).$(EXT)
    86 -       rm -f $(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
    87 -       rm -f $(PKGCFCGDIR)/$(LIBNAME).pc
    88 +       rm -rf $(DESTDIR)$(INCDIR)/$(LIBNAME)
    89 +       rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(EXT)
    90 +       rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
    91 +       rm -f $(DESTDIR)$(PKGCFCGDIR)/$(LIBNAME).pc
    92  
    93  clean:
    94         rm -f $(LIBOBJ) lib$(LIBNAME).*
     34        mkdir -p $(LIBDIR)
     35-       # remove potential broken old libs
     36-       rm -f $(LIBDIR)/lib$(LIBNAME).*
     37        $(INSTALL_LIB) lib$(LIBNAME).$(EXT) $(LIBDIR)
     38 ifneq ($(VERSION_EXT),)
     39        cd $(LIBDIR) && \