summaryrefslogtreecommitdiff
path: root/repo/libfreehand
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
committerdavidovski <david@davidovski.xyz>2022-06-15 20:02:02 +0100
commitd2567bfbdf0e9fa6db0a6ed1534831ec859a3e03 (patch)
tree684a17eebf446aa1adab1097616f1882c8d51568 /repo/libfreehand
parentd1fc3393cca72e8e432f827f7624e38734fad6dc (diff)
added deps for qemu
Diffstat (limited to 'repo/libfreehand')
-rw-r--r--repo/libfreehand/fix-build.patch13
-rw-r--r--repo/libfreehand/libfreehand.xibuild38
-rw-r--r--repo/libfreehand/parentheses-gcc8-fix.patch13
3 files changed, 64 insertions, 0 deletions
diff --git a/repo/libfreehand/fix-build.patch b/repo/libfreehand/fix-build.patch
new file mode 100644
index 0000000..2a612f4
--- /dev/null
+++ b/repo/libfreehand/fix-build.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/libfreehand_utils.cpp b/src/lib/libfreehand_utils.cpp
+index 439c457..32f23e0 100644
+--- a/src/lib/libfreehand_utils.cpp
++++ b/src/lib/libfreehand_utils.cpp
+@@ -162,7 +162,7 @@ void libfreehand::_appendUTF16(librevenge::RVNGString &text, std::vector<unsigne
+ while (j < length)
+ {
+ UChar32 c;
+- U16_NEXT(s, j, length, c)
++ U16_NEXT(s, j, length, c);
+ unsigned char outbuf[U8_MAX_LENGTH+1];
+ int i = 0;
+ U8_APPEND_UNSAFE(&outbuf[0], i, c);
diff --git a/repo/libfreehand/libfreehand.xibuild b/repo/libfreehand/libfreehand.xibuild
new file mode 100644
index 0000000..779bfca
--- /dev/null
+++ b/repo/libfreehand/libfreehand.xibuild
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+NAME="libfreehand"
+DESC="Import filter and tools for Adobe FreeHand documents"
+
+MAKEDEPS="libxml2 lcms2 icu gperf perl doxygen librevenge zlib"
+
+PKG_VER=0.1.2
+SOURCE="https://dev-www.libreoffice.org/src/libfreehand/libfreehand-$PKG_VER.tar.xz"
+
+ADDITIONAL="
+fix-build.patch
+parentheses-gcc8-fix.patch
+"
+
+prepare() {
+ apply_patches
+}
+
+build() {
+ export CXXFLAGS="$CXXFLAGS -Wno-error=deprecated-copy"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$PKG_DEST" install
+}
+
diff --git a/repo/libfreehand/parentheses-gcc8-fix.patch b/repo/libfreehand/parentheses-gcc8-fix.patch
new file mode 100644
index 0000000..7af1b05
--- /dev/null
+++ b/repo/libfreehand/parentheses-gcc8-fix.patch
@@ -0,0 +1,13 @@
+diff --git a/src/lib/FHCollector.cpp b/src/lib/FHCollector.cpp
+index 874ab46edf..a5ab52ed9a 100644
+--- a/src/lib/FHCollector.cpp
++++ b/src/lib/FHCollector.cpp
+@@ -1907,7 +1907,7 @@ void libfreehand::FHCollector::_outputDisplayText(const libfreehand::FHDisplayTe
+ textObjectProps.insert("svg:width", width);
+ for (int i=0; i<4; ++i) // osnola: let assume that there is no padding
+ {
+- char const *(padding[])= {"fo:padding-left","fo:padding-right","fo:padding-top","fo:padding-bottom"};
++ char const *padding[]= {"fo:padding-left","fo:padding-right","fo:padding-top","fo:padding-bottom"};
+ textObjectProps.insert(padding[i],0,librevenge::RVNG_POINT);
+ }
+ if (!FH_ALMOST_ZERO(rotation))