From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS11403 66.111.4.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 6E5DF1F463 for ; Tue, 24 Sep 2019 20:12:35 +0000 (UTC) Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 1B20621903; Tue, 24 Sep 2019 16:12:34 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Tue, 24 Sep 2019 16:12:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm1; bh=Jfs09t2uM5RHV156bSUggGi3dJ 6t1rn7tRRJeFgTDT4=; b=L9GPKOsdMk5G5/chOx/6RyEu6eif5bxqMyAbQAUDfh 0Vu/8YYATfZ4AdAVgrJlmOGri+rQnmEKa7Ob1GS3bBSa7ziXnpINuXxn1KM3ED1R 4XBJ/eHLzhr/DVLdrYP7VQct/YuoYDhTaQXvKncvpuu7Cx/mnwq/t1HzpHHXv60T 2YBfquriVi6Ttx5rR7uXhptitAELDJ7d8TWNxx/6Ljw4T8/Mu4OPfm/sNQnWhrni MIV5Vw8bJMcFtXOw+DfVXr9qbxlkS/1Ack8Zt0EF3//6nLoiJ1P5QGmVy/pO2jbg MjkyCO0XiYX12D7CXsR3ZgcdkDozchsdGAg+ZLu0dlmQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=Jfs09t2uM5RHV156b SUggGi3dJ6t1rn7tRRJeFgTDT4=; b=q21qlBeEoG3UKIpzU+IrAdHecx7Didywx KpodowrcvlivvVNgpmarauWwsNbfV5BBwqym8Ryrb77oJpIKMAcQNVky9KClRthi 9btOB57ZUmoA8/AxRwYjKAXwrwUeiJdADx4s+L1hxZzplzAz/L+8jyT39K9Fyr// xnBmVGb+IWAdox96Lrry211OcdVSnLTJZ29LQBnMexkPQ5Z56b7fNOFYCEPjGeO6 oyaKAYVXps9C7fxb5kRtQjKtmkeWv5lbpVXDHb4tQkiRUMlu9Hbhd3CIIcEJRADt 3nFcDP+1UfDY7zc0lBqtvis9prbao0726A1VhUrnFuSnWpyi8CmNQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrfedtgddugeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomheptehlhihsshgrucftohhsshcuoehhihesrghlhihsshgrrdhisheq necukfhppeekuddrudekjedrvddvgedrudeftdenucfrrghrrghmpehmrghilhhfrhhomh ephhhisegrlhihshhsrgdrihhsnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (130.224.187.81.in-addr.arpa [81.187.224.130]) by mail.messagingengine.com (Postfix) with ESMTPA id E336BD6005A; Tue, 24 Sep 2019 16:12:32 -0400 (EDT) From: Alyssa Ross To: meta@public-inbox.org Cc: Alyssa Ross , Amitai Schleier Subject: [PATCH] hlmod: update for highlight 3.51 API change Date: Tue, 24 Sep 2019 20:05:55 +0000 Message-Id: <20190924200551.31014-1-hi@alyssa.is> X-Mailer: git-send-email 2.22.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Quoting Amitai Schleier, who made this same change in ikiwiki[1], where lots of the public-inbox highlight code comes from: > As of 3.51, searchFile() is no longer provided in highlight's Perl > bindings (at least on NetBSD and OS X, as built from pkgsrc). This > leaves us falling through to getConfDir(), which has been gone > rather longer. > > From highlight git, it appears searchFile() and getFiletypesConfPath() > both originated in the 3.14 release. The latter is still available in > 3.51, and returns the same result searchFile() used to. Switch to it. So, this should still be compatible with the version of highlight.pm in Debian, but add support for newer versions as well. [1]: commit 4d06df9583e6c4145f8c6fc2fd51d7894c0b85ce Cc: Amitai Schleier --- lib/PublicInbox/HlMod.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/HlMod.pm b/lib/PublicInbox/HlMod.pm index 36e3110..1d7a460 100644 --- a/lib/PublicInbox/HlMod.pm +++ b/lib/PublicInbox/HlMod.pm @@ -20,7 +20,7 @@ use PublicInbox::Hval qw(src_escape ascii_html); my $hl; sub _parse_filetypes ($) { - my $ft_conf = $_[0]->searchFile('filetypes.conf') or + my $ft_conf = $_[0]->getFiletypesConfPath('filetypes') or die 'filetypes.conf not found by highlight'; open my $fh, '<', $ft_conf or die "failed to open($ft_conf): $!"; local $/; -- 2.22.1