Skip to contentSkip to conversation

groff: Fix build on Fedora 17 for 1.18.1.4

PATCH In review Ming Liu 2 participants 4 messages Jul 3, 2014

lore
Share & tools
lore

Ming Liu

author
#0 lore raw

PATCH 1/2 groff: Fix build on Fedora 17 for 1.18.1.4

The commit 79fc5576:
[ groff: Fix build on Fedora 17 ]

was applied to 1.22.2, but it's also needed by 1.18.1.4 to solve a same issue.

---
 meta/recipes-extended/groff/groff_1.18.1.4.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-extended/groff/groff_1.18.1.4.bb +8 -0
index 85357c5..6871949 100644
@@ -26,6 +26,14 @@ do_configure (){
 }
 
 do_install_append() {
+	# Some distros have both /bin/perl and /usr/bin/perl, but we set perl location
+	# for target as /usr/bin/perl, so fix it to /usr/bin/perl.
+	for i in afmtodit mmroff; do
+		if [ -f ${D}${bindir}/$i ]; then
+			sed -i -e '1s,#!.*perl,#! ${PERLPATH},' ${D}${bindir}/$i
+		fi
+	done
+
 	mkdir -p ${D}${sysconfdir}/groff
 	cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${sysconfdir}/groff/
 	cp -rf ${D}${datadir}/groff/site-tmac/* ${D}${datadir}/groff/${PV}/tmac/
Signature · 1 line
1.8.4.1
author
#1 lore raw

PATCH 2/2 groff: fix bindir transaction error

bindir is transfered to Makefile as ${D}${bindir}, hence it should not use DESTDIR as the prefix directory any more during the install.

---
 .../groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch | 39 ++++++++++++++++++++++
 meta/recipes-extended/groff/groff_1.18.1.4.bb      |  4 ++-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch new file +39 -0
new file mode 100644
index 0000000..559ae72
@@ -0,0 +1,39 @@
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Ming Liu <[email protected]>
+---
+ Makefile.sub |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/contrib/groffer/Makefile.sub
++++ b/contrib/groffer/Makefile.sub
+@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version.
+ 	$(RM) $@;
+ 	sed \
+             -e "s|@g@|$(g)|g" \
+-	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
++	    -e "s|@BINDIR@|$(bindir)|g" \
+ 	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ 	    -e "s|@VERSION@|$(version)$(revision)|g" \
+ 	    $(srcdir)/groffer.sh >$@;
+ 	chmod +x $@
+ 
+ install_data: groffer
+-	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
+-	$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
++	-test -d $(bindir) || $(mkinstalldirs) $(bindir)
++	-$(RM) $(bindir)/groffer
++	$(INSTALL_SCRIPT) groffer $(bindir)/groffer
+ 	-test -d $(DESTDIR)$(libdir)/groff/groffer || \
+           $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+@@ -58,7 +58,7 @@ install_data: groffer
+ 	$(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 
+ uninstall_sub:
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
++	-$(RM) $(bindir)/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 	-rmdir $(DESTDIR)$(libdir)/groff/groffer
meta/recipes-extended/groff/groff_1.18.1.4.bb +3 -1
index 6871949..38e1d36 100644
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
 SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
           file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
           file://man-local.patch \
-          file://mdoc-local.patch" 
+          file://mdoc-local.patch \
+          file://groff-1.18.1.4-fix-bindir.patch \
+" 
 
 inherit autotools texinfo
 
Signature · 1 line
1.8.4.1
#2 lore raw

Re: [PATCH 2/2] groff: fix bindir transaction error

Quoted 2 lines · Ming Liu

bindir is transfered to Makefile as ${D}${bindir}, hence it should not use DESTDIR as the prefix directory any more during the install.

This feels wrong, we really want to have DESTDIR support in the Makefile. Can we stop passing ${D} as part of bindir instead?

Cheers,

Richard

Quoted 70 lines
---
 .../groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch | 39 ++++++++++++++++++++++
 meta/recipes-extended/groff/groff_1.18.1.4.bb      |  4 ++-
 2 files changed, 42 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch
meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch new file +39 -0
new file mode 100644
index 0000000..559ae72
@@ -0,0 +1,39 @@
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Ming Liu <[email protected]>
+---
+ Makefile.sub |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/contrib/groffer/Makefile.sub
++++ b/contrib/groffer/Makefile.sub
+@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version.
+ 	$(RM) $@;
+ 	sed \
+             -e "s|@g@|$(g)|g" \
+-	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
++	    -e "s|@BINDIR@|$(bindir)|g" \
+ 	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ 	    -e "s|@VERSION@|$(version)$(revision)|g" \
+ 	    $(srcdir)/groffer.sh >$@;
+ 	chmod +x $@
+ 
+ install_data: groffer
+-	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
+-	$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
++	-test -d $(bindir) || $(mkinstalldirs) $(bindir)
++	-$(RM) $(bindir)/groffer
++	$(INSTALL_SCRIPT) groffer $(bindir)/groffer
+ 	-test -d $(DESTDIR)$(libdir)/groff/groffer || \
+           $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+@@ -58,7 +58,7 @@ install_data: groffer
+ 	$(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 
+ uninstall_sub:
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
++	-$(RM) $(bindir)/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 	-rmdir $(DESTDIR)$(libdir)/groff/groffer
meta/recipes-extended/groff/groff_1.18.1.4.bb +3 -1
index 6871949..38e1d36 100644
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
 SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
           file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
           file://man-local.patch \
-          file://mdoc-local.patch" 
+          file://mdoc-local.patch \
+          file://groff-1.18.1.4-fix-bindir.patch \
+" 
 
 inherit autotools texinfo
 
Signature · 1 line
1.8.4.1
author
#3 lore raw

Re: [PATCH 2/2] groff: fix bindir transaction error

Quoted 5 lines · Richard Purdie
Quoted 2 lines · Ming Liu

bindir is transfered to Makefile as ${D}${bindir}, hence it should not use DESTDIR as the prefix directory any more during the install.

This feels wrong, we really want to have DESTDIR support in the Makefile. Can we stop passing ${D} as part of bindir instead?

I think that is because there are many other Makefiles where only bindir is used to indicate the binary directory without DESTDIR, dozen of them except only one in this case, to name but a few:
......
groff-1.18.1.4/contrib/eqn2graph/Makefile.sub: $(INSTALL_SCRIPT) eqn2graph $(bindir)/eqn2graph
groff-1.18.1.4/src/roff/nroff/Makefile.sub: $(INSTALL_SCRIPT) nroff $(bindir)/$(NAMEPREFIX)nroff
groff-1.18.1.4/src/utils/afmtodit/Makefile.sub: $(INSTALL_SCRIPT) afmtodit $(bindir)/afmtodit
......

the best,
thank you

Quoted 78 lines

Cheers,

Richard

Quoted 70 lines
---
  .../groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch | 39 ++++++++++++++++++++++
  meta/recipes-extended/groff/groff_1.18.1.4.bb      |  4 ++-
  2 files changed, 42 insertions(+), 1 deletion(-)

create mode 100644 meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch

meta/recipes-extended/groff/groff-1.18.1.4/groff-1.18.1.4-fix-bindir.patch new file +39 -0
new file mode 100644
index 0000000..559ae72
@@ -0,0 +1,39 @@
+Upstream-Status: Inappropriate [embedded]
+
+Signed-off-by: Ming Liu <[email protected]>
+---
+ Makefile.sub |   10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/contrib/groffer/Makefile.sub
++++ b/contrib/groffer/Makefile.sub
+@@ -38,16 +38,16 @@ groffer: groffer.sh groffer2.sh version.
+ 	$(RM) $@;
+ 	sed \
+             -e "s|@g@|$(g)|g" \
+-	    -e "s|@BINDIR@|$(DESTDIR)$(bindir)|g" \
++	    -e "s|@BINDIR@|$(bindir)|g" \
+ 	    -e "s|@libdir@|$(DESTDIR)$(libdir)|g" \
+ 	    -e "s|@VERSION@|$(version)$(revision)|g" \
+ 	    $(srcdir)/groffer.sh >$@;
+ 	chmod +x $@
+
+ install_data: groffer
+-	-test -d $(DESTDIR)$(bindir) || $(mkinstalldirs) $(DESTDIR)$(bindir)
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
+-	$(INSTALL_SCRIPT) groffer $(DESTDIR)$(bindir)/groffer
++	-test -d $(bindir) || $(mkinstalldirs) $(bindir)
++	-$(RM) $(bindir)/groffer
++	$(INSTALL_SCRIPT) groffer $(bindir)/groffer
+ 	-test -d $(DESTDIR)$(libdir)/groff/groffer || \
+           $(mkinstalldirs) $(DESTDIR)$(libdir)/groff/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+@@ -58,7 +58,7 @@ install_data: groffer
+ 	$(DESTDIR)$(libdir)/groff/groffer/version.sh
+
+ uninstall_sub:
+-	-$(RM) $(DESTDIR)$(bindir)/groffer
++	-$(RM) $(bindir)/groffer
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/groffer2.sh
+ 	-$(RM) $(DESTDIR)$(libdir)/groff/groffer/version.sh
+ 	-rmdir $(DESTDIR)$(libdir)/groff/groffer
meta/recipes-extended/groff/groff_1.18.1.4.bb +3 -1
index 6871949..38e1d36 100644
@@ -11,7 +11,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=e43fc16fccd8519fba405f0a0ff6e8a3"
  SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \
            file://groff-1.18.1.4-remove-mom.patch;striplevel=1 \
            file://man-local.patch \
-          file://mdoc-local.patch"
+          file://mdoc-local.patch \
+          file://groff-1.18.1.4-fix-bindir.patch \
+"
 
  inherit autotools texinfo
 
Signature · 1 line
1.8.4.1