Ticket #23285: gdchart-0.11.5_2.diff

File gdchart-0.11.5_2.diff, 3.6 KB (added by nox@…, 14 years ago)
  • dports/graphics/gdchart/Portfile

    diff --git a/dports/graphics/gdchart/Portfile b/dports/graphics/gdchart/Portfile
    index c25e9b0..d4d78a4 100644
    a b PortSystem 1.0 
    44
    55name                gdchart
    66version             0.11.5
    7 revision            1
     7revision            2
    88categories          graphics
    99maintainers         jameskyle
    1010description         Easy to use C API, high performance library.
    checksums md5 a4af7bc927d8b88934da56fce10a7a3c \ 
    1919                    rmd160 be9b11eb446738d9e30d78e8ce73b8a418b1f520
    2020use_parallel_build  no
    2121
    22 depends_lib         port:libpng \
     22depends_build       port:libpng \
    2323                    port:zlib \
    2424                    port:gd2 \
    2525                    port:jpeg \
    2626                    port:freetype
    2727
     28set CFLAGS ${configure.cflags}
     29
     30post-patch {
     31    # Use prefix
     32    reinplace s:/usr/local:${prefix}: ${worksrcpath}/Makefile
     33}
     34
    2835use_configure       no
    2936
    30 patchfiles          patch-Makefile.diff
     37build.args \
     38    CC=${configure.cc} \
     39    GD_LIB=libgd.dylib
     40
     41pre-build {
     42    build.args-append \
     43        CFLAGS="${CFLAGS}"
     44}
     45
     46destroot.args \
     47    PREFIX_INC=${destroot}${prefix}/include \
     48    PREFIX_LIB=${destroot}${prefix}/lib \
     49
     50post-destroot {
     51    set docdir ${prefix}/share/doc/${name}
     52    xinstall -d ${destroot}${docdir}
     53    xinstall -m 644 ${worksrcpath}/README.txt ${destroot}${docdir}
     54}
     55
     56variant universal {
     57    append CFLAGS " ${configure.universal_cflags}"
    3158
    32 post-configure {
    33     reinplace "s|{__PREFIX__}|${prefix}|g" ${worksrcpath}/Makefile
    34     reinplace "s|{__DESTDIR__}|${destroot}|g" ${worksrcpath}/Makefile
     59    post-patch {
     60        # Use libtool instead of ar
     61        reinplace "s:ar cr:libtool -o:" \
     62            ${worksrcpath}/Makefile
     63    }
    3564}
    3665
    3766livecheck.type      regex
    3867livecheck.url       ${homepage}dev011x.htm
    3968livecheck.regex     {gdchart([0-9.]+)dev.tar.gz}
    40 livecheck.md5       a4af7bc927d8b88934da56fce10a7a3c
  • deleted file dports/graphics/gdchart/files/patch-Makefile.diff

    diff --git a/dports/graphics/gdchart/files/patch-Makefile.diff b/dports/graphics/gdchart/files/patch-Makefile.diff
    deleted file mode 100644
    index 33fabe6..0000000
    + -  
    1 --- Makefile.orig       2008-11-09 14:17:33.000000000 -0800
    2 +++ Makefile    2008-11-09 14:58:26.000000000 -0800
    3 @@ -3,14 +3,19 @@
    4  # CFLAGS=
    5  # CFLAGS=-g -ansi -pedantic
    6 
    7 +# -- Set default prefix and destdir's ------
    8 +DESTDIR ?= {__DESTDIR__}
    9 +PREFIX ?= {__PREFIX__}
    10 +
    11 +LD_LIBRARY_PATH=$(PREFIX)/lib
    12  # ----- build path -----
    13  GDC_INCL=./
    14  GDC_LD=./
    15  GDC_LIB=libgdc.a
    16 
    17  # ----- install locations -----
    18 -PREFIX_INC = /usr/local/include
    19 -PREFIX_LIB = /usr/local/lib
    20 +PREFIX_INC = $(PREFIX)/include
    21 +PREFIX_LIB = $(PREFIX)/lib
    22 
    23  # INCLUDEDIRS=-I. -I/usr/include/freetype2 -I/usr/include/X11 -I/usr/X11R6/include/X11 -I/usr/local/include
    24 
    25 @@ -18,9 +23,9 @@
    26  # GDChart requires the gd library - www.boutell.com/gd/
    27  # gd 2.0.28 or better is required (GIF support has returned to libgd)
    28  # if it's not installed in a standard location edit these lines for your installation
    29 -GD_INCL=/usr/local/include/
    30 -GD_LD=/usr/local/lib/
    31 -GD_LIB=libgd.so
    32 +GD_INCL=$(PREFIX)/include/
    33 +GD_LD=$(PREFIX)/lib/
    34 +GD_LIB=libgd.dylib
    35  # a static libgd is also available
    36  # GD_LIB=libgd.a
    37 
    38 @@ -135,8 +140,9 @@
    39 
    40  # ----- install -----
    41  install: gdc.h gdchart.h gdcpie.h libgdc.a
    42 -       cp gdc.h  gdchart.h  gdcpie.h $(PREFIX_INC)/
    43 -       cp libgdc.a $(PREFIX_LIB)/
    44 +       install -d $(DESTDIR)/$(PREFIX_LIB) $(DESTDIR)/$(PREFIX_INC)
    45 +       install gdc.h  gdchart.h  gdcpie.h $(DESTDIR)/$(PREFIX_INC)/
    46 +       install libgdc.a $(DESTDIR)/$(PREFIX_LIB)/
    47 
    48  # --- clean ---
    49  clean: