Import of libiconv 1.6.

Submitted by Vladimir Popov <pva48@mail.ru>.

libiconv provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.
It can convert from any of supported encodings to any other, through Unicode
conversion.
This commit is contained in:
naddy 2001-03-12 01:32:04 +00:00
parent 0f08e2d351
commit 3dd3693549
14 changed files with 392 additions and 0 deletions

View File

@ -0,0 +1,22 @@
# $OpenBSD: Makefile,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
DISTNAME= libiconv-1.6
CATEGORIES= converters devel
NEED_VERSION= 1.341
MASTER_SITES= ftp://ftp.ilog.fr/pub/Users/haible/gnu/
HOMEPAGE= http://clisp.cons.org/~haible/packages-libiconv.html
MAINTAINER= Vladimir Popov <pva48@mail.ru>
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS= ${CONFIGURE_SHARED} --enable-static
SEPARATE_BUILD= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,3 @@
MD5 (libiconv-1.6.tar.gz) = e79c022bb2d3e46f8608caa35a01b9f1
RMD160 (libiconv-1.6.tar.gz) = 01ac8876def15a2533cd7c7e0307cca1ecf1b02b
SHA1 (libiconv-1.6.tar.gz) = b760424c77f222f9067d663952342f2867774af6

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-autoconf_ltconfig,v 1.1.1.1 2001/03/12 01:32:05 naddy Exp $
--- autoconf/ltconfig.orig Mon Feb 26 13:52:17 2001
+++ autoconf/ltconfig Mon Mar 12 01:39:20 2001
@@ -1099,6 +1099,9 @@ cygwin* | mingw*)
with_gnu_ld=no
fi
;;
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1396,10 +1399,21 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
- hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ ;;
+ esac
;;
os2*)
@@ -2016,13 +2030,10 @@ netbsd*)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
- fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='pass_all'
;;
os2*)

View File

@ -0,0 +1,84 @@
$OpenBSD: patch-autoconf_ltmain_sh,v 1.1.1.1 2001/03/12 01:32:05 naddy Exp $
--- autoconf/ltmain.sh.orig Wed Feb 21 15:13:29 2001
+++ autoconf/ltmain.sh Mon Mar 12 01:39:12 2001
@@ -1079,7 +1079,18 @@ compiler."
# These systems don't actually have c library (as such)
continue
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ continue
+ ;;
esac
+ elif test "$arg" = "-lc_r"; then
+ case "$host" in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
elif test "$arg" = "-lm"; then
case "$host" in
*-*-cygwin* | *-*-beos*)
@@ -1091,6 +1102,10 @@ compiler."
deplibs="$deplibs $arg"
;;
+ -?thread)
+ deplibs="$deplibs $arg"
+ ;;
+
-module)
module=yes
continue
@@ -1799,6 +1814,9 @@ compiler."
# rhapsody is a little odd...
deplibs="$deplibs -framework System"
;;
+ *-*-openbsd*)
+ # do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems.
deplibs="$deplibs -lc"
@@ -3567,40 +3585,6 @@ libdir='$install_libdir'\
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
exit 0
;;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-lib_Makefile_in,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
--- lib/Makefile.in.orig Tue Mar 6 22:25:06 2001
+++ lib/Makefile.in Wed Mar 7 15:14:43 2001
@@ -79,7 +79,7 @@ iconv.lo : $(srcdir)/iconv.c $(srcdir)/c
# $(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) $(CP) libiconv.la $(libdir)/libiconv.la
install : all force
if [ ! -d $(DESTDIR)$(prefix) ] ; then mkdir $(DESTDIR)$(prefix) ; fi

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libcharset_Makefile_in,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
--- libcharset/Makefile.in.orig Wed Feb 21 00:42:12 2001
+++ libcharset/Makefile.in Wed Mar 7 15:14:43 2001
@@ -38,7 +38,7 @@ all : force
install-lib : all force
cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
$(MKINSTALLDIRS) $(includedir)
- $(INSTALL_DATA) include/libcharset.h $(includedir)/libcharset.h
+ $(CP) include/libcharset.h $(includedir)/libcharset.h
install : force
cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'

View File

@ -0,0 +1,52 @@
$OpenBSD: patch-libcharset_autoconf_ltconfig,v 1.1.1.1 2001/03/12 01:32:05 naddy Exp $
--- libcharset/autoconf/ltconfig.orig Mon Feb 26 13:49:31 2001
+++ libcharset/autoconf/ltconfig Mon Mar 12 01:54:37 2001
@@ -1105,6 +1105,9 @@ cygwin* | mingw*)
with_gnu_ld=no
fi
;;
+openbsd*)
+ with_gnu_ld=no
+ ;;
esac
@@ -1402,10 +1405,21 @@ else
;;
openbsd*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
- hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_shlibpath_var=no
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linkopts'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ if [ "`/usr/bin/file /usr/lib/libc.so.* | grep ELF`" != "" ]; then
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ ;;
+ esac
;;
os2*)
@@ -2021,13 +2035,10 @@ netbsd*)
openbsd*)
version_type=sunos
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- need_version=no
- fi
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
shlibpath_var=LD_LIBRARY_PATH
+ deplibs_check_method='pass_all'
;;
os2*)

View File

@ -0,0 +1,84 @@
$OpenBSD: patch-libcharset_autoconf_ltmain_sh,v 1.1.1.1 2001/03/12 01:32:05 naddy Exp $
--- libcharset/autoconf/ltmain.sh.orig Wed Feb 21 15:09:19 2001
+++ libcharset/autoconf/ltmain.sh Mon Mar 12 01:54:43 2001
@@ -1079,7 +1079,18 @@ compiler."
# These systems don't actually have c library (as such)
continue
;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ continue
+ ;;
esac
+ elif test "$arg" = "-lc_r"; then
+ case "$host" in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
elif test "$arg" = "-lm"; then
case "$host" in
*-*-cygwin* | *-*-beos*)
@@ -1091,6 +1102,10 @@ compiler."
deplibs="$deplibs $arg"
;;
+ -?thread)
+ deplibs="$deplibs $arg"
+ ;;
+
-module)
module=yes
continue
@@ -1799,6 +1814,9 @@ compiler."
# rhapsody is a little odd...
deplibs="$deplibs -framework System"
;;
+ *-*-openbsd*)
+ # do not include libc due to us having libc/libc_r.
+ ;;
*)
# Add libc to deplibs on all other systems.
deplibs="$deplibs -lc"
@@ -3567,40 +3585,6 @@ libdir='$install_libdir'\
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
- for libdir in $libdirs; do
- echo " $libdir"
- done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
- if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
- fi
- if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
- fi
- if test -n "$hardcode_libdir_flag_spec"; then
- libdir=LIBDIR
- eval flag=\"$hardcode_libdir_flag_spec\"
-
- echo " - use the \`$flag' linker flag"
- fi
- if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
- fi
- if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
- fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
exit 0
;;

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-libcharset_lib_Makefile_in,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
--- libcharset/lib/Makefile.in.orig Wed Feb 21 00:42:12 2001
+++ libcharset/lib/Makefile.in Wed Mar 7 15:14:43 2001
@@ -24,6 +24,7 @@ LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=un
# Programs used by "make install":
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
+CP = cp
MKINSTALLDIRS = $(SHELL) $(srcdir)/../autoconf/mkinstalldirs
#### End of system configuration section. ####
@@ -68,11 +69,11 @@ ref-del.sed : $(srcdir)/ref-del.sin
# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
install-lib : all force
$(MKINSTALLDIRS) $(libdir)
- $(LIBTOOL_INSTALL) $(INSTALL_DATA) libcharset.la $(libdir)/libcharset.la
+ $(LIBTOOL_INSTALL) $(CP) libcharset.la $(libdir)/libcharset.la
test -f $(libdir)/charset.alias && orig=$(libdir)/charset.alias \
|| orig=charset.alias; \
sed -f ref-add.sed $$orig > $(libdir)/t-charset.alias; \
- $(INSTALL_DATA) $(libdir)/t-charset.alias $(libdir)/charset.alias; \
+ $(CP) $(libdir)/t-charset.alias $(libdir)/charset.alias; \
rm -f $(libdir)/t-charset.alias
# The following is needed in order to install a simple file in $(libdir)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-libcharset_lib_config_charset,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
--- libcharset/lib/config.charset.orig Tue Mar 6 18:35:16 2001
+++ libcharset/lib/config.charset Wed Mar 7 15:14:43 2001
@@ -235,7 +235,7 @@ case "$os" in
#echo "sun_eu_greek ?" # what is this?
echo "UTF-8 UTF-8"
;;
- freebsd*)
+ *bsd*)
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
# localcharset.c falls back to using the full locale name
# from the environment variables.

View File

@ -0,0 +1 @@
character set conversion library

View File

@ -0,0 +1,15 @@
libiconv provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.
It can convert from any of supported encodings to any other, through Unicode
conversion.
It has also some limited support for transliteration, i.e. when a character
cannot be represented in the target character set, it can be approximated
through one or several similarly looking characters. Transliteration is
activated when "//TRANSLIT" is appended to the target encoding name.
libiconv is for you if your application needs to support multiple character
encodings, but that support lacks from your system.
WWW: ${HOMEPAGE}

View File

@ -0,0 +1,4 @@
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
lib/libcharset.so.1.0
lib/libiconv.so.2.3
DYNLIBDIR(%B)

View File

@ -0,0 +1,14 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2001/03/12 01:32:04 naddy Exp $
bin/iconv
include/iconv.h
include/libcharset.h
lib/charset.alias
lib/libcharset.a
lib/libcharset.la
lib/libiconv.a
lib/libiconv.la
%%SHARED%%
man/man1/iconv.1
man/man3/iconv.3
man/man3/iconv_close.3
man/man3/iconv_open.3