Skip to content

Commit 6a88793

Browse files
committed
Provide pkgconfig files for icu
The CMake build of ICU does not generate pkgconfig files for icu. Unfortunately both harfbuzz and libpsl use meson which strongly prefers pkgconfig files. CMake modules are supported in meson but it fails to associate debug and release builds properly. The pkgconfig files were just generated from a autotools install of icu and copied over. On version bumps these will need to be modified.
1 parent caacd71 commit 6a88793

File tree

7 files changed

+253
-11
lines changed

7 files changed

+253
-11
lines changed

ports/icu/pkgconfig/debug/icu-i18n.pc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/../tools/icu/debug/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/../include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/../share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/../tools/icu/debug/sbin
20+
#mandir = ${datarootdir}/man
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Internationalization library
38+
Name: icu-i18n
39+
Requires.private: icu-uc
40+
Libs: "-L${libdir}" -licuind
41+

ports/icu/pkgconfig/debug/icu-io.pc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/../tools/icu/debug/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/../include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/../share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/../tools/icu/debug/sbin
20+
#mandir = ${datarootdir}/man
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Stream and I/O Library
38+
Name: icu-io
39+
Requires.private: icu-i18n
40+
Libs: "-L${libdir}" -licuiod
41+

ports/icu/pkgconfig/debug/icu-uc.pc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/../tools/icu/debug/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/../include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/../share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/../tools/icu/debug/sbin
20+
#mandir = ${datarootdir}/man
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Common and Data libraries
38+
Name: icu-uc
39+
Libs: "-L${libdir}" -licuucd
40+
Libs.private: -licudtd ${baselibs}
41+
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/tools/icu/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/tools/icu/sbin
20+
#mandir = ${prefix}/share/icu
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Internationalization library
38+
Name: icu-i18n
39+
Requires.private: icu-uc
40+
Libs: "-L${libdir}" -licuin
41+

ports/icu/pkgconfig/release/icu-io.pc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/tools/icu/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/tools/icu/sbin
20+
#mandir = ${prefix}/share/icu
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Stream and I/O Library
38+
Name: icu-io
39+
Requires.private: icu-i18n
40+
Libs: "-L${libdir}" -licuio
41+

ports/icu/pkgconfig/release/icu-uc.pc

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
prefix=${pcfiledir}/../..
2+
# Copyright (C) 2016 and later: Unicode, Inc. and others.
3+
# License & terms of use: http://www.unicode.org/copyright.html
4+
# Copyright (C) 2010-2013, International Business Machines Corporation. All Rights Reserved.
5+
6+
# CFLAGS contains only anything end users should set
7+
CFLAGS =
8+
# CXXFLAGS contains only anything end users should set
9+
CXXFLAGS =
10+
# DEFS only contains those UCONFIG_CPPFLAGS which are not auto-set by platform.h
11+
DEFS =
12+
exec_prefix = ${prefix}
13+
#bindir = ${prefix}/tools/icu/bin
14+
libdir = ${prefix}/lib
15+
includedir = ${prefix}/include
16+
baselibs = -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -lcomdlg32 -ladvapi32
17+
#datarootdir = ${prefix}/share/icu
18+
#datadir = ${datarootdir}
19+
#sbindir = ${prefix}/tools/icu/sbin
20+
#mandir = ${prefix}/share/icu
21+
#sysconfdir = ${prefix}/etc
22+
UNICODE_VERSION=16.0
23+
ICUPREFIX=icu
24+
ICULIBSUFFIX=
25+
LIBICU=lib${ICUPREFIX}
26+
#SHAREDLIBCFLAGS=-fPIC
27+
pkglibdir=${libdir}/icu${ICULIBSUFFIX}/76.1
28+
#pkgdatadir=${datadir}/icu${ICULIBSUFFIX}/76.1
29+
ICUDATA_NAME = icudt76l
30+
#ICUPKGDATA_DIR=${prefix}/lib
31+
#ICUDATA_DIR=${pkgdatadir}
32+
ICUDESC=International Components for Unicode
33+
34+
Version: 76.1
35+
Cflags: "-I${includedir}"
36+
# end of icu.pc.in
37+
Description: International Components for Unicode: Common and Data libraries
38+
Name: icu-uc
39+
Libs: "-L${libdir}" -licuuc
40+
Libs.private: -licudt ${baselibs}
41+

ports/icu/portfile.cmake

+7-11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ vcpkg_cmake_configure(
6161

6262
vcpkg_cmake_install()
6363
vcpkg_copy_pdbs()
64+
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/ICU)
6465
vcpkg_fixup_pkgconfig()
6566

6667
if (ENABLE_TOOLS)
@@ -109,17 +110,12 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/share)
109110
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/sbin)
110111
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/sbin)
111112

112-
# Merge cmake configs
113-
file(COPY
114-
DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu
115-
PATTERN ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/*.cmake
116-
)
117-
file(COPY
118-
DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu
119-
PATTERN ${CURRENT_PACKAGES_DIR}/lib/cmake/*.cmake
120-
)
121-
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
122-
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
113+
# Meson requires a pkgconfig file to properly build libraries with ICU
114+
# The CMake here doesn't create one so just use a generated one
115+
if (VCPKG_TARGET_IS_WINDOWS)
116+
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/release DESTINATION ${CURRENT_PACKAGES_DIR}/lib RENAME pkgconfig)
117+
file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/pkgconfig/debug DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib RENAME pkgconfig)
118+
endif ()
123119

124120
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/icu RENAME copyright)
125121
file(WRITE ${CURRENT_PACKAGES_DIR}/share/icu/version "${VERSION_MAJOR}.${VERSION_MINOR}.0")

0 commit comments

Comments
 (0)