From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 04633138334 for ; Wed, 5 Jun 2019 12:32:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 14F2CE08D0; Wed, 5 Jun 2019 12:32:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C7D0CE08CD for ; Wed, 5 Jun 2019 12:32:20 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77C57345763 for ; Wed, 5 Jun 2019 12:32:19 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id D9C17621 for ; Wed, 5 Jun 2019 12:32:15 +0000 (UTC) From: "Alexis Ballier" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexis Ballier" Message-ID: <1496934562.cb9b2f139fb89bd77e9b0572ef5a92a68ee6cee2.aballier@gentoo> Subject: [gentoo-commits] proj/tex:master commit in: scripts/texlive/tlpsrc/ X-VCS-Repository: proj/tex X-VCS-Files: scripts/texlive/tlpsrc/Makefile scripts/texlive/tlpsrc/Makefile-dist scripts/texlive/tlpsrc/cataloguelicense2gentoolicense.sh scripts/texlive/tlpsrc/getlicense.sh X-VCS-Directories: scripts/texlive/tlpsrc/ X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier X-VCS-Revision: cb9b2f139fb89bd77e9b0572ef5a92a68ee6cee2 X-VCS-Branch: master Date: Wed, 5 Jun 2019 12:32:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 85e7672e-cf04-4ea6-bff7-b28fed112efd X-Archives-Hash: 684c96f3ccd8b91bbee3306de9ca508a commit: cb9b2f139fb89bd77e9b0572ef5a92a68ee6cee2 Author: Alexis Ballier gentoo org> AuthorDate: Thu Jun 8 15:09:22 2017 +0000 Commit: Alexis Ballier gentoo org> CommitDate: Thu Jun 8 15:09:22 2017 +0000 URL: https://gitweb.gentoo.org/proj/tex.git/commit/?id=cb9b2f13 generate license from texlive files instead of parsing html with regexpes... scripts/texlive/tlpsrc/Makefile | 13 +++++----- scripts/texlive/tlpsrc/Makefile-dist | 6 ----- .../tlpsrc/cataloguelicense2gentoolicense.sh | 30 ++++++++++++++++++++++ scripts/texlive/tlpsrc/getlicense.sh | 2 +- 4 files changed, 37 insertions(+), 14 deletions(-) diff --git a/scripts/texlive/tlpsrc/Makefile b/scripts/texlive/tlpsrc/Makefile index e35bcd9..900fad3 100644 --- a/scripts/texlive/tlpsrc/Makefile +++ b/scripts/texlive/tlpsrc/Makefile @@ -30,7 +30,7 @@ unpacked : $(FULLDESC:%=%.unpacked) %.srclist: %.tlpobj ./gensrc.sh $(shell cat $(<:%.tlpobj=%.list)) > $@ -%.licenselist: %.cataloguehtml +%.licenselist: %.tlplic ./getlicense.sh $(shell cat $(@:%.licenselist=%.list)) | sort | uniq | tr '\n' ' ' > $@ %.gentoolicense: %.licenselist @@ -65,6 +65,7 @@ clean: $(RMF) $(FULLDESC:%=%.list) $(RMF) $(FULLDESC:%=%.srclist) $(RMF) $(FULLDESC:%=%.doclist) + $(RMF) $(FULLDESC:%=%.fulllist) $(RMF) $(FULLDESC:%=%.licenselist) $(RMF) $(FULLDESC:%=%.base) $(RMF) $(FULLDESC:%=%.versionnedzips) @@ -76,7 +77,6 @@ clean: $(RMF) $(DESC:%=%.metadata) $(RMF) *.tlpobj $(RMF) *.tlplic - $(RMF) *.cataloguehtml $(RMF) *.unpacked $(RMF) tldir @@ -100,12 +100,11 @@ clean: $(MAKE) CONTENTS="$(shell cat $<)" -f Makefile-dist tlpobj touch $@ -%.tlplic: %.list - $(MAKE) CONTENTS="$(shell cat $<)" -f Makefile-dist tlplic - touch $@ +%.fulllist: %.list %.doclist %.srclist + cat $^ | tr '\n' ' ' > $@ -%.cataloguehtml: %.list - $(MAKE) CONTENTS="$(shell cat $<)" -f Makefile-dist cataloguehtml +%.tlplic: %.fulllist + $(MAKE) CONTENTS="$(shell cat $<)" -f Makefile-dist tlplic touch $@ %-post-ebuild: diff --git a/scripts/texlive/tlpsrc/Makefile-dist b/scripts/texlive/tlpsrc/Makefile-dist index 3a7c625..023e141 100644 --- a/scripts/texlive/tlpsrc/Makefile-dist +++ b/scripts/texlive/tlpsrc/Makefile-dist @@ -22,12 +22,6 @@ tlplic: $(CONTENTS:%=%.tlplic) %.tlpobj: $(TL_TRUNK)/Master/tlpkg/tlpsrc/%.tlpsrc $(TL_TRUNK)/Master/tlpkg/bin/tl-update-tlpdb -master=$(TL_TRUNK)/Master -output=$@ --tlpsrc-from-cmdline $< -%.cataloguehtml: - curl -I http://www.ctan.org/pkg/$(@:%.cataloguehtml=%) | grep 404 || wget -O $@ http://www.ctan.org/pkg/$(@:%.cataloguehtml=%) - touch $@ - -cataloguehtml: $(CONTENTS:%=%.cataloguehtml) - tldir: mkdir tlunpackdir touch $@ diff --git a/scripts/texlive/tlpsrc/cataloguelicense2gentoolicense.sh b/scripts/texlive/tlpsrc/cataloguelicense2gentoolicense.sh index 512022a..6a13b4d 100755 --- a/scripts/texlive/tlpsrc/cataloguelicense2gentoolicense.sh +++ b/scripts/texlive/tlpsrc/cataloguelicense2gentoolicense.sh @@ -13,6 +13,10 @@ while [ $# -gt 0 ] ; do echo "GPL-3";; gpl3+) echo "GPL-3+";; + gpl3+cc-by-sa-4) + $0 gpl3+ cc-by-sa-4;; + gplofllppl) + $0 gpl ofl lppl;; lppl1) echo "LPPL-1.3";; lppl) @@ -23,6 +27,18 @@ while [ $# -gt 0 ] ; do echo "LPPL-1.3";; lppl1.3c) echo "LPPL-1.3c";; + # Some tlpobj from texlive have this like that. This means both and are + # only few of them, so split manually. + lppl1.3ofl) + $0 lppl1.3 ofl;; + lppl1.3lppl1.3) + $0 lppl1.3;; + lpplgpl) + $0 lppl gpl;; + lpplgpl2) + $0 lppl gpl2;; + lppllppl) + $0 lppl;; gfl) echo "LPPL-1.3";; gfsl) @@ -37,6 +53,10 @@ while [ $# -gt 0 ] ; do echo "GPL-2";; other-free) echo "TeX-other-free";; + other-freelppl) + $0 other-free lppl;; + other-freelppl1.3) + $0 other-free lppl1.3;; #other) # echo "TeX-other";; other-nonfree) @@ -49,6 +69,8 @@ while [ $# -gt 0 ] ; do echo "LGPL-3";; pd) echo "public-domain";; + pdgpl3) + $0 pd gpl3;; apache2) echo "Apache-2.0";; artistic2) @@ -65,10 +87,18 @@ while [ $# -gt 0 ] ; do echo "FDL-1.1";; ofl) echo "OFL";; + oflapache2lppl1.3) + $0 ofl apache2 lppl1.3;; + ofllppl) + $0 ofl lppl;; + ofllppl1.3) + $0 ofl lppl1.3;; opl) echo "OPL";; mit) echo "MIT";; + mitlppl) + $0 mit lppl;; bsd2) echo "BSD-2";; #nosell) diff --git a/scripts/texlive/tlpsrc/getlicense.sh b/scripts/texlive/tlpsrc/getlicense.sh index 4ab1779..a417e22 100755 --- a/scripts/texlive/tlpsrc/getlicense.sh +++ b/scripts/texlive/tlpsrc/getlicense.sh @@ -1,5 +1,5 @@ #!/bin/bash while [ $# -gt 0 ] ; do - cat $1.cataloguehtml | tr '"' '\n' | grep '\/license\/' | tr '/' ' ' | awk '{print $2}' + grep '^catalogue-license' $1.tlplic | awk '{print $2}' shift done