pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/ham/freedv add awk script to fixup 0b constants not ha...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cfd7928986fb
branches:  trunk
changeset: 645340:cfd7928986fb
user:      dbj <dbj%pkgsrc.org@localhost>
date:      Tue Jan 27 08:19:22 2015 +0000

description:
add awk script to fixup 0b constants not handled by all compilers

diffstat:

 ham/freedv/Makefile       |   6 +++++-
 ham/freedv/fixbinconst.mk |  38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 1 deletions(-)

diffs (62 lines):

diff -r f474d0023a2a -r cfd7928986fb ham/freedv/Makefile
--- a/ham/freedv/Makefile       Tue Jan 27 07:05:17 2015 +0000
+++ b/ham/freedv/Makefile       Tue Jan 27 08:19:22 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2014/09/10 12:16:15 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2015/01/27 08:19:22 dbj Exp $
 #
 
 VERSION=       0.97.0.1696
@@ -27,6 +27,10 @@
 BUILD_DIRS=${CONFIGURE_DIRS}
 CMAKE_ARG_PATH=..
 
+.include "fixbinconst.mk"
+SUBST_STAGE.fixbinconst=       pre-configure
+SUBST_FILES.fixbinconst+=      src/varicode_table.h
+
 pre-configure:
        ${MKDIR} ${WRKSRC}/build
 
diff -r f474d0023a2a -r cfd7928986fb ham/freedv/fixbinconst.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/ham/freedv/fixbinconst.mk Tue Jan 27 08:19:22 2015 +0000
@@ -0,0 +1,38 @@
+# $NetBSD: fixbinconst.mk,v 1.1 2015/01/27 08:19:22 dbj Exp $
+
+# A hack to fix up single byte binary constants
+
+SUBST_CLASSES+=        fixbinconst
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0000/0b0/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0001/0b1/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0010/0b2/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0011/0b3/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0100/0b4/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0101/0b5/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0110/0b6/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]0111/0b7/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1000/0b8/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1001/0b9/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1010/0ba/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1011/0bb/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1100/0bc/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1101/0bd/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1110/0be/g'
+SUBST_SED.fixbinconst+=        -e 's/0[bB]1111/0bf/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0000/0x\10/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0001/0x\11/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0010/0x\12/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0011/0x\13/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0100/0x\14/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0101/0x\15/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0110/0x\16/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)0111/0x\17/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1000/0x\18/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1001/0x\19/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1010/0x\1a/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1011/0x\1b/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1100/0x\1c/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1101/0x\1d/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1110/0x\1e/g'
+SUBST_SED.fixbinconst+=        -e 's/0b\([0-9a-f]\)1111/0x\1f/g'
+SUBST_MESSAGE.fixbinconst= Fixing unportable binary constants



Home | Main Index | Thread Index | Old Index