diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 93e2bf92..5b7daa6f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,4 +16,4 @@ repos: rev: v3.8.0-1 hooks: - id: shfmt-docker - exclude: (ld|cc)-wrapper.sh$ \ No newline at end of file + exclude: (ld|cc)-wrapper.sh$ diff --git a/packages/development/libraries/cairo/.hab-plan-config.toml b/packages/development/libraries/cairo/.hab-plan-config.toml index d1151390..7c1df61b 100644 --- a/packages/development/libraries/cairo/.hab-plan-config.toml +++ b/packages/development/libraries/cairo/.hab-plan-config.toml @@ -1,5 +1,6 @@ [rules] missing-license = {level = "off", source-shasum = "243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64"} -unused-runpath-entry = {ignored_files = ["lib/*", "lib/cairo/*"] } +unused-runpath-entry = {ignored_files = ["lib/*", "lib/cairo/*", "libexec/gio-launch-desktop", "bin/*"] } library-dependency-not-found = {ignored_files = ["lib/*", "lib/cairo/*"] } -unused-dependency = {ignored_packages = ["core/{freetype,pixman,libpng,zlib,libice}"] } \ No newline at end of file +unused-dependency = {ignored_packages = ["core/{freetype,pixman,libpng,zlib,libice,python,glib,libxml2}"] } +duplicate-runtime-binary = { level = "off", primary_packages = ["core/glib"]} diff --git a/packages/development/libraries/cairo/plan.sh b/packages/development/libraries/cairo/plan.sh index 0fdbaf50..9837d4d1 100644 --- a/packages/development/libraries/cairo/plan.sh +++ b/packages/development/libraries/cairo/plan.sh @@ -9,50 +9,56 @@ pkg_upstream_url="https://www.cairographics.org" pkg_shasum="243a0736b978a33dee29f9cca7521733b78a65b5418206fef7bd1c3d4cf10b64" pkg_deps=( - core/freetype - core/glibc - core/libice - core/libpng - core/pixman - core/zlib + core/freetype + core/glibc + core/libice + core/libpng + core/pixman + core/zlib + core/libxml2 + core/fontconfig ) pkg_build_deps=( - core/fontconfig - core/pkg-config - core/xextproto - core/xproto - core/meson - core/ninja - core/python - core/sed - core/gcc + core/pkg-config + core/xextproto + core/xproto + core/meson + core/ninja + core/python + core/sed + core/gcc + core/patchelf ) pkg_bin_dirs=(bin) pkg_include_dirs=( - include - include/cairo + include + include/cairo ) pkg_lib_dirs=( - lib - lib/cairo + lib + lib/cairo ) pkg_pconfig_dirs=(lib/pkgconfig) do_build() { - export PYTHONPATH=${PYTHONPATH}:$(pkg_path_for meson)/lib/python3.10/site-packages/ + export PYTHONPATH=${PYTHONPATH}:$(pkg_path_for meson)/lib/python3.10/site-packages/ - sed -e "s,/usr/bin/env python3,$(pkg_path_for python)/bin/python,g" -i "${CACHE_PATH}/version.py" - meson setup builddir --prefix=${pkg_prefix} --buildtype=release - ninja -C builddir + sed -e "s,/usr/bin/env python3,$(pkg_path_for python)/bin/python,g" -i "${CACHE_PATH}/version.py" + meson setup builddir --prefix=${pkg_prefix} --buildtype=release + # --wrap-mode=nofallback + ninja -C builddir } do_install() { - ninja -C builddir install - - find "${pkg_prefix}/lib" -type f -name "*.so*" -exec patchelf --set-rpath "${LD_RUN_PATH}" {} \; + #freetype is not added to LD_RUN_PATH though it is added in pkg_deps. + # not sure why. need to check from hab-auto-build. + #so appending freetype below + export LD_RUN_PATH="$LD_RUN_PATH:$(pkg_path_for freetype)/lib" + ninja -C builddir install + find "${pkg_prefix}/lib" -type f -name "*.so*" -exec patchelf --set-rpath "${LD_RUN_PATH}" {} \; } do_check() { - meson test -C builddir -v cairo + meson test -C builddir -v cairo } diff --git a/packages/development/libraries/glib/.hab-plan-config.toml b/packages/development/libraries/glib/.hab-plan-config.toml index 2f37fb38..3d30c334 100644 --- a/packages/development/libraries/glib/.hab-plan-config.toml +++ b/packages/development/libraries/glib/.hab-plan-config.toml @@ -1,4 +1,5 @@ [rules] missing-license = {level = "off", source-shasum = "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4"} +license-not-found = {level = "off", source-shasum = "1665188ed9cc941c0a189dc6295e6859872523d1bfc84a5a84732a7ae87b02e4"} unused-rpath-entry = { ignored_files = ["lib/*"]} -unused-dependency = {ignored_packages = ["core/coreutils"]} \ No newline at end of file +unused-dependency = {ignored_packages = ["core/coreutils"]} diff --git a/packages/development/libraries/pango/.hab-plan-config.toml b/packages/development/libraries/pango/.hab-plan-config.toml new file mode 100644 index 00000000..e237cee3 --- /dev/null +++ b/packages/development/libraries/pango/.hab-plan-config.toml @@ -0,0 +1,6 @@ +[rules] +missing-license = {level = "off", source-shasum = "8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8"} +license-not-found = {level = "off", source-shasum = "8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8"} +unused-runpath-entry = { ignored_files = ["lib/*", "bin/*"]} +library-dependency-not-found = { ignored_files = ["lib/*", "bin/*"]} +unused-dependency = { ignored_packages = ["core/{libpng,glib,zlib,pcre2,pixman,fribidi,harfbuzz,cairo,libxml2,libffi,freetype,fontconfig,gcc-libs,util-linux}"]} diff --git a/packages/development/libraries/pango/plan.sh b/packages/development/libraries/pango/plan.sh new file mode 100644 index 00000000..2ec92018 --- /dev/null +++ b/packages/development/libraries/pango/plan.sh @@ -0,0 +1,78 @@ +pkg_name=pango +pkg_origin=core +pkg_version="1.54.0" +pkg_maintainer="The Habitat Maintainers " +pkg_license=('LGPL-2.0-only') +pkg_upstream_url="http://www.pango.org" +pkg_description="Pango is a library for laying out and rendering of text, with an emphasis on internationalization." +pkg_source="https://download.gnome.org/sources/pango/${pkg_version%.*}/pango-${pkg_version}.tar.xz" +pkg_shasum="8a9eed75021ee734d7fc0fdf3a65c3bba51dfefe4ae51a9b414a60c70b2d1ed8" +pkg_filename=${pkg_name}-${pkg_version}.tar.xz + +pkg_deps=( + core/glibc + core/gcc-libs + core/cairo + core/pixman + core/glib + core/pcre2 + core/libffi + core/zlib + core/fontconfig + core/freetype + core/libxml2 + core/libpng + core/util-linux + core/harfbuzz + core/fribidi +) +pkg_build_deps=( + core/meson + core/ninja + core/gcc + core/cmake + core/pkg-config + core/patchelf +) + +pkg_bin_dirs=(bin) +pkg_include_dirs=(include) +pkg_lib_dirs=(lib) +pkg_pconfig_dirs=(lib/pkgconfig) + +do_build() { + export PYTHONPATH=${PYTHONPATH}:$(pkg_path_for meson)/lib/python3.10/site-packages/ + meson setup builddir --prefix=${pkg_prefix} \ + --buildtype=release \ + -Ddocumentation=false \ + -Dintrospection="disabled" \ + --wrap-mode=nofallback + + ninja -C builddir +} + +do_install() { + #ravi changes--> + #freetype is not added to LD_RUN_PATH though it is added in pkg_deps. + # not sure why. need to check from hab-auto-build. + #so appending freetype below + export LD_RUN_PATH="$LD_RUN_PATH:$(pkg_path_for freetype)/lib" + + ninja -C builddir install + + build_line "Setting rpath for all binaries to '${LD_RUN_PATH}'" + #freetype is not getting set for some binaries with --set-rpath + #so using --add-needed for freetype .so. TO use --add-needed freetype + #should be in the RUN PATH. + find "${pkg_prefix}/bin" -type f -executable \ + -exec patchelf --set-interpreter "$(pkg_path_for glibc)/lib/ld-linux-x86-64.so.2" \ + --set-rpath "${LD_RUN_PATH}" --add-needed libfreetype.so.6 {} \; + + find "${pkg_prefix}/lib" -type f -name "*.so.*" \ + -exec patchelf --set-rpath "${LD_RUN_PATH}" --add-needed libfreetype.so.6 {} \; + #--> +} + +do_check() { + ninja -C builddir test +}