Ticket #42804: capstone-2.1.1.diff

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

Diff file for Capstone (Portfile & patch-Makefile)

  • devel/capstone/Portfile

    diff --git a/devel/capstone/Portfile b/devel/capstone/Portfile
    index e75cb9d..b2fec41 100644
    a b  
    44PortSystem          1.0
    55
    66name                capstone
    7 version             2.1
     7version             2.1.1
    88categories          devel
    99platforms           darwin
    1010maintainers         gmail.com:aquynh
    homepage http://www.capstone-engine.org/ 
    1818master_sites        ${homepage}download/${version}/
    1919extract.suffix      .tgz
    2020
    21 checksums           sha256  5ebc168212a159218a4454c72d0c060b8a8af78605b93b214b3d6c5e2a124896 \
    22                     rmd160  47b9a1949b7c82ec235dcb96a81d456f3b18eae6
     21checksums           sha256  8af3c0a0f439d516277f308938935003d072f34a34fcf2e8dcf07dd415b1ca65 \
     22                    rmd160  ae65771d182feef575fd4a19bc597170ba42ebcf
    2323
    2424patchfiles          patch-Makefile.diff
    2525
  • devel/capstone/files/patch-Makefile.diff

    diff --git a/devel/capstone/files/patch-Makefile.diff b/devel/capstone/files/patch-Makefile.diff
    index 7e081b6..bfcb18d 100644
    a b  
    1 --- Makefile.org        2014-03-04 18:18:25.000000000 -0800
    2 +++ Makefile    2014-03-04 18:27:48.000000000 -0800
    3 @@ -21,20 +21,24 @@
     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 @@
    44 CFLAGS += -DUSE_SYS_DYN_MEM
    55 endif
    66 
     
    2222+
    2323+LIBDIR = $(PREFIX)/lib
    2424 # on x86_64, we might have /usr/lib64 directory instead of /usr/lib
    25 -MACHINE := $(shell uname -m)
    26 -ifeq ($(MACHINE), x86_64)
    27 +UNAME_M := $(shell uname -m)
    28 +ifeq ($(UNAME_M),x86_64)
     25 UNAME_M := $(shell uname -m)
     26 ifeq ($(UNAME_M), x86_64)
    2927 ifeq (,$(wildcard $(LIBDIR)))
    3028-LIBDIR = $(DESTDIR)$(PREFIX)/lib64
    3129-else
     
    3432 endif
    3533 endif
    3634 
    37 @@ -136,21 +140,10 @@
    38  LIBOBJ += $(LIBOBJ_ARM) $(LIBOBJ_ARM64) $(LIBOBJ_MIPS) $(LIBOBJ_PPC) $(LIBOBJ_X86)
     35@@ -138,7 +142,6 @@
    3936 LIBOBJ += MCInst.o
    4037 
    41 -
     38 
    4239-UNAME_S := $(shell uname -s)
    43 -PKGCFCGDIR = $(LIBDIR)/pkgconfig
    44 -
     40 PKGCFCGDIR = $(LIBDIR)/pkgconfig
     41 
    4542 # OSX?
    46  ifeq ($(UNAME_S),Darwin)
    47  EXT = dylib
    48  AR_EXT = a
     43@@ -149,13 +152,6 @@
     44 # remove string check because OSX kernel complains about missing symbols
     45 CFLAGS += -D_FORTIFY_SOURCE=0
     46 endif
    4947-# By default, suppose that Brew is installed & use Brew path for pkgconfig file
    5048-PKGCFCGDIR = /usr/local/lib/pkgconfig
    5149-# is Macport installed instead?
     
    5654 else
    5755 # Cygwin?
    5856 IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
    59 @@ -228,25 +221,25 @@
    60         echo 'Description: Capstone disassembler engine' >> $(PKGCFGF)
    61         echo 'Version: $(VERSION)' >> $(PKGCFGF)
     57@@ -237,25 +233,25 @@
     58        echo 'Version: $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA)' >> $(PKGCFGF)
     59 endif
    6260        echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
    6361-       echo 'includedir=$(PREFIX)/include/capstone' >> $(PKGCFGF)
    6462+       echo 'includedir=$(INCDIR)/capstone' >> $(PKGCFGF)
     
    7977+       $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(DESTDIR)$(LIBDIR)
    8078+       mkdir -p $(DESTDIR)$(INCDIR)/$(LIBNAME)
    8179+       $(INSTALL_DATA) include/*.h $(DESTDIR)$(INCDIR)/$(LIBNAME)
    82 +       mkdir -p $(DESTDIR)$(LIBDIR)/pkgconfig
    83 +       $(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)$(LIBDIR)/pkgconfig/
     80+       mkdir -p $(DESTDIR)$(PKGCFCGDIR)
     81+       $(INSTALL_DATA) $(PKGCFGF) $(DESTDIR)$(PKGCFCGDIR)/
    8482 
    8583 uninstall:
    8684-       rm -rf $(INCDIR)/$(LIBNAME)
     
    9088+       rm -rf $(DESTDIR)$(INCDIR)/$(LIBNAME)
    9189+       rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(EXT)
    9290+       rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
    93 +       rm -f $(DESTDIR)$(LIBDIR)/pkgconfig/$(LIBNAME).pc
     91+       rm -f $(DESTDIR)$(PKGCFCGDIR)/$(LIBNAME).pc
    9492 
    9593 clean:
    9694        rm -f $(LIBOBJ) lib$(LIBNAME).*