aboutsummaryrefslogtreecommitdiff
path: root/converters/libiconv
diff options
context:
space:
mode:
authorMaxim Sobolev <sobomax@FreeBSD.org>2002-03-18 09:43:25 +0000
committerMaxim Sobolev <sobomax@FreeBSD.org>2002-03-18 09:43:25 +0000
commit0b31d075bc0e27d93cf260d6dda0f3fbe47654e6 (patch)
treecc417f6c1e09adfeacf163534c572adfc3e479f7 /converters/libiconv
parentfae245e621a47d9b5a1f044892b638c72a369b48 (diff)
downloadports-0b31d075bc0e27d93cf260d6dda0f3fbe47654e6.tar.gz
ports-0b31d075bc0e27d93cf260d6dda0f3fbe47654e6.zip
Iconv cleanup, stage 1a: remove `g' prefix from binaries, headers, libraries and
manpages installed by libiconv (aka GNU iconv) and add similar `b'-prefixes into components installed by iconv (aka BSD iconv). The reason why we do this is because unfortunately BSD iconv become abadonware (author doesn't maintain it anymore), while number of ports that need functional iconv library grows very fast, thus creating significant overhead due to patches needed to make ports working with prefixed GNU iconv. For compatibility reasons create symlinks in GNU iconv, so that all ports that expect GNU iconv to have `g' prefix should work unmodified until all those `g'-hacks are wiped out. Prompted by: ache Reviewed by (in principle): freebsd-ports, freebsd-gnome
Notes
Notes: svn path=/head/; revision=56286
Diffstat (limited to 'converters/libiconv')
-rw-r--r--converters/libiconv/Makefile12
-rw-r--r--converters/libiconv/files/patch-aa30
-rw-r--r--converters/libiconv/files/patch-ab25
-rw-r--r--converters/libiconv/files/patch-ac23
-rw-r--r--converters/libiconv/files/patch-ad90
-rw-r--r--converters/libiconv/files/patch-ae9
-rw-r--r--converters/libiconv/files/patch-include::iconv.h.in48
-rw-r--r--converters/libiconv/files/patch-lib::iconv.c58
-rw-r--r--converters/libiconv/pkg-plist6
9 files changed, 124 insertions, 177 deletions
diff --git a/converters/libiconv/Makefile b/converters/libiconv/Makefile
index da7942b14559..7bb374516c83 100644
--- a/converters/libiconv/Makefile
+++ b/converters/libiconv/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libiconv
PORTVERSION= 1.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= converters devel
MASTER_SITES= ${MASTER_SITE_GNU} \
ftp://ftp.ilog.fr/pub/Users/haible/gnu/
@@ -19,7 +19,13 @@ GNU_CONFIGURE= yes
CONFIGURE_ARGS= --enable-static
INSTALLS_SHLIB= yes
-MAN1= giconv.1
-MAN3= giconv.3 giconv_open.3 giconv_close.3
+MAN1= iconv.1
+MAN3= iconv.3 iconv_open.3 iconv_close.3
+
+post-install:
+ @${LN} -sf ${PREFIX}/bin/iconv ${PREFIX}/bin/giconv
+ @${LN} -sf ${PREFIX}/include/iconv.h ${PREFIX}/include/giconv.h
+ @${LN} -sf ${PREFIX}/lib/libiconv.a ${PREFIX}/lib/libgiconv.a
+ @${LN} -sf ${PREFIX}/lib/libiconv.so ${PREFIX}/lib/libgiconv.so
.include <bsd.port.mk>
diff --git a/converters/libiconv/files/patch-aa b/converters/libiconv/files/patch-aa
index 084afa2ad6b5..c767d10cffb7 100644
--- a/converters/libiconv/files/patch-aa
+++ b/converters/libiconv/files/patch-aa
@@ -2,8 +2,8 @@
$FreeBSD$
--- Makefile.in.orig Tue Feb 20 21:43:19 2001
-+++ Makefile.in Mon Aug 27 12:25:03 2001
-@@ -31,14 +31,14 @@
++++ Makefile.in Sun Mar 17 11:01:20 2002
+@@ -31,7 +31,7 @@
cd lib && $(MAKE) all
cd src && $(MAKE) all
cd man && $(MAKE) all
@@ -12,29 +12,3 @@ $FreeBSD$
# Installs the library and include files only. Typically called with only
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
- install-lib : all force
- cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
- if [ ! -d $(includedir) ] ; then mkdir $(includedir) ; fi
-- $(INSTALL_DATA) include/iconv.h $(includedir)/iconv.h
-+ $(INSTALL_DATA) include/iconv.h $(includedir)/giconv.h
-
- install : force
- cd libcharset && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
-@@ -47,7 +47,7 @@
- if [ ! -d $(DESTDIR)$(prefix) ] ; then mkdir $(DESTDIR)$(prefix) ; fi
- if [ ! -d $(DESTDIR)$(exec_prefix) ] ; then mkdir $(DESTDIR)$(exec_prefix) ; fi
- if [ ! -d $(DESTDIR)$(includedir) ] ; then mkdir $(DESTDIR)$(includedir) ; fi
-- $(INSTALL_DATA) include/iconv.h $(DESTDIR)$(includedir)/iconv.h
-+ $(INSTALL_DATA) include/iconv.h $(DESTDIR)$(includedir)/giconv.h
- cd man && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' mandir='$(mandir)'
-
- installdirs : force
-@@ -63,7 +63,7 @@
- cd libcharset && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
- cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
- cd src && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
-- $(RM) $(DESTDIR)$(includedir)/iconv.h
-+ $(RM) $(DESTDIR)$(includedir)/giconv.h
- cd man && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' mandir='$(mandir)'
-
- check : all force
diff --git a/converters/libiconv/files/patch-ab b/converters/libiconv/files/patch-ab
deleted file mode 100644
index 42b47d294478..000000000000
--- a/converters/libiconv/files/patch-ab
+++ /dev/null
@@ -1,25 +0,0 @@
---- src/Makefile.in Mon Jun 25 17:58:00 2001
-+++ src/Makefile.in Thu Aug 23 10:16:07 2001
-@@ -41,8 +41,8 @@
-
--iconv : $(srcdir)/iconv.c ../lib/libiconv.la
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) $(srcdir)/iconv.c ../lib/libiconv.la -o $@
-+iconv : $(srcdir)/iconv.c ../lib/libgiconv.la
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) -I../lib $(CFLAGS) $(CPPFLAGS) $(srcdir)/iconv.c ../lib/libgiconv.la -o $@
-
- # The following rule is necessary to avoid a toplevel "make -n check" failure.
--../lib/libiconv.la :
-- cd ../lib && $(MAKE) libiconv.la
-+../lib/libgiconv.la :
-+ cd ../lib && $(MAKE) libgiconv.la
-
-@@ -51,3 +51,3 @@
- if [ ! -d $(DESTDIR)$(bindir) ] ; then mkdir $(DESTDIR)$(bindir) ; fi
-- $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv $(DESTDIR)$(bindir)/iconv
-+ $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) iconv $(DESTDIR)$(bindir)/giconv
-
-@@ -59,3 +59,3 @@
- uninstall : force
-- $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(bindir)/iconv
-+ $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(bindir)/giconv
-
diff --git a/converters/libiconv/files/patch-ac b/converters/libiconv/files/patch-ac
index b0d7bad26d44..94e8629943cb 100644
--- a/converters/libiconv/files/patch-ac
+++ b/converters/libiconv/files/patch-ac
@@ -12,26 +12,3 @@ $FreeBSD$
htmldir = $(docdir)
# Programs used by "make":
-@@ -32,9 +32,8 @@
- if [ ! -d $(DESTDIR)$(prefix) ] ; then mkdir $(DESTDIR)$(prefix) ; fi
- if [ ! -d $(DESTDIR)$(mandir) ] ; then mkdir $(DESTDIR)$(mandir) ; fi
- if [ ! -d $(DESTDIR)$(mandir)/man1 ] ; then mkdir $(DESTDIR)$(mandir)/man1 ; fi
-- cd $(srcdir) && for f in *.1 ; do echo $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/$$f ; $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/$$f ; done
-+ cd $(srcdir) && for f in *.1 ; do echo $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/$$f ; $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man1/g$$f ; done
- if [ ! -d $(DESTDIR)$(mandir)/man3 ] ; then mkdir $(DESTDIR)$(mandir)/man3 ; fi
-- cd $(srcdir) && for f in *.3 ; do echo $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man3/$$f ; $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man3/$$f ; done
-+ cd $(srcdir) && for f in *.3 ; do echo $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man3/$$f ; $(INSTALL_DATA) $$f $(DESTDIR)$(mandir)/man3/g$$f ; done
-- if [ ! -d $(DESTDIR)$(prefix)/doc ] ; then mkdir $(DESTDIR)$(prefix)/doc ; fi
- if [ ! -d $(DESTDIR)$(docdir) ] ; then mkdir $(DESTDIR)$(docdir) ; fi
- if [ ! -d $(DESTDIR)$(htmldir) ] ; then mkdir $(DESTDIR)$(htmldir) ; fi
-@@ -50,8 +50,8 @@
- if [ ! -d $(DESTDIR)$(htmldir) ] ; then mkdir $(DESTDIR)$(htmldir) ; fi
-
- uninstall : force
-- cd $(srcdir) && for f in *.1 ; do echo $(RM) $(DESTDIR)$(mandir)/man1/$$f ; $(RM) $(DESTDIR)$(mandir)/man1/$$f ; done
-- cd $(srcdir) && for f in *.3 ; do echo $(RM) $(DESTDIR)$(mandir)/man3/$$f ; $(RM) $(DESTDIR)$(mandir)/man3/$$f ; done
-+ cd $(srcdir) && for f in *.1 ; do echo $(RM) $(DESTDIR)$(mandir)/man1/$$f ; $(RM) $(DESTDIR)$(mandir)/man1/g$$f ; done
-+ cd $(srcdir) && for f in *.3 ; do echo $(RM) $(DESTDIR)$(mandir)/man3/$$f ; $(RM) $(DESTDIR)$(mandir)/man3/g$$f ; done
- cd $(srcdir) && for f in *.html ; do echo $(RM) $(DESTDIR)$(htmldir)/$$f ; $(RM) $(DESTDIR)$(htmldir)/$$f ; done
-
- check :
diff --git a/converters/libiconv/files/patch-ad b/converters/libiconv/files/patch-ad
index 68d5533c69a6..e1d8a76d5079 100644
--- a/converters/libiconv/files/patch-ad
+++ b/converters/libiconv/files/patch-ad
@@ -2,99 +2,13 @@
$FreeBSD$
--- lib/Makefile.in.orig Thu Jun 28 01:37:49 2001
-+++ lib/Makefile.in Mon Aug 27 12:31:31 2001
-@@ -1,4 +1,4 @@
--# Makefile for libiconv/lib
-+# Makefile for libgiconv/lib
-
- #### Start of system configuration section. ####
-
++++ lib/Makefile.in Sun Mar 17 11:34:57 2002
@@ -39,7 +39,7 @@
# Before making a release, change this according to the libtool documentation,
# section "Library interface versions".
-LIBICONV_VERSION_INFO = 2:4:0
-+LIBICONV_VERSION_INFO = 2
++LIBICONV_VERSION_INFO = 3
# Needed by $(LIBTOOL).
top_builddir = ..
-@@ -50,31 +50,31 @@
-
- LIBCHARSET_OBJECTS = ../libcharset/lib/localcharset.lo
-
--all : @PLUGLIB@ libiconv.la
-+all : @PLUGLIB@ libgiconv.la
-
--libiconv.la : $(OBJECTS)
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS) $(LIBCHARSET_OBJECTS)
-+libgiconv.la : $(OBJECTS)
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libgiconv.la -rpath $(libdir) -version-info $(LIBICONV_VERSION_INFO) -no-undefined $(OBJECTS) $(LIBCHARSET_OBJECTS)
-
--libiconv_plug.so : libiconv_plug_@OS@.so
-- $(RM) libiconv_plug.so
-- $(LN_S) libiconv_plug_@OS@.so libiconv_plug.so
-+libgiconv_plug.so : libgiconv_plug_@OS@.so
-+ $(RM) libgiconv_plug.so
-+ $(LN_S) libgiconv_plug_@OS@.so libgiconv_plug.so
-
--libiconv_plug_linux.so : $(SOURCES)
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -shared -o libiconv_plug_linux.so
-+libgiconv_plug_linux.so : $(SOURCES)
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -shared -o libgiconv_plug_linux.so
-
--libiconv_plug_solaris.so : $(SOURCES)
-+libgiconv_plug_solaris.so : $(SOURCES)
- if test -n "@GCC@"; then \
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -G -o libiconv_plug_solaris.so; \
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -G -o libgiconv_plug_solaris.so; \
- else \
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -G -o libiconv_plug_solaris.so; \
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -KPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -G -o libgiconv_plug_solaris.so; \
- fi
-
--libiconv_plug_osf.so : $(SOURCES)
-+libgiconv_plug_osf.so : $(SOURCES)
- if test -n "@GCC@"; then \
-- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -shared -o libiconv_plug_osf.so; \
-+ $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -fPIC -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -shared -o libgiconv_plug_osf.so; \
- else \
- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -DPIC -DLIBICONV_PLUG $(SOURCES) $(LIBCHARSET_OBJECTS) -c -o iconv_plug.o; \
-- /bin/ld -shared -expect_unresolved \* -o libiconv_plug_osf.so iconv_plug.o; \
-+ /bin/ld -shared -expect_unresolved \* -o libgiconv_plug_osf.so iconv_plug.o; \
- fi
-
- iconv.lo : $(srcdir)/iconv.c $(srcdir)/converters.h $(srcdir)/encodings.def $(srcdir)/encodings_aix.def $(srcdir)/encodings_osf1.def $(srcdir)/encodings_dos.def $(srcdir)/encodings_local.def $(srcdir)/aliases.h $(srcdir)/aliases_aix.h $(srcdir)/aliases_osf1.h $(srcdir)/aliases_dos.h $(srcdir)/flags.h
-@@ -84,13 +84,13 @@
- # $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
- install-lib : all force
- if [ ! -d $(libdir) ] ; then mkdir $(libdir) ; fi
-- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libiconv.la $(libdir)/libiconv.la
-+ $(LIBTOOL_INSTALL) $(INSTALL_DATA) libgiconv.la $(libdir)/libgiconv.la
-
- install : all force
- if [ ! -d $(DESTDIR)$(prefix) ] ; then mkdir $(DESTDIR)$(prefix) ; fi
- if [ ! -d $(DESTDIR)$(exec_prefix) ] ; then mkdir $(DESTDIR)$(exec_prefix) ; fi
- if [ ! -d $(DESTDIR)$(libdir) ] ; then mkdir $(DESTDIR)$(libdir) ; fi
-- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libiconv.la $(DESTDIR)$(libdir)/libiconv.la
-+ $(LIBTOOL_INSTALL) $(INSTALL_DATA) libgiconv.la $(DESTDIR)$(libdir)/libgiconv.la
- if test -n "@PLUGLIB@"; then $(INSTALL_DATA) @PLUGLIB@ $(DESTDIR)$(libdir)/@PLUGLIB@.new && mv $(DESTDIR)$(libdir)/@PLUGLIB@.new $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
-
- installdirs : force
-@@ -99,7 +99,7 @@
- if [ ! -d $(DESTDIR)$(libdir) ] ; then mkdir $(DESTDIR)$(libdir) ; fi
-
- uninstall : force
-- $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libiconv.la
-+ $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libgiconv.la
- if test -n "@PLUGLIB@"; then $(RM) $(DESTDIR)$(libdir)/@PLUGLIB@ ; fi
-
- check : all
-@@ -107,7 +107,7 @@
- mostlyclean : clean
-
- clean : force
-- $(RM) *.o *.lo *.a *.la libiconv_plug* core so_locations
-+ $(RM) *.o *.lo *.a *.la libgiconv_plug* core so_locations
- $(RM) -r .libs _libs
-
- distclean : clean
diff --git a/converters/libiconv/files/patch-ae b/converters/libiconv/files/patch-ae
index 3357d4489461..a399c04d1235 100644
--- a/converters/libiconv/files/patch-ae
+++ b/converters/libiconv/files/patch-ae
@@ -20,15 +20,6 @@ $FreeBSD$
# Needed by $(LIBTOOL).
top_builddir = ..
-@@ -53,7 +54,7 @@
- $(LIBTOOL_LINK) $(CC) $(LDFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS)
-
- localcharset.lo : $(srcdir)/localcharset.c
-- $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H -DLIBDIR=\"$(libdir)\" -c $(srcdir)/localcharset.c
-+ $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) -DHAVE_CONFIG_H -DLIBDIR=\"$(sysconfdir)\" -c $(srcdir)/localcharset.c
-
- charset.alias: $(srcdir)/config.charset
- $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
@@ -72,11 +73,12 @@
install-lib : all force
$(MKINSTALLDIRS) $(libdir)
diff --git a/converters/libiconv/files/patch-include::iconv.h.in b/converters/libiconv/files/patch-include::iconv.h.in
new file mode 100644
index 000000000000..625de57a1494
--- /dev/null
+++ b/converters/libiconv/files/patch-include::iconv.h.in
@@ -0,0 +1,48 @@
+
+$FreeBSD$
+
+--- include/iconv.h.in.orig Mon Jun 25 15:06:22 2001
++++ include/iconv.h.in Sun Mar 17 15:41:14 2002
+@@ -21,6 +21,10 @@
+ #ifndef _LIBICONV_H
+ #define _LIBICONV_H
+
++#ifdef __FreeBSD__
++#define LIBICONV_PLUG
++#endif
++
+ #define _LIBICONV_VERSION 0x0107 /* version number: (major<<8) + minor */
+ extern int _libiconv_version; /* Likewise */
+
+@@ -68,6 +72,8 @@
+ encoding `tocode'. */
+ #ifndef LIBICONV_PLUG
+ #define iconv_open libiconv_open
++#else
++#define libiconv_open iconv_open
+ #endif
+ extern iconv_t iconv_open (const char* tocode, const char* fromcode);
+
+@@ -78,17 +84,21 @@
+ Decrements `*outbytesleft' and increments `*outbuf' by the same amount. */
+ #ifndef LIBICONV_PLUG
+ #define iconv libiconv
++#else
++#define libiconv iconv
+ #endif
+ extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
+
+ /* Frees resources allocated for conversion descriptor `cd'. */
+ #ifndef LIBICONV_PLUG
+ #define iconv_close libiconv_close
++#else
++#define libiconv_close iconv_close
+ #endif
+ extern int iconv_close (iconv_t cd);
+
+
+-#ifndef LIBICONV_PLUG
++#if !defined(LIBICONV_PLUG) || defined(__FreeBSD__)
+
+ /* Nonstandard extensions. */
+
diff --git a/converters/libiconv/files/patch-lib::iconv.c b/converters/libiconv/files/patch-lib::iconv.c
new file mode 100644
index 000000000000..dbbc94f4e0cc
--- /dev/null
+++ b/converters/libiconv/files/patch-lib::iconv.c
@@ -0,0 +1,58 @@
+
+$FreeBSD$
+
+--- lib/iconv.c.orig Sat May 26 03:25:09 2001
++++ lib/iconv.c Sun Mar 17 15:47:32 2002
+@@ -176,6 +176,13 @@
+ }
+ #endif
+
++#undef libiconv_open
++
++iconv_t libiconv_open (const char* tocode, const char* fromcode)
++{
++ return (iconv_open(tocode, fromcode));
++}
++
+ iconv_t iconv_open (const char* tocode, const char* fromcode)
+ {
+ struct conv_struct * cd;
+@@ -358,6 +365,15 @@
+ return (iconv_t)(-1);
+ }
+
++#undef libiconv
++
++size_t libiconv (iconv_t icd,
++ ICONV_CONST char* * inbuf, size_t *inbytesleft,
++ char* * outbuf, size_t *outbytesleft)
++{
++ return (iconv(icd, inbuf, inbytesleft, outbuf, outbytesleft));
++}
++
+ size_t iconv (iconv_t icd,
+ ICONV_CONST char* * inbuf, size_t *inbytesleft,
+ char* * outbuf, size_t *outbytesleft)
+@@ -371,6 +387,13 @@
+ outbuf,outbytesleft);
+ }
+
++#undef libiconv_close
++
++int libiconv_close (iconv_t icd)
++{
++ return (iconv_close(icd));
++}
++
+ int iconv_close (iconv_t icd)
+ {
+ conv_t cd = (conv_t) icd;
+@@ -378,7 +401,7 @@
+ return 0;
+ }
+
+-#ifndef LIBICONV_PLUG
++#if !defined(LIBICONV_PLUG) || defined(__FreeBSD__)
+
+ int iconvctl (iconv_t icd, int request, void* argument)
+ {
diff --git a/converters/libiconv/pkg-plist b/converters/libiconv/pkg-plist
index 728cd6bc5afa..5ea01741037d 100644
--- a/converters/libiconv/pkg-plist
+++ b/converters/libiconv/pkg-plist
@@ -1,12 +1,16 @@
bin/giconv
+bin/iconv
include/giconv.h
+include/iconv.h
include/libcharset.h
lib/libcharset.a
lib/libcharset.so
lib/libcharset.so.1
lib/libgiconv.a
lib/libgiconv.so
-lib/libgiconv.so.2
+lib/libiconv.a
+lib/libiconv.so
+lib/libiconv.so.3
libdata/charset.alias
share/doc/libiconv/iconv.1.html
share/doc/libiconv/iconv.3.html