inkscape: WIP.

This commit is contained in:
Alexpux
2014-01-15 22:58:22 +04:00
parent e7206c749d
commit 94bd4aaafb
5 changed files with 213 additions and 0 deletions

View File

@@ -0,0 +1,86 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=inkscape
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}"
pkgver=0.48.4
pkgrel=1
pkgdesc="Vector graphics editor using the SVG file format (mingw-w64)"
arch=('any')
url="http://inkscape.sourceforge.net/"
license=("GPL" "LGPL")
makedepends=("${_mingw_suff}-gcc"
"${_mingw_suff}-pkg-config"
"${_mingw_suff}-boost"
"intltool")
depends=(
"${_mingw_suff}-gc"
"${_mingw_suff}-gsl"
"${_mingw_suff}-gtkmm"
#"${_mingw_suff}-gtkspell"
"${_mingw_suff}-imagemagick"
"${_mingw_suff}-libxslt"
"${_mingw_suff}-poppler"
"${_mingw_suff}-python2"
"${_mingw_suff}-popt"
"${_mingw_suff}-libwpg"
#"${_mingw_suff}-desktop-file-utils"
#"${_mingw_suff}-hicolor-icon-theme"
)
optdepends=(#"${_mingw_suff}-pstoedit: latex formulas"
#"${_mingw_suff}-texlive-core: latex formulas"
#"${_mingw_suff}-python2-numpy: some extensions"
#"${_mingw_suff}-python2-lxml: some extensions and filters"
#"${_mingw_suff}-uniconvertor: reading/writing to some proprietary formats"
)
options=('staticlibs' 'strip')
source=("http://downloads.sourceforge.net/project/${_realname}/${_realname}/${pkgver}/${_realname}-${pkgver}.tar.bz2"
'spuriouscomma.patch'
'freetype.patch'
'inkscape-0.48.4-gc74.patch'
'headers-fix.patch')
sha1sums=('5f26f6ad191d1e7c2a9fb69a438722beb172224c'
'7d1d5a6d1d2b0926721a994d5889c52890fc57c1'
'3b08c1f3b53d1ca421d29fb886a75fb7a3563510'
'9d39d8bcc1d0c574f211169c24da16e796ca380b'
'12fddb0a0b34b4308de1979d13b26d05a6ec8f77')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p0 -i ${srcdir}/freetype.patch # FS#37956
patch -p0 -i ${srcdir}/spuriouscomma.patch
patch -p1 -i ${srcdir}/inkscape-0.48.4-gc74.patch
patch -p1 -i ${srcdir}/headers-fix.patch
sed -i 's|/usr/bin/python\>|/usr/bin/python2|g' cxxtest/*.py
sed -i 's|/usr/bin/env python\>|/usr/bin/env python2|g' share/*/{test/,}*.py
sed -i 's|"python" },|"python2" },|g' src/extension/implementation/script.cpp
sed -i 's|python -c|python2 -c|g' configure share/extensions/uniconv*.py
sed -i 's|"python"|"python2"|g' src/main.cpp
sed -i '/^#include <g.kmm/i #include <glibmm.h>' src/*{,/*{,/*{,/*}}}.{h,cpp}
}
build() {
# export lt_cv_deplibs_check_method='pass_all'
cd "${srcdir}/${_realname}-${pkgver}"
mkdir -p build-${MINGW_CHOST} && cd build-${MINGW_CHOST}
CFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1"
CXXFLAGS+=" -D__USE_MINGW_ANSI_STDIO=1"
../configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--with-python \
--without-perl \
--enable-lcms \
--enable-poppler-cairo \
--disable-dependency-tracking
make #-j1 VERBOSE=1
}
package() {
cd ${_realname}-${pkgver}/build-${MINGW_CHOST}
make DESTDIR="${pkgdir}" install
#rm -r "${pkgdir}${MINGW_PREFIX}/share"
}

View File

@@ -0,0 +1,14 @@
=== modified file 'src/libnrtype/FontFactory.h'
--- src/libnrtype/FontFactory.h 2010-04-15 19:00:11 +0000
+++ src/libnrtype/FontFactory.h 2013-11-28 05:54:34 +0000
@@ -31,7 +31,8 @@
#include <pango/pangowin32.h>
#else
#include <pango/pangoft2.h>
-#include <freetype/freetype.h>
+#include <ft2build.h>
+#include FT_FREETYPE_H
#endif
namespace Glib

View File

@@ -0,0 +1,22 @@
--- inkscape-0.48.4/src/prefix.h.orig 2014-01-15 21:39:11.089400000 +0400
+++ inkscape-0.48.4/src/prefix.h 2014-01-15 21:39:17.126600000 +0400
@@ -120,6 +120,7 @@
#ifdef __WIN32__
+#include <windows.h>
#include <glibmm/ustring.h>
Glib::ustring win32_getExePath();
--- inkscape-0.48.4/src/prefix.cpp.orig 2014-01-15 21:39:38.873000000 +0400
+++ inkscape-0.48.4/src/prefix.cpp 2014-01-15 21:39:50.120600000 +0400
@@ -428,9 +428,6 @@
* Provide a similar mechanism for Win32. Enable a macro,
* WIN32_DATADIR, that can look up subpaths for inkscape resources
*/
-
-#include <windows.h>
-#include <glibmm/ustring.h>
/**
* Return the directory of the .exe that is currently running

View File

@@ -0,0 +1,80 @@
diff -Naur inkscape-0.48.4/configure.old inkscape-0.48.4/configure
--- inkscape-0.48.4/configure.old 2012-12-15 17:56:08.450334780 +0100
+++ inkscape-0.48.4/configure 2013-12-01 17:34:15.643762526 +0100
@@ -8959,8 +8959,8 @@
# include <gc.h>
#endif
#include <stdio.h>
- extern unsigned GC_version;
int main(void){
+ unsigned GC_version = GC_get_version();
unsigned min = ((6 << 16) | (4 << 8) | 0);
printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
if (GC_version>=min) return 0;
diff -Naur inkscape-0.48.4/configure.ac.old inkscape-0.48.4/configure.ac
--- inkscape-0.48.4/configure.ac.orig 2012-12-15 17:50:19.205918190 +0100
+++ inkscape-0.48.4/configure.ac 2013-12-01 17:33:57.903433873 +0100
@@ -263,8 +263,8 @@
# include <gc.h>
#endif
#include <stdio.h>
- extern unsigned GC_version;
int main(void){
+ unsigned GC_version = GC_get_version();
unsigned min = ((6 << 16) | (4 << 8) | 0);
printf("%d.%d.%d ",GC_version >> 16, (GC_version >> 8) & 0xFF, GC_version & 0xFF);
if (GC_version>=min) return 0;
--- inkscape-0.48.4/src/gc-core.h.old 2013-12-31 01:22:38.976653890 +0400
+++ inkscape-0.48.4/src/gc-core.h 2013-12-31 01:22:48.525653608 +0400
@@ -57,7 +57,7 @@
CleanupFunc *old_func,
void **old_data);
int (*general_register_disappearing_link)(void **p_ptr,
- void *base);
+ const void *base);
int (*unregister_disappearing_link)(void **p_ptr);
std::size_t (*get_heap_size)();
std::size_t (*get_free_bytes)();
--- inkscape-0.48.4/src/gc.cpp.old 2013-12-31 01:23:50.462651778 +0400
+++ inkscape-0.48.4/src/gc.cpp 2013-12-31 01:40:37.718622017 +0400
@@ -70,8 +70,8 @@
return base + debug_base_fixup();
}
-int debug_general_register_disappearing_link(void **p_ptr, void *base) {
- char *real_base=reinterpret_cast<char *>(base) - debug_base_fixup();
+int debug_general_register_disappearing_link(void **p_ptr, const void *base) {
+ char *real_base=const_cast<char *>(reinterpret_cast<const char *>(base)) - debug_base_fixup();
return GC_general_register_disappearing_link(p_ptr, real_base);
}
@@ -90,7 +90,7 @@
}
}
-int dummy_general_register_disappearing_link(void **, void *) { return false; }
+int dummy_general_register_disappearing_link(void **, const void *) { return false; }
int dummy_unregister_disappearing_link(void **/*link*/) { return false; }
@@ -112,7 +112,11 @@
&GC_malloc_atomic_uncollectable,
&GC_base,
&GC_register_finalizer_ignore_self,
+#if (GC_MAJOR_VERSION >= 7 && GC_MINOR_VERSION >= 4)
&GC_general_register_disappearing_link,
+#else
+ (int (*)(void**, const void*))(&GC_general_register_disappearing_link),
+#endif
&GC_unregister_disappearing_link,
&GC_get_heap_size,
&GC_get_free_bytes,
@@ -202,7 +206,7 @@
die_because_not_initialized();
}
-int stub_general_register_disappearing_link(void **, void *) {
+int stub_general_register_disappearing_link(void **, const void *) {
die_because_not_initialized();
return 0;
}

View File

@@ -0,0 +1,11 @@
--- src/widgets/desktop-widget.h~ 2011-07-08 13:25:09.000000000 -0500
+++ src/widgets/desktop-widget.h 2013-02-15 16:04:45.806910365 -0600
@@ -239,7 +239,7 @@
private:
GtkWidget *tool_toolbox;
GtkWidget *aux_toolbox;
- GtkWidget *commands_toolbox,;
+ GtkWidget *commands_toolbox;
GtkWidget *snap_toolbox;
static void init(SPDesktopWidget *widget);