tidy5: allow cross compilation
This commit is contained in:
parent
7c9c32e8cb
commit
faf6339222
3 changed files with 42 additions and 3 deletions
20
srcpkgs/tidy5/patches/allow-cross.patch
Normal file
20
srcpkgs/tidy5/patches/allow-cross.patch
Normal file
|
@ -0,0 +1,20 @@
|
|||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -201,7 +201,7 @@
|
||||
# run built EXE to generate xml output
|
||||
add_custom_command(
|
||||
TARGET man
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/${LIB_NAME} -xml-help > ${TIDYHELP}
|
||||
+ COMMAND ${CMAKE_SOURCE_DIR}/tidy5 -xml-help > ${TIDYHELP}
|
||||
COMMENT "Generate ${TIDYHELP}"
|
||||
VERBATIM
|
||||
)
|
||||
@@ -209,7 +209,7 @@
|
||||
# run built EXE to generate more xml output
|
||||
add_custom_command(
|
||||
TARGET man
|
||||
- COMMAND ${CMAKE_BINARY_DIR}/${LIB_NAME} -xml-config > ${TIDYCONFIG}
|
||||
+ COMMAND ${CMAKE_SOURCE_DIR}/tidy5 -xml-config > ${TIDYCONFIG}
|
||||
COMMENT "Generate ${TIDYCONFIG}"
|
||||
VERBATIM
|
||||
)
|
|
@ -1,11 +1,15 @@
|
|||
--- CMakeLists.txt.orig
|
||||
+++ CMakeLists.txt
|
||||
@@ -157,7 +157,7 @@
|
||||
@@ -157,7 +157,11 @@
|
||||
set(name ${LIB_NAME})
|
||||
set ( BINDIR console )
|
||||
add_executable( ${name} ${BINDIR}/tidy.c )
|
||||
-target_link_libraries( ${name} ${add_LIBS} )
|
||||
+target_link_libraries( ${name} tidy-share )
|
||||
+if (BUILD_SHARED_LIB)
|
||||
+ target_link_libraries( ${name} tidy-share )
|
||||
+else()
|
||||
+ target_link_libraries( ${name} tidy-static )
|
||||
+endif()
|
||||
if (MSVC)
|
||||
set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
|
||||
endif ()
|
||||
|
|
|
@ -15,7 +15,22 @@ license="W3C"
|
|||
homepage="http://www.htacg.org/${_reponame}/"
|
||||
distfiles="https://github.com/htacg/${_reponame}/archive/${version}.tar.gz"
|
||||
checksum=569c23f9028e28ca5dd2020116dec01d2e43e0c698fdf9d0f6e599878495386d
|
||||
nocross=yes
|
||||
|
||||
pre_configure() {
|
||||
# the $(man) target requires tidy5 to run on the host
|
||||
ln -s ${cmake_builddir}/${pkgname}
|
||||
if [ -n "$CROSS_BUILD" ]; then
|
||||
rm ${pkgname}
|
||||
cd ${cmake_builddir}
|
||||
|
||||
env - PATH=/usr/bin cmake -DBUILD_SHARED_LIB:BOOL=FALSE ${wrksrc}
|
||||
make ${makejobs} ${pkgname}
|
||||
|
||||
cp ${pkgname} ${wrksrc}
|
||||
cd ${wrksrc}
|
||||
rm -rf ${cmake_builddir}
|
||||
fi
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE.txt LICENSE
|
||||
|
|
Loading…
Reference in a new issue