[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[libreoffice] 05/06: drop fontforge B-D-I; use pure perl for determining the ttf version



This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch debian-experimental-5.1
in repository libreoffice.

commit 921d83321bb61c24fae3bf697dd46fba74a24361
Author: Rene Engelhard <rene@debian.org>
Date:   Tue Nov 17 22:31:52 2015 +0100

    drop fontforge B-D-I; use pure perl for determining the ttf version
---
 changelog                  |  4 ++++
 control                    |  2 --
 rules                      |  7 ++-----
 scripts/get_ttf_version.pl | 32 ++++++++++++++++++++++++++++++++
 4 files changed, 38 insertions(+), 7 deletions(-)

diff --git a/changelog b/changelog
index 774d335..3cdff9d 100644
--- a/changelog
+++ b/changelog
@@ -15,6 +15,10 @@ libreoffice (1:5.1.0~beta1~git20151114-1) UNRELEASED; urgency=medium
       Icon= and Exec=
     - re-enable checks
 
+  * debian/scripts/get_ttf_version.pl, debian/rules: drop fontforge B-D-I;
+    use pure perl for determining the version; taken from upstreams win
+    installer
+
  -- Rene Engelhard <rene@debian.org>  Mon, 19 Oct 2015 22:57:36 +0200
 
 libreoffice (1:5.1.0~alpha1-4) experimental; urgency=medium
diff --git a/control b/control
index a79cf50..e86208d 100644
--- a/control
+++ b/control
@@ -149,7 +149,6 @@ Build-Depends: ant (>= 1.7.0) [!mips64],
                zlib1g-dev
 Build-Depends-Indep: doxygen (>= 1.8.4),
                      fdupes,
-                     fontforge,
                      libbase-java [!hppa !ia64 !mips64 !s390 !sparc],
                      libbsh-java,
                      libcommons-logging-java [!mips64],
@@ -4442,7 +4441,6 @@ Depends: ant (>= 1.7.0),
          firebird-dev (>= 2.5.2.26540.ds4-2),
          flex (>= 2.3.35),
          fontconfig,
-         fontforge,
          fonts-crosextra-carlito,
          fonts-liberation,
          g++-mingw-w64-i686,
diff --git a/rules b/rules
index 0cb35a1..da9b0ce 100755
--- a/rules
+++ b/rules
@@ -1494,10 +1494,6 @@ else
 	CONFIGURE_FLAGS += --disable-dconf
 endif
 
-ifeq "$(PACKAGE_TTF_OPENSYMBOL)" "y"
-	BUILD_DEPS_INDEP += , fontforge
-endif
-
 ifeq ($(ENABLE_MERGELIBS),y)
 	CONFIGURE_FLAGS += --enable-mergelibs
 endif
@@ -1872,6 +1868,7 @@ $(STAMP_DIR)/prepare:
 		    debian/scripts/cleandupes \
 		    debian/scripts/get_libebook_dep.sh \
 		    debian/scripts/get_libvlc_dep.sh \
+		    debian/scripts/get_ttf_version.pl \
 		    autogen.sh; \
 	do \
 	  chmod 755 $$FILE ;\
@@ -3429,7 +3426,7 @@ endif
 		-v$(BINARY_VERSION)
 ifeq "$(PACKAGE_TTF_OPENSYMBOL)" "y"
 	dh_gencontrol -pfonts-opensymbol -- \
-		-v$(shell echo `echo $(BINARY_VERSION) | cut -d: -f1` + 1 | bc):$(shell fontforge -lang=ff -c 'Open($$1); Print ($$fontversion); Quit(0);' debian/fonts-opensymbol/usr/share/fonts/truetype/openoffice/opens___.ttf)+LibO`echo $(BINARY_VERSION) | cut -d: -f2`
+		-v$(shell echo `echo $(BINARY_VERSION) | cut -d: -f1` + 1 | bc):$(shell debian/scripts/get_ttf_version.pl debian/fonts-opensymbol/usr/share/fonts/truetype/openoffice/opens___.ttf)+LibO`echo $(BINARY_VERSION) | cut -d: -f2`
 endif
 ifeq "$(ENABLE_MEDIAWIKI)" "y"
 	dh_gencontrol -plibreoffice-wiki-publisher -- \
diff --git a/scripts/get_ttf_version.pl b/scripts/get_ttf_version.pl
new file mode 100755
index 0000000..d5fe0cd
--- /dev/null
+++ b/scripts/get_ttf_version.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/perl
+
+# derived from http://cgit.freedesktop.org/libreoffice/core/diff/solenv/bin/modules/installer/windows/file.pm?id=38e24f1d059a6123ea15a68b4b24ca984642d66e
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+# This file incorporates work covered by the following license notice:
+#
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements. See the NOTICE file distributed
+#   with this work for additional information regarding copyright
+#   ownership. The ASF licenses this file to you under the Apache
+#   License, Version 2.0 (the "License"); you may not use this file
+#   except in compliance with the License. You may obtain a copy of
+#   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+
+open (TTF, "<$ARGV[0]") or die "could not open ttf";
+binmode TTF;
+{local $/ = undef; $ttfdata = <TTF>;}
+close TTF;
+
+my $ttfversion = "(Version )([0-9]+[.]*([0-9][.])*[0-9]+)";
+
+if ($ttfdata =~ /$ttfversion/ms)
+{
+    my ($version, $subversion, $microversion, $vervariant) = split(/\./,$2);
+        $fileversion = int($version) . "." . int($subversion);
+}
+
+print $fileversion;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice.git


Reply to: