mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 03:59:02 +08:00
[freexl] Fix mingw, cleanup (#19504)
* New port version, format manifest * Revise portfile * Add mingw support * Add libiconv dependency to pc file * x-add-version * Apply PR comment * x-add-version
This commit is contained in:
parent
18b793e28a
commit
5bc27e8a50
@ -1,6 +0,0 @@
|
||||
Source: freexl
|
||||
Version: 1.0.4
|
||||
Port-Version: 11
|
||||
Homepage: https://www.gaia-gis.it/gaia-sins/freexl-sources
|
||||
Description: FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet
|
||||
Build-Depends: libiconv
|
26
ports/freexl/fix-pc-file.patch
Normal file
26
ports/freexl/fix-pc-file.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index a44dbf4..55bd768 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -64,9 +64,11 @@ AC_CONFIG_FILES([Makefile \
|
||||
AC_CHECK_HEADERS(iconv.h,, [AC_MSG_ERROR([cannot find iconv.h, bailing out])])
|
||||
# on some systems "iconv()" lives in libc. On others it lives in libiconv
|
||||
# on older systems "libiconv()" lives in libiconv
|
||||
+SAVED_LIBS="${LIBS}"
|
||||
AC_SEARCH_LIBS(iconv,iconv,,
|
||||
AC_SEARCH_LIBS(libiconv,iconv,,AC_MSG_ERROR(['libiconv' is required but it doesn't seem to be installed on this system.]),))
|
||||
AC_SEARCH_LIBS(locale_charset,charset,,
|
||||
AC_SEARCH_LIBS(nl_langinfo,c,,AC_MSG_ERROR(['libcharset' is required but it doesn't seem to be installed on this system.]),))
|
||||
+AC_SUBST(ICONV_LIBS, "${LIBS%${SAVED_LIBS}}")
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
diff --git a/freexl.pc.in b/freexl.pc.in
|
||||
index 5813e68..8fc671d 100644
|
||||
--- a/freexl.pc.in
|
||||
+++ b/freexl.pc.in
|
||||
@@ -10,3 +10,4 @@ Description: a simple library extracting data from .xls (Excel BIFF) files
|
||||
Version: @VERSION@
|
||||
Libs: -L${libdir} -lfreexl -lm
|
||||
Cflags: -I${includedir}
|
||||
+Libs.private: @ICONV_LIBS@
|
@ -6,15 +6,16 @@ vcpkg_download_distfile(ARCHIVE
|
||||
SHA512 d72561f7b82e0281cb211fbf249e5e45411a7cdd009cfb58da3696f0a0341ea7df210883bfde794be28738486aeb4ffc67ec2c98fd2acde5280e246e204ce788
|
||||
)
|
||||
|
||||
if (VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
fix-makefiles.patch
|
||||
fix-sources.patch
|
||||
)
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
PATCHES
|
||||
fix-makefiles.patch
|
||||
fix-sources.patch
|
||||
fix-pc-file.patch
|
||||
)
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
||||
set(LIBS_ALL_DBG
|
||||
"\"${CURRENT_INSTALLED_DIR}/debug/lib/iconv.lib\" \
|
||||
\"${CURRENT_INSTALLED_DIR}/debug/lib/charset.lib\""
|
||||
@ -25,7 +26,7 @@ if (VCPKG_TARGET_IS_WINDOWS)
|
||||
)
|
||||
|
||||
vcpkg_install_nmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS_DEBUG
|
||||
INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}/debug"
|
||||
INST_DIR="${CURRENT_PACKAGES_DIR}/debug"
|
||||
@ -37,55 +38,33 @@ if (VCPKG_TARGET_IS_WINDOWS)
|
||||
"LINK_FLAGS="
|
||||
"LIBS_ALL=${LIBS_ALL_REL}"
|
||||
)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright)
|
||||
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib)
|
||||
if (VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib")
|
||||
else()
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/lib/freexl.lib)
|
||||
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib)
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/lib/freexl.lib")
|
||||
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/lib/freexl.lib)
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/lib/freexl_i.lib" "${CURRENT_PACKAGES_DIR}/lib/freexl.lib")
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib ${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib)
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/lib/freexl_i.lib" "${CURRENT_PACKAGES_DIR}/debug/lib/freexl.lib")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
elseif (CMAKE_HOST_UNIX OR CMAKE_HOST_APPLE) # Build in UNIX
|
||||
else() # Build in UNIX
|
||||
|
||||
vcpkg_extract_source_archive_ex(
|
||||
ARCHIVE ${ARCHIVE}
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
)
|
||||
file(REMOVE_RECURSE "${SOURCE_PATH}/configure")
|
||||
vcpkg_configure_make(
|
||||
AUTOCONFIG
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS_DEBUG
|
||||
INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}"
|
||||
"LINK_FLAGS=/debug"
|
||||
"CL_FLAGS=${CL_FLAGS_DBG}"
|
||||
"LIBS_ALL=${LIBS_ALL_DBG}"
|
||||
OPTIONS_RELEASE
|
||||
INSTALLED_ROOT="${CURRENT_INSTALLED_DIR}"
|
||||
"LINK_FLAGS="
|
||||
"CL_FLAGS=${CL_FLAGS_REL}"
|
||||
"LIBS_ALL=${LIBS_ALL_REL}"
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
vcpkg_fixup_pkgconfig(SYSTEM_LIBRARIES m)
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/freexl RENAME copyright)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
else()# Other build system
|
||||
message(FATAL_ERROR "Unsupported build system.")
|
||||
endif()
|
||||
|
||||
message(STATUS "Packaging ${TARGET_TRIPLET} done")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
10
ports/freexl/vcpkg.json
Normal file
10
ports/freexl/vcpkg.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "freexl",
|
||||
"version-string": "1.0.4",
|
||||
"port-version": 12,
|
||||
"description": "FreeXL is an open source library to extract valid data from within an Excel (.xls) spreadsheet",
|
||||
"homepage": "https://www.gaia-gis.it/gaia-sins/freexl-sources",
|
||||
"dependencies": [
|
||||
"libiconv"
|
||||
]
|
||||
}
|
@ -2158,7 +2158,7 @@
|
||||
},
|
||||
"freexl": {
|
||||
"baseline": "1.0.4",
|
||||
"port-version": 11
|
||||
"port-version": 12
|
||||
},
|
||||
"fribidi": {
|
||||
"baseline": "1.0.10",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "26e9d42e555e69bf1ea1747739daf3d6551bb46b",
|
||||
"version-string": "1.0.4",
|
||||
"port-version": 12
|
||||
},
|
||||
{
|
||||
"git-tree": "eb377ce039ce22eaec25f3bf81668c5d77bec086",
|
||||
"version-string": "1.0.4",
|
||||
|
Loading…
Reference in New Issue
Block a user