summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-10-06 02:11:02 +0100
committerSam James <sam@gentoo.org>2023-10-06 02:11:07 +0100
commitae76bbdafb14402e4779e00de82b2583ebb3d13e (patch)
tree498987976be687c667b734e22383aea9c2c71ac6 /app-text/htp
parentdev-python/pytest-xdist: drop pytest-forked dependency (diff)
downloadgentoo-ae76bbdafb14402e4779e00de82b2583ebb3d13e.tar.gz
gentoo-ae76bbdafb14402e4779e00de82b2583ebb3d13e.tar.bz2
gentoo-ae76bbdafb14402e4779e00de82b2583ebb3d13e.zip
app-text/htp: update EAPI 6 -> 8, fix build with perl-5.26(!), fix parallel make
Closes: https://bugs.gentoo.org/668250 Closes: https://bugs.gentoo.org/712280 Closes: https://bugs.gentoo.org/827173 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'app-text/htp')
-rw-r--r--app-text/htp/files/htp-1.19-fix-perl-5.26.patch12
-rw-r--r--app-text/htp/files/htp-1.19-no-prestrip.patch11
-rw-r--r--app-text/htp/files/htp-1.19-parallel-make.patch27
-rw-r--r--app-text/htp/htp-1.19-r1.ebuild36
4 files changed, 86 insertions, 0 deletions
diff --git a/app-text/htp/files/htp-1.19-fix-perl-5.26.patch b/app-text/htp/files/htp-1.19-fix-perl-5.26.patch
new file mode 100644
index 000000000000..b3adff7db2be
--- /dev/null
+++ b/app-text/htp/files/htp-1.19-fix-perl-5.26.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/668250
+--- a/homepage/ref/pphtp.pl
++++ b/homepage/ref/pphtp.pl
+@@ -6,7 +6,7 @@
+ # -n include line numbers
+ # -s include EBNF like syntax
+
+-require "hlhtp.pl";
++require "./hlhtp.pl";
+
+
+ while ($ARGV[0] =~ /^-(.*)/) {
diff --git a/app-text/htp/files/htp-1.19-no-prestrip.patch b/app-text/htp/files/htp-1.19-no-prestrip.patch
new file mode 100644
index 000000000000..c47b9e4d4241
--- /dev/null
+++ b/app-text/htp/files/htp-1.19-no-prestrip.patch
@@ -0,0 +1,11 @@
+--- a/src/Makefile.sub
++++ b/src/Makefile.sub
+@@ -46,7 +46,7 @@ install: install-bin
+
+ install-bin: $(HTP)
+ mkdir -p $(bindir)
+- $(INSTALL) -s $(HTP) $(bindir)
++ $(INSTALL) $(HTP) $(bindir)
+
+ #
+ # explicit dependency: final executable
diff --git a/app-text/htp/files/htp-1.19-parallel-make.patch b/app-text/htp/files/htp-1.19-parallel-make.patch
new file mode 100644
index 000000000000..850b1d18e330
--- /dev/null
+++ b/app-text/htp/files/htp-1.19-parallel-make.patch
@@ -0,0 +1,27 @@
+https://bugs.gentoo.org/827173
+https://sources.debian.org/patches/htp/1.19-8/0004-Parallel-ftbfs.patch/
+
+Description: Fix occasional parallel FTBFS
+ Various source files indirectly include $(d)/version.inc,
+ don't regenerate it in the middle of the build.
+Author: Adrian Bunk <bunk@debian.org>
+
+--- htp-1.19.orig/src/Makefile.sub
++++ htp-1.19/src/Makefile.sub
+@@ -57,14 +57,12 @@ $(HTP) : $(OBJ$(d))
+ #
+ # implicit dependencies for source code
+ #
+-$(OBJ$(d)) : %.$(OBJEXT) : %.c
++$(OBJ$(d)) : %.$(OBJEXT) : %.c $(d)/version.inc
+ ifdef WIN32DMC
+ cd $(dir $<); $(CC) $(CCOPT) $(DEFINES) $(notdir $<)
+ else
+ $(CC) $(CCOPT) $(DEFINES) -o $*.$(OBJEXT) $<
+ endif
+
+-$(d)/htp.$(OBJEXT) $(d)/ver.$(OBJEXT): $(d)/version.inc
+-
+ # restore parent dir
+ d := $(p$(d))
+
diff --git a/app-text/htp/htp-1.19-r1.ebuild b/app-text/htp/htp-1.19-r1.ebuild
new file mode 100644
index 000000000000..c01e19b48e7d
--- /dev/null
+++ b/app-text/htp/htp-1.19-r1.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="An HTML preprocessor"
+HOMEPAGE="http://htp.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="Clarified-Artistic"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.19-no-prestrip.patch
+ "${FILESDIR}"/${PN}-1.19-parallel-make.patch
+ "${FILESDIR}"/${PN}-1.19-fix-perl-5.26.patch
+)
+
+src_compile() {
+ # TOOD: Tests are always run by the Makefile right now
+ emake \
+ CCOPT="-c ${CFLAGS} ${CPPFLAGS} -DHAVE_SNPRINTF -DHAVE_VASPRINTF -DHAVE_ASPRINTF" \
+ CC="$(tc-getCC)" \
+ LINK='$(CC) $(LDFLAGS)'
+}
+
+src_install() {
+ emake \
+ DESTDIR="${D}" \
+ prefix='$(DESTDIR)/usr' \
+ pkgdocdir='$(DESTDIR)/usr/share/doc/${PF}/html' \
+ install
+}