#!/bin/sh -e
## 13_fix_flex_compile.dpatch by Otavio Salvador <otavio@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This should fix the problem with newest version of flex

if [ $# -ne 1 ]; then
    echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch}"

case "$1" in
       -patch) patch $patch_opts -p1 < $0;;
       -unpatch) patch $patch_opts -p1 -R < $0;;
        *)
                echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
                exit 1;;
esac

exit 0

@DPATCH@
--- a/src/sd/bv/adsedgelabel.l
+++ b/src/sd/bv/adsedgelabel.l
@@ -7,7 +7,6 @@
 char adsedgelabel_errormsg[1024] = "";
 char adsedgelabel_constraint[1024] = "";
 %}
-%option noyywrap
 
 integer   [0-9]+
 string    [A-Za-z](([ _][A-Za-z0-9])|([A-Za-z0-9]))*
--- a/src/sd/bv/adsltlformula.l
+++ b/src/sd/bv/adsltlformula.l
@@ -7,7 +7,6 @@
 char adsltlformula_errormsg[1024] = "";
 char adsltlformula_constraint[1024] = "";
 %}
-%option noyywrap
 
 integer   [0-9]+    
 string1   [A-Za-z][A-Za-z][A-Za-z0-9]([ \-_][A-Za-z0-9]|[A-Za-z0-9])*
--- a/src/sd/bv/adsmcoutput.l
+++ b/src/sd/bv/adsmcoutput.l
@@ -7,7 +7,6 @@
 char adsmcoutput_errormsg[1024] = "";
 char adsmcoutput_constraint[1024] = "";
 %}
-%option noyywrap
 
 
 string    [A-Za-z0-9.:,/@\|!()<>=&_*+]+ 
