Ticket #55754: Portfile-alliance.diff

File Portfile-alliance.diff, 5.4 KB (added by ryandesign (Ryan Carsten Schmidt), 6 years ago)

work in progress

  • Portfile

     
     1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
     2
    13PortSystem          1.0
    24
    35name                alliance
    4 version             5.0-20110203
    5 revision            2
    6 license             GPL
    7 set version_number  [lindex [split ${version} -] 0]
     6
     7#fetch.type git
     8
     9if {${fetch.type} ne "git"} {
     10    version             5.1.1
     11} else {
     12    git.url             https://www-soc.lip6.fr/git/alliance.git
     13    git.branch          57b0f4774e2347f768eb1aacbb173b683f75c144
     14    version             5.0-20171128
     15}
     16
     17license             GPL-2+
    818categories          science
    919maintainers         nomaintainer
    1020description         Alliance, CAD and libraries for VLSI design
     
    1323                    tools, and automatic place and route tools. A complete set of portable \
    1424                    CMOS libraries is provided
    1525platforms           darwin
    16 homepage            http://www-soc.lip6.fr/en/recherche/cian/alliance/
    1726
     27homepage            https://www-soc.lip6.fr/equipe-cian/logiciels/alliance/
    1828master_sites        ftp://asim.lip6.fr/pub/alliance/distribution/latest
     29use_bzip2           yes
    1930
    20 checksums           sha1    a1a9f84b5120ea262c989fcf42a6131ee54d5ec7 \
    21                     rmd160  be9554ae1c84c1f6d4cd49bf19e2fe997d9ec27b
     31checksums           rmd160  ad765aa6ce035f47d2a9745389dd58638d23ea87 \
     32                    sha256  811f201881af46d9d36f1c60b184c136fd2b8bebbe932a29e07ced40394ecc10 \
     33                    size    4486561
    2234
     35depends_build       port:fig2dev \
     36                    port:ImageMagick \
     37                    port:texlive-fonts-recommended \
     38                    port:texlive-latex \
     39                    port:texlive-latex-extra \
     40                    port:texlive-latex-recommended \
     41                    port:texlive-pictures \
     42                    port:texlive-plain-generic
     43
    2344depends_lib         port:xpm \
    2445                    port:openmotif
    2546
    26 worksrcdir          ${name}-${version_number}
     47if {${fetch.type} ne "git"} {
     48    worksrcdir              ${name}/src
     49} else {
     50    patch.dir               ${worksrcpath}/alliance/src
     51}
    2752
    28 patchfiles          patch-distrib-etc-Makefile.in.diff
     53patchfiles-append       patch-autostuff.diff
     54#patchfiles-append       patch-distrib-etc-Makefile.in.diff
     55if {${fetch.type} ne "git"} {
     56    patchfiles-append       patch-documentation.diff
     57}
    2958
     59# The distribution file doesn't contain a configure script.
     60# Homepage says:
     61# > Before running the autotools, you have to run the autostuff script
     62# > in ./alliance/src which generate the top-level automake files.
     63# See also:
     64# https://www-soc.lip6.fr/wws/arc/alliance-users/2014-03/msg00007.html
     65use_autoreconf          yes
     66autoreconf.dir          ${patch.dir}
     67autoreconf.cmd          ./autostuff
     68depends_build-append    port:autoconf \
     69                        port:automake \
     70                        port:libtool
     71
     72# README says:
     73# > We recommand not to build the tool in the source directory.
     74configure.dir           ${workpath}/build
     75configure.cmd           ${patch.dir}/configure
     76build.dir               ${configure.dir}
     77post-extract {
     78    file mkdir ${configure.dir}
     79}
     80
     81# README says:
     82# > Also, the install stage has to be done at the same time
     83# > as the make itself : the way the configure and Makefiles
     84# > are written implies that you do a "make install" in one
     85# > step rather than a "make" followed by a "make install"
     86build {}
     87
     88# Homepage says:
     89# > Do not build in parallel, always uses -j1, the build
     90# > process fail in strange ways when run in parallel (this
     91# > is a known problem due to the way Alliance was developped).
    3092use_parallel_build  no
    3193
    32 configure.args-append   --mandir=${prefix}/share/man
    33 configure.env-append    YACC='/usr/bin/yacc'
    34 build.env               LC_ALL=C
    35 destroot.env-append     YACC='/usr/bin/yacc'
     94configure.args-append   --enable-alc-shared
     95configure.env-append    ALLIANCE_TOP=${prefix} \
     96                        YACC=/usr/bin/yacc
    3697
     98destroot.env-append     LC_ALL=C \
     99                        YACC=/usr/bin/yacc
     100
    37101# compiler_issue
    38102if {[string match *clang* ${configure.compiler}]} {
    39103    # Missing return statements should really be fixed.
    40     # If you care about this port, fix the real issue...   
    41     configure.cflags-append -Wno-return-type
     104    # If you care about this port, fix the real issue...
     105#    configure.cflags-append -Wno-return-type
    42106}
    43107
    44108if {[string match *clang* ${configure.compiler}] ||
    45109    [string match *llvm-gcc-4.2* ${configure.compiler}]} {
    46110    # removing -O2 in nero/src in order to correctly export symbols in MDRGrid.o
    47     # cf. http://llvm.org/bugs/show_bug.cgi?id=7445
    48     # cf. http://trac.macports.org/ticket/32947#comment:3
    49     post-configure {
    50         reinplace "/^CXXFLAGS/s/ -O2//" ${worksrcpath}/nero/src/Makefile
    51     }
     111    # cf. https://bugs.llvm.org/show_bug.cgi?id=7445
     112    # cf. https://trac.macports.org/ticket/32947#comment:3
     113#    patchfiles-append   patch-nero-src-Makefile.am.diff
    52114}
    53115
    54116post-destroot {
     117return -code error
    55118    file mkdir  ${destroot}${prefix}/share/alliance
    56119    file rename ${destroot}${prefix}/doc        ${destroot}${prefix}/share/alliance
    57120    file rename ${destroot}${prefix}/examples   ${destroot}${prefix}/share/alliance