Ticket #52355: patch-darwinbuild.diff

File patch-darwinbuild.diff, 4.0 KB (added by kencu (Ken), 7 years ago)

Portfile patch version 20170521

  • devel/darwinbuild/Portfile

    diff --git a/devel/darwinbuild/Portfile b/devel/darwinbuild/Portfile
    index bb53b46886..c8c81d1977 100644
    a b  
    11PortSystem      1.0
    2 PortGroup       xcode 1.0
     2PortGroup           xcode 1.0
     3PortGroup       github 1.0
    34
    4 name            darwinbuild
    5 version         33
    6 revision        1
    75categories      devel
    86platforms       darwin
    97maintainers     wms
    10 license         BSD
     8license             BSD
    119description     Darwinbuild is a set of tools that facilitate building the sources \
    1210                released by Apple.
    1311
    long_description \ 
    1917                version on Apple's site. These tools will provide the proper build environment \
    2018                as well as help to resolve any necessary dependencies prior to building.
    2119
    22 homepage        http://darwinbuild.macosforge.org/
    23 master_sites    http://svn.macosforge.org/repository/darwinbuild/
    2420
    25 fetch.type      svn
    26 svn.url         ${master_sites}tags/${distname}
    27 svn.revision    HEAD
     21github.setup macosforge darwinbuild 37 darwinbuild-
     22
     23checksums           rmd160  07fc93baeb10209b21d9aff843877556ba8b8f4f \
     24                    sha256  2bb2e1458b6b9e3e6a189fb48e3cc0b72b7cb253607366b9ab6b92cdbac1e62b
     25
     26# fix a 64 -> 32 bit implicit integer cast
     27patchfiles-append  patch-darwinxref-plugins-register-64bit.diff
     28
    2829worksrcdir      ${distname}
    2930
    3031depends_lib-append      port:sqlite3 \
    3132                        port:tcl
    3233
    3334xcode.configuration     Public
    34 xcode.target            world
    35 xcode.build.settings    PREFIX=${prefix}
     35xcode.target                world
     36xcode.build.settings    PREFIX=${prefix} \
     37                        GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS=NO
    3638xcode.destroot.settings PREFIX=${prefix} \
     39                        GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS=NO \
    3740                        LIBRARY_SEARCH_PATHS=${prefix}/lib \
    3841                        HEADER_SEARCH_PATHS=${prefix}/include \
    3942                        FRAMEWORK_SEARCH_PATHS=${frameworks_dir}
    variant universal { 
    4851
    4952pre-fetch {
    5053        if {${os.major} < 10} {
    51                 return -code error "The ${name} port is only for Darwin 10. For Darwin\
    52                                     8 & 9 support, install the darwinbuild-legacy port." 
     54                return -code error "For Darwin \
     55                                    8 & 9 support, install the darwinbuild-legacy port."
    5356        }
    5457        if {![variant_isset universal]} {
    5558                return -code error "You must install ${name} with the universal variant.\
    5659                                    Try running `port install ${name} +universal` "
    57         }       
     60        }
    5861}
    5962
    6063platform darwin 9 {
  • new file devel/darwinbuild/files/patch-darwinxref-plugins-register-64bit.diff

    diff --git a/devel/darwinbuild/files/patch-darwinxref-plugins-register-64bit.diff b/devel/darwinbuild/files/patch-darwinxref-plugins-register-64bit.diff
    new file mode 100644
    index 0000000000..c8efc7b576
    - +  
     1--- darwinxref/plugins/register.c.orig  2013-10-16 16:25:16.000000000 -0700
     2+++ darwinxref/plugins/register.c       2017-05-21 10:34:04.000000000 -0700
     3@@ -340,7 +340,7 @@
     4                        // sections immediately follow the dylib_command structure, and are
     5                        // reflected in the cmdsize.
     6 
     7-                       int strsize = dylib->cmdsize - sizeof(struct dylib_command);
     8+                       unsigned long int strsize = dylib->cmdsize - sizeof(struct dylib_command);
     9                        char* str = malloc(strsize+1);
     10                        strncpy(str, (char*)((uint8_t*)dylib + dylib->dylib.name.offset), strsize);
     11                        str[strsize] = 0; // NUL-terminate
     12@@ -361,7 +361,7 @@
     13                        // sections immediately follow the dylib_command structure, and are
     14                        // reflected in the cmdsize.
     15 
     16-                       int strsize = dylinker->cmdsize - sizeof(struct dylinker_command);
     17+                       unsigned long int strsize = dylinker->cmdsize - sizeof(struct dylinker_command);
     18                        char* str = malloc(strsize+1);
     19                        strncpy(str, (char*)((uint8_t*)dylinker + dylinker->name.offset), strsize);
     20                        str[strsize] = 0; // NUL-terminate
     21@@ -381,7 +381,7 @@
     22                        if (swap) swap_symtab_command(symtab, NXHostByteOrder());
     23 
     24                        nsyms = symtab->nsyms;
     25-                       uint32_t symsize = nsyms * (mh64 ? sizeof(struct nlist_64) : sizeof(struct nlist));
     26+                       unsigned long int symsize = nsyms * (mh64 ? sizeof(struct nlist_64) : sizeof(struct nlist));
     27                        symbols = malloc(symsize);
     28                       
     29                        strsize = symtab->strsize;