From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- ...need_charset_alias-when-building-for-musl.patch | 30 ++++++ .../0001-replace-perl-w-with-use-warnings.patch | 102 +++++++++++++++++++++ ...off-1.22.2-correct-man.local-install-path.patch | 34 +++++++ poky/meta/recipes-extended/groff/groff_1.22.3.bb | 84 +++++++++++++++++ 4 files changed, 250 insertions(+) create mode 100644 poky/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch create mode 100644 poky/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch create mode 100644 poky/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch create mode 100644 poky/meta/recipes-extended/groff/groff_1.22.3.bb (limited to 'poky/meta/recipes-extended/groff') diff --git a/poky/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch b/poky/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch new file mode 100644 index 000000000..b61b43281 --- /dev/null +++ b/poky/meta/recipes-extended/groff/groff-1.22.3/0001-Unset-need_charset_alias-when-building-for-musl.patch @@ -0,0 +1,30 @@ +From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 13 Apr 2015 17:02:13 -0700 +Subject: [PATCH] Unset need_charset_alias when building for musl + +localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4 +which actually shoudl be fixed in gnulib and then all downstream +projects will get it eventually. For now we apply the fix to +coreutils + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + lib/gnulib.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: groff-1.22.3/src/libs/gnulib/lib/Makefile.am +=================================================================== +--- groff-1.22.3.orig/src/libs/gnulib/lib/Makefile.am ++++ groff-1.22.3/src/libs/gnulib/lib/Makefile.am +@@ -113,7 +113,7 @@ install-exec-localcharset: all-local + case '$(host_os)' in \ + darwin[56]*) \ + need_charset_alias=true ;; \ +- darwin* | cygwin* | mingw* | pw32* | cegcc*) \ ++ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \ + need_charset_alias=false ;; \ + *) \ + need_charset_alias=true ;; \ diff --git a/poky/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch b/poky/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch new file mode 100644 index 000000000..f1db5b065 --- /dev/null +++ b/poky/meta/recipes-extended/groff/groff-1.22.3/0001-replace-perl-w-with-use-warnings.patch @@ -0,0 +1,102 @@ +From 5b574542070db286c89b3827e8f15ed4b3b39034 Mon Sep 17 00:00:00 2001 +From: Robert Yang +Date: Thu, 6 Apr 2017 01:46:00 -0700 +Subject: [PATCH] replace "perl -w" with "use warnings" + +The shebang's max length is usually 128 as defined in +/usr/include/linux/binfmts.h: + #define BINPRM_BUF_SIZE 128 + +There would be errors when @PERL@ is longer than 128, use +'/usr/bin/env perl' can fix the problem, but '/usr/bin/env perl -w' +doesn't work: + +/usr/bin/env: perl -w: No such file or directory + +So replace "perl -w" with "use warnings" to make it work. + +Upstream-Status: Pending + +Signed-off-by: Robert Yang +--- + font/devpdf/util/BuildFoundries.pl | 3 ++- + src/devices/gropdf/gropdf.pl | 3 ++- + src/devices/gropdf/pdfmom.pl | 3 ++- + src/utils/afmtodit/afmtodit.pl | 3 ++- + 4 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/font/devpdf/util/BuildFoundries.pl b/font/devpdf/util/BuildFoundries.pl +index 39f2f0d..a2bfd8e 100644 +--- a/font/devpdf/util/BuildFoundries.pl ++++ b/font/devpdf/util/BuildFoundries.pl +@@ -1,4 +1,4 @@ +-#!/usr/bin/perl -w ++#!/usr/bin/perl + # + # BuildFoundries : Given a Foundry file generate groff and download files + # Deri James : Monday 07 Feb 2011 +@@ -22,6 +22,7 @@ + # along with this program. If not, see . + + use strict; ++use warnings; + + my $where=shift||''; + my $devps=shift||'../devps'; +diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl +index 035d123..b933b32 100644 +--- a/src/devices/gropdf/gropdf.pl ++++ b/src/devices/gropdf/gropdf.pl +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # + # gropdf : PDF post processor for groff + # +@@ -21,6 +21,7 @@ + # along with this program. If not, see . + + use strict; ++use warnings; + use Getopt::Long qw(:config bundling); + use Compress::Zlib; + +diff --git a/src/devices/gropdf/pdfmom.pl b/src/devices/gropdf/pdfmom.pl +index beec820..4b46ea4 100644 +--- a/src/devices/gropdf/pdfmom.pl ++++ b/src/devices/gropdf/pdfmom.pl +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!@PERL@ + # + # pdfmom : Frontend to run groff -mom to produce PDFs + # Deri James : Friday 16 Mar 2012 +@@ -24,6 +24,7 @@ + # along with this program. If not, see . + + use strict; ++use warnings; + use File::Temp qw/tempfile/; + my @cmd; + my $dev='pdf'; +diff --git a/src/utils/afmtodit/afmtodit.pl b/src/utils/afmtodit/afmtodit.pl +index 4f2ce83..5c078ff 100644 +--- a/src/utils/afmtodit/afmtodit.pl ++++ b/src/utils/afmtodit/afmtodit.pl +@@ -1,4 +1,4 @@ +-#! /usr/bin/perl -w ++#! /usr/bin/perl + # -*- Perl -*- + # Copyright (C) 1989-2014 Free Software Foundation, Inc. + # Written by James Clark (jjc@jclark.com) +@@ -19,6 +19,7 @@ + # along with this program. If not, see . + + use strict; ++use warnings; + + @afmtodit.tables@ + +-- +2.10.2 + diff --git a/poky/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch b/poky/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch new file mode 100644 index 000000000..c73328a18 --- /dev/null +++ b/poky/meta/recipes-extended/groff/groff-1.22.3/groff-1.22.2-correct-man.local-install-path.patch @@ -0,0 +1,34 @@ +Correct the install path of man.local to fix following error: + /yocto/build/tmp/sysroots/x86_64-linux/usr/share/groff/1.22.2/tmac/an-old.tmac:690: warning: can't find macro file `man.local' + +Signed-off-by: Zhenhua Luo +Upstream-Status: Pending + +diff --git a/tmac/Makefile.sub b/tmac/Makefile.sub +index 1506232..f1468c5 100644 +--- a/tmac/Makefile.sub ++++ b/tmac/Makefile.sub +@@ -121,9 +121,9 @@ install_data: $(NORMALFILES) $(SPECIALFILES) man.local \ + $(RM) $(DESTDIR)$(mdocdir)/$$f; \ + $(INSTALL_DATA) $$f-s $(DESTDIR)$(mdocdir)/$$f; \ + done +- -test -f $(DESTDIR)$(localtmacdir)/man.local \ ++ -test -f $(DESTDIR)$(tmacdir)/man.local \ + || $(INSTALL_DATA) $(srcdir)/man.local \ +- $(DESTDIR)$(localtmacdir)/man.local ++ $(DESTDIR)$(tmacdir)/man.local + -test -f $(DESTDIR)$(localtmacdir)/mdoc.local \ + || $(INSTALL_DATA) mdoc.local-s $(DESTDIR)$(localtmacdir)/mdoc.local + +@@ -164,9 +164,9 @@ uninstall_sub: + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_s_prefix)s.tmac + $(RM) $(DESTDIR)$(tmacdir)/$(tmac_an_prefix)an.tmac + $(RM) $(DESTDIR)$(tmacdir)/www.tmac +- -if cmp -s $(DESTDIR)$(localtmacdir)/man.local \ ++ -if cmp -s $(DESTDIR)$(tmacdir)/man.local \ + $(srcdir)/man.local; then \ +- $(RM) $(DESTDIR)$(localtmacdir)/man.local; \ ++ $(RM) $(DESTDIR)$(tmacdir)/man.local; \ + fi + -if cmp -s $(DESTDIR)$(localtmacdir)/mdoc.local \ + $(srcdir)/mdoc.local; then \ diff --git a/poky/meta/recipes-extended/groff/groff_1.22.3.bb b/poky/meta/recipes-extended/groff/groff_1.22.3.bb new file mode 100644 index 000000000..7472f5982 --- /dev/null +++ b/poky/meta/recipes-extended/groff/groff_1.22.3.bb @@ -0,0 +1,84 @@ +SUMMARY = "GNU Troff software" +DESCRIPTION = "The groff (GNU troff) software is a typesetting package which reads plain text mixed with \ +formatting commands and produces formatted output." +SECTION = "base" +HOMEPAGE = "http://www.gnu.org/software/groff/" +LICENSE = "GPLv3" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +SRC_URI = "${GNU_MIRROR}/groff/groff-${PV}.tar.gz \ + file://groff-1.22.2-correct-man.local-install-path.patch \ + file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0001-replace-perl-w-with-use-warnings.patch \ +" + +SRC_URI[md5sum] = "cc825fa64bc7306a885f2fb2268d3ec5" +SRC_URI[sha256sum] = "3a48a9d6c97750bfbd535feeb5be0111db6406ddb7bb79fc680809cda6d828a5" + +DEPENDS = "groff-native" +DEPENDS_class-native = "" +RDEPENDS_${PN} += "perl sed" + +inherit autotools texinfo + +EXTRA_OECONF = "--without-x" +PARALLEL_MAKE = "" + +CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" + +do_configure_prepend() { + if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then + sed -i \ + -e '/^GROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/groff:' \ + -e '/^TROFFBIN=/s:=.*:=${STAGING_BINDIR_NATIVE}/troff:' \ + -e '/^GROFF_BIN_PATH=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ + -e '/^GROFF_BIN_DIR=/s:=.*:=${STAGING_BINDIR_NATIVE}:' \ + ${S}/contrib/*/Makefile.sub \ + ${S}/doc/Makefile.in \ + ${S}/doc/Makefile.sub + fi +} + +do_configure_append() { + # generate gnulib configure script + olddir=`pwd` + cd ${S}/src/libs/gnulib/ + ACLOCAL="$ACLOCAL" autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || die "autoreconf execution failed." + cd ${olddir} +} + +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 gropdf pdfmom grog; do + if [ -f ${D}${bindir}/$i ]; then + sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/$i + fi + done + if [ -e ${D}${libdir}/charset.alias ]; then + rm -rf ${D}${libdir}/charset.alias + fi + + # awk is located at /usr/bin/, not /bin/ + SPECIAL_AWK=`find ${D} -name special.awk` + if [ -f ${SPECIAL_AWK} ]; then + sed -i -e 's:#!.*awk:#! ${USRBINPATH}/awk:' ${SPECIAL_AWK} + fi + + # not ship /usr/bin/glilypond and its releated files in embedded target system + rm -rf ${D}${bindir}/glilypond + rm -rf ${D}${libdir}/groff/glilypond + rm -rf ${D}${mandir}/man1/glilypond* +} + +do_install_append_class-native() { + create_cmdline_wrapper ${D}/${bindir}/groff \ + -F${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/font \ + -M${STAGING_DIR_NATIVE}${datadir_native}/groff/${PV}/tmac +} + +FILES_${PN} += "${libdir}/${BPN}/site-tmac \ + ${libdir}/${BPN}/groffer/" + +BBCLASSEXTEND = "native" -- cgit v1.2.1