[134201] trunk/dports/devel/bison
larryv at macports.org
larryv at macports.org
Thu Mar 19 17:31:15 PDT 2015
Revision: 134201
https://trac.macports.org/changeset/134201
Author: larryv at macports.org
Date: 2015-03-19 17:31:15 -0700 (Thu, 19 Mar 2015)
Log Message:
-----------
bison: Update to 3.0.4 (#41600), add `bison-runtime` subport
- Update to latest upstream version, 3.0.4.
- Remove unnecessary configure options.
- Add dependency on Perl, which is used by the build.
- Remove dependency on iconv, which doesn't seem to be used.
- Don't manually install documentation and examples, since the build
system now does this.
- Move examples to `${prefix}/share/examples`.
- Split off a `bison-runtime` subport to provide the translations for
localized programs that incorporate Bison-generated parsers. (See the
PACKAGING file from the upstream distribution.)
Modified Paths:
--------------
trunk/dports/devel/bison/Portfile
Added Paths:
-----------
trunk/dports/devel/bison/files/
trunk/dports/devel/bison/files/skip-runtime-po.patch
Modified: trunk/dports/devel/bison/Portfile
===================================================================
--- trunk/dports/devel/bison/Portfile 2015-03-20 00:31:13 UTC (rev 134200)
+++ trunk/dports/devel/bison/Portfile 2015-03-20 00:31:15 UTC (rev 134201)
@@ -5,15 +5,24 @@
name bison
epoch 1
-version 2.7.1
-revision 1
+version 3.0.4
categories devel
platforms darwin
+subport bison-runtime {
+ supported_archs noarch
+}
license GPL-3+
maintainers mww
+if {${subport} eq "bison-runtime"} {
+ description Localization support for Bison-generated parsers
+ long_description The Bison parser generator provides \
+ translations for its parser diagnostics. \
+ Programs that contain Bison-generated parsers \
+ can use these translations to generate \
+ localized error messages.
installs_libs no
-
+} else {
description The Yacc-compatible Parser Generator
long_description Bison is a general-purpose parser generator \
that converts an annotated context-free \
@@ -27,37 +36,53 @@
desk calculators to complex programming \
languages.
+ depends_build bin:perl:perl5
depends_lib port:gettext \
- port:libiconv \
port:m4
-
+ depends_run port:bison-runtime
+}
homepage http://www.gnu.org/software/bison
master_sites gnu
use_xz yes
-checksums rmd160 933257e61c1098160d4fd71063f340b2ee304671 \
- sha256 b409adcbf245baadb68d2f66accf6fdca5e282cafec1b865f4b5e963ba8ea7fb
+checksums rmd160 414959f3d619d8e4875e241ee02852b2ff13c2cb \
+ sha256 a72428c7917bdf9fa93cb8181c971b6e22834125848cf1d03ce10b1bb0716fe1
-configure.args --disable-silent-rules \
- --infodir=${prefix}/share/info \
- --mandir=${prefix}/share/man
+configure.args --disable-silent-rules
+if {${subport} eq "bison-runtime"} {
+
+ build.dir ${worksrcpath}/runtime-po
+
+ # Use the deactivate hack because `bison` used to install these files.
+ pre-activate {
+ if {![catch {lindex [registry_active bison] 0} installedBison]} {
+ set installedBisonEpoch [lindex $installedBison 5]
+ set installedBisonVersion [lindex $installedBison 1]
+ if {$installedBisonEpoch < 1
+ || ($installedBisonEpoch == 1
+ && [vercmp $installedBisonVersion 3.0.4] < 0)} {
+ registry_deactivate_composite bison {} {ports_nodepcheck true}
+ }
+ }
+ }
+
+ livecheck.type none
+
+} else {
+
+ patchfiles skip-runtime-po.patch
+
test.run yes
test.target check
post-destroot {
- set docdir ${prefix}/share/doc/${name}
- xinstall -d ${destroot}${docdir}/examples/calc++
- xinstall -m 0444 -W ${worksrcpath} AUTHORS COPYING ChangeLog NEWS \
- THANKS TODO ${destroot}${docdir}
- xinstall -m 444 -W ${worksrcpath}/examples/calc++ \
- calc++-driver.cc calc++-driver.hh calc++-parser.cc \
- calc++-parser.hh calc++-parser.stamp calc++-parser.yy \
- calc++-scanner.cc calc++-scanner.ll calc++.cc location.hh \
- position.hh stack.hh test \
- ${destroot}${docdir}/examples/calc++
+ xinstall -d ${destroot}${prefix}/share/examples
+ move ${destroot}${prefix}/share/doc/${subport}/examples \
+ ${destroot}${prefix}/share/examples/${subport}
}
livecheck.type regex
livecheck.url http://ftp.gnu.org/gnu/bison/
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)
+}
Added: trunk/dports/devel/bison/files/skip-runtime-po.patch
===================================================================
--- trunk/dports/devel/bison/files/skip-runtime-po.patch (rev 0)
+++ trunk/dports/devel/bison/files/skip-runtime-po.patch 2015-03-20 00:31:15 UTC (rev 134201)
@@ -0,0 +1,13 @@
+Index: Makefile.in
+===================================================================
+--- Makefile.in.orig
++++ Makefile.in
+@@ -2102,7 +2102,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = subdir-objects
+ ACLOCAL_AMFLAGS = -I m4
+-SUBDIRS = po runtime-po .
++SUBDIRS = po .
+ aclocal_DATA = m4/bison-i18n.m4
+
+ # Some of our targets (cross-option.texi, bison.1) use "bison --help".
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150319/b172e7c1/attachment.html>
More information about the macports-changes
mailing list