Skip to content

Commit

Permalink
Enable debugging of C# support on Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaible committed Oct 9, 2024
1 parent 11872f1 commit 3dcb3d9
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 4 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/many-platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,7 @@ jobs:
: "Set a PATH without native Windows implementations like java and tclsh."
export PATH="/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows"
export CPPFLAGS="-Wall"
./build-on.sh '${{ env.package }}' '' 'make' '/usr' '' ''
./build-on.sh '${{ env.package }}' '--enable-csharp=dotnet' 'make' '/usr' '' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
Expand Down Expand Up @@ -1190,7 +1190,7 @@ jobs:
export CC=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32-gcc
export CXX=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32-g++
wget -O libiconv-1.17.tar.gz https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32' 'make' '/usr/${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32/sys-root/mingw' 'libiconv-1.17' ''
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32 --enable-csharp=dotnet' 'make' '/usr/${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32/sys-root/mingw' 'libiconv-1.17' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
Expand Down Expand Up @@ -1315,7 +1315,7 @@ jobs:
export AR="`pwd`/ar-lib lib"
export RANLIB=":"
wget -O libiconv-1.17.tar.gz https://ftp.gnu.org/gnu/libiconv/libiconv-1.17.tar.gz
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32 --disable-shared' 'make' '/usr/local/msvc${{ matrix.bitness }}' 'libiconv-1.17' ''
./build-on.sh '${{ env.package }}' '--host=${{ matrix.bitness == 32 && 'i686' || 'x86_64' }}-w64-mingw32 --disable-shared --enable-csharp=dotnet' 'make' '/usr/local/msvc${{ matrix.bitness }}' 'libiconv-1.17' ''
# Doc: https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# https://github.com/actions/upload-artifact?tab=readme-ov-file#usage
- if: ${{ always() }}
Expand Down
2 changes: 1 addition & 1 deletion build-tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ git clone --depth 1 https://git.savannah.gnu.org/git/"$package".git
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git

# Apply patches.
#(cd "$package" && patch -p1 < ../patches/...)
(cd "$package" && patch -p1 < ../patches/csharp-debugging.patch)

export GNULIB_SRCDIR=`pwd`/gnulib
cd "$package"
Expand Down
48 changes: 48 additions & 0 deletions patches/csharp-debugging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/gettext-tools/tests/lang-csharp b/gettext-tools/tests/lang-csharp
index 55879abfa..a43e2d50a 100755
--- a/gettext-tools/tests/lang-csharp
+++ b/gettext-tools/tests/lang-csharp
@@ -1,6 +1,6 @@
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
-
+set -x
# Test of gettext facilities in the C# language.
# Assumes an fr_FR locale is installed.
# Assumes the following packages are installed: mono, mcs.
@@ -154,7 +154,7 @@ ${DIFF} fr.po fr.po.new || Exit 1

: ${MSGFMT=msgfmt}
GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \
-${MSGFMT} --csharp -d . -r prog -l fr fr.po || Exit 1
+${MSGFMT} --csharp -v -d . -r prog -l fr fr.po || Exit 1

# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
diff --git a/gettext-tools/tests/msgunfmt-csharp-1 b/gettext-tools/tests/msgunfmt-csharp-1
index fbbd5cced..e43625de1 100755
--- a/gettext-tools/tests/msgunfmt-csharp-1
+++ b/gettext-tools/tests/msgunfmt-csharp-1
@@ -1,6 +1,6 @@
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
-
+set -x
# Test of --csharp option.

# Test whether we can compile and execute C# programs.
@@ -52,12 +52,12 @@ EOF

: ${MSGFMT=msgfmt}
GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \
-${MSGFMT} --csharp -d mu-cs-1 -r prog -l fr mu-cs-1/fr.po || Exit 1
+${MSGFMT} --csharp -v -d mu-cs-1 -r prog -l fr mu-cs-1/fr.po || Exit 1

: ${MSGUNFMT=msgunfmt}
GETTEXTCSHARPEXEDIR=../../src \
GETTEXTCSHARPLIBDIR=../../../gettext-runtime/intl-csharp \
-${MSGUNFMT} --csharp -d mu-cs-1 -r prog -l fr -o mu-cs-1/prog.out || Exit 1
+${MSGUNFMT} --csharp -v -d mu-cs-1 -r prog -l fr -o mu-cs-1/prog.out || Exit 1

: ${MSGCAT=msgcat}
${MSGCAT} -s -o mu-cs-1/prog.sort mu-cs-1/prog.out || Exit 1

0 comments on commit 3dcb3d9

Please sign in to comment.