On Thu, Mar 25, 2010 at 10:05:36AM +0100, Landry Breuil wrote:
> I spoke too fast.. it builds, but fails to link. UNICODE_LIBS in webkit
> makefiles is empty, as icu-config fails.
>
> ### icu-config: Can't find /usr/local/lib/libicuuc.so.*.* - ICU prefix
> is wrong.
> ### Try the --prefix= option
> ### or --detect-prefix
> ### (If you want to disable this check, use the --noverify option)
> ### icu-config: Exitting.
>
> $ls -l /usr/local/lib/libicuuc.so.*.*
> -r-xr-xr-x 1 root bin 1384208 Mar 24 17:37
> /usr/local/lib/libicuuc.so.3.0*
>
> But if i disable their internal sanity check, it works :
>
> $/usr/local/bin/icu-config --noverify --ldflags-libsonly
> -licui18n -licuuc -licudata
>
> so icu-config might need a second look. Did you actually test to compile
> anything depending on icu ?
>
> I dunno how icu4c 4.2 was, but it worked and linked webkit fine.
>
This diff fixes the same problem as the other, and builds the static icu
libraries. Now the configure script provides a convenient way to build both
static and shared libraries. It increases the package size, but allow for more
case coverage.
Cheers,
--
Vincent / dermiste
Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/icu4c/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile 12 Oct 2009 11:18:40 -0000 1.10
+++ Makefile 4 Apr 2010 09:27:35 -0000
@@ -1,14 +1,12 @@
# $OpenBSD: Makefile,v 1.10 2009/10/12 11:18:40 sthen Exp $
-SHARED_ONLY= Yes
-
COMMENT= International Components for Unicode
-VERSION= 4.2.1
+VERSION= 4.4
DISTNAME= icu4c-${VERSION:S/./_/g}-src
PKGNAME= icu4c-${VERSION}
-SO_VERSION= 2.0
-.for _lib in icudata icui18n icuio icule iculx icutu icuuc
+SO_VERSION= 3.0
+.for _lib in icudata icui18n icuio icule iculx icutest icutu icuuc
SHARED_LIBS+= ${_lib} ${SO_VERSION}
.endfor
SUBST_VARS+= VERSION
@@ -16,7 +14,7 @@
HOMEPAGE= http://www.icu-project.org
-MAINTAINER= Vincent Gross <[email protected]>
+MAINTAINER= Vincent Gross <[email protected]>
# ICU
# http://source.icu-project.org/repos/icu/icu/trunk/license.html
@@ -33,6 +31,7 @@
USE_GMAKE= Yes
CONFIGURE_STYLE= gnu
CONFIGURE_ARGS+= ${CONFIGURE_SHARED} \
+ --enable-static \
--disable-renaming \
--disable-extras \
--disable-samples
@@ -47,6 +46,10 @@
PKGDATA_INVOKE_OPTS="SO_TARGET_VERSION=${SO_VERSION}
SO_TARGET_VERSION_MAJOR=${SO_VERSION:R}"
post-install:
+# Bug #7506, #7567 and #7574, libicutest is not installed
+ ${INSTALL_PROGRAM} ${WRKBUILD}/tools/ctestfw/libicutest.a ${PREFIX}/lib/
+ ${INSTALL_PROGRAM} ${WRKBUILD}/tools/ctestfw/libicutest.so.3.0
${PREFIX}/lib/
+# who needs those annoying symlinks ?
find ${PREFIX}/lib -type l -name 'libicu*.so*' -exec rm '{}' \;
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/textproc/icu4c/distinfo,v
retrieving revision 1.5
diff -u -r1.5 distinfo
--- distinfo 12 Oct 2009 11:18:40 -0000 1.5
+++ distinfo 4 Apr 2010 09:27:35 -0000
@@ -1,5 +1,5 @@
-MD5 (icu4c-4_2_1-src.tgz) = 43OKvQ084YcNwf0fIrulsQ==
-RMD160 (icu4c-4_2_1-src.tgz) = G5QxehF8QNVk7AR8/5yy3i3jvZ4=
-SHA1 (icu4c-4_2_1-src.tgz) = hyp3/KUTJasLM1y7rcFzlXYHhDQ=
-SHA256 (icu4c-4_2_1-src.tgz) = gU3jHhQT35Rc3TSTm0JMTPepTRxIHy1EyZyMpSsogGM=
-SIZE (icu4c-4_2_1-src.tgz) = 13161131
+MD5 (icu4c-4_4-src.tgz) = Nrd+aOc/Dun3u4YmKeMzQg==
+RMD160 (icu4c-4_4-src.tgz) = 73d7oTJMztK029FDjtdUPq8RXWM=
+SHA1 (icu4c-4_4-src.tgz) = bwH+cA5LoDWIjBDsfpZOF3LH9iY=
+SHA256 (icu4c-4_4-src.tgz) = lsqrAR54SwBM5YZ2Zf5xFAKlPrbRmogX9YLIGXEfk/M=
+SIZE (icu4c-4_4-src.tgz) = 16428350
Index: patches/patch-source_Makefile_in
===================================================================
RCS file: /cvs/ports/textproc/icu4c/patches/patch-source_Makefile_in,v
retrieving revision 1.3
diff -u -r1.3 patch-source_Makefile_in
--- patches/patch-source_Makefile_in 7 Jun 2009 00:54:43 -0000 1.3
+++ patches/patch-source_Makefile_in 4 Apr 2010 09:27:35 -0000
@@ -1,7 +1,7 @@
-$OpenBSD: patch-source_Makefile_in,v 1.3 2009/06/07 00:54:43 landry Exp $
---- source/Makefile.in.orig Fri May 8 18:13:08 2009
-+++ source/Makefile.in Sat May 9 20:17:36 2009
-@@ -210,8 +210,8 @@ $(top_builddir)/config/pkgdataMakefile:
+$OpenBSD$
+--- source/Makefile.in.orig Tue Mar 16 06:15:14 2010
++++ source/Makefile.in Sat Apr 3 14:53:41 2010
+@@ -216,8 +216,8 @@ $(top_builddir)/config/pkgdataMakefile:
$(top_builddir)/config/icu-config: $(top_builddir)/Makefile
$(top_srcdir)/config/icu-config-top $(top_srcdir)/config/icu-config-bottom
$(top_builddir)/config/Makefile.inc @platform_make_fragment@
$(top_srcdir)/config/make2sh.sed
-$(RMV) $@
Index: patches/patch-source_common_Makefile_in
===================================================================
RCS file: /cvs/ports/textproc/icu4c/patches/patch-source_common_Makefile_in,v
retrieving revision 1.4
diff -u -r1.4 patch-source_common_Makefile_in
--- patches/patch-source_common_Makefile_in 27 Jan 2009 22:11:15 -0000
1.4
+++ patches/patch-source_common_Makefile_in 4 Apr 2010 09:27:35 -0000
@@ -1,12 +1,12 @@
-$OpenBSD: patch-source_common_Makefile_in,v 1.4 2009/01/27 22:11:15 landry Exp
$
---- source/common/Makefile.in.orig Mon Sep 22 21:03:28 2008
-+++ source/common/Makefile.in Wed Oct 29 11:51:13 2008
-@@ -62,7 +62,7 @@ CPPFLAGS += -I$(top_builddir)/common
- endif
- CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/i18n $(LIBCPPFLAGS)
- DEFS += -DU_COMMON_IMPLEMENTATION
+$OpenBSD$
+--- source/common/Makefile.in.orig Sat Mar 20 11:18:11 2010
++++ source/common/Makefile.in Sat Mar 20 11:19:31 2010
+@@ -63,7 +63,7 @@ endif
+ CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUUC)
+ # we want DEFS here, because we want icucfg.h
+ DEFS += -DU_COMMON_IMPLEMENTATION @DEFS@
-LDFLAGS += $(LDFLAGSICUUC)
+LDFLAGS += -fPIC $(LDFLAGSICUUC)
- # $(LIBICUDT) is either stub data or the real DLL common data.
- LIBS = $(LIBICUDT) $(DEFAULT_LIBS)
+ # for plugin configuration
+ CPPFLAGS += "-DDEFAULT_ICU_PLUGINS=\"$(libdir)/icu\" "
Index: patches/patch-source_config_Makefile_inc_in
===================================================================
RCS file: patches/patch-source_config_Makefile_inc_in
diff -N patches/patch-source_config_Makefile_inc_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_config_Makefile_inc_in 4 Apr 2010 09:27:35 -0000
@@ -0,0 +1,15 @@
+There is no good reason to use different names for static and shared
+libraries
+
+$OpenBSD$
+--- source/config/Makefile.inc.in.orig Fri Apr 2 17:46:18 2010
++++ source/config/Makefile.inc.in Fri Apr 2 17:50:16 2010
+@@ -44,7 +44,7 @@ PACKAGE = @PACKAGE@
+ LIBICU = lib$(ICUPREFIX)
+
+ # Static library prefix and file extension
+-STATIC_PREFIX = s
++STATIC_PREFIX =
+ LIBSICU = lib$(STATIC_PREFIX)$(ICUPREFIX)
+ A = a
+
Index: patches/patch-source_config_icu-config-bottom
===================================================================
RCS file:
/cvs/ports/textproc/icu4c/patches/patch-source_config_icu-config-bottom,v
retrieving revision 1.4
diff -u -r1.4 patch-source_config_icu-config-bottom
--- patches/patch-source_config_icu-config-bottom 7 Jun 2009 00:54:43
-0000 1.4
+++ patches/patch-source_config_icu-config-bottom 4 Apr 2010 09:27:35
-0000
@@ -1,16 +1,18 @@
-$OpenBSD: patch-source_config_icu-config-bottom,v 1.4 2009/06/07 00:54:43
landry Exp $
---- source/config/icu-config-bottom.orig Fri May 8 18:12:32 2009
-+++ source/config/icu-config-bottom Sat May 9 20:17:36 2009
-@@ -3,7 +3,7 @@
- ## Copyright (c) 2002-2008, International Business Machines Corporation and
+$OpenBSD$
+--- source/config/icu-config-bottom.orig Tue Mar 16 06:14:02 2010
++++ source/config/icu-config-bottom Sun Apr 4 10:11:32 2010
+@@ -3,8 +3,8 @@
+ ## Copyright (c) 2002-2010, International Business Machines Corporation and
## others. All Rights Reserved.
--ICUUC_FILE=${libdir}/${ICULIBS_COMMON_LIB_NAME}
-+ICUUC_FILE=${libdir}/${ICULIBS_COMMON_LIB_NAME}.*.*
+-ICUUC_FILE="${libdir}/${ICULIBS_COMMON_LIB_NAME}"
+-ICUUC_FILE_A="${libdir}/${ICULIBS_COMMON_LIB_NAME_A}"
++ICUUC_FILE="${ICULIBS_COMMON_LIB_NAME}.*.*"
++ICUUC_FILE_A="${ICULIBS_COMMON_LIB_NAME_A}"
# echo ENABLE RPATH $ENABLE_RPATH and RPATHLDFLAGS=${RPATH_LDFLAGS}
if [ "x$PKGDATA_MODE" = "x" ]; then
-@@ -45,7 +45,7 @@ allflags()
+@@ -47,7 +47,7 @@ allflags()
echo " --ldflags-layout Print ICU layout engine link directive.
Use in addition to --ldflags"
echo " --ldflags-libsonly Same as --ldflags, but only the -l
directives"
echo " --ldflags-searchpath Print only -L (search path) directive"
@@ -19,3 +21,13 @@
echo " --ldflags-icuio Print ICU icuio link directive. Use in
addition to --ldflags "
echo " --ldflags-obsolete Print ICU obsolete link directive. Use in
addition to --ldflags. (requires icuapps/obsolete to be built and installed.) "
echo " --mandir Print manpage (man) path"
+@@ -94,7 +94,8 @@ usage()
+ ## Check the sanity of current variables
+ sanity()
+ {
+- if [ ! -f "${ICUUC_FILE}" -a ! -f "${ICUUC_FILE_A}" ] && [
${IGNORE_ICUUC_FILE_CHECK} = "no" ] && [ ${SANITY} = "sane" ];
++ libcnt=`find ${libdir} -name ${ICUUC_FILE} -o -name ${ICUUC_FILE_A} |
wc -l`
++ if [ ${libcnt} -lt 1 ] && [ ${IGNORE_ICUUC_FILE_CHECK} = "no" ] && [
${SANITY} = "sane" ];
+ then
+ echo "### $ME: Can't find ${ICUUC_FILE} - ICU prefix is wrong." 1>&2
+ echo "### Try the --prefix= option " 1>&2
Index: patches/patch-source_config_mh-bsd-gcc
===================================================================
RCS file: /cvs/ports/textproc/icu4c/patches/patch-source_config_mh-bsd-gcc,v
retrieving revision 1.2
diff -u -r1.2 patch-source_config_mh-bsd-gcc
--- patches/patch-source_config_mh-bsd-gcc 27 Jan 2009 22:11:15 -0000
1.2
+++ patches/patch-source_config_mh-bsd-gcc 4 Apr 2010 09:27:35 -0000
@@ -2,8 +2,8 @@
Prevents build system from setting DT_SONAME into shared libs.
---- source/config/mh-bsd-gcc.orig Thu Jan 15 08:46:10 2009
-+++ source/config/mh-bsd-gcc Sat Jan 24 13:35:37 2009
+--- source/config/mh-bsd-gcc.orig Tue Mar 16 06:14:02 2010
++++ source/config/mh-bsd-gcc Sat Mar 20 11:16:31 2010
@@ -21,7 +21,7 @@ LD_RPATH=
LD_RPATH_PRE= -Wl,-rpath,
@@ -11,5 +11,5 @@
-LD_SONAME = -Wl,-soname -Wl,$(notdir $(MIDDLE_SO_TARGET))
+LD_SONAME =
- ## Shared object suffix
- SO = so
+ ## Shared library options
+ LD_SOOPTIONS= -Wl,-Bsymbolic
Index: patches/patch-source_configure
===================================================================
RCS file: /cvs/ports/textproc/icu4c/patches/patch-source_configure,v
retrieving revision 1.6
diff -u -r1.6 patch-source_configure
--- patches/patch-source_configure 7 Jun 2009 00:54:43 -0000 1.6
+++ patches/patch-source_configure 4 Apr 2010 09:27:35 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-source_configure,v 1.6 2009/06/07 00:54:43 landry Exp $
---- source/configure.orig Sat May 9 20:22:27 2009
-+++ source/configure Sat May 9 20:21:03 2009
-@@ -5588,13 +5588,13 @@ if test $threads = true; then
+--- source/configure.orig Tue Mar 16 06:15:14 2010
++++ source/configure Sat Mar 20 11:16:31 2010
+@@ -6915,13 +6915,13 @@ if test $threads = true; then
# moving on to a more generic test
@@ -18,7 +18,7 @@
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
-@@ -5658,7 +5658,7 @@ if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""y
+@@ -6985,7 +6985,7 @@ if test "x$ac_cv_lib_pthread_pthread_attr_init" = x""y
#define HAVE_LIBPTHREAD 1
_ACEOF
@@ -27,7 +27,7 @@
fi
-@@ -5809,13 +5809,13 @@ fi
+@@ -7136,13 +7136,13 @@ fi
else
# For HP 11
@@ -44,7 +44,7 @@
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
-@@ -5879,7 +5879,7 @@ if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""
+@@ -7206,7 +7206,7 @@ if test "x$ac_cv_lib_pthread_pthread_mutex_init" = x""
#define HAVE_LIBPTHREAD 1
_ACEOF
Index: patches/patch-source_icudefs_mk_in
===================================================================
RCS file: patches/patch-source_icudefs_mk_in
diff -N patches/patch-source_icudefs_mk_in
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-source_icudefs_mk_in 4 Apr 2010 09:27:35 -0000
@@ -0,0 +1,15 @@
+There is no good reason to use different names for static and shared
+libraries
+
+$OpenBSD$
+--- source/icudefs.mk.in.orig Fri Apr 2 18:09:15 2010
++++ source/icudefs.mk.in Fri Apr 2 18:10:15 2010
+@@ -193,7 +193,7 @@ STATIC_PREFIX_WHEN_USED =
+ endif
+
+ # Static library prefix and file extension
+-STATIC_PREFIX = s
++STATIC_PREFIX =
+ LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX)
+ A = a
+ SOBJ = $(SO)
Index: pkg/PFRAG.shared
===================================================================
RCS file: pkg/PFRAG.shared
diff -N pkg/PFRAG.shared
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/PFRAG.shared 4 Apr 2010 09:27:35 -0000
@@ -0,0 +1,9 @@
+...@comment $OpenBSD$
+...@lib lib/libicudata.so.${LIBicudata_VERSION}
+...@lib lib/libicui18n.so.${LIBicui18n_VERSION}
+...@lib lib/libicuio.so.${LIBicuio_VERSION}
+...@lib lib/libicule.so.${LIBicule_VERSION}
+...@lib lib/libiculx.so.${LIBiculx_VERSION}
+...@lib lib/libicutest.so.${LIBicutest_VERSION}
+...@lib lib/libicutu.so.${LIBicutu_VERSION}
+...@lib lib/libicuuc.so.${LIBicuuc_VERSION}
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/icu4c/pkg/PLIST,v
retrieving revision 1.5
diff -u -r1.5 PLIST
--- pkg/PLIST 7 Jun 2009 00:54:43 -0000 1.5
+++ pkg/PLIST 4 Apr 2010 09:27:35 -0000
@@ -6,6 +6,7 @@
@bin bin/genctd
@bin bin/genrb
bin/icu-config
+...@bin bin/icuinfo
@bin bin/makeconv
@bin bin/pkgdata
include/layout/
@@ -54,12 +55,18 @@
include/unicode/fieldpos.h
include/unicode/fmtable.h
include/unicode/format.h
+include/unicode/fpositer.h
include/unicode/gregocal.h
+include/unicode/icudataver.h
+include/unicode/icuplug.h
+include/unicode/localpointer.h
+include/unicode/locdspnm.h
include/unicode/locid.h
include/unicode/measfmt.h
include/unicode/measunit.h
include/unicode/measure.h
include/unicode/msgfmt.h
+include/unicode/normalizer2.h
include/unicode/normlzr.h
include/unicode/numfmt.h
include/unicode/numsys.h
@@ -69,6 +76,7 @@
include/unicode/plurfmt.h
include/unicode/plurrule.h
include/unicode/ppalmos.h
+include/unicode/ptypes.h
include/unicode/putil.h
include/unicode/pwin32.h
include/unicode/rbbi.h
@@ -79,6 +87,7 @@
include/unicode/resbund.h
include/unicode/schriter.h
include/unicode/search.h
+include/unicode/selfmt.h
include/unicode/simpletz.h
include/unicode/smpdtfmt.h
include/unicode/sortkey.h
@@ -121,6 +130,7 @@
include/unicode/uidna.h
include/unicode/uintrnal.h
include/unicode/uiter.h
+include/unicode/uldnames.h
include/unicode/uloc.h
include/unicode/ulocdata.h
include/unicode/umachine.h
@@ -133,6 +143,7 @@
include/unicode/uniset.h
include/unicode/unistr.h
include/unicode/unorm.h
+include/unicode/unorm2.h
include/unicode/unum.h
include/unicode/uobject.h
include/unicode/uobslete.h
@@ -161,6 +172,7 @@
include/unicode/utrace.h
include/unicode/utrans.h
include/unicode/utypes.h
+include/unicode/uvernum.h
include/unicode/uversion.h
include/unicode/vtzone.h
lib/icu/
@@ -170,13 +182,14 @@
lib/icu/Makefile.inc
lib/icu/current
lib/icu/pkgdata.inc
-...@lib lib/libicudata.so.${LIBicudata_VERSION}
-...@lib lib/libicui18n.so.${LIBicui18n_VERSION}
-...@lib lib/libicuio.so.${LIBicuio_VERSION}
-...@lib lib/libicule.so.${LIBicule_VERSION}
-...@lib lib/libiculx.so.${LIBiculx_VERSION}
-...@lib lib/libicutu.so.${LIBicutu_VERSION}
-...@lib lib/libicuuc.so.${LIBicuuc_VERSION}
+lib/libicudata.a
+lib/libicui18n.a
+lib/libicuio.a
+lib/libicule.a
+lib/libiculx.a
+lib/libicutest.a
+lib/libicutu.a
+lib/libicuuc.a
@man man/man1/derb.1
@man man/man1/genbrk.1
@man man/man1/gencnval.1
@@ -192,6 +205,7 @@
@man man/man8/icupkg.8
@bin sbin/genccode
@bin sbin/gencmn
+...@bin sbin/gennorm2
@bin sbin/gensprep
@bin sbin/genuca
@bin sbin/icupkg
@@ -202,3 +216,4 @@
@comment share/icu/${VERSION}/install-sh
share/icu/${VERSION}/license.html
@comment share/icu/${VERSION}/mkinstalldirs
+%%SHARED%%