Skip to content

Commit

Permalink
add libiconv
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Jan 28, 2024
1 parent 577036e commit 3595abd
Show file tree
Hide file tree
Showing 10 changed files with 1,885 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
run: |
pacman -Syu --needed --noconfirm \
git unzip ghc cabal-install haskell-shake haskell-aeson-pretty \
cmake extra-cmake-modules ninja fmt fcitx5 boost python opencc jdk17-openjdk check
cmake extra-cmake-modules ninja fmt fcitx5 boost python opencc jdk17-openjdk check gperf
- name: Fetch source code
uses: actions/checkout@v4
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,6 @@
[submodule "libthai"]
path = libthai
url = https://github.com/tlwg/libthai
[submodule "libiconv"]
path = libiconv
url = https://git.savannah.gnu.org/git/libiconv
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ Cabal is required to build this project.
* libhangul: [libhangul/libhangul](https://github.com/libhangul/libhangul)
* libchewing: [chewing/libchewing](https://github.com/chewing/libchewing)
* libthai: [tlwg/libthai](https://github.com/tlwg/libthai)
* libiconv: [GNU/libiconv](https://savannah.gnu.org/projects/libiconv)
1 change: 1 addition & 0 deletions libiconv
Submodule libiconv added at 4b9c27
26 changes: 26 additions & 0 deletions patches/iconv.h.in.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
24c24
< extern @DLL_VARIABLE@ int _libiconv_version; /* Likewise */
---
> extern int _libiconv_version; /* Likewise */
58c58
< #define EILSEQ @EILSEQ@
---
> #define EILSEQ
82c82
< extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
---
> extern size_t iconv (iconv_t cd, char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
100,101c100,101
< #if @USE_MBSTATE_T@
< #if @BROKEN_WCHAR_H@
---
> #if 1
> #if 0
121c121
< #if @USE_MBSTATE_T@
---
> #if 1
168c168
< #if @HAVE_WCHAR_T@
---
> #if 1
15 changes: 15 additions & 0 deletions patches/libiconv.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.22.1)
project(libiconv)

set(LIBICONV_HEADER
"include/iconv.h"
)
set(LIBICONV_SOURCE
lib/iconv.c
libcharset/lib/localcharset.c
)

add_library(iconv STATIC ${LIBICONV_SOURCE})
target_include_directories(iconv PRIVATE include libcharset/include)
install(TARGETS iconv)
install(FILES ${LIBICONV_HEADER} DESTINATION include)
Loading

0 comments on commit 3595abd

Please sign in to comment.