diff --git a/pkgconf/001-no-cygpath-conv.patch b/pkgconf/001-no-cygpath-conv.patch index f054040f..bda60b70 100644 --- a/pkgconf/001-no-cygpath-conv.patch +++ b/pkgconf/001-no-cygpath-conv.patch @@ -1,11 +1,145 @@ ---- pkgconf-1.7.1/libpkgconf/path.c.orig 2019-07-12 13:10:54.000000000 +0200 -+++ pkgconf-1.7.1/libpkgconf/path.c 2020-10-16 19:56:17.512930500 +0200 -@@ -320,7 +320,7 @@ - bool - pkgconf_path_relocate(char *buf, size_t buflen) - { --#if defined(HAVE_CYGWIN_CONV_PATH) && defined(__MSYS__) -+#if defined(HAVE_CYGWIN_CONV_PATH) && defined(__MSYS__) && 0 - ssize_t size; - char *tmpbuf, *ti; +From 4be39c59fbad1008af6e06e9a76f53f9c0b48d43 Mon Sep 17 00:00:00 2001 +From: Christoph Reiter +Date: Fri, 19 Mar 2021 16:59:02 +0100 +Subject: [PATCH] Remove usage of cygwin_conv_path() under cygwin/msys + +This converted Unix paths to Windows paths, but all cygwin tools +work with Unix paths so this shouldn't be needed. + +There is one use case if you use a cygwin pkgconf with a non-cygwin toolchain, +but pkgconf works reasonable well natively now so this shouldn't be needed +anymore and more likely leads to problems and confusion. + +Both cygwin and msys have patched this out already: +* https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/pkgconf.git;a=blob;f=pkgconf.cygport;h=e5d003f3f3dfc9e374b916974018022ad8d68852;hb=HEAD#l55 +* https://github.com/msys2/MSYS2-packages/blob/a4bce0c2943109e7d06c8660d91b89065eb09bea/pkgconf/PKGBUILD#L26 +--- + configure.ac | 2 +- + doc/libpkgconf-path.rst | 2 +- + libpkgconf/config.h.meson | 3 --- + libpkgconf/path.c | 26 +------------------------- + meson.build | 1 - + tests/test_env.sh.in | 1 - + 6 files changed, 3 insertions(+), 32 deletions(-) + +diff --git a/configure.ac b/configure.ac +index cd6ab67..be494c9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -22,7 +22,7 @@ AX_CHECK_COMPILE_FLAG([-std=gnu99], [CFLAGS="$CFLAGS -std=gnu99"], [ + AX_CHECK_COMPILE_FLAG([-std=c99], [CFLAGS="$CFLAGS -std=c99"]) + ]) + AC_CONFIG_HEADERS([libpkgconf/config.h]) +-AC_CHECK_FUNCS([strlcpy strlcat strndup cygwin_conv_path]) ++AC_CHECK_FUNCS([strlcpy strlcat strndup]) + AC_CHECK_HEADERS([sys/stat.h]) + AM_INIT_AUTOMAKE([foreign dist-xz subdir-objects]) + AM_SILENT_RULES([yes]) +diff --git a/doc/libpkgconf-path.rst b/doc/libpkgconf-path.rst +index 6d39b3a..e923f61 100644 +--- a/doc/libpkgconf-path.rst ++++ b/doc/libpkgconf-path.rst +@@ -55,7 +55,7 @@ variables. + + .. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen) + +- Relocates a path, possibly calling normpath() or cygwin_conv_path() on it. ++ Relocates a path, possibly calling normpath() on it. + + :param char* buf: The path to relocate. + :param size_t buflen: The buffer length the path is contained in. +diff --git a/libpkgconf/config.h.meson b/libpkgconf/config.h.meson +index c0e97a6..09279da 100644 +--- a/libpkgconf/config.h.meson ++++ b/libpkgconf/config.h.meson +@@ -1,8 +1,5 @@ + /* libpkgconf/config.h.in. Generated from configure.ac by autoheader. */ + +-/* Define to 1 if you have the `cygwin_conv_path' function. */ +-#mesondefine HAVE_CYGWIN_CONV_PATH +- + /* Define to 1 if you have the `strlcat' function. */ + #mesondefine HAVE_STRLCAT + +diff --git a/libpkgconf/path.c b/libpkgconf/path.c +index 8e23c44..89d2ce0 100644 +--- a/libpkgconf/path.c ++++ b/libpkgconf/path.c +@@ -17,10 +17,6 @@ + #include + #include + +-#ifdef HAVE_CYGWIN_CONV_PATH +-# include +-#endif +- + #if defined(HAVE_SYS_STAT_H) && ! defined(_WIN32) + # include + # define PKGCONF_CACHE_INODES +@@ -306,7 +302,7 @@ normpath(const char *path) + * + * .. c:function:: bool pkgconf_path_relocate(char *buf, size_t buflen) + * +- * Relocates a path, possibly calling normpath() or cygwin_conv_path() on it. ++ * Relocates a path, possibly calling normpath() on it. + * + * :param char* buf: The path to relocate. + * :param size_t buflen: The buffer length the path is contained in. +@@ -320,25 +316,6 @@ pkgconf_path_relocate(char *buf, size_t buflen) + char *ti; + #endif + +-#ifdef HAVE_CYGWIN_CONV_PATH +- /* +- * If we are on Cygwin or MSYS, then we want to convert the virtual path +- * to a real DOS path, using cygwin_conv_path(). +- */ +- ssize_t size; +- char *tmpbuf; +- +- size = cygwin_conv_path(CCP_POSIX_TO_WIN_A, buf, NULL, 0); +- if (size < 0 || (size_t) size > buflen) +- return false; +- +- tmpbuf = malloc(size); +- if (cygwin_conv_path(CCP_POSIX_TO_WIN_A, buf, tmpbuf, size)) +- return false; +- +- pkgconf_strlcpy(buf, tmpbuf, buflen); +- free(tmpbuf); +-#else + char *tmpbuf; + + if ((tmpbuf = normpath(buf)) != NULL) +@@ -353,7 +330,6 @@ pkgconf_path_relocate(char *buf, size_t buflen) + pkgconf_strlcpy(buf, tmpbuf, buflen); + free(tmpbuf); + } +-#endif + + #ifdef _WIN32 + /* +diff --git a/meson.build b/meson.build +index e7822b8..991598a 100644 +--- a/meson.build ++++ b/meson.build +@@ -10,7 +10,6 @@ cc = meson.get_compiler('c') + cdata = configuration_data() + + check_functions = [ +- ['HAVE_CYGWIN_CONV_PATH', 'cygwin_conv_path', 'sys/cygwin.h'], + ['HAVE_STRLCAT', 'strlcat', 'string.h'], + ['HAVE_STRLCPY', 'strlcpy', 'string.h'], + ['HAVE_STRNDUP', 'strndup', 'string.h'], +diff --git a/tests/test_env.sh.in b/tests/test_env.sh.in +index 17ee1f5..e0ce042 100644 +--- a/tests/test_env.sh.in ++++ b/tests/test_env.sh.in +@@ -26,7 +26,6 @@ LIBRARY_PATH_ENV="LIBRARY_PATH" + PATH_SEP=":" + SYSROOT_DIR="${selfdir}/test" + case "$(uname -s)" in +-Msys|CYGWIN*) PATH_SEP=";";; + Haiku) LIBRARY_PATH_ENV="BELIBRARIES";; + esac diff --git a/pkgconf/002-meson-write-pc-file.patch b/pkgconf/002-meson-write-pc-file.patch deleted file mode 100644 index 0b9525bf..00000000 --- a/pkgconf/002-meson-write-pc-file.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- pkgconf-1.7.3/meson.build.orig 2020-10-18 17:27:40.210500600 +0200 -+++ pkgconf-1.7.3/meson.build 2020-10-18 17:27:00.204103200 +0200 -@@ -84,6 +84,13 @@ - soversion : '3', - ) - -+pkg = import('pkgconfig') -+pkg.generate(libpkgconf, -+ name : 'libpkgconf', -+ description : 'a library for accessing and manipulating development framework configuration', -+ url: 'http://github.com/pkgconf/pkgconf', -+ filebase : 'libpkgconf', -+) - - pkgconf_exe = executable('pkgconf', - 'cli/main.c', diff --git a/pkgconf/PKGBUILD b/pkgconf/PKGBUILD index f6aa8b31..bcfa0eed 100644 --- a/pkgconf/PKGBUILD +++ b/pkgconf/PKGBUILD @@ -1,8 +1,8 @@ # Maintainer: Bartlomiej Piotrowski pkgname=pkgconf -pkgver=1.7.3 -pkgrel=2 +pkgver=1.7.4 +pkgrel=1 pkgdesc='pkg-config compatible utility which does not depend on glib' url='https://github.com/pkgconf/pkgconf' arch=('i686' 'x86_64') @@ -13,18 +13,17 @@ makedepends=('meson' conflicts=('pkg-config') provides=('pkg-config') replaces=('pkg-config') -source=(https://distfiles.dereferenced.org/pkgconf/$pkgname-$pkgver.tar.xz - 001-no-cygpath-conv.patch - 002-meson-write-pc-file.patch) -sha256sums=('b846aea51cf696c3392a0ae58bef93e2e72f8e7073ca6ad1ed8b01c85871f9c0' - '3bbff179662d718c703c11b0ec34c118c73dc39fab05a90e7a55fccf15c2eb93' - '9af1f0600ca15e5f285ba54f4cb334f5d7e00f1bc21b6f571d71acd747f303b6') +source=(https://github.com/pkgconf/pkgconf/archive/refs/tags/$pkgname-$pkgver.tar.gz + 001-no-cygpath-conv.patch) +sha256sums=('2828dcdef88098748c306281d64a630b4ccd0703b1d92b532c31411e531d3088' + '573f79ee4a677d9f1a306620733a280ac4a2c9588fac73176c355f37e10a005b') prepare() { + mv "${pkgname}-${pkgname}-${pkgver}" "${pkgname}-${pkgver}" cd "${srcdir}/${pkgname}-${pkgver}" + # https://github.com/pkgconf/pkgconf/pull/216 patch -p1 -i ${srcdir}/001-no-cygpath-conv.patch - patch -p1 -i ${srcdir}/002-meson-write-pc-file.patch } build() {