NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/58104 (When building x11, awk (not ${TOOL_AWK}) is used for PACKAGE_VERSION)



Thank you for applying the patch.
Please pull-up to release branch.

And, when ${TOOL_AWK} dumps core (but, less times than platform’s awk), then I use ${TOOL_GREP} before ${TOOL_AWK} as following.


--- src/external/mit/xorg/xorg-pkg-ver.mk-110    2018-05-31 18:31:39.000000000 

+0900
+++ src/external/mit/xorg/xorg-pkg-ver.mk    2024-03-31 22:52:57.865845014 +0900
@@ -11,46 +11,50 @@

.if exists(${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure)
XORG_PKG_PACKAGE_VERSION!= \
+    ${TOOL_GREP} ^PACKAGE_VERSION= ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure 
|    \
   ${TOOL_AWK} -F= '/^PACKAGE_VERSION=/ {            \
        match($$2, "([0-9]+\\.)+[0-9]+");            \
        version = substr($$2, RSTART, RLENGTH);        \
        print version;                    \
        exit 0;                        \
-    }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
+    }'
.if !empty(XORG_PKG_PACKAGE_VERSION)
CPPFLAGS+=    -DPACKAGE_VERSION=\"${XORG_PKG_PACKAGE_VERSION:Q}\"
CPPFLAGS+=    -DVERSION=\"${XORG_PKG_PACKAGE_VERSION:q}\"
.endif

XORG_PKG_PACKAGE_STRING!= \
+    ${TOOL_GREP} ^PACKAGE_STRING= ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure 
|    \
   ${TOOL_AWK} -F= '/^PACKAGE_STRING=/ {            \
        match($$2, "[-_a-zA-Z]+[    ]+([0-9]+\\.)+[0-9]+");    \
        string = substr($$2, RSTART, RLENGTH);        \
        print string;                    \
        exit 0;                        \
-    }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
+    }'
.if !empty(XORG_PKG_PACKAGE_STRING)
CPPFLAGS+=    -DPACKAGE_STRING=\"${XORG_PKG_PACKAGE_STRING:Q}\"
.endif

XORG_PKG_PACKAGE_NAME!= \
+    ${TOOL_GREP} ^PACKAGE_NAME= ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure |    \
   ${TOOL_AWK} -F= '/^PACKAGE_NAME=/ {            \
        match($$2, "[-_a-zA-Z0-9]+");            \
        name = substr($$2, RSTART, RLENGTH);        \
        print name;                    \
        exit 0;                        \
-    }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
+    }'
.if !empty(XORG_PKG_PACKAGE_NAME)
CPPFLAGS+=    -DPACKAGE_NAME=\"${XORG_PKG_PACKAGE_NAME:Q}\"
.endif

XORG_PKG_RELEASE_DATE!= \
+    ${TOOL_GREP} ^RELEASE_DATE= ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure |    \
   ${TOOL_AWK} -F= '/^RELEASE_DATE=/ {            \
        match($$2, "[-_a-zA-Z0-9]+");            \
        name = substr($$2, RSTART, RLENGTH);        \
        print name;                    \
        exit 0;                        \
-    }' ${X11SRCDIR.${XORG_PKG_VER_PROG}}/configure
+    }'
.if !empty(XORG_PKG_RELEASE_DATE)
CPPFLAGS+=    -DRELEASE_DATE=\"${XORG_PKG_RELEASE_DATE:Q}\"
.endif
--- src/share/mk/bsd.x11.mk-114525    2023-12-01 12:32:41.555622511 +0900
+++ src/share/mk/bsd.x11.mk    2024-03-31 23:31:32.244541090 +0900
@@ -274,8 +274,9 @@
   if [ -n '${PKGCONFIG_VERSION.${.PREFIX}}' ]; then \
       _pkg_version='${PKGCONFIG_VERSION.${.PREFIX}}'; \
   else \
-        _pkg_version=$$(${PRINT_PACKAGE_VERSION} \
-            ${PKGDIST.${.PREFIX}}/configure); \
+        _pkg_version=$$(${TOOL_GREP} ^PACKAGE_VERSION= \
+            ${PKGDIST.${.PREFIX}}/configure |    \
+            ${PRINT_PACKAGE_VERSION});    \
   fi; \
   ${TOOL_SED} \
       ${PKGCONFIG_SED_FLAGS} \

-- 
Kouichi Hashikawa


Home | Main Index | Thread Index | Old Index