Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pango] added v1.54.0 #392

Merged
merged 6 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ repos:
rev: v3.8.0-1
hooks:
- id: shfmt-docker
exclude: (ld|cc)-wrapper.sh$
exclude: (ld|cc)-wrapper.sh$
5 changes: 3 additions & 2 deletions packages/development/libraries/cairo/.hab-plan-config.toml
Original file line number Diff line number Diff line change
@@ -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}"] }
unused-dependency = {ignored_packages = ["core/{freetype,pixman,libpng,zlib,libice,python,glib,libxml2}"] }
duplicate-runtime-binary = { level = "off", primary_packages = ["core/glib"]}
60 changes: 33 additions & 27 deletions packages/development/libraries/cairo/plan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
3 changes: 2 additions & 1 deletion packages/development/libraries/glib/.hab-plan-config.toml
Original file line number Diff line number Diff line change
@@ -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"]}
unused-dependency = {ignored_packages = ["core/coreutils"]}
6 changes: 6 additions & 0 deletions packages/development/libraries/pango/.hab-plan-config.toml
Original file line number Diff line number Diff line change
@@ -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}"]}
78 changes: 78 additions & 0 deletions packages/development/libraries/pango/plan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
pkg_name=pango
pkg_origin=core
pkg_version="1.54.0"
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
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
}