diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4cb94f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/woff-code-latest.zip diff --git a/Makefile b/Makefile deleted file mode 100644 index d3a5fc0..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: woff -# $Id$ -NAME := woff -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/changelog b/changelog new file mode 100644 index 0000000..ed7996d --- /dev/null +++ b/changelog @@ -0,0 +1,21 @@ +* Tue Nov 29 2022 Benjamin A. Beasley - 0.20091126-6 +- Clarify URL/Source situation, and do not claim to have a working source + archive URL +- General tidying of spec file; use modern macros and install HTML format + description as documentation +- Add hand-written man pages + +* Sun Jun 05 2022 Benson Muite - 0.20091126-5 +- Source URL update + +* Mon Feb 19 2018 Parag Nemade - 0.20091126-4 +- Add BuildRequires: gcc as per packaging guidelines + +* Thu Feb 11 2016 Parag Nemade - 0.20091126-3 +- Clean the spec file + +* Sun Nov 29 2009 Parag Nemade - 0.20091126-2.fc12 +- Added BR:zlib-devel + +* Fri Nov 27 2009 Parag Nemade - 0.20091126-1.fc12 +- Initial specfile for Fedora diff --git a/possible-double-free.patch b/possible-double-free.patch new file mode 100644 index 0000000..09a5660 --- /dev/null +++ b/possible-double-free.patch @@ -0,0 +1,11 @@ +diff -Naur a/woff.c b/woff.c +--- a/woff.c 2009-09-25 09:54:13.000000000 -0400 ++++ b/woff.c 2022-11-29 10:09:15.091798523 -0500 +@@ -354,6 +354,7 @@ + newHeader->privLen = 0; + + free(tableOrder); ++ tableOrder = 0; + + if ((status & eWOFF_warn_checksum_mismatch) != 0) { + /* The original font had checksum errors, so we now decode our WOFF data diff --git a/sfnt2woff.1 b/sfnt2woff.1 new file mode 100644 index 0000000..87cecb6 --- /dev/null +++ b/sfnt2woff.1 @@ -0,0 +1,35 @@ +.TH sfnt2woff "1" "November 2020" sfnt2woff\-zopfli "User Commands" +.SH NAME +sfnt2woff \- package OpenType +.I otffile +as WOFF, creating +.IR otffile .woff +.SH SYNOPSIS +sfnt2woff +.RB [ \-v +.IR maj . min ] +.RB [ \-m +.IR metadata.xml ] +.RB [ \-p +.IR private.dat ] +.I otffile +.SH DESCRIPTION +.PP +Packages OpenType +.I otffile +as WOFF, creating +.IR otffile .woff. +.SH OPTIONS +.TP +\fB\-v\fR \fImaj\fR.\fImin +set font version number (major and minor, both integers) +.TP +\fB\-m\fR \fImetadata.xml +include metadata from +.I metadata.xml +(not validated) +.TP +\fB\-p\fR \fIprivate.dat +include private data block +.SH "SEE ALSO" +.BR woff2sfnt (1) diff --git a/sources b/sources index e69de29..a3fd9e8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +1dcdbc9a7f48086185740c185d822279 woff-code-latest.zip diff --git a/woff.spec b/woff.spec new file mode 100644 index 0000000..e213f93 --- /dev/null +++ b/woff.spec @@ -0,0 +1,61 @@ +Name: woff +Version: 0.20091126 +Release: %autorelease +Summary: Encoding and decoding for Web Open Font Format (WOFF) + +License: MPL-1.0 OR GPL-2.0-or-later OR LGPL-2.0-or-later +# Note that the URL http://people.mozilla.org/~jkew/woff/, where the original +# WOFF reference implementation sources were published, is no longer available. +# A copy of that page can be found at +# https://web.archive.org/web/20170630235618/https://people-mozilla.org/~jkew/woff/, +# and the sources are mirrored at https://github.com/TheJessieKirk/sfnt2woff. +%global original_url https://people-mozilla.org/~jkew/woff/ +# The URL is no longer active, so we reference an archived copy: +URL: https://web.archive.org/web/20170630235618/%{original_url} +# There is no longer a working URL for this archive. +Source0: %{original_url}/woff-code-latest.zip +# Hand-written for Fedora in groff_man(7) format based on --help output +Source1: sfnt2woff.1 +Source2: woff2sfnt.1 + +# It’s possible that tableOrder could be freed twice if a failure occurs. Set +# the pointer null after freeing it to prevent this. There is no current +# upstream to which this could be reported. +Patch: possible-double-free.patch + +BuildRequires: make +BuildRequires: gcc + +BuildRequires: zlib-devel + +%description +Provides the sfnt2woff and woff2sfnt command-line tools for encoding and +decoding Web Open Font Format (WOFF) files. + +%prep +%autosetup -c -p1 + + +%build +%set_build_flags +%make_build CFLAGS="${CFLAGS}" + + +%install +# The Makefile has no install target. +install -d '%{buildroot}%{_bindir}' +install -t '%{buildroot}%{_bindir}' -p sfnt2woff woff2sfnt +install -d '%{buildroot}%{_mandir}/man1' +install -t '%{buildroot}%{_mandir}/man1' -p -m 0644 '%{SOURCE1}' '%{SOURCE2}' + + +%files +%doc woff-2009-10-03.html +%{_bindir}/sfnt2woff +%{_bindir}/woff2sfnt +%{_mandir}/man1/sfnt2woff.1* +%{_mandir}/man1/woff2sfnt.1* + + +%changelog +%autochangelog diff --git a/woff2sfnt.1 b/woff2sfnt.1 new file mode 100644 index 0000000..77bdb67 --- /dev/null +++ b/woff2sfnt.1 @@ -0,0 +1,33 @@ +.TH woff2sfnt "1" "November 2020" woff2sfnt "User Commands" +.SH NAME +woff2sfnt \- decode WOFF file +.IR woff , +writing OpenType data to +.B stdout +.SH SYNOPSIS +woff2sfnt +.RB [ \-v \ |\ \-m \ |\ \-p ] +.I woff +.SH DESCRIPTION +.PP +Decodes WOFF file +.IR woff , +writing OpenType data to +.BR stdout . +.SH OPTIONS +.TP +.B \-v +write font version to +.B stdout +.TP +.B \-m +write WOFF metadata block to +.B stdout +.TP +.B \-p +write private data block to +.B stdout +.SH NOTES +Only one of \fB\-v\fR, \fB\-m\fR, \fB\-p\fR may be used at a time. +.SH "SEE ALSO" +.BR sfnt2woff (1)