[128846] trunk/dports/textproc

larryv at macports.org larryv at macports.org
Thu Nov 27 23:43:59 PST 2014


Revision: 128846
          https://trac.macports.org/changeset/128846
Author:   larryv at macports.org
Date:     2014-11-27 23:43:58 -0800 (Thu, 27 Nov 2014)
Log Message:
-----------
yodl: Create port (http://yodl.sourceforge.net)

Added Paths:
-----------
    trunk/dports/textproc/yodl/
    trunk/dports/textproc/yodl/Portfile
    trunk/dports/textproc/yodl/files/
    trunk/dports/textproc/yodl/files/bash-hashbang.patch
    trunk/dports/textproc/yodl/files/macports-compilers.patch
    trunk/dports/textproc/yodl/files/macports-locations.patch

Added: trunk/dports/textproc/yodl/Portfile
===================================================================
--- trunk/dports/textproc/yodl/Portfile	                        (rev 0)
+++ trunk/dports/textproc/yodl/Portfile	2014-11-28 07:43:58 UTC (rev 128846)
@@ -0,0 +1,68 @@
+# -*- 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
+# $Id$
+
+PortSystem          1.0
+
+name                yodl
+version             3.04.00
+categories          textproc
+platforms           darwin
+license             GPL-3
+maintainers         larryv
+
+description         Your Own Document Language
+long_description    Yodl is a package implementing a pre-document \
+                    language and tools to process it. The idea of Yodl \
+                    is that you write up a document in a pre-language, \
+                    then use the tools to convert it to some final \
+                    document language. Current converters are for \
+                    HTML, man, LaTeX, a poor-man’s text converter and \
+                    an experimental XML converter. Main document types \
+                    are ‘article’, ‘report’, ‘book’, ‘letter’ and \
+                    ‘manpage’. The Yodl document language is designed \
+                    to be easy to use and extensible.
+homepage            http://yodl.sourceforge.net
+
+depends_build       port:icmake
+depends_lib         bin:bash:bash
+depends_skip_archcheck-append icmake bash
+
+master_sites        sourceforge:project/yodl/yodl/${version}
+distfiles           yodl_${version}.orig${extract.suffix}
+checksums           rmd160  bd03e15418295eb112b4228d3e2fd68b95d225a7 \
+                    sha256  66b317877906e165506796f9342a1adf931376f7d8b6990b2d2ff12107685893
+
+patchfiles          bash-hashbang.patch \
+                    macports-compilers.patch \
+                    macports-locations.patch
+post-patch {
+    reinplace -W ${worksrcpath} s|__MP_CC__|${configure.cc}| INSTALL.im
+    reinplace -W ${worksrcpath} s|__MP_CXX__|${configure.cxx}| INSTALL.im
+    reinplace -W ${worksrcpath} s|__MP_PREFIX__|${prefix}| INSTALL.im build
+}
+
+use_configure       no
+# TODO: Enable universal variant.
+
+# Install steps derived from INSTALL.txt in the distribution.
+
+build {
+    set environ CFLAGS='${configure.cflags}'
+    append environ " CXXFLAGS='${configure.cxxflags}'"
+    append environ " LDFLAGS='${configure.ldflags}'"
+
+    # Some sed(1) invocations fail without this.
+    append environ " LC_ALL=C"
+
+    # Don't bother building manual, since that requires LaTeX.
+    system -W ${worksrcpath} "env $environ ./build programs"
+    system -W ${worksrcpath} "env $environ ./build man"
+    system -W ${worksrcpath} "env $environ ./build macros"
+}
+
+destroot {
+    system -W ${worksrcpath} "./build install programs ${destroot}"
+    system -W ${worksrcpath} "./build install man ${destroot}"
+    system -W ${worksrcpath} "./build install macros ${destroot}"
+    system -W ${worksrcpath} "./build install docs ${destroot}"
+}


Property changes on: trunk/dports/textproc/yodl/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/textproc/yodl/files/bash-hashbang.patch
===================================================================
--- trunk/dports/textproc/yodl/files/bash-hashbang.patch	                        (rev 0)
+++ trunk/dports/textproc/yodl/files/bash-hashbang.patch	2014-11-28 07:43:58 UTC (rev 128846)
@@ -0,0 +1,110 @@
+Index: macros/rawmacros/create
+===================================================================
+--- macros/rawmacros/create.orig
++++ macros/rawmacros/create
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ if [ "$#" == "0" ] ; then
+     echo provide requested format as first arg.
+Index: macros/rawmacros/keepdiff
+===================================================================
+--- macros/rawmacros/keepdiff.orig
++++ macros/rawmacros/keepdiff
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ `diff $1 $1.rep > /dev/null`
+ 
+Index: macros/rawmacros/makeyoin
+===================================================================
+--- macros/rawmacros/makeyoin.orig
++++ macros/rawmacros/makeyoin
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ if [ "$*" == "0" ] ; then
+     echo "Provide requested format as 1st argument (e.g., html, latex)"
+Index: macros/rawmacros/repairs
+===================================================================
+--- macros/rawmacros/repairs.orig
++++ macros/rawmacros/repairs
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ sed '
+ s/htmlcommand/NOTRANS/g
+ s/latexcommand/NOTRANS/g
+Index: macros/rawmacros/separator
+===================================================================
+--- macros/rawmacros/separator.orig
++++ macros/rawmacros/separator
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ target=$1
+ file=$2
+Index: macros/rawmacros/startdoc
+===================================================================
+--- macros/rawmacros/startdoc.orig
++++ macros/rawmacros/startdoc
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ target=STARTDOC
+ 
+Index: scripts/configreplacements
+===================================================================
+--- scripts/configreplacements.orig
++++ scripts/configreplacements
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ CONFIG="tmp/wip/config.h"
+ 
+Index: scripts/createmacros
+===================================================================
+--- scripts/createmacros.orig
++++ scripts/createmacros
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ # This file creates the std.<format>.yo files, e.g. std.latex.yo
+ 
+Index: scripts/stdmacros
+===================================================================
+--- scripts/stdmacros.orig
++++ scripts/stdmacros
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ if [ "$#" == "0" ] ; then
+     echo provide scratch filename, destination directory, requested format
+Index: scripts/yodl2whatever.in
+===================================================================
+--- scripts/yodl2whatever.in.orig
++++ scripts/yodl2whatever.in
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ # Don't hack the executable script by hand. Rather, reconfigure your
+ # YODL package and do "make -C scripts clean; make -C scripts install".
+Index: src/yodl/replace
+===================================================================
+--- src/yodl/replace.orig
++++ src/yodl/replace
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/usr/bin/env bash
+ 
+ ls gram*.c | sed '
+     s/gram//g

Added: trunk/dports/textproc/yodl/files/macports-compilers.patch
===================================================================
--- trunk/dports/textproc/yodl/files/macports-compilers.patch	                        (rev 0)
+++ trunk/dports/textproc/yodl/files/macports-compilers.patch	2014-11-28 07:43:58 UTC (rev 128846)
@@ -0,0 +1,51 @@
+Index: INSTALL.im
+===================================================================
+--- INSTALL.im.orig
++++ INSTALL.im
+@@ -76,8 +76,8 @@ void setLocations()
+     MAN             = BASE + "/share/man";    
+     STD_INCLUDE     = BASE + "/share/yodl";
+ 
+-    COMPILER = "gcc";
+-    CXX = "g++";
++    COMPILER = "__MP_CC__";
++    CXX = "__MP_CXX__";
+ }
+ 
+ 
+Index: build
+===================================================================
+--- build.orig
++++ build
+@@ -13,6 +13,7 @@
+ string  CLASSES;
+ string  g_lopt;
+ string  g_copt;
++string  g_cxxopt;
+ string  g_cwd;
+ string  g_wip =     "tmp/wip";          // no slash here
+ string  g_install = "tmp/install";      // no slash here
+@@ -61,6 +62,8 @@ void main(int argc, list argv)
+ 
+     g_copt = setOpt(COPT + " -g", "CFLAGS");
+ 
++    g_cxxopt = setOpt(g_cxxopt, "CXXFLAGS");
++
+ #ifdef PROFILING
+     g_copt = COPT + " -pg";
+     g_lopt = "-pg";
+Index: icmake/program
+===================================================================
+--- icmake/program.orig
++++ icmake/program
+@@ -26,8 +26,8 @@ void _programYodlverbinsert()
+ {
+     if ("src/verbinsert/verbinsert.cc" younger 
+             g_install + BIN + "/yodlverbinsert")
+-        run(CXX + " --std=c++11 -o " + g_install + BIN + "/yodlverbinsert " + 
+-            g_copt + " src/verbinsert/verbinsert.cc " + g_lopt);
++        run(CXX + " -o " + g_install + BIN + "/yodlverbinsert " + 
++            g_cxxopt + " src/verbinsert/verbinsert.cc " + g_lopt);
+ }
+ 
+ void program(string target)

Added: trunk/dports/textproc/yodl/files/macports-locations.patch
===================================================================
--- trunk/dports/textproc/yodl/files/macports-locations.patch	                        (rev 0)
+++ trunk/dports/textproc/yodl/files/macports-locations.patch	2014-11-28 07:43:58 UTC (rev 128846)
@@ -0,0 +1,31 @@
+Index: INSTALL.im
+===================================================================
+--- INSTALL.im.orig
++++ INSTALL.im
+@@ -65,14 +65,14 @@ string CXX;
+ 
+ void setLocations()
+ {
+-    BASE    = "/usr";
++    BASE    = "__MP_PREFIX__";
+ 
+     // make sure that BIN, STD_INCLUDE, MAN, DOC and DOCDOC all are
+     // absolute paths
+ 
+     BIN             = BASE + "/bin";
+     DOC             = BASE + "/share/doc/yodl";
+-    DOCDOC          = BASE + "/share/doc/yodl-doc";
++    DOCDOC          = DOC;
+     MAN             = BASE + "/share/man";    
+     STD_INCLUDE     = BASE + "/share/yodl";
+ 
+Index: build
+===================================================================
+--- build.orig
++++ build
+@@ -1,4 +1,4 @@
+-#!/usr/bin/icmake -qt/tmp/yodl
++#!__MP_PREFIX__/bin/icmake -qt/tmp/yodl
+ 
+ #include "VERSION" 
+ #include "INSTALL.im"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141127/4af454e7/attachment.html>


More information about the macports-changes mailing list