diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-05 12:40:24 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-11-05 13:37:25 +0000 |
commit | 0d1e30b1361b9a1a06c56d2433befd9be77bff14 (patch) | |
tree | 5b4248932b3342bf99370c4c1da8a86b122194c2 /main/abuild | |
parent | 2bb7088a03007efcefaf2dcfcd839c8e75b050be (diff) | |
download | aports-0d1e30b1361b9a1a06c56d2433befd9be77bff14.tar.bz2 aports-0d1e30b1361b9a1a06c56d2433befd9be77bff14.tar.xz |
main/abuild: fix detection of deps and symlinks
Diffstat (limited to 'main/abuild')
-rw-r--r-- | main/abuild/APKBUILD | 10 | ||||
-rw-r--r-- | main/abuild/git.patch | 107 |
2 files changed, 112 insertions, 5 deletions
diff --git a/main/abuild/APKBUILD b/main/abuild/APKBUILD index c1aa017b7e..f48be4f299 100644 --- a/main/abuild/APKBUILD +++ b/main/abuild/APKBUILD @@ -2,7 +2,7 @@ pkgname=abuild pkgver=2.25.0_rc1 _ver=${pkgver%_git*} -pkgrel=1 +pkgrel=2 pkgdesc="Script to build Alpine Packages" url="http://git.alpinelinux.org/cgit/abuild/" arch="all" @@ -20,7 +20,7 @@ subpackages="apkbuild-cpan:cpan apkbuild-gem-resolver:gems" options="suid" pkggroups="abuild" source="http://dev.alpinelinux.org/archive/abuild/abuild-$_ver.tar.xz - 0001-abuild-do-not-install-itself-as-a-makedepend.patch + git.patch " _builddir="$srcdir/$pkgname-$_ver" @@ -66,8 +66,8 @@ gems() { } md5sums="6fd1f7b99247618cbf0ca22b7c6cec1b abuild-2.25.0_rc1.tar.xz -6bf3cbf4d6175798fff17baaa1ecef2c 0001-abuild-do-not-install-itself-as-a-makedepend.patch" +4ab04221889b9d35f3d9c2999e676f47 git.patch" sha256sums="2addf0e0a518d85669f5a6cbe593ea7d57232d8573acd1a9e322b68e5a14614d abuild-2.25.0_rc1.tar.xz -007177afd724e8fdc081588079c8d70724b271686a0f2776ec831447aa115185 0001-abuild-do-not-install-itself-as-a-makedepend.patch" +9d1c11a4bd4e1009bfd17d3483fa013061d8b32e1ed8b4cb0c259a24e658378a git.patch" sha512sums="6dca86b68f57aaa4df0a1401098d2264d33c44380a0186ae3b03784e8f648ac17317d7ce7d3586db45d3d36ca65454fc53e032bd7b58f22f356c937038a991e5 abuild-2.25.0_rc1.tar.xz -b15632f09015ed40639fcb3cba8253608a3637d3e103707a35d249ae4f2fe92a5ed77168146e8d7eccae7bec8cec17b58bce921119a7aa4911059cc3942a89a4 0001-abuild-do-not-install-itself-as-a-makedepend.patch" +f749307b40100dc03521bce11d55b83e08f96309d91b2845e7ba3d8a6a8188baeb9fceeb26adb58a35d3c201b2e6e67ea08742f9fd2cf63501e657c5cc615823 git.patch" diff --git a/main/abuild/git.patch b/main/abuild/git.patch new file mode 100644 index 0000000000..cba100cc83 --- /dev/null +++ b/main/abuild/git.patch @@ -0,0 +1,107 @@ +diff --git a/abuild.in b/abuild.in +index 0dd8f9a..8d06261 100644 +--- a/abuild.in ++++ b/abuild.in +@@ -886,13 +886,14 @@ prepare_trace_rpaths() { + + # search for broken symlinks so we later can pull in proper depends + prepare_symlinks() { ++ local target + local dir="${subpkgdir:-$pkgdir}" + options_has "!tracedeps" && return 0 + cd "$dir" || return 1 + find -type l | while read symlink; do +- if ! [ -e "$symlink" ]; then +- echo "$symlink $(readlink $symlink)" \ +- >> "$controldir"/.symlinks ++ target=$(readlink "$symlink") ++ if ! [ -e "$dir$(normalize_target_path "$target" "$symlink")" ]; then ++ echo "$symlink $target" >> "$controldir"/.symlinks + fi + done + } +@@ -1190,11 +1191,16 @@ scan_shared_objects() { + done > "$controldir"/.needs-so + } + +-# normalize a path string +-normalize_path() { ++# normalize a symlink target path (1st arg) ++# Converts a relative path to absolute with respect to the symlink ++# path (2nd arg). ++normalize_target_path() { ++ local path=$1 ++ [ "${path:0:1}" = / ] || path=$(dirname "$2")/$path ++ + local oifs="$IFS" pathstr= i= + IFS='/' +- set -- $1 ++ set -- $path + for i; do + case "$i" in + "."|"") continue;; +@@ -1217,10 +1223,7 @@ scan_symlink_targets() { + fi + + while read symlink target; do +- if [ "${target#/}" = "$target" ]; then +- target="${symlink%/*}/$target" +- fi +- targetpath="$datadir"/$(normalize_path "$target") ++ targetpath=$datadir$(normalize_target_path "$target" "$symlink") + if [ -e "$targetpath" ] || [ -L "$targetpath" ]; then + echo "$name=$pkgver-r$pkgrel" \ + >> "$d"/.symlinks-needs +@@ -1721,14 +1724,12 @@ builddeps() { + [ "$pkgname" = "${i%%[<>=]*}" ] && continue + subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i" + done +- hostdeps="$makedepends_host" +- for i in $depends; do ++ for i in $depends $makedepends_host; do + [ "$pkgname" = "${i%%[<>=]*}" ] && continue + subpackages_has ${i%%[<>=]*} || hostdeps="$hostdeps $i" + done + else +- builddeps="$makedepends" +- for i in $BUILD_BASE $depends; do ++ for i in $BUILD_BASE $depends $makedepends; do + [ "$pkgname" = "${i%%[<>=]*}" ] && continue + subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i" + done +@@ -1962,9 +1963,8 @@ post_add() { + } + + deps() { +- local builddeps i +- builddeps="$makedepends" +- for i in $depends; do ++ local builddeps= i ++ for i in $depends $makedepends; do + [ "$pkgname" = "${i%%[<>=]*}" ] && continue + subpackages_has ${i%%[<>=]*} || builddeps="$builddeps $i" + done +diff --git a/newapkbuild.in b/newapkbuild.in +index 5ba51fb..a47dcae 100644 +--- a/newapkbuild.in ++++ b/newapkbuild.in +@@ -45,7 +45,6 @@ build_autotools() { + --prefix=/usr \\ + --sysconfdir=/etc \\ + --mandir=/usr/share/man \\ +- --infodir=/usr/share/info \\ + --localstatedir=/var \\ + || return 1 + make || return 1 +@@ -70,10 +69,8 @@ build_cmake() { + -DCMAKE_INSTALL_LIBDIR=lib \\ + -DBUILD_SHARED_LIBS=True \\ + -DCMAKE_BUILD_TYPE=Release \\ +- -DCMAKE_CXX_COMPILER="\${CXX:-g++}" \\ +- -DCMAKE_C_COMPILER="\${CC:-gcc}" \\ + -DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\ +- -DCMAKE_CXX_FLAGS="\$CFLAGS" \\ ++ -DCMAKE_C_FLAGS="\$CFLAGS" \\ + ${CMAKE_CROSSOPTS} \\ + || return 1 + make || return 1 |