diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-03-08 04:29:08 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-03-08 04:29:08 +0000 |
commit | 00042447f4a5a5ea733ca66ad59a10c32db24287 (patch) | |
tree | fd23133509a5b1740268979846027c6a35a852a5 | |
parent | b053440732ce017bb82363b66b00d5b36a046ece (diff) | |
download | packages-00042447f4a5a5ea733ca66ad59a10c32db24287.tar.gz packages-00042447f4a5a5ea733ca66ad59a10c32db24287.tar.bz2 packages-00042447f4a5a5ea733ca66ad59a10c32db24287.tar.xz packages-00042447f4a5a5ea733ca66ad59a10c32db24287.zip |
system/pkgconf: bump to 1.6.0, modernise
-rw-r--r-- | system/pkgconf/APKBUILD | 15 | ||||
-rw-r--r-- | system/pkgconf/personality.patch | 55 |
2 files changed, 62 insertions, 8 deletions
diff --git a/system/pkgconf/APKBUILD b/system/pkgconf/APKBUILD index 79f4b3819..777af1613 100644 --- a/system/pkgconf/APKBUILD +++ b/system/pkgconf/APKBUILD @@ -1,8 +1,8 @@ # Maintainer: A. Wilcox <awilfox@adelielinux.org> pkgname=pkgconf -pkgver=1.5.4 +pkgver=1.6.0 pkgrel=0 -pkgdesc="development framework configuration tools" +pkgdesc="Toolkit for maintaining development package metadata" url="https://git.dereferenced.org/pkgconf/pkgconf/" arch="all" license="ISC" @@ -10,10 +10,11 @@ replaces="pkgconfig" provides="pkgconfig=1" subpackages="$pkgname-doc $pkgname-dev" checkdepends="kyua atf" -source="https://distfiles.dereferenced.org/pkgconf/pkgconf-$pkgver.tar.xz" +source="https://distfiles.dereferenced.org/pkgconf/pkgconf-$pkgver.tar.xz + personality.patch + " build() { - cd "$builddir" ./configure \ --build=$CBUILD \ --host=$CHOST \ @@ -27,13 +28,10 @@ build() { } check() { - cd "$builddir" make check } package() { - cd "$builddir" - make DESTDIR="$pkgdir" install ln -s pkgconf "$pkgdir"/usr/bin/pkg-config } @@ -49,4 +47,5 @@ dev() { mv "$subpkgdir"/usr/share/aclocal/pkg.m4 "$pkgdir"/usr/share/aclocal/ } -sha512sums="795a67f8f98b7598c0af8e70c830851561f090a96cb66b75149e5faf633f06c1b098fa3cec76cde35160a9809556536da6a2a95af8ff954c9b28536d15b79f93 pkgconf-1.5.4.tar.xz" +sha512sums="eddb9354b3e0a4b91eb49c7b81ed4cbeb92b96b1931f25185b37fa66f25604315f0e1cc8cf13a415508b5a07c1b0d85ddb39a988648787b968083ddc82e73fda pkgconf-1.6.0.tar.xz +94d7749fa5d751f9207c9f6168dcce52bbe6108e9440721a640b6bc3492867c3fce5231d779a780a611009f1c1ad65bc9db8e81452c059f7b34b97314b38844a personality.patch" diff --git a/system/pkgconf/personality.patch b/system/pkgconf/personality.patch new file mode 100644 index 000000000..e7ff9ad9a --- /dev/null +++ b/system/pkgconf/personality.patch @@ -0,0 +1,55 @@ +From d926e75b345a6948e4e976828d3331cd7f0db660 Mon Sep 17 00:00:00 2001 +From: Emil Renner Berthing <esmil@mailme.dk> +Date: Wed, 6 Mar 2019 16:03:32 +0100 +Subject: [PATCH] main: fix personalities when argv[0] contains path + +--- + cli/main.c | 31 ++++++++++++++++++++----------- + 1 file changed, 20 insertions(+), 11 deletions(-) + +diff --git a/cli/main.c b/cli/main.c +index b52cc85..caa2525 100644 +--- a/cli/main.c ++++ b/cli/main.c +@@ -740,21 +740,30 @@ dump_personality(const pkgconf_cross_personality_t *p) + static pkgconf_cross_personality_t * + deduce_personality(char *argv[]) + { +- char *workbuf = strdup(argv[0]), *i; +- pkgconf_cross_personality_t *out = pkgconf_cross_personality_default(), *deduced; ++ const char *argv0 = argv[0]; ++ char *i, *prefix; ++ pkgconf_cross_personality_t *out; ++ ++ i = strrchr(argv0, '/'); ++ if (i != NULL) ++ argv0 = i + 1; ++ ++#if defined(_WIN32) || defined(_WIN64) ++ i = strrchr(argv0, '\\'); ++ if (i != NULL) ++ argv0 = i + 1; ++#endif + +- i = strstr(workbuf, "-pkg"); ++ i = strstr(argv0, "-pkg"); + if (i == NULL) +- goto finish; +- +- *i = 0; ++ return pkgconf_cross_personality_default(); + +- deduced = pkgconf_cross_personality_find(workbuf); +- if (deduced != NULL) +- out = deduced; ++ prefix = strndup(argv0, i - argv0); ++ out = pkgconf_cross_personality_find(prefix); ++ free(prefix); ++ if (out == NULL) ++ return pkgconf_cross_personality_default(); + +-finish: +- free(workbuf); + return out; + } + |