diff --git a/0001-fix-compile-error.patch b/0001-fix-compile-error.patch new file mode 100644 index 0000000..ae02d7a --- /dev/null +++ b/0001-fix-compile-error.patch @@ -0,0 +1,30 @@ +From 24be77843e52326205e206c8fd66324d0deb5cb5 Mon Sep 17 00:00:00 2001 +From: root +Date: Tue, 20 Jun 2023 12:10:31 +0800 +Subject: [PATCH] fix compile error + +--- + src/gui/gui-preview.c | 7 ------- + 1 file changed, 7 deletions(-) + +diff --git a/src/gui/gui-preview.c b/src/gui/gui-preview.c +index e4d3ac6..bdd5ca5 100644 +--- a/src/gui/gui-preview.c ++++ b/src/gui/gui-preview.c +@@ -56,13 +56,6 @@ + # include "config.h" + #endif + +-// compatibility fixes for libsynctex (>=1.16 && <=2.00): +-#ifdef USE_SYNCTEX1 +- typedef synctex_scanner_t synctex_scanner_p; +- typedef synctex_node_t synctex_node_p; +- #define synctex_display_query(scanner, file, line, column, page) synctex_display_query(scanner, file, line, column) +- #define synctex_scanner_next_result(scanner) synctex_next_result(scanner) +-#endif + + #define page_inner(pc,i) (((pc)->pages + (i))->inner) + #define page_outer(pc,i) (((pc)->pages + (i))->outer) +-- +2.33.0 + diff --git a/0001-fix-the-synctex-path-error.patch b/0001-fix-the-synctex-path-error.patch new file mode 100644 index 0000000..d184ea8 --- /dev/null +++ b/0001-fix-the-synctex-path-error.patch @@ -0,0 +1,33 @@ +From da40eed219ad53bcbf1a2de351bf38e507f67717 Mon Sep 17 00:00:00 2001 +From: root +Date: Sun, 25 Jun 2023 16:10:11 +0800 +Subject: [PATCH] fix the synctex path error + +--- + configure.ac | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 10ec0f3..2ba0b23 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -54,10 +54,12 @@ PKG_CHECK_MODULES(gtkspell3, [gtkspell3-3.0],, + GUI_CFLAGS="$GUI_CFLAGS $gtkspell3_CFLAGS" + GUI_LIBS="$GUI_LIBS $gtkspell3_LIBS" + +-PKG_CHECK_MODULES(synctex, [synctex >= 1.16],, +- [AC_MSG_ERROR([You need synctex to build $PACKAGE])]) +-GUI_CFLAGS="$GUI_CFLAGS $synctex_CFLAGS" +-GUI_LIBS="$GUI_LIBS $synctex_LIBS" ++AC_ARG_WITH([synctex-libs], ++ [AS_HELP_STRING([--with-synctex-libs],[synctex libs directory])], ++ [GUI_LIBS="$GUI_LIBS -$withval"]) ++AC_ARG_WITH([synctex-cflags], ++ [AS_HELP_STRING([--with-synctex-cflags],[synctex cflags directory])], ++ [GUI_CFLAGS="$GUI_CFLAGS -I$withval"]) + + # Set USE_SYNCTEX1 for synctex (< 2.00) compatibility + if $PKG_CONFIG --max-version 1.99 synctex; then +-- +2.33.0 + diff --git a/gummi-0.8.3.tar.gz b/gummi-0.8.3.tar.gz new file mode 100644 index 0000000..2e4b63a Binary files /dev/null and b/gummi-0.8.3.tar.gz differ diff --git a/gummi.spec b/gummi.spec new file mode 100644 index 0000000..805cc74 --- /dev/null +++ b/gummi.spec @@ -0,0 +1,55 @@ +Name: gummi +Version: 0.8.3 +Release: 1 +Summary: A LaTeX editor for the Linux platform in C/GTK+ +Group: Publishing +License: MIT +URL: https://github.com/alexandervdm/gummi +Source0: https://github.com/alexandervdm/gummi/releases/download/%{version}/%{name}-%{version}.tar.gz +Patch0: 0001-fix-compile-error.patch +Patch1: 0001-fix-the-synctex-path-error.patch + +BuildRequires: intltool +BuildRequires: pkgconfig(glib-2.0) +BuildRequires: pkgconfig(gthread-2.0) +BuildRequires: pkgconfig(gtksourceview-4) +BuildRequires: pkgconfig(gtkspell3-3.0) +BuildRequires: pkgconfig(gtk+-3.0) +BuildRequires: pkgconfig(poppler-glib) +BuildRequires: pkgconfig(synctex) + +%description +Gummi is a LaTeX editor for the Linux platform, written in C/GTK+. It was +designed with simplicity in mind, but hopes to appeal to both novice and more +advanced LaTeX writers. Gummi was released as free opensource software under +the MIT license. + +%prep +%autosetup -p1 + +# switch to gtksourceview4 +perl -pi -e 's/gtksourceview-3.0/gtksourceview-4/g' configure.ac +perl -pi -e 's/gtksourceview3/gtksourceview4/g' configure.ac + +%build +autoreconf -fi +%configure --with-synctex-libs=lsynctex --with-synctex-cflags=/usr/include/synctex +%make_build + +%install +%make_install + +%find_lang %{name} + +%files -f %{name}.lang +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/%{name}/ +%{_datadir}/pixmaps/%{name}.png +%{_libdir}/%{name}/ +%{_mandir}/man1/%{name}.1* + + +%changelog +* Mon Jun 05 2023 wangtaozhi - 0.8.3-1 +- Package init diff --git a/gummi.yaml b/gummi.yaml new file mode 100644 index 0000000..f0c3c0d --- /dev/null +++ b/gummi.yaml @@ -0,0 +1,5 @@ +version_control: github +src_repo: https://github.com/alexandervdm/gummi/ +tag_prefix: "v" +separator: "." +