termux-packages/scripts/build
agnostic-apollo 571db28a3d termux_step_configure_cmake: Revert CMAKE_INSTALL_LIBDIR old behaviour changed in 2af00064
Absolute paths are still allowed in `DCMAKE_INSTALL_LIBDIR` as per https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html

Different packages have different way of handling `DCMAKE_INSTALL_LIBDIR`. The `libprotobuf` is appending an absolute path to `build` directory (#10068), while `libjpeg-turbo` is not appending a relative `lib` path to `DCMAKE_INSTALL_PREFIX` and instead  appending to `build` directory and so all the lib files stay at `/home/builder/.termux-build/libjpeg-turbo/build/lib` and hence won't get added to the `deb`, which results in `openjdk-17` failing if `-i` is not passed to `build-package.sh`, since it can't find `libjpeg.so` with `-L${TERMUX_PREFIX}/lib` after compilation from source, unless `-L$TERMUX_TOPDIR/libjpeg-turbo/build/lib` is passed.

Considering that most packages would likely be considering an absolute path passed in `DCMAKE_INSTALL_LIBDIR` to actually be absolute, the default behaviour should be reverted, specially considering it is what's been working, otherwise lot of packages would need testing, like from https://github.com/termux/termux-packages/commit/9155acd040.

```
checking for which libjpeg to use... system
checking jpeglib.h usability... yes
configure: WARNING: jpeglib.h: accepted by the compiler, rejected by the preprocessor!
checking jpeglib.h presence... no
checking for jpeglib.h... yes
configure: WARNING: jpeglib.h: proceeding with the compiler's result
configure: error: --with-libjpeg=system specified, but no libjpeg found
checking for jpeg_CreateDecompress in -ljpeg... no
configure exiting with result code 1
```

```
[0/1] Install the project...
-- Install configuration: "Release"
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/tjbench
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libturbojpeg.a
-- Installing: /data/data/com.termux/files/usr/include/turbojpeg.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.a
-- Installing: /data/data/com.termux/files/usr/bin/rdjpgcom
-- Installing: /data/data/com.termux/files/usr/bin/wrjpgcom
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.ijg
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/README.md
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/example.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/tjexample.c
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/libjpeg.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/structure.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/usage.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/wizard.txt
-- Installing: /data/data/com.termux/files/usr/share/doc/libjpeg-turbo/LICENSE.md
-- Installing: /data/data/com.termux/files/usr/share/man/man1/cjpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/djpeg.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/jpegtran.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/rdjpgcom.1
-- Installing: /data/data/com.termux/files/usr/share/man/man1/wrjpgcom.1
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libjpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/pkgconfig/libturbojpeg.pc
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfig.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboConfigVersion.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets.cmake
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/cmake/libjpeg-turbo/libjpeg-turboTargets-release.cmake
-- Installing: /data/data/com.termux/files/usr/include/jconfig.h
-- Installing: /data/data/com.termux/files/usr/include/jerror.h
-- Installing: /data/data/com.termux/files/usr/include/jmorecfg.h
-- Installing: /data/data/com.termux/files/usr/include/jpeglib.h
-- Installing: /home/builder/.termux-build/libjpeg-turbo/build/lib/libjpeg.so
-- Installing: /data/data/com.termux/files/usr/bin/cjpeg
-- Installing: /data/data/com.termux/files/usr/bin/djpeg
-- Installing: /data/data/com.termux/files/usr/bin/jpegtran
...
2022-07-28 15:27:20 +05:00
..
configure termux_step_configure_cmake: Revert CMAKE_INSTALL_LIBDIR old behaviour changed in 2af00064 2022-07-28 15:27:20 +05:00
get_source build-package.sh: fix TERMUX_PKG_SRCURL unbound variable 2020-07-22 20:08:46 +03:00
setup termux_setup_python_crossenv: update to 1.3.0 2022-07-11 03:38:31 +08:00
termux_create_debian_subpackages.sh LLVM Tools (#7952) 2022-04-13 12:10:32 +05:30
termux_create_pacman_subpackages.sh feat(build scripts): allow packages to define extra static split patterns 2022-03-09 10:01:57 +09:00
termux_download.sh chore(scripts/*): add shebang to scripts that can be run 2022-07-22 16:38:44 +02:00
termux_download_deb_pac.sh fix(build-package.sh): Do not use dependencies while building from repo if it hosts packages built for a different package name than TERMUX_APP_PACKAGE 2022-07-28 15:27:20 +05:00
termux_error_exit.sh build-package.sh: fix printing of error message when trying to run script on Android device 2019-03-26 01:27:09 +02:00
termux_extract_dep_info.sh chore(scripts/*): add shebang to scripts that can be run 2022-07-22 16:38:44 +02:00
termux_get_repo_files.sh termux_get_repo_files: remove some identation 2021-10-24 18:46:34 +02:00
termux_step_create_debian_package.sh build-package.sh: fix undefined AR variable 2021-12-04 10:37:55 +02:00
termux_step_create_pacman_install_hook.sh build-package.sh: allow to select package formats between debian and pacman 2021-09-10 19:55:28 +03:00
termux_step_create_pacman_package.sh build-package.sh: setting up to work with pacman (#8451) 2022-01-14 15:16:37 +02:00
termux_step_create_timestamp_file.sh build-package: create timestamp file after get_dependencies 2021-08-21 22:37:51 +02:00
termux_step_extract_into_massagedir.sh termux_step_extract_into_massagedir.sh: don't add tmp/ files to packages, particularly on-device 2020-02-07 00:22:50 +05:30
termux_step_finish_build.sh enable on-device builds 2019-08-08 16:58:34 +03:00
termux_step_get_dependencies.sh fix(build-package.sh): Ensure dependency packages are force rebuilt as well if `-f` is passed 2022-07-28 15:27:20 +05:00
termux_step_handle_buildarch.sh build-package.sh: more fixes for variable checking 2019-08-13 18:44:10 +03:00
termux_step_handle_hostbuild.sh build-package: error if hostbuilt tools are missing 2021-08-24 21:40:46 +02:00
termux_step_host_build.sh build-package: mv termux_step_host_build to scripts/build/ 2019-02-27 21:59:08 +02:00
termux_step_install_license.sh licenses: Simplified BSD->BSD Simplified 2021-08-02 11:38:35 +02:00
termux_step_install_service_scripts.sh termux-services: Make `log/run` a regular file 2022-05-16 08:13:54 +09:00
termux_step_make.sh feat(haskell build): adhere to new setup script 2022-03-16 15:32:04 +01:00
termux_step_make_install.sh feat(haskell build): adhere to new setup script 2022-03-16 15:32:04 +01:00
termux_step_massage.sh scripts(massage): only suggest autoreconf if configure.{ac,in} exist 2022-07-22 16:38:44 +02:00
termux_step_override_config_scripts.sh build-package: Apply `$PREFIX/bin/sh` hack appropriately 2022-04-13 09:03:16 +02:00
termux_step_patch_package.sh termux_step_patch_package: apply patches in alphabetical order 2021-09-02 21:13:58 +05:30
termux_step_replace_guess_scripts.sh build-package.sh: better support for metapackages 2019-08-14 20:29:58 +03:00
termux_step_setup_build_folders.sh setup_build_folders, clean.sh: don't fail if chmod fails 2022-02-11 22:37:18 +01:00
termux_step_setup_toolchain.sh ci(setup-android-sdk.sh): update to ndk r23c 2022-06-23 20:29:28 +02:00
termux_step_setup_variables.sh chore: Move REPO-related variables to properties.sh 2022-07-11 15:43:24 +08:00
termux_step_start_build.sh ci(setup-android-sdk.sh): update to ndk r23c 2022-06-23 20:29:28 +02:00