Chris Lamb wrote on Thu, Aug 18, 2016 at 23:45:27 +0100:
>  gkrellm.pc: Makefile
> -     echo 'prefix=$(INSTALLROOT)\n'\
> +     printf 'prefix=$(INSTALLROOT)\n'\
>       'Name: GKrellM\n'\
>       'Description: Extensible GTK system monitoring application\n'\
>       'Version: $(VERSION)\n'\
>       'Requires: gtk+-2.0 >= 2.4.0\n'\
>       'Cflags: -I$(INCLUDEDIR)\n'\
> -     '$(GKRELLM_PC_EXTRA)' > gkrellm.pc
> +     '$(GKRELLM_PC_EXTRA)\n' > gkrellm.pc

Note this patch assumes that there are no '%' signs in the values of the
interpolated makefile parameters.

If that is a concern, I would suggest the following:

--- gkrellm-2.3.7.orig/Makefile
+++ gkrellm-2.3.7/Makefile
@@ -131,13 +131,13 @@ all gkrellm: gkrellm.pc
        (cd server && ${MAKE} gkrellmd)
 
 gkrellm.pc: Makefile
-       echo 'prefix=$(INSTALLROOT)\n'\
-       'Name: GKrellM\n'\
-       'Description: Extensible GTK system monitoring application\n'\
-       'Version: $(VERSION)\n'\
-       'Requires: gtk+-2.0 >= 2.4.0\n'\
-       'Cflags: -I$(INCLUDEDIR)\n'\
-       '$(GKRELLM_PC_EXTRA)' > gkrellm.pc
+       echo  >$@ 'prefix=$(INSTALLROOT)'
+       echo >>$@ 'Name: GKrellM'
+       echo >>$@ 'Description: Extensible GTK system monitoring application'
+       echo >>$@ 'Version: $(VERSION)'
+       echo >>$@ 'Requires: gtk+-2.0 >= 2.4.0'
+       echo >>$@ 'Cflags: -I$(INCLUDEDIR)'
+       printf >>$@ '%%s\n' '$(GKRELLM_PC_EXTRA)'
 
 install: install_gkrellm.pc
        (cd po && ${MAKE} install)

Cheers,

Daniel

Reply via email to