libretro-core.eclass: Use | instead of : as sed CLFAGS delimiter
authorCraig Andrews <candrews@gentoo.org>
Sat, 29 Feb 2020 04:23:41 +0000 (23:23 -0500)
committerCraig Andrews <candrews@gentoo.org>
Sat, 29 Feb 2020 04:35:42 +0000 (23:35 -0500)
Signed-off-by: Craig Andrews <candrews@gentoo.org>
Closes: https://bugs.gentoo.org/710952
Closes: https://bugs.gentoo.org/710972
Closes: https://bugs.gentoo.org/711048
Closes: https://bugs.gentoo.org/710880

eclass/libretro-core.eclass

index 768c4701827bae42d2c59facb9ba94a7447a506c..f5f63065f2238fd1b88ee41d0b994654f24cd92b 100644 (file)
@@ -126,12 +126,12 @@ libretro-core_src_prepare() {
                # * Add short-rev to Makefile
                sed \
                        -e 's/\r$//g' \
-                       -e "/flags.*=/s:-O[[:digit:]]:${CFLAGS}:g" \
-                       -e "/CFLAGS.*=/s:-O[[:digit:]]:${CFLAGS}:g" \
-                       -e "/CXXFLAGS.*=/s:-O[[:digit:]]:${CXXFLAGS}:g" \
-                       -e "/.*,--version-script=.*/s:$: ${LDFLAGS} ${LIBS}:g" \
-                       -e "/\$(CC)/s:\(\$(SHARED)\):\1 ${LDFLAGS} ${LIBS}:" \
-                       -e 's:\(\$(CC)\):\1 \$(CFLAGS):g' \
+                       -e "/flags.*=/s|-O[[:digit:]]|${CFLAGS}|g" \
+                       -e "/CFLAGS.*=/s|-O[[:digit:]]|${CFLAGS}|g" \
+                       -e "/CXXFLAGS.*=/s|-O[[:digit:]]|${CXXFLAGS}|g" \
+                       -e "/.*,--version-script=.*/s|$| ${LDFLAGS} ${LIBS}|g" \
+                       -e "/\$(CC)/s|\(\$(SHARED)\)|\1 ${LDFLAGS} ${LIBS}|" \
+                       -e 's|\(\$(CC)\)|\1 \$(CFLAGS)|g' \
                        -e "s/GIT_VERSION\s.=.*$/GIT_VERSION=${custom_libretro_commit_sha}/g" \
                        -i "${makefile}" || die "Failed to use custom cflags in ${makefile}"
        done