initial import
This commit is contained in:
74
inkscape-legacy/PKGBUILD
Normal file
74
inkscape-legacy/PKGBUILD
Normal file
@@ -0,0 +1,74 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
_realpkgname=inkscape
|
||||
pkgname=$_realpkgname-legacy
|
||||
pkgver=0.92.4
|
||||
_debver=$pkgver
|
||||
_debrel=3
|
||||
pkgrel=8
|
||||
pkgdesc="Professional vector graphics editor (legacy version)"
|
||||
url='https://inkscape.org/'
|
||||
license=('GPL-2' 'GPL-3' 'LGPL-2.1')
|
||||
arch=('i686' 'x86_64')
|
||||
conflicts=('inkscape')
|
||||
provides=('inkscape')
|
||||
depends=('gtk' 'gc' 'gsl' 'gtkmm' 'gtkspell3' 'graphicsmagick-imagemagick-compat' 'libxslt'
|
||||
'poppler-glib' 'popt' 'potrace' 'ttf-dejavu' 'tauthon' 'desktop-file-utils' 'hicolor-icon-theme' 'gdl')
|
||||
makedepends=('boost' 'intltool' 'python' 'quilt')
|
||||
optdepends=('tauthon-numpy: some extensions'
|
||||
'tauthon-lxml: some extensions and filters')
|
||||
source=("https://media.inkscape.org/dl/resources/file/${_realpkgname}-${pkgver}.tar.bz2"
|
||||
"https://deb.debian.org/debian/pool/main/i/inkscape/inkscape_${_debver}-${_debrel}.debian.tar.xz"
|
||||
"no-const.patch"
|
||||
"deny-clipboards-extension.patch")
|
||||
sha512sums=('b9034605a79cd8aea808edf42e284819951ae1ea67778f0922f4c10224e94aca6c844acbc2294625773f0a7047d4e32ccdada876238a792a2c17db172c88e120'
|
||||
'db47ca8d28c29d18de6cec372297715bc16cc33fc6a75adf14a8b716d884fbe521726f98eb222e5749b3589d6dd5e0449eb88f377f60bce47cc874c8d4be2e12'
|
||||
'f6593e23f4e292e275eef131a6f69eb1fa4dd2f9a31a9e64d7a63565b0400c4720395d9081a0d930dcf9fe71ff58b878c4e0f0ccc33316618754890826f6f293'
|
||||
'b6f5484596b06d7cba475e3342886a224cf70a7726b7d24ac997a439dfdf64a4cd4ab969e706a48629fd5bb9ec7e3824ae70870f535328daeed14f1053ecbe81')
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
|
||||
./autogen.sh
|
||||
patch -Np1 -i ${srcdir}/no-const.patch
|
||||
patch -Np1 -i ${srcdir}/deny-clipboards-extension.patch
|
||||
|
||||
sed -i 's|/usr/bin/python\>|/usr/bin/tauthon|g' cxxtest/*.py
|
||||
sed -i 's|/usr/bin/env python\>|/usr/bin/env tauthon|g' share/*/{test/,}*.py
|
||||
sed -i 's|"python" },|"tauthon" },|g' src/extension/implementation/script.cpp
|
||||
sed -i 's|python -c|tauthon -c|g' configure share/extensions/uniconv*.py
|
||||
sed -i 's|"python"|"tauthon"|g' src/main.cpp
|
||||
|
||||
sed -i 's| abs(| std::fabs(|g' src/ui/tools/flood-tool.cpp
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
export FREETYPE_CONFIG="/usr/bin/pkg-config freetype2"
|
||||
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
--enable-lcms \
|
||||
--enable-poppler-cairo \
|
||||
--disable-strict-build \
|
||||
--disable-dependency-tracking \
|
||||
--enable-gtk3-experimental
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${srcdir}/${_realpkgname}-${pkgver}"
|
||||
make DESTDIR="${pkgdir}" install
|
||||
install -Dm644 debian/copyright -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
}
|
||||
23
inkscape-legacy/deny-clipboards-extension.patch
Normal file
23
inkscape-legacy/deny-clipboards-extension.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
--- a/src/ui/clipboard.cpp 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/ui/clipboard.cpp 2024-12-31 20:41:22.337917664 +0100
|
||||
@@ -1163,7 +1163,11 @@
|
||||
// FIXME: Temporary hack until we add support for memory output.
|
||||
// Save to a temporary file, read it back and then set the clipboard contents
|
||||
gchar *filename = g_build_filename( g_get_tmp_dir(), "inkscape-clipboard-export", NULL );
|
||||
- gsize len; gchar *data;
|
||||
+ gchar *data;
|
||||
+ gsize len;
|
||||
+
|
||||
+ bool previous_gui = INKSCAPE.use_gui();
|
||||
+ INKSCAPE.use_gui(false);
|
||||
|
||||
try {
|
||||
if (out == outlist.end() && target == "image/png")
|
||||
@@ -1204,6 +1208,7 @@
|
||||
} catch (...) {
|
||||
}
|
||||
|
||||
+ INKSCAPE.use_gui(previous_gui);
|
||||
g_unlink(filename); // delete the temporary file
|
||||
g_free(filename);
|
||||
}
|
||||
136
inkscape-legacy/no-const.patch
Normal file
136
inkscape-legacy/no-const.patch
Normal file
@@ -0,0 +1,136 @@
|
||||
--- a/src/extension/internal/pdfinput/pdf-input.cpp 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/extension/internal/pdfinput/pdf-input.cpp 2024-12-31 21:27:27.574557163 +0100
|
||||
@@ -689,12 +689,12 @@
|
||||
//
|
||||
gchar const *poppler_datadir = g_getenv("POPPLER_DATADIR");
|
||||
if (poppler_datadir != NULL) {
|
||||
- globalParams = new GlobalParams(poppler_datadir);
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS(poppler_datadir);
|
||||
} else {
|
||||
- globalParams = new GlobalParams();
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
||||
}
|
||||
#else
|
||||
- globalParams = new GlobalParams();
|
||||
+ globalParams = _POPPLER_NEW_GLOBAL_PARAMS();
|
||||
#endif // ENABLE_OSX_APP_LOCATIONS
|
||||
}
|
||||
|
||||
--- a/src/extension/internal/pdfinput/pdf-parser.cpp 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/extension/internal/pdfinput/pdf-parser.cpp 2024-12-31 21:30:17.185577782 +0100
|
||||
@@ -272,7 +272,7 @@
|
||||
ClipHistoryEntry *save();
|
||||
ClipHistoryEntry *restore();
|
||||
GBool hasSaves() { return saved != NULL; }
|
||||
- void setClip(GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
||||
+ void setClip(_POPPLER_CONST_83 GfxPath *newClipPath, GfxClipType newClipType = clipNormal);
|
||||
GfxPath *getClipPath() { return clipPath; }
|
||||
GfxClipType getClipType() { return clipType; }
|
||||
|
||||
@@ -426,7 +426,7 @@
|
||||
error(errInternal, -1, "Weird page contents");
|
||||
return;
|
||||
}
|
||||
- parser = new Parser(xref, new Lexer(xref, obj), gFalse);
|
||||
+ parser = new _POPPLER_NEW_PARSER(xref, obj);
|
||||
go(topLevel);
|
||||
delete parser;
|
||||
parser = NULL;
|
||||
@@ -2210,7 +2210,11 @@
|
||||
}
|
||||
if (printCommands) {
|
||||
printf(" font: tag=%s name='%s' %g\n",
|
||||
+#if POPPLER_CHECK_VERSION(21,11,0)
|
||||
+ font->getTag().c_str(),
|
||||
+#else
|
||||
font->getTag()->getCString(),
|
||||
+#endif
|
||||
font->getName() ? font->getName()->getCString() : "???",
|
||||
args[1].getNum());
|
||||
fflush(stdout);
|
||||
@@ -2414,7 +2418,7 @@
|
||||
int wMode;
|
||||
double riseX, riseY;
|
||||
CharCode code;
|
||||
- Unicode *u = NULL;
|
||||
+ Unicode _POPPLER_CONST_82 *u = NULL;
|
||||
double x, y, dx, dy, tdx, tdy;
|
||||
double originX, originY, tOriginX, tOriginY;
|
||||
double oldCTM[6], newCTM[6];
|
||||
@@ -3394,7 +3398,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
-void ClipHistoryEntry::setClip(GfxPath *clipPathA, GfxClipType clipTypeA) {
|
||||
+void ClipHistoryEntry::setClip(_POPPLER_CONST_83 GfxPath *clipPathA, GfxClipType clipTypeA) {
|
||||
// Free previous clip path
|
||||
if (clipPath) {
|
||||
delete clipPath;
|
||||
--- a/src/extension/internal/pdfinput/poppler-transition-api.h 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/extension/internal/pdfinput/poppler-transition-api.h 2024-12-31 21:32:58.276547132 +0100
|
||||
@@ -3,6 +3,30 @@
|
||||
|
||||
#include <glib/poppler-features.h>
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
||||
+#define _POPPLER_CONST_83 const
|
||||
+#else
|
||||
+#define _POPPLER_CONST_83
|
||||
+#endif
|
||||
+
|
||||
+#if POPPLER_CHECK_VERSION(0, 82, 0)
|
||||
+#define _POPPLER_CONST_82 const
|
||||
+#else
|
||||
+#define _POPPLER_CONST_82
|
||||
+#endif
|
||||
+
|
||||
+#if POPPLER_CHECK_VERSION(0, 76, 0)
|
||||
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, obj, gFalse)
|
||||
+#else
|
||||
+#define _POPPLER_NEW_PARSER(xref, obj) Parser(xref, new Lexer(xref, obj), gFalse)
|
||||
+#endif
|
||||
+
|
||||
+#if POPPLER_CHECK_VERSION(0, 83, 0)
|
||||
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) std::unique_ptr<GlobalParams>(new GlobalParams(args))
|
||||
+#else
|
||||
+#define _POPPLER_NEW_GLOBAL_PARAMS(args...) new GlobalParams(args)
|
||||
+#endif
|
||||
+
|
||||
#if POPPLER_CHECK_VERSION(0, 72, 0)
|
||||
#define getCString c_str
|
||||
#endif
|
||||
--- a/src/extension/internal/pdfinput/svg-builder.cpp 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/extension/internal/pdfinput/svg-builder.cpp 2024-12-31 21:34:24.487065888 +0100
|
||||
@@ -264,10 +264,10 @@
|
||||
/**
|
||||
* \brief Generates a SVG path string from poppler's data structure
|
||||
*/
|
||||
-static gchar *svgInterpretPath(GfxPath *path) {
|
||||
+static gchar *svgInterpretPath(_POPPLER_CONST_83 GfxPath *path) {
|
||||
Inkscape::SVG::PathString pathString;
|
||||
for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) {
|
||||
- GfxSubpath *subpath = path->getSubpath(i);
|
||||
+ _POPPLER_CONST_83 GfxSubpath *subpath = path->getSubpath(i);
|
||||
if (subpath->getNumPoints() > 0) {
|
||||
pathString.moveTo(subpath->getX(0), subpath->getY(0));
|
||||
int j = 1;
|
||||
@@ -1379,7 +1379,7 @@
|
||||
void SvgBuilder::addChar(GfxState *state, double x, double y,
|
||||
double dx, double dy,
|
||||
double originX, double originY,
|
||||
- CharCode /*code*/, int /*nBytes*/, Unicode *u, int uLen) {
|
||||
+ CharCode /*code*/, int /*nBytes*/, Unicode const *u, int uLen) {
|
||||
|
||||
|
||||
bool is_space = ( uLen == 1 && u[0] == 32 );
|
||||
--- a/src/extension/internal/pdfinput/svg-builder.h 2019-01-15 05:29:27.000000000 +0100
|
||||
+++ b/src/extension/internal/pdfinput/svg-builder.h 2024-12-31 21:34:45.897194723 +0100
|
||||
@@ -141,7 +141,7 @@
|
||||
void addChar(GfxState *state, double x, double y,
|
||||
double dx, double dy,
|
||||
double originX, double originY,
|
||||
- CharCode code, int nBytes, Unicode *u, int uLen);
|
||||
+ CharCode code, int nBytes, Unicode const *u, int uLen);
|
||||
void beginTextObject(GfxState *state);
|
||||
void endTextObject(GfxState *state);
|
||||
|
||||
Reference in New Issue
Block a user