From c8645b111ae20d1755195eab6462aa30e9cabfb6 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Wed, 6 Jul 2011 23:48:54 +0300 Subject: [PATCH] Rename the shared library to iconv.dll instead of hacking up the import library --- mingw-win-iconv.spec | 15 +++++++++------ win-iconv-0.0.3-dllname.patch | 13 +++++++++++++ 2 files changed, 22 insertions(+), 6 deletions(-) create mode 100644 win-iconv-0.0.3-dllname.patch diff --git a/mingw-win-iconv.spec b/mingw-win-iconv.spec index f50f778..2b8f84e 100644 --- a/mingw-win-iconv.spec +++ b/mingw-win-iconv.spec @@ -4,13 +4,15 @@ Name: mingw-win-iconv Version: 0.0.3 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Iconv implementation using Win32 API License: Public Domain Group: Development/Libraries URL: http://code.google.com/p/win-iconv Source0: http://win-iconv.googlecode.com/files/win-iconv-%{version}.tar.bz2 +# rename libiconv.dll -> iconv.dll to match the .def file +Patch0: win-iconv-0.0.3-dllname.patch BuildArch: noarch BuildRequires: mingw32-filesystem >= 68 @@ -51,16 +53,13 @@ Static version of the MinGW Windows Iconv library. %prep %setup -q -n win-iconv-%{version} +%patch0 -p1 -b .dllname dos2unix readme.txt dos2unix ChangeLog chmod -x readme.txt chmod -x ChangeLog -# Make sure that the .dll.a import library doesn't refer to a dll named -# iconv.dll (as the library generated by cmake is named libiconv.dll) -sed -i s/'LIBRARY ICONV.DLL'// iconv.def - %build %{_mingw32_cmake} -DBUILD_STATIC=1 @@ -74,7 +73,7 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_bindir}/*.exe %files -n %{_mingw32_pkg_name} %doc ChangeLog readme.txt -%{_mingw32_bindir}/libiconv.dll +%{_mingw32_bindir}/iconv.dll %{_mingw32_includedir}/iconv.h %{_mingw32_libdir}/libiconv.dll.a @@ -83,6 +82,10 @@ rm -rf $RPM_BUILD_ROOT%{_mingw32_bindir}/*.exe %changelog +* Wed Jul 06 2011 Kalev Lember - 0.0.3-4 +- Rename the shared library to iconv.dll instead of hacking up the + import library + * Wed Jul 6 2011 Erik van Pienbroek - 0.0.3-3 - Make sure that the .dll.a import library refers to libiconv.dll instead of iconv.dll diff --git a/win-iconv-0.0.3-dllname.patch b/win-iconv-0.0.3-dllname.patch new file mode 100644 index 0000000..39f0dc9 --- /dev/null +++ b/win-iconv-0.0.3-dllname.patch @@ -0,0 +1,13 @@ +diff -up win-iconv-0.0.3/CMakeLists.txt.dllname win-iconv-0.0.3/CMakeLists.txt +--- win-iconv-0.0.3/CMakeLists.txt.dllname 2011-06-01 23:56:29.000000000 +0300 ++++ win-iconv-0.0.3/CMakeLists.txt 2011-07-06 23:46:04.706557778 +0300 +@@ -37,7 +37,8 @@ endif(NOT WINCE) + + if(BUILD_SHARED) + add_library(iconv SHARED win_iconv.c iconv.def) +- set_target_properties(iconv PROPERTIES COMPILE_FLAGS "-DMAKE_DLL") ++ set_target_properties(iconv PROPERTIES COMPILE_FLAGS "-DMAKE_DLL" ++ PREFIX "") + if(WINCE) + target_link_libraries(iconv ${WCECOMPAT_LIBRARIES}) + endif(WINCE)