Rename the shared library to iconv.dll instead of hacking up the import library

This commit is contained in:
Kalev Lember 2011-07-06 23:48:54 +03:00
parent 0317f70d1a
commit c8645b111a
2 changed files with 22 additions and 6 deletions

View File

@ -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 <kalevlember@gmail.com> - 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 <epienbro@fedoraproject.org> - 0.0.3-3
- Make sure that the .dll.a import library refers to libiconv.dll
instead of iconv.dll

View File

@ -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)