Rev 29 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 29 | Rev 36 | ||
---|---|---|---|
1 | #!/bin/sh |
1 | #!/bin/sh |
2 | ## 02_wrong_lib_version_h.dpatch by Magnus Holmgren <magnus@kibibyte.se> |
2 | ## 02_wrong_lib_version_h.dpatch by Magnus Holmgren <magnus@kibibyte.se> |
3 | ## |
3 | ## |
4 | ## All lines beginning with `## DP:' are a description of the patch. |
4 | ## All lines beginning with `## DP:' are a description of the patch. |
5 | ## DP: Move static spf_lib_version.h out of the way and patch configure to put |
5 | ## DP: Move static spf_lib_version.h out of the way and patch configure to put |
6 | ## DP: the autogenerated one in the right place. |
6 | ## DP: the autogenerated one in the right place. |
7 | 7 | ||
8 | set -e |
8 | set -e |
9 | 9 | ||
10 | lib_version_h=src/include/spf_lib_version.h |
10 | lib_version_h=src/include/spf_lib_version.h |
11 | 11 | ||
12 | dpatch_patch() { |
12 | dpatch_patch() { |
13 | # Update configure script so that it writes to the right .h file |
13 | # Update configure script so that it writes to the right .h file |
14 | test -e configure.old || \ |
14 | test -e configure.old || \ |
15 | sed -ri.old -e 's%src/libspf2/spf_lib_version%src/include/spf_lib_version%' configure |
15 | sed -ri.old -e 's%src/libspf2/spf_lib_version%src/include/spf_lib_version%' configure |
16 | # Move the bad .h file out of the way |
16 | # Move the bad .h file out of the way |
17 | test -e $lib_version_h.old || mv -f $lib_version_h $lib_version_h.old |
17 | test -e $lib_version_h.old || mv -f $lib_version_h $lib_version_h.old |
18 | } |
18 | } |
19 | 19 | ||
20 | dpatch_unpatch() { |
20 | dpatch_unpatch() { |
21 | # Move the bad .h file back to its position |
21 | # Move the bad .h file back to its position |
22 | if test -e $lib_version_h.old; then mv -f $lib_version_h.old $lib_version_h; fi |
22 | if test -e $lib_version_h.old; then mv -f $lib_version_h.old $lib_version_h; fi |
23 | # Move the original configure script back |
23 | # Move the original configure script back |
24 | if test -e configure.old; then mv -f configure.old configure; fi |
24 | if test -e configure.old; then mv -f configure.old configure; fi |
25 | } |
25 | } |
26 | 26 | ||
27 | 27 | ||
28 | DPATCH_LIB_NO_DEFAULT=1 |
28 | DPATCH_LIB_NO_DEFAULT=1 |
29 | 29 | ||
30 | . /usr/share/dpatch/dpatch.lib.sh |
30 | . /usr/share/dpatch/dpatch.lib.sh |