Ticket #21304: allegro.patch

File allegro.patch, 3.8 KB (added by nerdling (Jeremy Lavergne), 15 years ago)

successful build and install of 4.9.15

  • files/patch-makefile.osx

     
    1 --- makefile.osx.orig   2007-09-25 01:01:57.000000000 +0200
    2 +++ makefile.osx        2007-09-25 01:03:53.000000000 +0200
    3 @@ -42,7 +42,7 @@
    4  TEMPLATE_NAME = Allegro\ Application
    5  TEMPLATE = $(TEMPLATE_DIR)/$(TEMPLATE_NAME)
    6  
    7 -MAN_DIR = /usr/local/man
    8 +MAN_DIR = $(DESTDIR)$(PREFIX)/share/man
    9  
    10  
    11  ifdef STATICLINK
    12 @@ -58,7 +58,7 @@
    13  
    14  DYLINK_FLAGS = -compatibility_version $(compatibility_version) -current_version $(shared_version)
    15  
    16 -INSTALL_NAME = -install_name lib$(VERSION)-$(shared_major_minor).dylib
    17 +INSTALL_NAME = -install_name $(PREFIX)/lib/lib$(VERSION)-$(shared_version).dylib
    18  INSTALL_NAME_EMBED = -install_name "`echo "@executable_path/../Frameworks/$(FRAMEWORK_NAME).framework/Versions/$(shared_version)/$(FRAMEWORK_NAME)" | sed 's!//*!/!g'`"
    19  
    20  ifdef EMBED
    21 @@ -84,7 +84,7 @@
    22  ifdef WARNMODE
    23     WFLAGS = -Wall -W -Werror -Wno-unused -Wno-long-double
    24  else
    25 -   WFLAGS = -Wall -Wno-unused -Wno-long-double
    26 +   WFLAGS = -Wall -Wno-unused
    27  endif
    28  
    29  ifdef TARGET_ARCH_COMPAT
    30 @@ -169,7 +169,7 @@
    31  # -------- rules for installing and removing the library files --------
    32  
    33  DESTDIR =
    34 -INSTALLDIR = $(DESTDIR)/usr/local
    35 +INSTALLDIR = $(DESTDIR)$(PREFIX)
    36  BINDIR = bin
    37  LIBDIR = lib
    38  INCDIR = include
    39 @@ -203,11 +203,11 @@
    40  else
    41         @sed -e "s/@LINK_WITH_STATIC_LIBS@/no/" misc/allegro-config.in >temp
    42  endif
    43 -       @sed -e "s#@prefix@#$(INSTALLDIR)#" temp > temp2
    44 -       @sed -e "s#@INCLUDE_PREFIX@#$(INSTALLDIR)#" temp2 > temp
    45 -       @sed -e "s#@includedir@#$(INSTALLDIR)/include#" temp > temp2
    46 -       @sed -e "s#@libdir@#$(INSTALLDIR)/lib#" temp2 > temp
    47 -       @sed -e "s#@bindir@#$(INSTALLDIR)/bin#" temp > temp2
    48 +       @sed -e "s#@prefix@#$(PREFIX)#" temp > temp2
    49 +       @sed -e "s#@INCLUDE_PREFIX@#$(PREFIX)#" temp2 > temp
    50 +       @sed -e "s#@includedir@#$(PREFIX)/include#" temp > temp2
    51 +       @sed -e "s#@libdir@#$(PREFIX)/lib#" temp2 > temp
    52 +       @sed -e "s#@bindir@#$(PREFIX)/bin#" temp > temp2
    53         @sed -e "s/@LIB_TO_LINK@/$(VERSION)/" temp2 > temp
    54         @sed -e "s/@LDFLAGS@//" temp > temp2
    55         @sed -e "s/@LIBS@/$(STATIC_LIBRARIES)/" temp2 > temp
  • Portfile

     
    11# $Id$
    22
    33PortSystem 1.0
     4PortGroup       cmake 1.0
    45
    56name            allegro
    6 version         4.2.2
    7 revision        1
     7version         4.9.15
    88description     A game programming library for C/C++ developers.
    99long_description \
    1010                Allegro is a game programming library for \
     
    1717use_parallel_build  yes
    1818homepage        http://alleg.sourceforge.net/
    1919master_sites    sourceforge:alleg
    20 checksums       md5 87ffb1def034e0ec29a9ad4a595cda7e
    21 patchfiles      patch-makefile.osx
     20checksums           md5     e7c9f3bd868d7f2f8e2fc4e01612da6a \
     21                    sha1    06830f8fe9afbad5647541ee4f7f8dd1d5d4aa13 \
     22                    rmd160  4b41d6214f3262ebba49714d94619d594259dbd0
    2223
    23 configure    {
    24     system "cd ${worksrcpath} && sh fix.sh macosx"
    25     reinplace "s|CC = gcc|CC = ${configure.cc}|" ${worksrcpath}/makefile.osx
    26 }
    2724
    2825# check for universal build
    2926pre-build {
     
    3633
    3734build.target
    3835
    39 destroot.target     install install-man
    4036destroot.args       PREFIX=${prefix}
    4137
    42 # some additional tools were build, let's install them
    43 post-destroot {
    44     foreach tool {colormap dat dat2c dat2s exedat grabber pack pat2dat rgbmap textconv} {
    45         xinstall -m 0755 -W ${worksrcpath}/tools/ ${tool} ${destroot}${prefix}/bin/
    46     }
    47 }
    48 
    4938livecheck.type  regex
    5039livecheck.url   http://alleg.sourceforge.net/wip.html
    5140livecheck.regex {Stable branch ([\d.]+) source releases}