From 5f8a50f6198e9725d61660aea16358aff1e8bbeb Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Tue, 23 Apr 2024 05:06:24 -0400 Subject: [PATCH 1/3] add ttf-vista-fonts package (nonfree) --- srcpkgs/ttf-vista-fonts/template | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 srcpkgs/ttf-vista-fonts/template diff --git a/srcpkgs/ttf-vista-fonts/template b/srcpkgs/ttf-vista-fonts/template new file mode 100644 index 00000000000000..2e988ce12ed46b --- /dev/null +++ b/srcpkgs/ttf-vista-fonts/template @@ -0,0 +1,41 @@ +pkgname=ttf-vista-fonts +version=1.0.0 +revision=1 +short_desc="Microsoft Vista and Office 2007 True Type Fonts" +maintainer="Michael Kinder " +# Referenced to the PowerPointViewer.exe, the template and mechanism are custom. +# The fonts are licensed under a Microsoft-specific license included with this +# package as filename "EULA". +license="custom:microsoft" +homepage="https://docs.microsoft.com/en-us/typography/fonts/font-faq" +distfiles="https://web.archive.org/web/20171225132744/http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe>${pkgname}.cab" +checksum=249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423 +makedepends="fontforge fontconfig cabextract" +nocross=yes + +# While it is fine to distribute the templates that build packages +# containing the Vista and Office 2007 fonts, they must not distribute the fonts +# themselves (this would constitute changing or otherwise +# encapsulating the filename which is not permitted). +restricted=yes +repository=nonfree + +# They're just fonts... + +# Tell XBPS that these are fonts +font_dirs="/usr/share/fonts/TTF" + +do_extract() { + mkdir -p ${wrksrc} + cabextract --lowercase ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.cab -d ${wrksrc} + cabextract --lowercase -F '*.tt[fc]' ${wrksrc}/ppviewer.cab -d ${wrksrc} +} + +do_install() { + vmkdir usr/share/fonts/TTF + # Use find command to correctly handle and copy each font file + find ${wrksrc} -iname "*.ttf" -o -iname "*.ttc" | while read fontfile; do + vcopy "$(basename ${fontfile})" usr/share/fonts/TTF/ + done + vinstall ${wrksrc}/eula 644 usr/share/licenses/${pkgname}/EULA +} From e1b039fc8c16958ee48af4d2661b4c7ef56065fd Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Tue, 23 Apr 2024 10:22:25 -0400 Subject: [PATCH 2/3] update template --- srcpkgs/ttf-vista-fonts/template | 36 ++++++++------------------------ 1 file changed, 9 insertions(+), 27 deletions(-) diff --git a/srcpkgs/ttf-vista-fonts/template b/srcpkgs/ttf-vista-fonts/template index 2e988ce12ed46b..22444afda864d7 100644 --- a/srcpkgs/ttf-vista-fonts/template +++ b/srcpkgs/ttf-vista-fonts/template @@ -1,41 +1,23 @@ +# Template file for 'ttf-vista-fonts' pkgname=ttf-vista-fonts version=1.0.0 revision=1 +hostmakedepends="cabextract" short_desc="Microsoft Vista and Office 2007 True Type Fonts" maintainer="Michael Kinder " -# Referenced to the PowerPointViewer.exe, the template and mechanism are custom. -# The fonts are licensed under a Microsoft-specific license included with this -# package as filename "EULA". license="custom:microsoft" homepage="https://docs.microsoft.com/en-us/typography/fonts/font-faq" distfiles="https://web.archive.org/web/20171225132744/http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe>${pkgname}.cab" checksum=249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423 -makedepends="fontforge fontconfig cabextract" -nocross=yes - -# While it is fine to distribute the templates that build packages -# containing the Vista and Office 2007 fonts, they must not distribute the fonts -# themselves (this would constitute changing or otherwise -# encapsulating the filename which is not permitted). +font_dirs="/usr/share/fonts/TTF" restricted=yes repository=nonfree - -# They're just fonts... - -# Tell XBPS that these are fonts -font_dirs="/usr/share/fonts/TTF" - -do_extract() { - mkdir -p ${wrksrc} - cabextract --lowercase ${XBPS_SRCDISTDIR}/${pkgname}-${version}/${pkgname}.cab -d ${wrksrc} - cabextract --lowercase -F '*.tt[fc]' ${wrksrc}/ppviewer.cab -d ${wrksrc} -} +skip_extraction="${pkgname}.cab" do_install() { - vmkdir usr/share/fonts/TTF - # Use find command to correctly handle and copy each font file - find ${wrksrc} -iname "*.ttf" -o -iname "*.ttc" | while read fontfile; do - vcopy "$(basename ${fontfile})" usr/share/fonts/TTF/ - done - vinstall ${wrksrc}/eula 644 usr/share/licenses/${pkgname}/EULA + vsrccopy ${pkgname}.cab . + cabextract ${pkgname}.cab + cabextract --lowercase -F '*.tt[fc]' ppviewer.cab \ + -d ${DESTDIR}/usr/share/fonts/TTF + vlicense EULA } From 97a297b0da81e80713951deba1cebf7bfcd92b1e Mon Sep 17 00:00:00 2001 From: Michael Kinder Date: Tue, 23 Apr 2024 05:06:24 -0400 Subject: [PATCH 3/3] New package: ttf-vista-fonts-1.0.0 --- srcpkgs/ttf-vista-fonts/template | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 srcpkgs/ttf-vista-fonts/template diff --git a/srcpkgs/ttf-vista-fonts/template b/srcpkgs/ttf-vista-fonts/template new file mode 100644 index 00000000000000..22444afda864d7 --- /dev/null +++ b/srcpkgs/ttf-vista-fonts/template @@ -0,0 +1,23 @@ +# Template file for 'ttf-vista-fonts' +pkgname=ttf-vista-fonts +version=1.0.0 +revision=1 +hostmakedepends="cabextract" +short_desc="Microsoft Vista and Office 2007 True Type Fonts" +maintainer="Michael Kinder " +license="custom:microsoft" +homepage="https://docs.microsoft.com/en-us/typography/fonts/font-faq" +distfiles="https://web.archive.org/web/20171225132744/http://download.microsoft.com/download/E/6/7/E675FFFC-2A6D-4AB0-B3EB-27C9F8C8F696/PowerPointViewer.exe>${pkgname}.cab" +checksum=249473568eba7a1e4f95498acba594e0f42e6581add4dead70c1dfb908a09423 +font_dirs="/usr/share/fonts/TTF" +restricted=yes +repository=nonfree +skip_extraction="${pkgname}.cab" + +do_install() { + vsrccopy ${pkgname}.cab . + cabextract ${pkgname}.cab + cabextract --lowercase -F '*.tt[fc]' ppviewer.cab \ + -d ${DESTDIR}/usr/share/fonts/TTF + vlicense EULA +}