tree-wide: apply relative CMAKE_INSTALL_LIBDIR and CMAKE_INSTALL_INCLUDEDIR to packages that otherwise generate invalid .cmake and .pc files - #27323
Conversation
…NCLUDEDIR` to packages that otherwise generate invalid `.cmake` and `.pc` files - like - termux#25694 - termux#26831 - termux#27230 - Before: ``` ~ $ grep -rnI $PREFIX -e /$PREFIX/include -e /$PREFIX/lib /data/data/com.termux/files/usr/bin/taglib-config:24: includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/bin/gdal-config:10:CONFIG_PLUGINDIR="/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib/gdalplugins" /data/data/com.termux/files/usr/bin/xslt-config:6:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/bin/xslt-config:7:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-c.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-c.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-lua.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-lua.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-query.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/share/pkgconfig/tree-sitter-query.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/share/pkgconfig/swipl.pc:3:libdir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/SPIRV-Tools.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/SPIRV-Tools.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/libcares.pc:11:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libcares.pc:12:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/shaderc.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/shaderc.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/blosc.pc:5:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/toxcore.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/toxcore.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/id3tag.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libxslt.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libxslt.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/SPIRV-Tools-shared.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/SPIRV-Tools-shared.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/tree-sitter-markdown-inline.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/tree-sitter-markdown-inline.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/shaderc_combined.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/shaderc_combined.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/libtorrent-rasterbar.pc:8:Cflags: -fexceptions -pthread -I/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include -DTORRENT_LINKING_SHARED -DBOOST_ASIO_ENABLE_CANCELIO -DBOOST_ASIO_NO_DEPRECATED -DTORRENT_USE_OPENSSL -DTORRENT_USE_LIBCRYPTO -DTORRENT_SSL_PEERS -DOPENSSL_NO_SSL2 /data/data/com.termux/files/usr/lib/pkgconfig/muparser.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/muparser.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/haisrt.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/shaderc_static.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/shaderc_static.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/aom.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/srt.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/openxr.pc:7:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libobjc.pc:3:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/openblas.pc:5:includedir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include/openblas /data/data/com.termux/files/usr/lib/pkgconfig/libpano13.pc:14:libdir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/tree-sitter-markdown.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/tree-sitter-markdown.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/libchromaprint.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libchromaprint.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/libexslt.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libexslt.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-config.cmake:40:set(LIBXSLT_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}//data/data/com.termux/files/usr/include") /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-config.cmake:41:set(LIBXSLT_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}//data/data/com.termux/files/usr/lib") /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-config.cmake:42:set(LIBXSLT_EXSLT_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}//data/data/com.termux/files/usr/include") /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-config.cmake:43:set(LIBXSLT_EXSLT_LIBRARY_DIR "${PACKAGE_PREFIX_DIR}//data/data/com.termux/files/usr/lib") /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-export.cmake:56: INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}//data/data/com.termux/files/usr/include" /data/data/com.termux/files/usr/lib/cmake/libxslt-1.1.43/libxslt-export.cmake:64: INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}//data/data/com.termux/files/usr/include" /data/data/com.termux/files/usr/lib/python3.12/site-packages/scipy/__config__.py:86: "include directory": r"/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include/openblas", /data/data/com.termux/files/usr/lib/python3.12/site-packages/scipy/__config__.py:96: "include directory": r"/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include/openblas", /data/data/com.termux/files/usr/lib/python3.12/site-packages/numpy/__config__.py:79: "include directory": r"/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include/openblas", /data/data/com.termux/files/usr/lib/python3.12/site-packages/numpy/__config__.py:89: "include directory": r"/data/data/com.termux/files/usr//data/data/com.termux/files/usr/include/openblas", ~ $ ``` - After: ``` ~ $ grep -rnI $PREFIX -e /$PREFIX/include -e /$PREFIX/lib ~ $ ``` - Fix prefix pollutiuon build failure `shaderc`->`openxr` - Remove only remaining instance of obsolete variable `TERMUX_PKG_INCLUDE_IN_DEVPACKAGE` from `taglib` - Rebuild `python-numpy` and `python-scipy` because they got polluted by invalid paths from the `openblas.pc`
fc5b304 to
ccfe6cd
Compare
|
I will merge it in 24 hours if no problems are found and no additional packages in the main repository are found that need relative |
|
Is it possible to add a check in the |
Technically, yes, but I think it might not be a good idea. For both this check and that other check, it's possible to just occasionally run the command in a Termux installation that has a lot of packages installed to check for any new instances of bad files, rather than running the check on every build of every package. I will add it if you tell me that it is important to add. |
…`CMAKE_INSTALL_INCLUDEDIR` - termux/termux-packages#27323 for tur-on-device
…`CMAKE_INSTALL_INCLUDEDIR` - termux/termux-packages#27323 for tur-on-device
we also need to partially revert termux#27323 for taglib which ncmpcpp depends on.
we also need to partially revert #27323 for taglib which ncmpcpp depends on.
…NCLUDEDIR` to more packages that otherwise generate invalid `.cmake` and `.pc` files - #27323 again - Before: ``` /data/data/com.termux/files/usr/include/lws_config.h:10:#define LWS_INSTALL_LIBDIR "/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib" /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:5:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:6:includedir=${prefix}//data/data/com.termux/files/usr/include/opencv4 /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:11:Libs: -L${exec_prefix}//data/data/com.termux/files/usr/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_cvv -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_signal -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core /data/data/com.termux/files/usr/lib/pkgconfig/libebur128.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/frei0r.pc:3:libdir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/mlt-framework-7.pc:7:moduledir=${prefix}//data/data/com.termux/files/usr/lib/mlt-7 /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:3:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include ``` - After: ``` ~ $ grep -rnI $PREFIX -e /$PREFIX/include -e /$PREFIX/lib ~ $ ```
…NCLUDEDIR` to more packages that otherwise generate invalid `.cmake` and `.pc` files - termux/termux-packages#27323 again - Before: ``` /data/data/com.termux/files/usr/include/lws_config.h:10:#define LWS_INSTALL_LIBDIR "/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib" /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:5:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:6:includedir=${prefix}//data/data/com.termux/files/usr/include/opencv4 /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:11:Libs: -L${exec_prefix}//data/data/com.termux/files/usr/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_cvv -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_signal -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core /data/data/com.termux/files/usr/lib/pkgconfig/libebur128.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/frei0r.pc:3:libdir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/mlt-framework-7.pc:7:moduledir=${prefix}//data/data/com.termux/files/usr/lib/mlt-7 /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:3:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include ``` - After: ``` ~ $ grep -rnI $PREFIX -e /$PREFIX/include -e /$PREFIX/lib ~ $ ```
- `TERMUX_PKG_EXTRA_CONFIGURE_ARGS` from #27323 incorrectly overrides the original `TERMUX_PKG_EXTRA_CONFIGURE_ARGS`, causing `Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES` after #28627 because the docker container does not contain `python3-dev`, so now that Docker is used for all builds, this error has become consistently reproducible
- `TERMUX_PKG_EXTRA_CONFIGURE_ARGS` from termux/termux-packages#27323 incorrectly overrides the original `TERMUX_PKG_EXTRA_CONFIGURE_ARGS`, causing `Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES` after termux/termux-packages#28627 because the docker container does not contain `python3-dev`, so now that Docker is used for all builds, this error has become consistently reproducible
we also need to partially revert termux#27323 for taglib which ncmpcpp depends on.
…NCLUDEDIR` to more packages that otherwise generate invalid `.cmake` and `.pc` files - termux#27323 again - Before: ``` /data/data/com.termux/files/usr/include/lws_config.h:10:#define LWS_INSTALL_LIBDIR "/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib" /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:5:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:6:includedir=${prefix}//data/data/com.termux/files/usr/include/opencv4 /data/data/com.termux/files/usr/lib/pkgconfig/opencv4.pc:11:Libs: -L${exec_prefix}//data/data/com.termux/files/usr/lib -lopencv_gapi -lopencv_stitching -lopencv_aruco -lopencv_bgsegm -lopencv_bioinspired -lopencv_ccalib -lopencv_cvv -lopencv_dnn_objdetect -lopencv_dnn_superres -lopencv_dpm -lopencv_face -lopencv_freetype -lopencv_fuzzy -lopencv_hfs -lopencv_img_hash -lopencv_intensity_transform -lopencv_line_descriptor -lopencv_mcc -lopencv_quality -lopencv_rapid -lopencv_reg -lopencv_rgbd -lopencv_saliency -lopencv_signal -lopencv_stereo -lopencv_structured_light -lopencv_phase_unwrapping -lopencv_superres -lopencv_optflow -lopencv_surface_matching -lopencv_tracking -lopencv_highgui -lopencv_datasets -lopencv_text -lopencv_plot -lopencv_videostab -lopencv_videoio -lopencv_wechat_qrcode -lopencv_xfeatures2d -lopencv_shape -lopencv_ml -lopencv_ximgproc -lopencv_video -lopencv_xobjdetect -lopencv_objdetect -lopencv_calib3d -lopencv_imgcodecs -lopencv_features2d -lopencv_dnn -lopencv_flann -lopencv_xphoto -lopencv_photo -lopencv_imgproc -lopencv_core /data/data/com.termux/files/usr/lib/pkgconfig/libebur128.pc:3:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:2:libdir=${prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/liboqs.pc:3:includedir=${prefix}//data/data/com.termux/files/usr/include /data/data/com.termux/files/usr/lib/pkgconfig/frei0r.pc:3:libdir=/data/data/com.termux/files/usr//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/mlt-framework-7.pc:7:moduledir=${prefix}//data/data/com.termux/files/usr/lib/mlt-7 /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:3:libdir=${exec_prefix}//data/data/com.termux/files/usr/lib /data/data/com.termux/files/usr/lib/pkgconfig/libwebsockets.pc:4:includedir=${prefix}//data/data/com.termux/files/usr/include ``` - After: ``` ~ $ grep -rnI $PREFIX -e /$PREFIX/include -e /$PREFIX/lib ~ $ ```
- `TERMUX_PKG_EXTRA_CONFIGURE_ARGS` from termux#27323 incorrectly overrides the original `TERMUX_PKG_EXTRA_CONFIGURE_ARGS`, causing `Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES` after termux#28627 because the docker container does not contain `python3-dev`, so now that Docker is used for all builds, this error has become consistently reproducible
- `TERMUX_PKG_EXTRA_CONFIGURE_ARGS` from termux#27323 incorrectly overrides the original `TERMUX_PKG_EXTRA_CONFIGURE_ARGS`, causing `Could NOT find Python (missing: Python_EXECUTABLE Python_LIBRARIES` after termux#28627 because the docker container does not contain `python3-dev`, so now that Docker is used for all builds, this error has become consistently reproducible
like
Before:
Fix prefix pollution build failure
shaderc->openxrRemove only remaining instance of obsolete variable
TERMUX_PKG_INCLUDE_IN_DEVPACKAGEfromtaglibRebuild
python-numpyandpython-scipybecause they got polluted by invalid paths from theopenblas.pc