Skip to content

[Pull Request] Prepare for release version 2.1.0. #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Sep 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ tests/test-shiftseq.exe
tests/uniq-u
tests/uniq-u.exe
tests/tmp-*.TXT
a.out

# Patterns for all subdirectories: all kinds of automatic backup files.
*.orig
Expand All @@ -51,6 +52,7 @@ tests/tmp-*.TXT
.#*
\#*#
.vscode
.cache

# Autopull modules
build-aux/
Expand All @@ -59,6 +61,7 @@ build-aux/
tests/data/UTF-8.TXT
tests/data/GB18030-2005.TXT
tests/data/GB18030-2022.TXT
*.tmp

# Dist directory and temps
cppp-reiconv-v*
Expand Down
30 changes: 17 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# The cppp-reiconv library is free software; you can redistribute it
# and/or modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either version 2.1
# License as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# The cppp-reiconv library is distributed in the hope that it will be
Expand All @@ -16,28 +16,31 @@
# If not, see <https://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.12)
project(cppp-reiconv VERSION 2.0.0)
project(cppp-reiconv VERSION 2.1.0)

# Define options
option(ENABLE_EXTRA "Enable extra encodings and features." OFF)

# Set C++ standard
set(CMAKE_CXX_STANDARD 11)

# ----------------------------------------------------------------------------------
# Import build-aux subdirectory.
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/build-aux")
set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/build-aux")
add_subdirectory("${BUILD_AUX}")
message(STATUS "Using '${BUILD_AUX}' for C++ Plus build-aux directory.")
elseif(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux")
set(BUILD_AUX "${CMAKE_CURRENT_SOURCE_DIR}/../build-aux")
else()
message(FATAL_ERROR "CMake build-aux directory is not exists, try to execute 'setup.cmd' or './setup.sh' to get it.")
endif()
set(AUX_DIR "${BUILD_AUX}/cmake")
get_filename_component(BUILD_AUX "${BUILD_AUX}" ABSOLUTE)
include("${BUILD_AUX}/cmake/cppp.cmake")

message(STATUS "Using '${BUILD_AUX}' for C++ Plus build-aux directory.")
add_subdirectory("${BUILD_AUX}")

include("${AUX_DIR}/cppp.cmake")
cppp_init_nls_util()

# ----------------------------------------------------------------------------------
check_have_visibility()

if(MSVC)
Expand All @@ -52,20 +55,21 @@ elseif(HAVE_VISIBILITY)
else()
set(DLL_VARIABLE "")
endif()
configure_file("${srcdir}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp")
configure_file("${srcdir}/windows/libcppp-reiconv.rc.in" "${outdir}/windows/libcppp-reiconv.rc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/windows/libcppp-reiconv.rc.in" "${CMAKE_BINARY_DIR}/windows/libcppp-reiconv.rc")

# Generate header file for install
if(WIN32)
set(DLL_VARIABLE "__declspec(dllimport)")
else()
set(DLL_VARIABLE "")
endif()
configure_file("${srcdir}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp.inst")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/include/cppp/reiconv.hpp.in" "${output_includedir}/cppp/reiconv.hpp.inst")
cppp_nls_autotranslate("${output_includedir}/cppp/reiconv.hpp.inst" "${CMAKE_CURRENT_SOURCE_DIR}/lang")

# Add includes
include_directories("${srcdir}/lib")
include_directories("${srcdir}/lib/generated")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/lib/generated")
include_directories("${output_includedir}")

# Add definitions
Expand All @@ -75,7 +79,7 @@ if(ENABLE_EXTRA)
endif()

# Add library
cppp_build_library(${PROJECT_NAME} "${srcdir}/lib/iconv.cpp" TRUE TRUE "${outdir}/windows/libcppp-reiconv.rc")
cppp_build_library(${PROJECT_NAME} "${CMAKE_CURRENT_SOURCE_DIR}/lib/iconv.cpp" TRUE TRUE "${CMAKE_BINARY_DIR}/windows/libcppp-reiconv.rc")

# Include test suite.
include("tests/tests.cmake")
Expand Down
9 changes: 2 additions & 7 deletions CPPPPKG
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
{
"name" : "cppp-reiconv",
"version" : "2.0.0",
"version" : "2.1.0",
"list_file_path": "FILELIST",
"description": "C++ Plus character set conversion library",
"authors": [
"The C++ Plus Project",
"Bruno Haible",
"ChenPi11",
"Sam Steingold",
"Ben Noordhuis",
"Mike Fulton",
"Daiki Ueno",
"KO Myung-Hun"
"ChenPi11"
],
"webpage": "https://github.com/cppp-project/cppp-reiconv",
"subpackages": {
Expand Down
35 changes: 35 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
2023-09-02 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Optimize 'iconv_open(int, int)'.
Change version to '2.1.0'.
Update NEWS.md.
Remove some authors because they are only contributors.
Prepare for release version 2.1.0.

2023-08-29 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Fix type-conflict warning when in clang.
Fully remove wchar support.
Add function 'extern iconv_t iconv_open (int tocode_cp, int fromcode_cp, bool strict=true)'.
Update language map.

2023-08-27 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Add codepage definitions.

2023-08-24 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Fix subdirectory import bug.
Optimize the way to import build-aux.

2023-08-23 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Add CTest on Windows support.

2023-07-28 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Finish NLS Translate language maps (en_US, zh_CN).
Add Doxygen notes for 'cppp/reiconv.hpp'.
Fix 'reiconv_version' bug (changed it to 2.0).
Remove 'iconv_allocation_t';

2023-07-19 ChenPi11 <wushengwuxi-msctinoulk@outlook.com>

Fix encode()'s EILSEQ bug.
Expand Down
23 changes: 13 additions & 10 deletions FILELIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
lang/en_US.langmap
lang/zh_CN.langmap
lib/utf32.h
lib/iso8859_16.h
lib/iso8859_6.h
Expand Down Expand Up @@ -285,16 +287,14 @@ lib/encodings.def
lib/tds565.h
lib/cp932ext.h
lib/gb12345ext.h
lib/loop_wchar.h
tests/table-from.cpp
tests/cmp.cpp
tests/check-stateless
tests/check-stateless.cpp
tests/table-from.hpp
tests/tests.cmake
tests/uniq-u.cpp
tests/reiconv-test.cpp
tests/table-to.cpp
tests/check-stateful
tests/genutf8.cpp
tests/uniq-u.hpp
tests/reiconv-test.hpp
tests/table-to.hpp
tests/check-stateful.cpp
tests/data-generator.cpp
tests/data/IBM-284.TXT
tests/data/IBM-1112.TXT
tests/data/IBM-1146.TXT
Expand Down Expand Up @@ -541,7 +541,10 @@ tests/data/IBM-1158.TXT
tests/data/BIG5-2003.IRREVERSIBLE.TXT
tests/test-shiftseq.cpp
tests/test-to-wchar.cpp
tests/gengb18030z.cpp
tests/throw_error.hpp
tests/file_utils.hpp
tests/sort.cpp
tests/sort.hpp
COPYING
Makefile.devel
include/cppp/reiconv.hpp.in
Expand Down
9 changes: 9 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
New in 2.1.0:
* Add a new function `iconv_t iconv_open(int tocode_cp, int fromcode_cp, bool strict = true);` and codepage definitions.
* Add CTest on Windows support.
* Remove 'iconv_allocation_t';
* Fully remove wchar support.
* Fix some bugs.
* Add header comments NLS support.
* Add Doxygen comments for 'cppp/reiconv.hpp'.

New in 2.0.0:
* Redist 'GNU LIBICONV' to 'cppp-reiconv'.
* Remove iconv program, iconv gettext po, iconv manual.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ cmake --install .

# Install
This library installs:
- a shared library 'libcppp-reiconv.so' or '~.dll' or '~.dylib' ...
- a static library 'libcppp-reiconv.a' or '~.lib' ...
- a shared library 'libcppp-reiconv'.
- a static library 'libcppp-reiconv.static'.
- a header file '<cppp/reiconv.hpp>'.

To use it, simply #include <cppp/reiconv.hpp> and import the lib to use the functions.
Expand Down
Loading