diff --git a/0001-Fix-build-with-GCC13.patch b/0001-Fix-build-with-GCC13.patch new file mode 100644 index 0000000000000000000000000000000000000000..8161f947fd20cc513d23cb74e1cc5b1a3217e383 --- /dev/null +++ b/0001-Fix-build-with-GCC13.patch @@ -0,0 +1,48 @@ +From c68f5f9cade8a890efefcb4c2e0fc57762211286 Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Fri, 24 Feb 2023 14:01:18 -0500 +Subject: [PATCH] Fix build with GCC13 + +GCC 13 now complains about this line: +``` +src/ui/widget/selected-style.cpp:111:6: error: statement-expressions are not allowed outside functions nor in template-argument lists + 111 | {g_strdup("application/x-oswb-color"), 0, APP_OSWB_COLOR} + | ^~~~~~~~ +``` + +However, it is not necessary to strdup the string constant as the value +just needs to exist indefinitely, and it will as a constant. While C +doesn't mind the `const` difference, a simple cast will silence C++'s +higher strictness. + +And in fact, the other use of `GtkTargetEntry` in +`src/ui/drag-and-drop.cpp` does the same cast. + +Signed-off-by: Elliott Sales de Andrade +--- + src/ui/widget/selected-style.cpp | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp +index 68fe1fc426..7274f1b74c 100644 +--- a/src/ui/widget/selected-style.cpp ++++ b/src/ui/widget/selected-style.cpp +@@ -100,14 +100,8 @@ enum ui_drop_target_info { + APP_OSWB_COLOR + }; + +-//TODO: warning: deprecated conversion from string constant to ‘gchar*’ +-// +-//Turn out to be warnings that we should probably leave in place. The +-// pointers/types used need to be read-only. So until we correct the using +-// code, those warnings are actually desired. They say "Hey! Fix this". We +-// definitely don't want to hide/ignore them. --JonCruz + static const GtkTargetEntry ui_drop_target_entries [] = { +- {g_strdup("application/x-oswb-color"), 0, APP_OSWB_COLOR} ++ {(gchar *)"application/x-oswb-color", 0, APP_OSWB_COLOR} + }; + + static guint nui_drop_target_entries = G_N_ELEMENTS(ui_drop_target_entries); +-- +2.39.2 + diff --git a/inkscape-1.2.2.tar.xz b/inkscape-1.2.2.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..62b3f53a58fd9b2c81127e2c183668aa143d7a53 Binary files /dev/null and b/inkscape-1.2.2.tar.xz differ diff --git a/inkscape.spec b/inkscape.spec new file mode 100644 index 0000000000000000000000000000000000000000..61ecba62b37d6fc1caf37e977a58ba2f43588046 --- /dev/null +++ b/inkscape.spec @@ -0,0 +1,207 @@ +%define anolis_release 1 +%define debug_package %{nil} +%bcond_with graphicsmagick + +Name: inkscape +Version: 1.2.2 +Release: %{anolis_release}%{?dist} +Summary: Vector-based drawing program using SVG +License: GPL-2.0-or-later AND CC-BY-3.0 +URL: https://inkscape.org/ +Source0: https://inkscape.org/gallery/item/37360/inkscape-1.2.2.tar.xz +# https://gitlab.com/inkscape/inkscape/-/merge_requests/5108 +Patch: 0001-Fix-build-with-GCC13.patch + +Provides: bundled(libcroco) +Provides: bundled(autotrace) +Provides: bundled(libdepixelize) +Provides: bundled(libuemf) +Provides: bundled(adaptagrams) +Provides: bundled(lib2geom) + +BuildRequires: gcc-c++ +BuildRequires: aspell-devel aspell-en +BuildRequires: atk-devel +BuildRequires: boost-devel +BuildRequires: cairo-devel +BuildRequires: dos2unix +BuildRequires: desktop-file-utils +BuildRequires: double-conversion-devel +BuildRequires: freetype-devel +BuildRequires: gc-devel >= 6.4 +BuildRequires: libgdl-devel +BuildRequires: gettext +BuildRequires: gsl-devel +BuildRequires: gtkmm30-devel +%if %{with imagemagick} +BuildRequires: pkgconfig(ImageMagick++) < 7 +%endif +%if %{with graphicsmagick} +BuildRequires: pkgconfig(GraphicsMagick++) +%endif +BuildRequires: intltool +BuildRequires: lcms2-devel +BuildRequires: libpng-devel >= 1.2 +BuildRequires: libwpg-devel +BuildRequires: libxml2-devel >= 2.6.11 +BuildRequires: libxslt-devel >= 1.0.15 +BuildRequires: pango-devel +BuildRequires: pkgconfig +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: poppler-glib-devel +BuildRequires: popt-devel +BuildRequires: libappstream-glib +BuildRequires: libtool +BuildRequires: potrace-devel +BuildRequires: cmake +BuildRequires: libwpd-devel +BuildRequires: dbus-glib-devel +BuildRequires: libjpeg-devel +BuildRequires: libsigc++20-devel +BuildRequires: libsoup-devel +BuildRequires: gspell-devel +BuildRequires: make + +Requires: python3 +Requires: python3-lxml +Requires: python3-numpy +Requires: python3-scour +Requires: python3-appdirs +Requires: python3-cssselect +Requires: python3-pillow +# Weak dependencies for the LaTeX plugin +Suggests: pstoedit +Suggests: tex(latex) +Suggests: tex(dvips) +Suggests: texlive-amsmath +Suggests: texlive-amsfonts + +%description +Inkscape is a vector graphics editor, with capabilities similar to +Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector +Graphics (SVG) file format. It is therefore a very useful tool for web +designers and as an interchange format for desktop publishing. + +Inkscape supports many advanced SVG features (markers, clones, alpha +blending, etc.) and great care is taken in designing a streamlined +interface. It is very easy to edit nodes, perform complex path operations, +trace bitmaps and much more. + + +%package view +Summary: Viewing program for SVG files + +%description view +Viewer for files in W3C standard Scalable Vector Graphics (SVG) file +format. + + +%package doc +Summary: Documentation for Inkscape +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +Tutorial and examples for Inkscape, a graphics editor for vector +graphics in W3C standard Scalable Vector Graphics (SVG) file format. + + +%prep +%autosetup -n inkscape-1.2.2_2022-12-01_b0a8486541 -p1 +%py3_shebang_fix . +find . -name CMakeLists.txt | xargs sed -i 's|COMMAND python |COMMAND %{__python3} |g' + +#strip invalid tag +sed -i /url/d org.inkscape.Inkscape.appdata.xml.in + +# https://bugs.launchpad.net/inkscape/+bug/314381 +# A couple of files have executable bits set, +# despite not being executable +find . -name '*.cpp' | xargs chmod -x +find . -name '*.h' | xargs chmod -x + +# Fix end of line encodings +dos2unix -k -q share/extensions/*.py + +%build +%cmake3 \ + -DWITH_GRAPHICS_MAGICK=%{?with_graphicsmagick:ON}%{!?with_graphicsmagick:OFF} \ + -DWITH_IMAGE_MAGICK=%{?with_imagemagick:ON}%{!?with_imagemagick:OFF} \ + -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \ + -DBUILD_SHARED_LIBS:BOOL=OFF +%cmake_build + + +%install +%cmake_install + +# No skencil anymore +rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/extensions/sk2svg.sh + +# Don't install development files for bundled libraries +rm -r $RPM_BUILD_ROOT%{_includedir}/2geom-1.2.2/ +rm -r $RPM_BUILD_ROOT%{_libdir}/cmake/2Geom +rm $RPM_BUILD_ROOT%{_libdir}/pkgconfig/2geom.pc + +%find_lang %{name} --with-man + +rm -rf $RPM_BUILD_ROOT%{_datadir}/inkscape/doc +rm -f $RPM_BUILD_ROOT%{_datadir}/doc/inkscape/copyright +rm -f $RPM_BUILD_ROOT%{_libdir}/lib2geom.a +%generate_compatibility_deps + +%check +# Validate appdata file +appstream-util validate-relax --nonet $RPM_BUILD_ROOT%{_datadir}/metainfo/*.appdata.xml + +# Validate desktop file +desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.inkscape.Inkscape.desktop + + +%files -f %{name}.lang +%license COPYING +%{_bindir}/inkscape +%dir %{_datadir}/inkscape +%{_datadir}/inkscape/attributes +%{_datadir}/inkscape/branding +%{_datadir}/inkscape/extensions +%{_datadir}/inkscape/filters +%{_datadir}/inkscape/fonts +%{_datadir}/inkscape/icons +%{_datadir}/inkscape/keys +%{_datadir}/inkscape/markers +%{_datadir}/inkscape/palettes +%{_datadir}/inkscape/paint +%{_datadir}/inkscape/pixmaps +%{_datadir}/inkscape/screens +%{_datadir}/inkscape/symbols +%{_datadir}/inkscape/templates +%{_datadir}/inkscape/ui +%{_datadir}/metainfo/org.inkscape.Inkscape.appdata.xml +%{_datadir}/applications/org.inkscape.Inkscape.desktop +%{_mandir}/man1/*.1* +%exclude %{_mandir}/man1/inkview.1* +%{_datadir}/inkscape/tutorials +%{_datadir}/inkscape/themes +%{_datadir}/icons/hicolor/*/apps/*.png +%{_datadir}/icons/hicolor/*/apps/*.svg +%{_datadir}/bash-completion/completions/inkscape +%dir %{abidir} +%{abidir}/inkscape-option.list + +%files view +%{_bindir}/inkview +%{_mandir}/man1/inkview.1* +%{_mandir}/*/man1/inkview.1* + + +%files doc +%doc AUTHORS NEWS.md README.md +%dir %{_datadir}/inkscape +%{_datadir}/inkscape/examples + + +%changelog +* Sat Mar 25 2023 happy_orange - 1.2.2-1 +- init package from upstream