[89690] trunk/dports/lang/bf2c
jmr at macports.org
jmr at macports.org
Mon Feb 6 14:15:27 PST 2012
Revision: 89690
http://trac.macports.org/changeset/89690
Author: jmr at macports.org
Date: 2012-02-06 14:15:24 -0800 (Mon, 06 Feb 2012)
Log Message:
-----------
bf2c: update to 1.2.4
Modified Paths:
--------------
trunk/dports/lang/bf2c/Portfile
Added Paths:
-----------
trunk/dports/lang/bf2c/files/
trunk/dports/lang/bf2c/files/Makefile.patch
trunk/dports/lang/bf2c/files/strndup.patch
Modified: trunk/dports/lang/bf2c/Portfile
===================================================================
--- trunk/dports/lang/bf2c/Portfile 2012-02-06 21:58:26 UTC (rev 89689)
+++ trunk/dports/lang/bf2c/Portfile 2012-02-06 22:15:24 UTC (rev 89690)
@@ -1,9 +1,11 @@
# $Id$
-PortSystem 1.0
+PortSystem 1.0
+
name bf2c
-version 1.2.3
+version 1.2.4
categories lang
+license BSD
maintainers nomaintainer
description optimizing BrainF*ck to C compiler
long_description \
@@ -11,17 +13,26 @@
devised by Urban Mueller. It is oriented around a tape, a read/write \
head, an input device and an output device. This program converts \
Brainf*ck source into C, while attempting to optimize.
-homepage http://bf2c.sourceforge.net/
+homepage http://rene-ladan.nl:8080/bf2c/
platforms darwin
-master_sites sourceforge:project/bf2c/bf2c/${version}
-checksums md5 72cabfb53dfab3f83de7ea901dfbb411
+master_sites ftp://rene-ladan.nl/pub/distfiles/
+use_bzip2 yes
+checksums rmd160 9a959e5d8c079d4c56d4259d53145c63bdfd0417 \
+ sha256 be960be733b79492cb6de2c30297abcf9de68d0200c27f1a088c1b338f9a4f10
-patch {
- reinplace s|-Werror||g ${worksrcpath}/Makefile
-}
+patchfiles Makefile.patch
use_configure no
+build.env CXX=${configure.cxx} \
+ CXXFLAGS="${configure.cxxflags} ${configure.cxx_archflags}"
+
destroot {
- xinstall -m 555 ${worksrcpath}/bf2c ${destroot}${prefix}/bin
+ xinstall ${worksrcpath}/bf2c ${destroot}${prefix}/bin
}
+
+platform darwin {
+ if {${os.major} < 11} {
+ patchfiles-append strndup.patch
+ }
+}
Added: trunk/dports/lang/bf2c/files/Makefile.patch
===================================================================
--- trunk/dports/lang/bf2c/files/Makefile.patch (rev 0)
+++ trunk/dports/lang/bf2c/files/Makefile.patch 2012-02-06 22:15:24 UTC (rev 89690)
@@ -0,0 +1,13 @@
+--- Makefile.orig 2012-01-03 08:49:41.000000000 +1100
++++ Makefile 2012-02-07 07:48:49.000000000 +1100
+@@ -4,8 +4,8 @@
+ all: bf2c
+
+ bf2c:
+- $(CXX) -c $(sources)
+- $(CXX) bf2c.cc -o $@ $(objects)
++ $(CXX) $(CXXFLAGS) -c $(sources)
++ $(CXX) $(CXXFLAGS) bf2c.cc -o $@ $(objects)
+
+ check:
+ lint -aabcehirsx $(sources) bf2c.cc
Added: trunk/dports/lang/bf2c/files/strndup.patch
===================================================================
--- trunk/dports/lang/bf2c/files/strndup.patch (rev 0)
+++ trunk/dports/lang/bf2c/files/strndup.patch 2012-02-06 22:15:24 UTC (rev 89690)
@@ -0,0 +1,55 @@
+--- token.cc.orig 2012-01-03 09:02:22.000000000 +1100
++++ token.cc 2012-02-07 07:46:22.000000000 +1100
+@@ -3,6 +3,52 @@
+ #include <stdlib.h>
+ #include <string.h>
+
++/*
++ * Copyright (c) 1988, 1993
++ * The Regents of the University of California. All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ * 4. Neither the name of the University nor the names of its contributors
++ * may be used to endorse or promote products derived from this software
++ * without specific prior written permission.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ */
++
++char *
++strndup(const char *str, size_t n)
++{
++ size_t len;
++ char *copy;
++
++ for (len = 0; len < n && str[len]; len++)
++ continue;
++
++ if ((copy = (char *)malloc(len + 1)) == NULL)
++ return (NULL);
++ memcpy(copy, str, len);
++ copy[len] = '\0';
++ return (copy);
++}
++
++
+ Token::Token() {
+ myname = strndup("TOKEN", strlen("TOKEN"));
+ mytype = ttToken;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120206/b5669278/attachment.html>
More information about the macports-changes
mailing list